diff options
author | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
---|---|---|
committer | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
commit | 4a52a71956a8d46fcb7294ac71734504bb09bcc2 (patch) | |
tree | ee3dc5af3b6313e921cd920906356f5d4febc4ed /.venv/lib/python3.12/site-packages/litellm/proxy | |
parent | cc961e04ba734dd72309fb548a2f97d67d578813 (diff) | |
download | gn-ai-master.tar.gz |
Diffstat (limited to '.venv/lib/python3.12/site-packages/litellm/proxy')
186 files changed, 51422 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/.gitignore b/.venv/lib/python3.12/site-packages/litellm/proxy/.gitignore new file mode 100644 index 00000000..caa4783d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/.gitignore @@ -0,0 +1,2 @@ +.env +secrets.toml
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/README.md b/.venv/lib/python3.12/site-packages/litellm/proxy/README.md new file mode 100644 index 00000000..6c0d3f98 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/README.md @@ -0,0 +1,44 @@ +# litellm-proxy + +A local, fast, and lightweight **OpenAI-compatible server** to call 100+ LLM APIs. + +## usage + +```shell +$ pip install litellm +``` +```shell +$ litellm --model ollama/codellama + +#INFO: Ollama running on http://0.0.0.0:8000 +``` + +## replace openai base +```python +import openai # openai v1.0.0+ +client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:8000") # set proxy to base_url +# request sent to model set on litellm proxy, `litellm --model` +response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ + { + "role": "user", + "content": "this is a test request, write a short poem" + } +]) + +print(response) +``` + +[**See how to call Huggingface,Bedrock,TogetherAI,Anthropic, etc.**](https://docs.litellm.ai/docs/simple_proxy) + + +--- + +### Folder Structure + +**Routes** +- `proxy_server.py` - all openai-compatible routes - `/v1/chat/completion`, `/v1/embedding` + model info routes - `/v1/models`, `/v1/model/info`, `/v1/model_group_info` routes. +- `health_endpoints/` - `/health`, `/health/liveliness`, `/health/readiness` +- `management_endpoints/key_management_endpoints.py` - all `/key/*` routes +- `management_endpoints/team_endpoints.py` - all `/team/*` routes +- `management_endpoints/internal_user_endpoints.py` - all `/user/*` routes +- `management_endpoints/ui_sso.py` - all `/sso/*` routes
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/__init__.py b/.venv/lib/python3.12/site-packages/litellm/proxy/__init__.py new file mode 100644 index 00000000..b6e690fd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/__init__.py @@ -0,0 +1 @@ +from . import * diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/9yIyUkG6nV2cO0gn7kJ-Q/_buildManifest.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/9yIyUkG6nV2cO0gn7kJ-Q/_buildManifest.js new file mode 100644 index 00000000..96ded068 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/9yIyUkG6nV2cO0gn7kJ-Q/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-28b803cb2479b966.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/9yIyUkG6nV2cO0gn7kJ-Q/_ssgManifest.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/9yIyUkG6nV2cO0gn7kJ-Q/_ssgManifest.js new file mode 100644 index 00000000..5b3ff592 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/9yIyUkG6nV2cO0gn7kJ-Q/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/117-883150efc583d711.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/117-883150efc583d711.js new file mode 100644 index 00000000..afb2644d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/117-883150efc583d711.js @@ -0,0 +1,2 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[117],{65157:function(e,t){"use strict";function n(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return n}})},91572:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let r=n(68498),o=n(33068);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,r.addPathPrefix)(e,"/ui"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75266:function(e,t){"use strict";function n(e){var t,n;t=self.__next_s,n=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[n,r]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(r)for(let e in r)"children"!==e&&o.setAttribute(e,r[e]);n?(o.src=n,o.onload=()=>e(),o.onerror=t):r&&(o.innerHTML=r.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{n()}):n()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return n}}),window.next={version:"14.2.21",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83079:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let r=n(12846);async function o(e,t){let n=(0,r.getServerActionDispatcher)();if(!n)throw Error("Invariant: missing action dispatcher.");return new Promise((r,o)=>{n({actionId:e,actionArgs:t,resolve:r,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92304:function(e,t,n){"use strict";let r,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return x}});let u=n(47043),l=n(53099),a=n(57437);n(91572);let i=u._(n(34040)),c=l._(n(2265)),s=n(6671),f=n(48701),d=u._(n(61404)),p=n(83079),h=n(89721),y=n(2103);n(70647);let _=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,h.isNextRouterError)(t[0])||_.apply(window.console,t)},window.addEventListener("error",e=>{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=new TextEncoder,g=!1,m=!1,R=null;function P(e){if(0===e[0])r=[];else if(1===e[0]){if(!r)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(b.encode(e[1])):r.push(e[1])}else 2===e[0]&&(R=e[1])}let j=function(){o&&!m&&(o.close(),m=!0,r=void 0),g=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",j,!1):j();let O=self.__next_f=self.__next_f||[];O.forEach(P),O.push=P;let S=new ReadableStream({start(e){r&&(r.forEach(t=>{e.enqueue(b.encode(t))}),g&&!m&&(e.close(),m=!0,r=void 0)),o=e}}),E=(0,s.createFromReadableStream)(S,{callServer:p.callServer});function w(){return(0,c.use)(E)}let T=c.default.StrictMode;function M(e){let{children:t}=e;return t}function x(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(T,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(M,{children:(0,a.jsx)(w,{})})})})}),n=window.__next_root_layout_missing_tags,r=!!(null==n?void 0:n.length),o={onRecoverableError:d.default};"__next_error__"===document.documentElement.id||r?i.default.createRoot(v,o).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...o,formState:R}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19506),(0,n(75266).appBootstrap)(()=>{let{hydrate:e}=n(92304);n(12846),n(4707),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(65157);{let e=n.u;n.u=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return encodeURI(e(...n))}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},90295:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});let r=n(47149);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6495:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AppRouterAnnouncer",{enumerable:!0,get:function(){return l}});let r=n(2265),o=n(54887),u="next-route-announcer";function l(e){let{tree:t}=e,[n,l]=(0,r.useState)(null);(0,r.useEffect)(()=>(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,r.useState)(""),c=(0,r.useRef)();return(0,r.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),n?(0,o.createPortal)(a,n):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6866:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION:function(){return r},FLIGHT_PARAMETERS:function(){return i},NEXT_DID_POSTPONE_HEADER:function(){return s},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_RSC_UNION_QUERY:function(){return c},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_HEADER:function(){return n}});let n="RSC",r="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=[[n],[o],[u]],c="_rsc",s="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12846:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createEmptyCacheNode:function(){return C},default:function(){return I},getServerActionDispatcher:function(){return E},urlToUrlWithoutFlightMarker:function(){return T}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956),a=n(24673),i=n(33456),c=n(79060),s=n(47744),f=n(61060),d=n(82952),p=n(86146),h=n(1634),y=n(6495),_=n(4123),v=n(39320),b=n(38137),g=n(6866),m=n(35076),R=n(11283),P=n(84541),j="undefined"==typeof window,O=j?null:new Map,S=null;function E(){return S}let w={};function T(e){let t=new URL(e,location.origin);if(t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,n=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-n)}return t}function M(e){return e.origin!==window.location.origin}function x(e){let{appRouterState:t,sync:n}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:r,canonicalUrl:o}=t,u={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(r.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),n(t)},[t,n]),null}function C(){return{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null}}function A(e){null==e&&(e={});let t=window.history.state,n=null==t?void 0:t.__NA;n&&(e.__NA=n);let r=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return r&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=r),e}function N(e){let{headCacheNode:t}=e,n=null!==t?t.head:null,r=null!==t?t.prefetchHead:null,o=null!==r?r:n;return(0,u.useDeferredValue)(n,o)}function D(e){let t,{buildId:n,initialHead:r,initialTree:i,urlParts:f,initialSeedData:g,couldBeIntercepted:E,assetPrefix:T,missingSlots:C}=e,D=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:n,initialSeedData:g,urlParts:f,initialTree:i,initialParallelRoutes:O,location:j?null:window.location,initialHead:r,couldBeIntercepted:E}),[n,g,f,i,r,E]),[I,U,k]=(0,s.useReducerWithReduxDevtools)(D);(0,u.useEffect)(()=>{O=null},[]);let{canonicalUrl:F}=(0,s.useUnwrapState)(I),{searchParams:L,pathname:H}=(0,u.useMemo)(()=>{let e=new URL(F,"undefined"==typeof window?"http://n":window.location.href);return{searchParams:e.searchParams,pathname:(0,R.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[F]),$=(0,u.useCallback)(e=>{let{previousTree:t,serverResponse:n}=e;(0,u.startTransition)(()=>{U({type:a.ACTION_SERVER_PATCH,previousTree:t,serverResponse:n})})},[U]),G=(0,u.useCallback)((e,t,n)=>{let r=new URL((0,h.addBasePath)(e),location.href);return U({type:a.ACTION_NAVIGATE,url:r,isExternalUrl:M(r),locationSearch:location.search,shouldScroll:null==n||n,navigateType:t})},[U]);S=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{U({...e,type:a.ACTION_SERVER_ACTION})})},[U]);let z=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let n;if(!(0,p.isBot)(window.navigator.userAgent)){try{n=new URL((0,h.addBasePath)(e),window.location.href)}catch(t){throw Error("Cannot prefetch '"+e+"' because it cannot be converted to a URL.")}M(n)||(0,u.startTransition)(()=>{var e;U({type:a.ACTION_PREFETCH,url:n,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})}},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;G(e,"replace",null==(n=t.scroll)||n)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;G(e,"push",null==(n=t.scroll)||n)})},refresh:()=>{(0,u.startTransition)(()=>{U({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[U,G]);(0,u.useEffect)(()=>{window.next&&(window.next.router=z)},[z]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(w.pendingMpaPath=void 0,U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[U]);let{pushRef:B}=(0,s.useUnwrapState)(I);if(B.mpaNavigation){if(w.pendingMpaPath!==F){let e=window.location;B.pendingPush?e.assign(F):e.replace(F),w.pendingMpaPath=F}(0,u.use)(b.unresolvedThenable)}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),n=e=>{var t;let n=window.location.href,r=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(null!=e?e:n,n),tree:r})})};window.history.pushState=function(t,r,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=A(t),o&&n(o)),e(t,r,o)},window.history.replaceState=function(e,r,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=A(e),o&&n(o)),t(e,r,o)};let r=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",r),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",r)}},[U]);let{cache:W,tree:K,nextUrl:V,focusAndScrollRef:Y}=(0,s.useUnwrapState)(I),X=(0,u.useMemo)(()=>(0,v.findHeadInCache)(W,K[1]),[W,K]),q=(0,u.useMemo)(()=>(function e(t,n){for(let r of(void 0===n&&(n={}),Object.values(t[1]))){let t=r[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(P.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?n[t[0]]=t[1].split("/"):o&&(n[t[0]]=t[1]),n=e(r,n))}return n})(K),[K]);if(null!==X){let[e,n]=X;t=(0,o.jsx)(N,{headCacheNode:e},n)}else t=null;let J=(0,o.jsxs)(_.RedirectBoundary,{children:[t,W.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:K})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{appRouterState:(0,s.useUnwrapState)(I),sync:k}),(0,o.jsx)(c.PathParamsContext.Provider,{value:q,children:(0,o.jsx)(c.PathnameContext.Provider,{value:H,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:L,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:n,changeByServerResponse:$,tree:K,focusAndScrollRef:Y,nextUrl:V},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:z,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:W.parallelRoutes,tree:K,url:F,loading:W.loading},children:J})})})})})})]})}function I(e){let{globalErrorComponent:t,...n}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(D,{...n})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return u}});let r=n(18993),o=n(51845);function u(e){let t=o.staticGenerationAsyncStorage.getStore();if((null==t||!t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new r.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientPageRoot",{enumerable:!0,get:function(){return u}});let r=n(57437),o=n(54535);function u(e){let{Component:t,props:n}=e;return n.searchParams=(0,o.createDynamicallyTrackedSearchParams)(n.searchParams||{}),(0,r.jsx)(t,{...n})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ErrorBoundary:function(){return h},ErrorBoundaryHandler:function(){return f},GlobalError:function(){return d},default:function(){return p}});let r=n(47043),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(89721),i=n(51845),c={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function s(e){let{error:t}=e,n=i.staticGenerationAsyncStorage.getStore();if((null==n?void 0:n.isRevalidate)||(null==n?void 0:n.isStaticGeneration))throw console.error(t),t;return null}class f extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function d(e){let{error:t}=e,n=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(s,{error:t}),(0,o.jsx)("div",{style:c.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:c.text,children:"Application error: a "+(n?"server":"client")+"-side exception has occurred (see the "+(n?"server logs":"browser console")+" for more information)."}),n?(0,o.jsx)("p",{style:c.text,children:"Digest: "+n}):null]})})]})]})}let p=d;function h(e){let{errorComponent:t,errorStyles:n,errorScripts:r,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(f,{pathname:a,errorComponent:t,errorStyles:n,errorScripts:r,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},46177:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DynamicServerError:function(){return r},isDynamicServerError:function(){return o}});let n="DYNAMIC_SERVER_USAGE";class r extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},89721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let r=n(98200),o=n(88968);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,r.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});let r=n(47043),o=n(53099),u=n(57437),l=o._(n(2265)),a=r._(n(54887)),i=n(61956),c=n(44848),s=n(38137),f=n(61060),d=n(76015),p=n(7092),h=n(4123),y=n(80),_=n(73171),v=n(78505),b=n(28077),g=["bottom","height","left","right","top","width","x","y"];function m(e,t){let n=e.getBoundingClientRect();return n.top>=0&&n.top<=t}class R extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var n;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,n)=>(0,d.matchSegment)(t,e[n]))))return;let r=null,o=e.hashFragment;if(o&&(r="top"===o?document.body:null!=(n=document.getElementById(o))?n:document.getElementsByName(o)[0]),r||(r="undefined"==typeof window?null:a.default.findDOMNode(this)),!(r instanceof Element))return;for(;!(r instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return g.every(e=>0===t[e])}(r);){if(null===r.nextElementSibling)return;r=r.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){r.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!m(r,t)&&(e.scrollTop=0,m(r,t)||r.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,r.focus()}}}}function P(e){let{segmentPath:t,children:n}=e,r=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(R,{segmentPath:t,focusAndScrollRef:r.focusAndScrollRef,children:n})}function j(e){let{parallelRouterKey:t,url:n,childNodes:r,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=r.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};v=e,r.set(f,e)}let g=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,m=(0,l.useDeferredValue)(v.rsc,g),R="object"==typeof m&&null!==m&&"function"==typeof m.then?(0,l.use)(m):m;if(!R){let e=v.lazyData;if(null===e){let t=function e(t,n){if(t){let[r,o]=t,u=2===t.length;if((0,d.matchSegment)(n[0],r)&&n[1].hasOwnProperty(o)){if(u){let t=e(void 0,n[1][o]);return[n[0],{...n[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[n[0],{...n[1],[o]:e(t.slice(2),n[1][o])}]}}return n}(["",...o],_),r=(0,b.hasInterceptionRouteInCurrentTree)(_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(n,location.origin),t,r?p.nextUrl:null,h),v.lazyDataResolved=!1}let t=(0,l.use)(e);v.lazyDataResolved||(setTimeout(()=>{(0,l.startTransition)(()=>{y({previousTree:_,serverResponse:t})})}),v.lazyDataResolved=!0),(0,l.use)(s.unresolvedThenable)}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:n,loading:v.loading},children:R})}function O(e){let{children:t,hasLoading:n,loading:r,loadingStyles:o,loadingScripts:a}=e;return n?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[o,a,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function S(e){let{parallelRouterKey:t,segmentPath:n,error:r,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,template:d,notFound:p,notFoundStyles:b}=e,g=(0,l.useContext)(i.LayoutRouterContext);if(!g)throw Error("invariant expected layout router to be mounted");let{childNodes:m,tree:R,url:S,loading:E}=g,w=m.get(t);w||(w=new Map,m.set(t,w));let T=R[1][t][0],M=(0,_.getSegmentValue)(T),x=[T];return(0,u.jsx)(u.Fragment,{children:x.map(e=>{let l=(0,_.getSegmentValue)(e),g=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:n,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:r,errorStyles:o,errorScripts:a,children:(0,u.jsx)(O,{hasLoading:!!E,loading:null==E?void 0:E[0],loadingStyles:null==E?void 0:E[1],loadingScripts:null==E?void 0:E[2],children:(0,u.jsx)(y.NotFoundBoundary,{notFound:p,notFoundStyles:b,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:S,tree:R,childNodes:w,segmentPath:n,cacheKey:g,isActive:M===l})})})})})}),children:[c,s,d]},(0,v.createRouterCacheKey)(e,!0))})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{canSegmentBeOverridden:function(){return u},matchSegment:function(){return o}});let r=n(87417),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var n;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(n=(0,r.getSegmentParam)(e))?void 0:n.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return i.notFound},permanentRedirect:function(){return i.permanentRedirect},redirect:function(){return i.redirect},useParams:function(){return p},usePathname:function(){return f},useRouter:function(){return d},useSearchParams:function(){return s},useSelectedLayoutSegment:function(){return y},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let r=n(2265),o=n(61956),u=n(79060),l=n(73171),a=n(84541),i=n(52646),c=n(55501);function s(){let e=(0,r.useContext)(u.SearchParamsContext),t=(0,r.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e]);if("undefined"==typeof window){let{bailoutToClientRendering:e}=n(96149);e("useSearchParams()")}return t}function f(){return(0,r.useContext)(u.PathnameContext)}function d(){let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function p(){return(0,r.useContext)(u.PathParamsContext)}function h(e){void 0===e&&(e="children");let t=(0,r.useContext)(o.LayoutRouterContext);return t?function e(t,n,r,o){let u;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)u=t[1][n];else{var i;let e=t[1];u=null!=(i=e.children)?i:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,l.getSegmentValue)(c);return!s||s.startsWith(a.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,n,!1,o))}(t.tree,e):null}function y(e){void 0===e&&(e="children");let t=h(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l},RedirectType:function(){return r.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(88968),o=n(98200);class u extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class l extends URLSearchParams{append(){throw new u}delete(){throw new u}set(){throw new u}sort(){throw new u}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(98200);n(31765);let i=n(61956);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:n,asNotFound:r,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:n,asNotFound:r,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98200:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return o},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let r=n(2522),o=n(90675);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,n;let o=new Promise((e,r)=>{t=e,n=r}),u=async()=>{try{r._(this,l)[l]++;let n=await e();t(n)}catch(e){n(e)}finally{r._(this,l)[l]--,r._(this,i)[i]()}};return r._(this,a)[a].push({promiseFn:o,task:u}),r._(this,i)[i](),o}bump(e){let t=r._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=r._(this,a)[a].splice(t,1)[0];r._(this,a)[a].unshift(e),r._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),r._(this,u)[u]=e,r._(this,l)[l]=0,r._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(r._(this,l)[l]<r._(this,u)[u]||e)&&r._(this,a)[a].length>0){var t;null==(t=r._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectBoundary:function(){return s},RedirectErrorBoundary:function(){return c}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(88968);function i(e){let{redirect:t,reset:n,redirectType:r}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{r===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),n()})},[t,r,n,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,n=(0,l.useRouter)();return(0,o.jsx)(c,{router:n,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5001:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},88968:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return y},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return d},permanentRedirect:function(){return f},redirect:function(){return s}});let u=n(20544),l=n(90295),a=n(5001),i="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(i);r.digest=i+";"+t+";"+e+";"+n+";";let o=u.requestAsyncStorage.getStore();return o&&(r.mutableCookies=o.mutableCookies),r}function s(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(25575);function o(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},22356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let r=n(27420),o=n(92576);function u(e,t,n,u){let[l,a,i]=n.slice(-3);if(null===a)return!1;if(3===n.length){let n=a[2],o=a[3];t.loading=o,t.rsc=n,t.prefetchRsc=null,(0,r.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),t.loading=e.loading,(0,o.fillCacheWithNewSubTreeData)(t,e,n,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,n,r,a){let i;let[c,s,f,d,p]=n;if(1===t.length){let e=l(n,r,t);return(0,u.addRefreshMarkerToActiveParallelSegments)(e,a),e}let[h,y]=t;if(!(0,o.matchSegment)(h,c))return null;if(2===t.length)i=l(s[y],r,t);else if(null===(i=e(t.slice(2),s[y],r,a)))return null;let _=[t[0],{...s,[y]:i},f,d];return p&&(_[4]=!0),(0,u.addRefreshMarkerToActiveParallelSegments)(_,a),_}}});let r=n(84541),o=n(76015),u=n(50232);function l(e,t,n){let[u,a]=e,[i,c]=t;if(i===r.DEFAULT_SEGMENT_KEY&&u!==r.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(u,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=l(a[e],c[e],n):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let r=[u,t];return e[2]&&(r[2]=e[2]),e[3]&&(r[3]=e[3]),e[4]&&(r[4]=e[4]),r}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clearCacheNodeDataForSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l),s=t.parallelRoutes.get(l);s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s));let f=null==c?void 0:c.get(i),d=s.get(i);if(u){d&&d.lazyData&&d!==f||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}if(!d||!f){d||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}return d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved,loading:d.loading},s.set(i,d)),e(d,f,o.slice(2))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{computeChangedPath:function(){return s},extractPathFromFlightRouterState:function(){return c}});let r=n(91182),o=n(84541),u=n(76015),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?"children"===e?"":e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let n=Array.isArray(e[0])?e[0][1]:e[0];if(n===o.DEFAULT_SEGMENT_KEY||r.INTERCEPTION_ROUTE_MARKERS.some(e=>n.startsWith(e)))return;if(n.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[a(n)],l=null!=(t=e[1])?t:{},s=l.children?c(l.children):void 0;if(void 0!==s)u.push(s);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let n=c(t);void 0!==n&&u.push(n)}return i(u)}function s(e,t){let n=function e(t,n){let[o,l]=t,[i,s]=n,f=a(o),d=a(i);if(r.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(n))?p:""}for(let t in l)if(s[t]){let n=e(l[t],s[t]);if(null!==n)return a(i)+"/"+n}return null}(e,t);return null==n||"/"===n?n:i(n.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33456:function(e,t){"use strict";function n(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return c}});let r=n(33456),o=n(27420),u=n(5410),l=n(60305),a=n(24673),i=n(50232);function c(e){var t;let{buildId:n,initialTree:c,initialSeedData:s,urlParts:f,initialParallelRoutes:d,location:p,initialHead:h,couldBeIntercepted:y}=e,_=f.join("/"),v=!p,b={lazyData:null,rsc:s[2],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:v?new Map:d,lazyDataResolved:!1,loading:s[3]},g=p?(0,r.createHrefFromUrl)(p):_;(0,i.addRefreshMarkerToActiveParallelSegments)(c,g);let m=new Map;(null===d||0===d.size)&&(0,o.fillLazyItemsTillLeafWithHead)(b,void 0,c,s,h);let R={buildId:n,tree:c,cache:b,prefetchCache:m,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:g,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(c)||(null==p?void 0:p.pathname))?t:null};if(p){let e=new URL(""+p.pathname+p.search,p.origin),t=[["",c,null,null]];(0,l.createPrefetchCacheEntryForInitialLoad)({url:e,kind:a.PrefetchKind.AUTO,data:[t,void 0,!1,y],tree:R.tree,prefetchCache:R.prefetchCache,nextUrl:R.nextUrl})}return R}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},78505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let r=n(84541);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith(r.PAGE_SEGMENT_KEY)?r.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return s}});let r=n(6866),o=n(12846),u=n(83079),l=n(24673),a=n(37207),{createFromFetch:i}=n(6671);function c(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0,!1,!1]}async function s(e,t,n,s,f){let d={[r.RSC_HEADER]:"1",[r.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};f===l.PrefetchKind.AUTO&&(d[r.NEXT_ROUTER_PREFETCH_HEADER]="1"),n&&(d[r.NEXT_URL]=n);let p=(0,a.hexHash)([d[r.NEXT_ROUTER_PREFETCH_HEADER]||"0",d[r.NEXT_ROUTER_STATE_TREE],d[r.NEXT_URL]].join(","));try{var h;let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(r.NEXT_RSC_UNION_QUERY,p);let n=await fetch(t,{credentials:"same-origin",headers:d}),l=(0,o.urlToUrlWithoutFlightMarker)(n.url),a=n.redirected?l:void 0,f=n.headers.get("content-type")||"",y=!!n.headers.get(r.NEXT_DID_POSTPONE_HEADER),_=!!(null==(h=n.headers.get("vary"))?void 0:h.includes(r.NEXT_URL)),v=f===r.RSC_CONTENT_TYPE_HEADER;if(v||(v=f.startsWith("text/plain")),!v||!n.ok)return e.hash&&(l.hash=e.hash),c(l.toString());let[b,g]=await i(Promise.resolve(n),{callServer:u.callServer});if(s!==b)return c(n.url);return[g,a,y,_]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0,!1,!1]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,n,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=n.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,head:null,prefetchHead:null,loading:e[3],parallelRoutes:h?new Map(h.parallelRoutes):new Map,lazyDataResolved:!1},h&&(0,r.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,head:y.head,prefetchHead:y.prefetchHead,parallelRoutes:new Map(y.parallelRoutes),lazyDataResolved:!1,loading:y.loading},p.set(f,y)),e(y,h,l.slice(2),a))}}});let r=n(94377),o=n(27420),u=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,n,u,l,a,i){if(0===Object.keys(u[1]).length){t.head=a;return}for(let c in u[1]){let s;let f=u[1][c],d=f[0],p=(0,r.createRouterCacheKey)(d),h=null!==l&&void 0!==l[1][c]?l[1][c]:null;if(n){let r=n.parallelRoutes.get(c);if(r){let n;let u=(null==i?void 0:i.kind)==="auto"&&i.status===o.PrefetchCacheEntryStatus.reusable,l=new Map(r),s=l.get(p);n=null!==h?{lazyData:null,rsc:h[2],prefetchRsc:null,head:null,prefetchHead:null,loading:h[3],parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1}:u&&s?{lazyData:s.lazyData,rsc:s.rsc,prefetchRsc:s.prefetchRsc,head:s.head,prefetchHead:s.prefetchHead,parallelRoutes:new Map(s.parallelRoutes),lazyDataResolved:s.lazyDataResolved,loading:s.loading}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1,loading:null},l.set(p,n),e(n,s,f,h||null,a,i),t.parallelRoutes.set(c,l);continue}}if(null!==h){let e=h[2],t=h[3];s={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:t}}else s={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};let y=t.parallelRoutes.get(c);y?y.set(p,s):t.parallelRoutes.set(c,new Map([[p,s]])),e(s,void 0,f,h,a,i)}}}});let r=n(78505),o=n(24673);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44510:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleMutable",{enumerable:!0,get:function(){return u}});let r=n(5410);function o(e){return void 0!==e}function u(e,t){var n,u,l;let a=null==(u=t.shouldScroll)||u,i=e.nextUrl;if(o(t.patchedTree)){let n=(0,r.computeChangedPath)(e.tree,t.patchedTree);n?i=n:i||(i=e.canonicalUrl)}return{buildId:e.buildId,canonicalUrl:o(t.canonicalUrl)?t.canonicalUrl===e.canonicalUrl?e.canonicalUrl:t.canonicalUrl:e.canonicalUrl,pushRef:{pendingPush:o(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:o(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:o(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!a&&(!!o(null==t?void 0:t.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:!!t.hashFragment&&e.canonicalUrl.split("#",1)[0]===(null==(n=t.canonicalUrl)?void 0:n.split("#",1)[0]),hashFragment:a?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:a?null!=(l=null==t?void 0:t.scrollableSegments)?l:e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,prefetchCache:t.prefetchCache?t.prefetchCache:e.prefetchCache,tree:o(t.patchedTree)?t.patchedTree:e.tree,nextUrl:i}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSegmentMismatch",{enumerable:!0,get:function(){return o}});let r=n(95967);function o(e,t,n){return(0,r.handleExternalUrl)(e,{},e.canonicalUrl,!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheBelowFlightSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l);if(!c)return;let s=t.parallelRoutes.get(l);if(s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s)),u){s.delete(i);return}let f=c.get(i),d=s.get(i);d&&f&&(d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved},s.set(i,d)),e(d,f,o.slice(2)))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},94377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheByRouterState",{enumerable:!0,get:function(){return o}});let r=n(78505);function o(e,t,n){for(let o in n[1]){let u=n[1][o][0],l=(0,r.createRouterCacheKey)(u),a=t.parallelRoutes.get(o);if(a){let t=new Map(a);t.delete(l),e.parallelRoutes.set(o,t)}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,n){let r=t[0],o=n[0];if(Array.isArray(r)&&Array.isArray(o)){if(r[0]!==o[0]||r[2]!==o[2])return!0}else if(r!==o)return!0;if(t[4])return!n[4];if(n[4])return!0;let u=Object.values(t[1])[0],l=Object.values(n[1])[0];return!u||!l||e(u,l)}}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{abortTask:function(){return c},listenForDynamicRequest:function(){return a},updateCacheNodeOnNavigation:function(){return function e(t,n,a,c,s){let f=n[1],d=a[1],p=c[1],h=t.parallelRoutes,y=new Map(h),_={},v=null;for(let t in d){let n;let a=d[t],c=f[t],b=h.get(t),g=p[t],m=a[0],R=(0,u.createRouterCacheKey)(m),P=void 0!==c?c[0]:void 0,j=void 0!==b?b.get(R):void 0;if(null!==(n=m===r.PAGE_SEGMENT_KEY?l(a,void 0!==g?g:null,s):m===r.DEFAULT_SEGMENT_KEY?void 0!==c?{route:c,node:null,children:null}:l(a,void 0!==g?g:null,s):void 0!==P&&(0,o.matchSegment)(m,P)&&void 0!==j&&void 0!==c?null!=g?e(j,c,a,g,s):function(e){let t=i(e,null,null);return{route:e,node:t,children:null}}(a):l(a,void 0!==g?g:null,s))){null===v&&(v=new Map),v.set(t,n);let e=n.node;if(null!==e){let n=new Map(b);n.set(R,e),y.set(t,n)}_[t]=n.route}else _[t]=a}if(null===v)return null;let b={lazyData:null,rsc:t.rsc,prefetchRsc:t.prefetchRsc,head:t.head,prefetchHead:t.prefetchHead,loading:t.loading,parallelRoutes:y,lazyDataResolved:!1};return{route:function(e,t){let n=[e[0],t];return 2 in e&&(n[2]=e[2]),3 in e&&(n[3]=e[3]),4 in e&&(n[4]=e[4]),n}(a,_),node:b,children:v}}},updateCacheNodeOnPopstateRestoration:function(){return function e(t,n){let r=n[1],o=t.parallelRoutes,l=new Map(o);for(let t in r){let n=r[t],a=n[0],i=(0,u.createRouterCacheKey)(a),c=o.get(t);if(void 0!==c){let r=c.get(i);if(void 0!==r){let o=e(r,n),u=new Map(c);u.set(i,o),l.set(t,u)}}}let a=t.rsc,i=d(a)&&"pending"===a.status;return{lazyData:null,rsc:a,head:t.head,prefetchHead:i?t.prefetchHead:null,prefetchRsc:i?t.prefetchRsc:null,loading:i?t.loading:null,parallelRoutes:l,lazyDataResolved:!1}}}});let r=n(84541),o=n(76015),u=n(78505);function l(e,t,n){let r=i(e,t,n);return{route:e,node:r,children:null}}function a(e,t){t.then(t=>{for(let n of t[0]){let t=n.slice(0,-3),r=n[n.length-3],l=n[n.length-2],a=n[n.length-1];"string"!=typeof t&&function(e,t,n,r,l){let a=e;for(let e=0;e<t.length;e+=2){let n=t[e],r=t[e+1],u=a.children;if(null!==u){let e=u.get(n);if(void 0!==e){let t=e.route[0];if((0,o.matchSegment)(r,t)){a=e;continue}}}return}!function e(t,n,r,l){let a=t.children,i=t.node;if(null===a){null!==i&&(function e(t,n,r,l,a){let i=n[1],c=r[1],f=l[1],p=t.parallelRoutes;for(let t in i){let n=i[t],r=c[t],l=f[t],d=p.get(t),h=n[0],y=(0,u.createRouterCacheKey)(h),_=void 0!==d?d.get(y):void 0;void 0!==_&&(void 0!==r&&(0,o.matchSegment)(h,r[0])&&null!=l?e(_,n,r,l,a):s(n,_,null))}let h=t.rsc,y=l[2];null===h?t.rsc=y:d(h)&&h.resolve(y);let _=t.head;d(_)&&_.resolve(a)}(i,t.route,n,r,l),t.node=null);return}let c=n[1],f=r[1];for(let t in n){let n=c[t],r=f[t],u=a.get(t);if(void 0!==u){let t=u.route[0];if((0,o.matchSegment)(n[0],t)&&null!=r)return e(u,n,r,l)}}}(a,n,r,l)}(e,t,r,l,a)}c(e,null)},t=>{c(e,t)})}function i(e,t,n){let r=e[1],o=null!==t?t[1]:null,l=new Map;for(let e in r){let t=r[e],a=null!==o?o[e]:null,c=t[0],s=(0,u.createRouterCacheKey)(c),f=i(t,void 0===a?null:a,n),d=new Map;d.set(s,f),l.set(e,d)}let a=0===l.size,c=null!==t?t[2]:null,s=null!==t?t[3]:null;return{lazyData:null,parallelRoutes:l,prefetchRsc:void 0!==c?c:null,prefetchHead:a?n:null,loading:void 0!==s?s:null,rsc:p(),head:a?p():null,lazyDataResolved:!1}}function c(e,t){let n=e.node;if(null===n)return;let r=e.children;if(null===r)s(e.route,n,t);else for(let e of r.values())c(e,t);e.node=null}function s(e,t,n){let r=e[1],o=t.parallelRoutes;for(let e in r){let t=r[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,n)}let l=t.rsc;d(l)&&(null===n?l.resolve(null):l.reject(n));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.status="pending",n.resolve=t=>{"pending"===n.status&&(n.status="fulfilled",n.value=t,e(t))},n.reject=e=>{"pending"===n.status&&(n.status="rejected",n.reason=e,t(e))},n.tag=f,n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},60305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createPrefetchCacheEntryForInitialLoad:function(){return c},getOrCreatePrefetchCacheEntry:function(){return i},prunePrefetchCache:function(){return f}});let r=n(33456),o=n(44848),u=n(24673),l=n(24819);function a(e,t){let n=(0,r.createHrefFromUrl)(e,!1);return t?t+"%"+n:n}function i(e){let t,{url:n,nextUrl:r,tree:o,buildId:l,prefetchCache:i,kind:c}=e,f=a(n,r),d=i.get(f);if(d)t=d;else{let e=a(n),r=i.get(e);r&&(t=r)}return t?(t.status=h(t),t.kind!==u.PrefetchKind.FULL&&c===u.PrefetchKind.FULL)?s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:null!=c?c:u.PrefetchKind.TEMPORARY}):(c&&t.kind===u.PrefetchKind.TEMPORARY&&(t.kind=c),t):s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:c||u.PrefetchKind.TEMPORARY})}function c(e){let{nextUrl:t,tree:n,prefetchCache:r,url:o,kind:l,data:i}=e,[,,,c]=i,s=c?a(o,t):a(o),f={treeAtTimeOfPrefetch:n,data:Promise.resolve(i),kind:l,prefetchTime:Date.now(),lastUsedTime:Date.now(),key:s,status:u.PrefetchCacheEntryStatus.fresh};return r.set(s,f),f}function s(e){let{url:t,kind:n,tree:r,nextUrl:i,buildId:c,prefetchCache:s}=e,f=a(t),d=l.prefetchQueue.enqueue(()=>(0,o.fetchServerResponse)(t,r,i,c,n).then(e=>{let[,,,n]=e;return n&&function(e){let{url:t,nextUrl:n,prefetchCache:r}=e,o=a(t),u=r.get(o);if(!u)return;let l=a(t,n);r.set(l,u),r.delete(o)}({url:t,nextUrl:i,prefetchCache:s}),e})),p={treeAtTimeOfPrefetch:r,data:d,kind:n,prefetchTime:Date.now(),lastUsedTime:null,key:f,status:u.PrefetchCacheEntryStatus.fresh};return s.set(f,p),p}function f(e){for(let[t,n]of e)h(n)===u.PrefetchCacheEntryStatus.expired&&e.delete(t)}let d=1e3*Number("30"),p=1e3*Number("300");function h(e){let{kind:t,prefetchTime:n,lastUsedTime:r}=e;return Date.now()<(null!=r?r:n)+d?r?u.PrefetchCacheEntryStatus.reusable:u.PrefetchCacheEntryStatus.fresh:"auto"===t&&Date.now()<n+p?u.PrefetchCacheEntryStatus.stale:"full"===t&&Date.now()<n+p?u.PrefetchCacheEntryStatus.reusable:u.PrefetchCacheEntryStatus.expired}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44529:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fastRefreshReducer",{enumerable:!0,get:function(){return r}}),n(44848),n(33456),n(81935),n(63237),n(95967),n(44510),n(22356),n(12846),n(77831),n(28077);let r=function(e,t){return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},39320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findHeadInCache",{enumerable:!0,get:function(){return o}});let r=n(78505);function o(e,t){return function e(t,n,o){if(0===Object.keys(n).length)return[t,o];for(let u in n){let[l,a]=n[u],i=t.parallelRoutes.get(u);if(!i)continue;let c=(0,r.createRouterCacheKey)(l),s=i.get(c);if(!s)continue;let f=e(s,a,o+"/"+c);if(f)return f}return null}(e,t,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},73171:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28077:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasInterceptionRouteInCurrentTree",{enumerable:!0,get:function(){return function e(t){let[n,o]=t;if(Array.isArray(n)&&("di"===n[2]||"ci"===n[2])||"string"==typeof n&&(0,r.isInterceptionRouteAppPath)(n))return!0;if(o){for(let t in o)if(e(o[t]))return!0}return!1}}});let r=n(91182);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95967:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{handleExternalUrl:function(){return _},navigateReducer:function(){return b}}),n(44848);let r=n(33456),o=n(77058),u=n(81935),l=n(53728),a=n(63237),i=n(24673),c=n(44510),s=n(22356),f=n(24819),d=n(12846),p=n(84541);n(56118);let h=n(60305),y=n(65556);function _(e,t,n,r){return t.mpaNavigation=!0,t.canonicalUrl=n,t.pendingPush=r,t.scrollableSegments=void 0,(0,c.handleMutable)(e,t)}function v(e){let t=[],[n,r]=e;if(0===Object.keys(r).length)return[[n]];for(let[e,o]of Object.entries(r))for(let r of v(o))""===n?t.push([e,...r]):t.push([n,e,...r]);return t}let b=function(e,t){let{url:n,isExternalUrl:b,navigateType:g,shouldScroll:m}=t,R={},{hash:P}=n,j=(0,r.createHrefFromUrl)(n),O="push"===g;if((0,h.prunePrefetchCache)(e.prefetchCache),R.preserveCustomHistoryState=!1,b)return _(e,R,n.toString(),O);let S=(0,h.getOrCreatePrefetchCacheEntry)({url:n,nextUrl:e.nextUrl,tree:e.tree,buildId:e.buildId,prefetchCache:e.prefetchCache}),{treeAtTimeOfPrefetch:E,data:w}=S;return f.prefetchQueue.bump(w),w.then(t=>{let[n,f]=t,h=!1;if(S.lastUsedTime||(S.lastUsedTime=Date.now(),h=!0),"string"==typeof n)return _(e,R,n,O);if(document.getElementById("__next-page-redirect"))return _(e,R,j,O);let b=e.tree,g=e.cache,w=[];for(let t of n){let n=t.slice(0,-4),r=t.slice(-3)[0],c=["",...n],f=(0,u.applyRouterStatePatchToTree)(c,b,r,j);if(null===f&&(f=(0,u.applyRouterStatePatchToTree)(c,E,r,j)),null!==f){if((0,a.isNavigatingToNewRootLayout)(b,f))return _(e,R,j,O);let u=(0,d.createEmptyCacheNode)(),m=!1;for(let e of(S.status!==i.PrefetchCacheEntryStatus.stale||h?m=(0,s.applyFlightData)(g,u,t,S):(m=function(e,t,n,r){let o=!1;for(let u of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.loading=t.loading,e.parallelRoutes=new Map(t.parallelRoutes),v(r).map(e=>[...n,...e])))(0,y.clearCacheNodeDataForSegmentPath)(e,t,u),o=!0;return o}(u,g,n,r),S.lastUsedTime=Date.now()),(0,l.shouldHardNavigate)(c,b)?(u.rsc=g.rsc,u.prefetchRsc=g.prefetchRsc,(0,o.invalidateCacheBelowFlightSegmentPath)(u,g,n),R.cache=u):m&&(R.cache=u,g=u),b=f,v(r))){let t=[...n,...e];t[t.length-1]!==p.DEFAULT_SEGMENT_KEY&&w.push(t)}}}return R.patchedTree=b,R.canonicalUrl=f?(0,r.createHrefFromUrl)(f):j,R.pendingPush=O,R.scrollableSegments=w,R.hashFragment=P,R.shouldScroll=m,(0,c.handleMutable)(e,R)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{prefetchQueue:function(){return l},prefetchReducer:function(){return a}});let r=n(6866),o=n(29744),u=n(60305),l=new o.PromiseQueue(5);function a(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:n}=t;return n.searchParams.delete(r.NEXT_RSC_UNION_QUERY),(0,u.getOrCreatePrefetchCacheEntry)({url:n,nextUrl:e.nextUrl,prefetchCache:e.prefetchCache,kind:t.kind,tree:e.tree,buildId:e.buildId}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return h}});let r=n(44848),o=n(33456),u=n(81935),l=n(63237),a=n(95967),i=n(44510),c=n(27420),s=n(12846),f=n(77831),d=n(28077),p=n(50232);function h(e,t){let{origin:n}=t,h={},y=e.canonicalUrl,_=e.tree;h.preserveCustomHistoryState=!1;let v=(0,s.createEmptyCacheNode)(),b=(0,d.hasInterceptionRouteInCurrentTree)(e.tree);return v.lazyData=(0,r.fetchServerResponse)(new URL(y,n),[_[0],_[1],_[2],"refetch"],b?e.nextUrl:null,e.buildId),v.lazyData.then(async n=>{let[r,s]=n;if("string"==typeof r)return(0,a.handleExternalUrl)(e,h,r,e.pushRef.pendingPush);for(let n of(v.lazyData=null,r)){if(3!==n.length)return console.log("REFRESH FAILED"),e;let[r]=n,i=(0,u.applyRouterStatePatchToTree)([""],_,r,e.canonicalUrl);if(null===i)return(0,f.handleSegmentMismatch)(e,t,r);if((0,l.isNavigatingToNewRootLayout)(_,i))return(0,a.handleExternalUrl)(e,h,y,e.pushRef.pendingPush);let d=s?(0,o.createHrefFromUrl)(s):void 0;s&&(h.canonicalUrl=d);let[g,m]=n.slice(-2);if(null!==g){let e=g[2];v.rsc=e,v.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(v,void 0,r,g,m),h.prefetchCache=new Map}await (0,p.refreshInactiveParallelSegments)({state:e,updatedTree:i,updatedCache:v,includeNextUrl:b,canonicalUrl:h.canonicalUrl||e.canonicalUrl}),h.cache=v,h.patchedTree=i,h.canonicalUrl=y,_=i}return(0,i.handleMutable)(e,h)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let r=n(33456),o=n(5410);function u(e,t){var n;let{url:u,tree:l}=t,a=(0,r.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(n=(0,o.extractPathFromFlightRouterState)(i))?n:u.pathname}}n(56118),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return g}});let r=n(83079),o=n(6866),u=n(1634),l=n(33456),a=n(95967),i=n(81935),c=n(63237),s=n(44510),f=n(27420),d=n(12846),p=n(28077),h=n(77831),y=n(50232),{createFromFetch:_,encodeReply:v}=n(6671);async function b(e,t,n){let l,{actionId:a,actionArgs:i}=n,c=await v(i),s=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:a,[o.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...t?{[o.NEXT_URL]:t}:{}},body:c}),f=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");l={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){l={paths:[],tag:!1,cookie:!1}}let d=f?new URL((0,u.addBasePath)(f),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await _(Promise.resolve(s),{callServer:r.callServer});if(f){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:d,revalidatedParts:l}}let[t,[,n]]=null!=e?e:[];return{actionResult:t,actionFlightData:n,redirectLocation:d,revalidatedParts:l}}return{redirectLocation:d,revalidatedParts:l}}function g(e,t){let{resolve:n,reject:r}=t,o={},u=e.canonicalUrl,_=e.tree;o.preserveCustomHistoryState=!1;let v=e.nextUrl&&(0,p.hasInterceptionRouteInCurrentTree)(e.tree)?e.nextUrl:null;return o.inFlightServerAction=b(e,v,t),o.inFlightServerAction.then(async r=>{let{actionResult:p,actionFlightData:b,redirectLocation:g}=r;if(g&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!b)return(n(p),g)?(0,a.handleExternalUrl)(e,o,g.href,e.pushRef.pendingPush):e;if("string"==typeof b)return(0,a.handleExternalUrl)(e,o,b,e.pushRef.pendingPush);if(o.inFlightServerAction=null,g){let e=(0,l.createHrefFromUrl)(g,!1);o.canonicalUrl=e}for(let n of b){if(3!==n.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[r]=n,s=(0,i.applyRouterStatePatchToTree)([""],_,r,g?(0,l.createHrefFromUrl)(g):e.canonicalUrl);if(null===s)return(0,h.handleSegmentMismatch)(e,t,r);if((0,c.isNavigatingToNewRootLayout)(_,s))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[p,b]=n.slice(-2),m=null!==p?p[2]:null;if(null!==m){let t=(0,d.createEmptyCacheNode)();t.rsc=m,t.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(t,void 0,r,p,b),await (0,y.refreshInactiveParallelSegments)({state:e,updatedTree:s,updatedCache:t,includeNextUrl:!!v,canonicalUrl:o.canonicalUrl||e.canonicalUrl}),o.cache=t,o.prefetchCache=new Map}o.patchedTree=s,_=s}return n(p),(0,s.handleMutable)(e,o)},t=>(r(t),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},68448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let r=n(33456),o=n(81935),u=n(63237),l=n(95967),a=n(22356),i=n(44510),c=n(12846),s=n(77831);function f(e,t){let{serverResponse:n}=t,[f,d]=n,p={};if(p.preserveCustomHistoryState=!1,"string"==typeof f)return(0,l.handleExternalUrl)(e,p,f,e.pushRef.pendingPush);let h=e.tree,y=e.cache;for(let n of f){let i=n.slice(0,-4),[f]=n.slice(-3,-2),_=(0,o.applyRouterStatePatchToTree)(["",...i],h,f,e.canonicalUrl);if(null===_)return(0,s.handleSegmentMismatch)(e,t,f);if((0,u.isNavigatingToNewRootLayout)(h,_))return(0,l.handleExternalUrl)(e,p,e.canonicalUrl,e.pushRef.pendingPush);let v=d?(0,r.createHrefFromUrl)(d):void 0;v&&(p.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(y,b,n),p.patchedTree=_,p.cache=b,y=b,h=_}return(0,i.handleMutable)(e,p)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},50232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{addRefreshMarkerToActiveParallelSegments:function(){return function e(t,n){let[r,o,,l]=t;for(let a in r.includes(u.PAGE_SEGMENT_KEY)&&"refresh"!==l&&(t[2]=n,t[3]="refresh"),o)e(o[a],n)}},refreshInactiveParallelSegments:function(){return l}});let r=n(22356),o=n(44848),u=n(84541);async function l(e){let t=new Set;await a({...e,rootTree:e.updatedTree,fetchedSegments:t})}async function a(e){let{state:t,updatedTree:n,updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c=n,canonicalUrl:s}=e,[,f,d,p]=n,h=[];if(d&&d!==s&&"refresh"===p&&!i.has(d)){i.add(d);let e=(0,o.fetchServerResponse)(new URL(d,location.origin),[c[0],c[1],c[2],"refetch"],l?t.nextUrl:null,t.buildId).then(e=>{let t=e[0];if("string"!=typeof t)for(let e of t)(0,r.applyFlightData)(u,u,e)});h.push(e)}for(let e in f){let n=a({state:t,updatedTree:f[e],updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c,canonicalUrl:s});h.push(n)}await Promise.all(h)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24673:function(e,t){"use strict";var n,r,o,u;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return f},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return s},ACTION_REFRESH:function(){return l},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return p}});let l="refresh",a="navigate",i="restore",c="server-patch",s="prefetch",f="fast-refresh",d="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(o=n||(n={})).AUTO="auto",o.FULL="full",o.TEMPORARY="temporary",(u=r||(r={})).fresh="fresh",u.reusable="reusable",u.expired="expired",u.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let r=n(24673),o=n(95967),u=n(68448),l=n(77784),a=n(99601),i=n(24819),c=n(44529),s=n(13722),f="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case r.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case r.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case r.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case r.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case r.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case r.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case r.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53728:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,n){let[o,u]=n,[l,a]=t;return(0,r.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let r=n(76015);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createDynamicallyTrackedSearchParams:function(){return a},createUntrackedSearchParams:function(){return l}});let r=n(51845),o=n(86999),u=n(30650);function l(e){let t=r.staticGenerationAsyncStorage.getStore();return t&&t.forceStatic?{}:e}function a(e){let t=r.staticGenerationAsyncStorage.getStore();return t?t.forceStatic?{}:t.isStaticGeneration||t.dynamicShouldError?new Proxy({},{get:(e,n,r)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),u.ReflectAdapter.get(e,n,r)),has:(e,n)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),Reflect.has(e,n)),ownKeys:e=>((0,o.trackDynamicDataAccessed)(t,"searchParams"),Reflect.ownKeys(e))}):e:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});let r=n(20030);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36864:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{StaticGenBailoutError:function(){return r},isStaticGenBailoutError:function(){return o}});let n="NEXT_STATIC_GEN_BAILOUT";class r extends Error{constructor(...e){super(...e),this.code=n}}function o(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{useReducerWithReduxDevtools:function(){return i},useUnwrapState:function(){return a}});let r=n(53099)._(n(2265)),o=n(24673),u=n(2103);function l(e){if(e instanceof Map){let t={};for(let[n,r]of e.entries()){if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r._bundlerConfig){t[n]="FlightData";continue}}t[n]=l(r)}return t}if("object"==typeof e&&null!==e){let t={};for(let n in e){let r=e[n];if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r.hasOwnProperty("_bundlerConfig")){t[n]="FlightData";continue}}t[n]=l(r)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,r.use)(e):e}let i="undefined"!=typeof window?function(e){let[t,n]=r.default.useState(e),o=(0,r.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,r.useRef)(),i=(0,r.useRef)();return(0,r.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,r.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,n)},[o,e]),(0,r.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]}:function(e){return[e,()=>{},()=>{}]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let r=n(10580);function o(e){return(0,r.pathHasPrefix)(e,"/ui")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33068:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let r=n(26674),o=n(63381),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:n,hash:u}=(0,o.parsePath)(e);return""+(0,r.removeTrailingSlash)(t)+n+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(18993);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,r.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35076:function(e,t,n){"use strict";function r(e){return(e=e.slice(3)).startsWith("/")||(e="/"+e),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return r}}),n(11283),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12010:function(e,t){"use strict";function n(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,o=e[r];if(0<u(o,t))e[r]=t,e[n]=o,n=r;else break}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,o=e.length,l=o>>>1;r<l;){var a=2*(r+1)-1,i=e[a],c=a+1,s=e[c];if(0>u(i,n))c<o&&0>u(s,i)?(e[r]=s,e[c]=n,r=c):(e[r]=i,e[a]=n,r=a);else if(c<o&&0>u(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function u(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function R(e){for(var t=r(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,n(s,t);else break;t=r(f)}}function P(e){if(v=!1,R(e),!_){if(null!==r(s))_=!0,C();else{var t=r(f);null!==t&&A(P,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j=!1,O=-1,S=5,E=-1;function w(){return!(t.unstable_now()-E<S)}function T(){if(j){var e=t.unstable_now();E=e;var n=!0;try{e:{_=!1,v&&(v=!1,g(O),O=-1),y=!0;var u=h;try{t:{for(R(e),p=r(s);null!==p&&!(p.expirationTime>e&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,R(e),n=!0;break t}p===r(s)&&o(s),R(e)}else o(s);p=r(s)}if(null!==p)n=!0;else{var c=r(f);null!==c&&A(P,c.startTime-e),n=!1}}break e}finally{p=null,h=u,y=!1}n=void 0}}finally{n?l():j=!1}}}if("function"==typeof m)l=function(){m(T)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,x=M.port2;M.port1.onmessage=T,l=function(){x.postMessage(null)}}else l=function(){b(T,0)};function C(){j||(j=!0,l())}function A(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||y||(_=!0,C())},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(s)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,o,u){var l=t.unstable_now();switch(u="object"==typeof u&&null!==u&&"number"==typeof(u=u.delay)&&0<u?l+u:l,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=u+a,e={id:d++,callback:o,priorityLevel:e,startTime:u,expirationTime:a,sortIndex:-1},u>l?(e.sortIndex=u,n(f,e),null===r(s)&&e===r(f)&&(v?(g(O),O=-1):v=!0,A(P,u-l))):(e.sortIndex=a,n(s,e),_||y||(_=!0,C())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},71767:function(e,t,n){"use strict";e.exports=n(12010)},60934:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getPathname:function(){return r},isFullStringUrl:function(){return o},parseUrl:function(){return u}});let n="http://n";function r(e){return new URL(e,n).pathname}function o(e){return/https?:\/\//.test(e)}function u(e){let t;try{t=new URL(e,n)}catch{}return t}},86999:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Postpone:function(){return d},createPostponedAbortSignal:function(){return b},createPrerenderState:function(){return c},formatDynamicAPIAccesses:function(){return _},markCurrentScopeAsDynamic:function(){return s},trackDynamicDataAccessed:function(){return f},trackDynamicFetch:function(){return p},usedDynamicAPIs:function(){return y}});let o=(r=n(2265))&&r.__esModule?r:{default:r},u=n(46177),l=n(36864),a=n(60934),i="function"==typeof o.default.unstable_postpone;function c(e){return{isDebugSkeleton:e,dynamicAccesses:[]}}function s(e,t){let n=(0,a.getPathname)(e.urlPathname);if(!e.isUnstableCacheCallback){if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}}function f(e,t){let n=(0,a.getPathname)(e.urlPathname);if(e.isUnstableCacheCallback)throw Error(`Route ${n} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}function d({reason:e,prerenderState:t,pathname:n}){h(t,e,n)}function p(e,t){e.prerenderState&&h(e.prerenderState,t,e.urlPathname)}function h(e,t,n){v();let r=`Route ${n} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),o.default.unstable_postpone(r)}function y(e){return e.dynamicAccesses.length>0}function _(e){return e.dynamicAccesses.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" (<anonymous>)")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}: +${t}`))}function v(){if(!i)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")}function b(e){v();let t=new AbortController;try{o.default.unstable_postpone(e)}catch(e){t.abort(e)}return t.signal}},87417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return o}});let r=n(91182);function o(e){let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:t?"catchall-intercepted":"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:t?"dynamic-intercepted":"dynamic",param:e.slice(1,-1)}:null}},70647:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HMR_ACTIONS_SENT_TO_BROWSER",{enumerable:!0,get:function(){return n}}),(r=n||(n={})).ADDED_PAGE="addedPage",r.REMOVED_PAGE="removedPage",r.RELOAD_PAGE="reloadPage",r.SERVER_COMPONENT_CHANGES="serverComponentChanges",r.MIDDLEWARE_CHANGES="middlewareChanges",r.CLIENT_CHANGES="clientChanges",r.SERVER_ONLY_CHANGES="serverOnlyChanges",r.SYNC="sync",r.BUILT="built",r.BUILDING="building",r.DEV_PAGES_MANIFEST_UPDATE="devPagesManifestUpdate",r.TURBOPACK_MESSAGE="turbopack-message",r.SERVER_ERROR="serverError",r.TURBOPACK_CONNECTED="turbopack-connected"},91182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return l},isInterceptionRouteAppPath:function(){return u}});let r=n(20926),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,n,u;for(let r of e.split("/"))if(n=o.find(e=>r.startsWith(e))){[t,u]=e.split(n,2);break}if(!t||!n||!u)throw Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(t=(0,r.normalizeAppPath)(t),n){case"(.)":u="/"===t?`/${u}`:t+"/"+u;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);u=l.slice(0,-2).concat(u).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:u}}},30650:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return n}});class n{static get(e,t,n){let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}static set(e,t,n,r){return Reflect.set(e,t,n,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},61956:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return l},LayoutRouterContext:function(){return u},MissingSlotContext:function(){return i},TemplateContext:function(){return a}});let r=n(47043)._(n(2265)),o=r.default.createContext(null),u=r.default.createContext(null),l=r.default.createContext(null),a=r.default.createContext(null),i=r.default.createContext(new Set)},37207:function(e,t){"use strict";function n(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)&4294967295;return t>>>0}function r(e){return n(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{djb2Hash:function(){return n},hexHash:function(){return r}})},48701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext({})},79060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PathParamsContext:function(){return l},PathnameContext:function(){return u},SearchParamsContext:function(){return o}});let r=n(2265),o=(0,r.createContext)(null),u=(0,r.createContext)(null),l=(0,r.createContext)(null)},18993:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{BailoutToCSRError:function(){return r},isBailoutToCSRError:function(){return o}});let n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class r extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}},78162:function(e,t){"use strict";function n(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return n}})},2103:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ActionQueueContext:function(){return a},createMutableActionQueue:function(){return s}});let r=n(53099),o=n(24673),u=n(91450),l=r._(n(2265)),a=l.default.createContext(null);function i(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending?c({actionQueue:e,action:e.pending,setState:t}):e.needsRefresh&&(e.needsRefresh=!1,e.dispatch({type:o.ACTION_REFRESH,origin:window.location.origin},t)))}async function c(e){let{actionQueue:t,action:n,setState:r}=e,u=t.state;if(!u)throw Error("Invariant: Router state not initialized");t.pending=n;let l=n.payload,a=t.action(u,l);function c(e){n.discarded||(t.state=e,t.devToolsInstance&&t.devToolsInstance.send(l,e),i(t,r),n.resolve(e))}(0,o.isThenable)(a)?a.then(c,e=>{i(t,r),n.reject(e)}):c(a)}function s(){let e={state:null,dispatch:(t,n)=>(function(e,t,n){let r={resolve:n,reject:()=>{}};if(t.type!==o.ACTION_RESTORE){let e=new Promise((e,t)=>{r={resolve:e,reject:t}});(0,l.startTransition)(()=>{n(e)})}let u={payload:t,next:null,resolve:r.resolve,reject:r.reject};null===e.pending?(e.last=u,c({actionQueue:e,action:u,setState:n})):t.type===o.ACTION_NAVIGATE||t.type===o.ACTION_RESTORE?(e.pending.discarded=!0,e.last=u,e.pending.payload.type===o.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),c({actionQueue:e,action:u,setState:n})):(null!==e.last&&(e.last.next=u),e.last=u)})(e,t,n),action:async(e,t)=>{if(null===e)throw Error("Invariant: Router state not initialized");return(0,u.reducer)(e,t)},pending:null,last:null};return e}},68498:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let r=n(63381);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:n,query:o,hash:u}=(0,r.parsePath)(e);return""+t+n+o+u}},20926:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let r=n(78162),o=n(84541);function u(e){return(0,r.ensureLeadingSlash)(e.split("/").reduce((e,t,n,r)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&n===r.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},7092:function(e,t){"use strict";function n(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let n=document.documentElement,r=n.style.scrollBehavior;n.style.scrollBehavior="auto",t.dontForceLayout||n.getClientRects(),e(),n.style.scrollBehavior=r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return n}})},86146:function(e,t){"use strict";function n(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return n}})},63381:function(e,t){"use strict";function n(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return n}})},10580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let r=n(63381);function o(e,t){if("string"!=typeof e)return!1;let{pathname:n}=(0,r.parsePath)(e);return n===t||n.startsWith(t+"/")}},26674:function(e,t){"use strict";function n(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return n}})},84541:function(e,t){"use strict";function n(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return r},isGroupSegment:function(){return n}});let r="__PAGE__",o="__DEFAULT__"},55501:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let r=n(53099)._(n(2265)),o=r.default.createContext(null);function u(e){let t=(0,r.useContext)(o);t&&t(e)}},31765:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},47149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return u}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let o=globalThis.AsyncLocalStorage;function u(){return o?new o:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20030:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34040:function(e,t,n){"use strict";var r=n(54887);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},54887:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(84417)},97950:function(e,t,n){"use strict";var r=n(54887),o={stream:!0},u=new Map;function l(e){var t=n(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function a(){}var i=new Map,c=n.u;n.u=function(e){var t=i.get(e);return void 0!==t?t:c(e)};var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,f=Symbol.for("react.element"),d=Symbol.for("react.lazy"),p=Symbol.iterator,h=Array.isArray,y=Object.getPrototypeOf,_=Object.prototype,v=new WeakMap;function b(e,t,n,r){this.status=e,this.value=t,this.reason=n,this._response=r}function g(e){switch(e.status){case"resolved_model":E(e);break;case"resolved_module":w(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":throw e;default:throw e.reason}}function m(e,t){for(var n=0;n<e.length;n++)(0,e[n])(t)}function R(e,t,n){switch(e.status){case"fulfilled":m(t,e.value);break;case"pending":case"blocked":case"cyclic":e.value=t,e.reason=n;break;case"rejected":n&&m(n,e.reason)}}function P(e,t){if("pending"===e.status||"blocked"===e.status){var n=e.reason;e.status="rejected",e.reason=t,null!==n&&m(n,t)}}function j(e,t){if("pending"===e.status||"blocked"===e.status){var n=e.value,r=e.reason;e.status="resolved_module",e.value=t,null!==n&&(w(e),R(e,n,r))}}b.prototype=Object.create(Promise.prototype),b.prototype.then=function(e,t){switch(this.status){case"resolved_model":E(this);break;case"resolved_module":w(this)}switch(this.status){case"fulfilled":e(this.value);break;case"pending":case"blocked":case"cyclic":e&&(null===this.value&&(this.value=[]),this.value.push(e)),t&&(null===this.reason&&(this.reason=[]),this.reason.push(t));break;default:t(this.reason)}};var O=null,S=null;function E(e){var t=O,n=S;O=e,S=null;var r=e.value;e.status="cyclic",e.value=null,e.reason=null;try{var o=JSON.parse(r,e._response._fromJSON);if(null!==S&&0<S.deps)S.value=o,e.status="blocked",e.value=null,e.reason=null;else{var u=e.value;e.status="fulfilled",e.value=o,null!==u&&m(u,o)}}catch(t){e.status="rejected",e.reason=t}finally{O=t,S=n}}function w(e){try{var t=e.value,r=n(t[0]);if(4===t.length&&"function"==typeof r.then){if("fulfilled"===r.status)r=r.value;else throw r.reason}var o="*"===t[2]?r:""===t[2]?r.__esModule?r.default:r:r[t[2]];e.status="fulfilled",e.value=o}catch(t){e.status="rejected",e.reason=t}}function T(e,t){e._chunks.forEach(function(e){"pending"===e.status&&P(e,t)})}function M(e,t){var n=e._chunks,r=n.get(t);return r||(r=new b("pending",null,null,e),n.set(t,r)),r}function x(e,t){if("resolved_model"===(e=M(e,t)).status&&E(e),"fulfilled"===e.status)return e.value;throw e.reason}function C(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.')}function A(e,t,n,r,o){var u;return(e={_bundlerConfig:e,_moduleLoading:t,_callServer:void 0!==n?n:C,_encodeFormAction:r,_nonce:o,_chunks:new Map,_stringDecoder:new TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[]})._fromJSON=(u=e,function(e,t){return"string"==typeof t?function(e,t,n,r){if("$"===r[0]){if("$"===r)return f;switch(r[1]){case"$":return r.slice(1);case"L":return{$$typeof:d,_payload:e=M(e,t=parseInt(r.slice(2),16)),_init:g};case"@":if(2===r.length)return new Promise(function(){});return M(e,t=parseInt(r.slice(2),16));case"S":return Symbol.for(r.slice(2));case"F":return t=x(e,t=parseInt(r.slice(2),16)),function(e,t){function n(){var e=Array.prototype.slice.call(arguments),n=t.bound;return n?"fulfilled"===n.status?r(t.id,n.value.concat(e)):Promise.resolve(n).then(function(n){return r(t.id,n.concat(e))}):r(t.id,e)}var r=e._callServer;return v.set(n,t),n}(e,t);case"Q":return new Map(e=x(e,t=parseInt(r.slice(2),16)));case"W":return new Set(e=x(e,t=parseInt(r.slice(2),16)));case"I":return 1/0;case"-":return"$-0"===r?-0:-1/0;case"N":return NaN;case"u":return;case"D":return new Date(Date.parse(r.slice(2)));case"n":return BigInt(r.slice(2));default:switch((e=M(e,r=parseInt(r.slice(1),16))).status){case"resolved_model":E(e);break;case"resolved_module":w(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":var o;return r=O,e.then(function(e,t,n,r){if(S){var o=S;r||o.deps++}else o=S={deps:r?0:1,value:null};return function(r){t[n]=r,o.deps--,0===o.deps&&"blocked"===e.status&&(r=e.value,e.status="fulfilled",e.value=o.value,null!==r&&m(r,o.value))}}(r,t,n,"cyclic"===e.status),(o=r,function(e){return P(o,e)})),null;default:throw e.reason}}}return r}(u,this,e,t):"object"==typeof t&&null!==t?e=t[0]===f?{$$typeof:f,type:t[1],key:t[2],ref:null,props:t[3],_owner:null}:t:t}),e}function N(e,t){function r(t){T(e,t)}var c=t.getReader();c.read().then(function t(f){var d=f.value;if(f.done)T(e,Error("Connection closed."));else{var p=0,h=e._rowState,y=e._rowID,_=e._rowTag,v=e._rowLength;f=e._buffer;for(var g=d.length;p<g;){var m=-1;switch(h){case 0:58===(m=d[p++])?h=1:y=y<<4|(96<m?m-87:m-48);continue;case 1:84===(h=d[p])?(_=h,h=2,p++):64<h&&91>h?(_=h,h=3,p++):(_=0,h=3);continue;case 2:44===(m=d[p++])?h=4:v=v<<4|(96<m?m-87:m-48);continue;case 3:m=d.indexOf(10,p);break;case 4:(m=p+v)>d.length&&(m=-1)}var O=d.byteOffset+p;if(-1<m){p=new Uint8Array(d.buffer,O,m-p),v=e,O=_;var S=v._stringDecoder;_="";for(var w=0;w<f.length;w++)_+=S.decode(f[w],o);switch(_+=S.decode(p),O){case 73:!function(e,t,r){var o=e._chunks,c=o.get(t);r=JSON.parse(r,e._fromJSON);var s=function(e,t){if(e){var n=e[t[0]];if(e=n[t[2]])n=e.name;else{if(!(e=n["*"]))throw Error('Could not find the module "'+t[0]+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');n=t[2]}return 4===t.length?[e.id,e.chunks,n,1]:[e.id,e.chunks,n]}return t}(e._bundlerConfig,r);if(r=function(e){for(var t=e[1],r=[],o=0;o<t.length;){var c=t[o++],s=t[o++],f=u.get(c);void 0===f?(i.set(c,s),s=n.e(c),r.push(s),f=u.set.bind(u,c,null),s.then(f,a),u.set(c,s)):null!==f&&r.push(f)}return 4===e.length?0===r.length?l(e[0]):Promise.all(r).then(function(){return l(e[0])}):0<r.length?Promise.all(r):null}(s)){if(c){var f=c;f.status="blocked"}else f=new b("blocked",null,null,e),o.set(t,f);r.then(function(){return j(f,s)},function(e){return P(f,e)})}else c?j(c,s):o.set(t,new b("resolved_module",s,null,e))}(v,y,_);break;case 72:if(y=_[0],v=JSON.parse(_=_.slice(1),v._fromJSON),_=s.current)switch(y){case"D":_.prefetchDNS(v);break;case"C":"string"==typeof v?_.preconnect(v):_.preconnect(v[0],v[1]);break;case"L":y=v[0],p=v[1],3===v.length?_.preload(y,p,v[2]):_.preload(y,p);break;case"m":"string"==typeof v?_.preloadModule(v):_.preloadModule(v[0],v[1]);break;case"S":"string"==typeof v?_.preinitStyle(v):_.preinitStyle(v[0],0===v[1]?void 0:v[1],3===v.length?v[2]:void 0);break;case"X":"string"==typeof v?_.preinitScript(v):_.preinitScript(v[0],v[1]);break;case"M":"string"==typeof v?_.preinitModuleScript(v):_.preinitModuleScript(v[0],v[1])}break;case 69:p=(_=JSON.parse(_)).digest,(_=Error("An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.")).stack="Error: "+_.message,_.digest=p,(O=(p=v._chunks).get(y))?P(O,_):p.set(y,new b("rejected",null,_,v));break;case 84:v._chunks.set(y,new b("fulfilled",_,null,v));break;case 68:case 87:throw Error("Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.");default:(O=(p=v._chunks).get(y))?(v=O,y=_,"pending"===v.status&&(_=v.value,p=v.reason,v.status="resolved_model",v.value=y,null!==_&&(E(v),R(v,_,p)))):p.set(y,new b("resolved_model",_,null,v))}p=m,3===h&&p++,v=y=_=h=0,f.length=0}else{d=new Uint8Array(d.buffer,O,d.byteLength-p),f.push(d),v-=d.byteLength;break}}return e._rowState=h,e._rowID=y,e._rowTag=_,e._rowLength=v,c.read().then(t).catch(r)}}).catch(r)}t.createFromFetch=function(e,t){var n=A(null,null,t&&t.callServer?t.callServer:void 0,void 0,void 0);return e.then(function(e){N(n,e.body)},function(e){T(n,e)}),M(n,0)},t.createFromReadableStream=function(e,t){return N(t=A(null,null,t&&t.callServer?t.callServer:void 0,void 0,void 0),e),M(t,0)},t.createServerReference=function(e,t){var n;function r(){var n=Array.prototype.slice.call(arguments);return t(e,n)}return n={id:e,bound:null},v.set(r,n),r},t.encodeReply=function(e){return new Promise(function(t,n){var r,o,u,l;o=1,u=0,l=null,r=JSON.stringify(r=e,function e(r,a){if(null===a)return null;if("object"==typeof a){if("function"==typeof a.then){null===l&&(l=new FormData),u++;var i,c,s=o++;return a.then(function(n){n=JSON.stringify(n,e);var r=l;r.append(""+s,n),0==--u&&t(r)},function(e){n(e)}),"$@"+s.toString(16)}if(h(a))return a;if(a instanceof FormData){null===l&&(l=new FormData);var f=l,d=""+(r=o++)+"_";return a.forEach(function(e,t){f.append(d+t,e)}),"$K"+r.toString(16)}if(a instanceof Map)return a=JSON.stringify(Array.from(a),e),null===l&&(l=new FormData),r=o++,l.append(""+r,a),"$Q"+r.toString(16);if(a instanceof Set)return a=JSON.stringify(Array.from(a),e),null===l&&(l=new FormData),r=o++,l.append(""+r,a),"$W"+r.toString(16);if(null===(c=a)||"object"!=typeof c?null:"function"==typeof(c=p&&c[p]||c["@@iterator"])?c:null)return Array.from(a);if((r=y(a))!==_&&(null===r||null!==y(r)))throw Error("Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.");return a}if("string"==typeof a)return"Z"===a[a.length-1]&&this[r]instanceof Date?"$D"+a:a="$"===a[0]?"$"+a:a;if("boolean"==typeof a)return a;if("number"==typeof a)return Number.isFinite(i=a)?0===i&&-1/0==1/i?"$-0":i:1/0===i?"$Infinity":-1/0===i?"$-Infinity":"$NaN";if(void 0===a)return"$undefined";if("function"==typeof a){if(void 0!==(a=v.get(a)))return a=JSON.stringify(a,e),null===l&&(l=new FormData),r=o++,l.set(""+r,a),"$F"+r.toString(16);throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.")}if("symbol"==typeof a){if(Symbol.for(r=a.description)!==a)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+a.description+") cannot be found among global symbols.");return"$S"+r}if("bigint"==typeof a)return"$n"+a.toString(10);throw Error("Type "+typeof a+" is not supported as an argument to a Server Function.")}),null===l?t(r):(l.set("0",r),0===u&&t(l))})}},16703:function(e,t,n){"use strict";e.exports=n(97950)},6671:function(e,t,n){"use strict";e.exports=n(16703)},30622:function(e,t,n){"use strict";var r=n(2265),o=Symbol.for("react.element"),u=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;function i(e,t,n){var r,u={},i=null,c=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&"key"!==r&&"ref"!==r&&(u[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===u[r]&&(u[r]=t[r]);return{$$typeof:o,type:e,key:i,ref:c,props:u,_owner:a.current}}t.Fragment=u,t.jsx=i,t.jsxs=i},17869:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}function b(){}function g(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var m=g.prototype=new b;m.constructor=g,y(m,v.prototype),m.isPureReactComponent=!0;var R=Array.isArray,P={current:null},j={current:null},O={transition:null},S={ReactCurrentDispatcher:P,ReactCurrentCache:j,ReactCurrentBatchConfig:O,ReactCurrentOwner:{current:null}},E=Object.prototype.hasOwnProperty,w=S.ReactCurrentOwner;function T(e,t,r){var o,u={},l=null,a=null;if(null!=t)for(o in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(l=""+t.key),t)E.call(t,o)&&"key"!==o&&"ref"!==o&&"__self"!==o&&"__source"!==o&&(u[o]=t[o]);var i=arguments.length-2;if(1===i)u.children=r;else if(1<i){for(var c=Array(i),s=0;s<i;s++)c[s]=arguments[s+2];u.children=c}if(e&&e.defaultProps)for(o in i=e.defaultProps)void 0===u[o]&&(u[o]=i[o]);return{$$typeof:n,type:e,key:l,ref:a,props:u,_owner:w.current}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var x=/\/+/g;function C(e,t){var n,r;return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36)}function A(){}function N(e,t,o){if(null==e)return e;var u=[],l=0;return!function e(t,o,u,l,a){var i,c,s,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var h=!1;if(null===t)h=!0;else switch(f){case"string":case"number":h=!0;break;case"object":switch(t.$$typeof){case n:case r:h=!0;break;case d:return e((h=t._init)(t._payload),o,u,l,a)}}if(h)return a=a(t),h=""===l?"."+C(t,0):l,R(a)?(u="",null!=h&&(u=h.replace(x,"$&/")+"/"),e(a,o,u,"",function(e){return e})):null!=a&&(M(a)&&(i=a,c=u+(!a.key||t&&t.key===a.key?"":(""+a.key).replace(x,"$&/")+"/")+h,a={$$typeof:n,type:i.type,key:c,ref:i.ref,props:i.props,_owner:i._owner}),o.push(a)),1;h=0;var y=""===l?".":l+":";if(R(t))for(var _=0;_<t.length;_++)f=y+C(l=t[_],_),h+=e(l,o,u,f,a);else if("function"==typeof(_=null===(s=t)||"object"!=typeof s?null:"function"==typeof(s=p&&s[p]||s["@@iterator"])?s:null))for(t=_.call(t),_=0;!(l=t.next()).done;)f=y+C(l=l.value,_++),h+=e(l,o,u,f,a);else if("object"===f){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(A,A):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),o,u,l,a);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(o=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return h}(e,u,"","",function(e){return t.call(o,e,l++)}),u}function D(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}function I(){return new WeakMap}function U(){return{s:0,v:void 0,o:null,p:null}}function k(){}var F="function"==typeof reportError?reportError:function(e){console.error(e)};t.Children={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!M(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=l,t.PureComponent=g,t.StrictMode=u,t.Suspense=s,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S,t.act=function(){throw Error("act(...) is not supported in production builds of React.")},t.cache=function(e){return function(){var t=j.current;if(!t)return e.apply(null,arguments);var n=t.getCacheForType(I);void 0===(t=n.get(e))&&(t=U(),n.set(e,t)),n=0;for(var r=arguments.length;n<r;n++){var o=arguments[n];if("function"==typeof o||"object"==typeof o&&null!==o){var u=t.o;null===u&&(t.o=u=new WeakMap),void 0===(t=u.get(o))&&(t=U(),u.set(o,t))}else null===(u=t.p)&&(t.p=u=new Map),void 0===(t=u.get(o))&&(t=U(),u.set(o,t))}if(1===t.s)return t.v;if(2===t.s)throw t.v;try{var l=e.apply(null,arguments);return(n=t).s=1,n.v=l}catch(e){throw(l=t).s=2,l.v=e,e}}},t.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var o=y({},e.props),u=e.key,l=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,a=w.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(c in t)E.call(t,c)&&"key"!==c&&"ref"!==c&&"__self"!==c&&"__source"!==c&&(o[c]=void 0===t[c]&&void 0!==i?i[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){i=Array(c);for(var s=0;s<c;s++)i[s]=arguments[s+2];o.children=i}return{$$typeof:n,type:e.type,key:u,ref:l,props:o,_owner:a}},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=M,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:D}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition,n=new Set;O.transition={_callbacks:n};var r=O.transition;try{var o=e();"object"==typeof o&&null!==o&&"function"==typeof o.then&&(n.forEach(function(e){return e(r,o)}),o.then(k,F))}catch(e){F(e)}finally{O.transition=t}},t.unstable_useCacheRefresh=function(){return P.current.useCacheRefresh()},t.use=function(e){return P.current.use(e)},t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return P.current.useDeferredValue(e,t)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useOptimistic=function(e,t){return P.current.useOptimistic(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.0-canary-178c267a4e-20241218"},2265:function(e,t,n){"use strict";e.exports=n(17869)},57437:function(e,t,n){"use strict";e.exports=n(30622)},2522:function(e,t,n){"use strict";function r(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}n.r(t),n.d(t,{_:function(){return r},_class_private_field_loose_base:function(){return r}})},90675:function(e,t,n){"use strict";n.r(t),n.d(t,{_:function(){return o},_class_private_field_loose_key:function(){return o}});var r=0;function o(e){return"__private_"+r+++"_"+e}},47043:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}n.r(t),n.d(t,{_:function(){return r},_interop_require_default:function(){return r}})},53099:function(e,t,n){"use strict";function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=u?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(o,l,a):o[l]=e[l]}return o.default=e,n&&n.set(e,o),o}n.r(t),n.d(t,{_:function(){return o},_interop_require_wildcard:function(){return o}})}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/13b76428-ebdf3012af0e4489.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/13b76428-ebdf3012af0e4489.js new file mode 100644 index 00000000..30737905 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/13b76428-ebdf3012af0e4489.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[990],{77398:function(e,t,n){var s;e=n.nmd(e),s=function(){"use strict";function t(){return V.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){var t;if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(t in e)if(i(e,t))return!1;return!0}function a(e){return void 0===e}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,s=[],i=e.length;for(n=0;n<i;++n)s.push(t(e[n],n));return s}function h(e,t){for(var n in t)i(t,n)&&(e[n]=t[n]);return i(t,"toString")&&(e.toString=t.toString),i(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,s){return ti(e,t,n,s,!0).utc()}function c(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){var t=null,n=!1,s=e._d&&!isNaN(e._d.getTime());return(s&&(t=c(e),n=G.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e))?s:(e._isValid=s,e._isValid)}function m(e){var t=d(NaN);return null!=e?h(c(t),e):c(t).userInvalidated=!0,t}G=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),s=n.length>>>0;for(t=0;t<s;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var _,y,g=t.momentProperties=[],w=!1;function p(e,t){var n,s,i,r=g.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=c(t)),a(t._locale)||(e._locale=t._locale),r>0)for(n=0;n<r;n++)a(i=t[s=g[n]])||(e[s]=i);return e}function v(e){p(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,t.updateOffset(this),w=!1)}function k(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function M(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,n){var s=!0;return h(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),s){var r,a,o,u=[],l=arguments.length;for(a=0;a<l;a++){if(r="","object"==typeof arguments[a]){for(o in r+="\n["+a+"] ",arguments[0])i(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[a];u.push(r)}M(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+Error().stack),s=!1}return n.apply(this,arguments)},n)}var Y={};function S(e,n){null!=t.deprecationHandler&&t.deprecationHandler(e,n),Y[e]||(M(n),Y[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,r=h({},e);for(n in t)i(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)i(e,n)&&!i(t,n)&&s(e[n])&&(r[n]=h({},r[n]));return r}function T(e){null!=e&&this.set(e)}function x(e,t,n){var s=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null,A=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)i(e,t)&&n.push(t);return n};var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,P={},R={};function C(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(R[e]=i),t&&(R[t[0]]=function(){return x(i.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(P[t=H(t,e.localeData())]=P[t]||function(e){var t,n,s,i=e.match(N);for(n=0,s=i.length;n<s;n++)R[i[n]]?i[n]=R[i[n]]:i[n]=(t=i[n]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(t){var n,r="";for(n=0;n<s;n++)r+=O(i[n])?i[n].call(t,e):i[n];return r}}(t),P[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,s),W.lastIndex=0,n-=1;return e}var F={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function L(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function E(e){var t,n,s={};for(n in e)i(e,n)&&(t=L(n))&&(s[t]=e[n]);return s}var V,G,A,I,j={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,B=/[+-]?\d{6}/,J=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,et=/[+-]?\d{1,6}/,en=/\d+/,es=/[+-]?\d+/,ei=/Z|[+-]\d\d:?\d\d/gi,er=/Z|[+-]\d\d(?::?\d\d)?/gi,ea=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,eo=/^[1-9]\d?/,eu=/^([1-9]\d|\d)/;function el(e,t,n){I[e]=O(t)?t:function(e,s){return e&&n?n:t}}function eh(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ed(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ec(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ed(t)),n}I={};var ef={};function em(e,t){var n,s,i=t;for("string"==typeof e&&(e=[e]),o(t)&&(i=function(e,n){n[t]=ec(e)}),s=e.length,n=0;n<s;n++)ef[e[n]]=i}function e_(e,t){em(e,function(e,n,s,i){s._w=s._w||{},t(e,s._w,s,i)})}function ey(e){return e%4==0&&e%100!=0||e%400==0}function eg(e){return ey(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?x(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),el("Y",es),el("YY",J,z),el("YYYY",ee,q),el("YYYYY",et,B),el("YYYYYY",et,B),em(["YYYYY","YYYYYY"],0),em("YYYY",function(e,n){n[0]=2===e.length?t.parseTwoDigitYear(e):ec(e)}),em("YY",function(e,n){n[0]=t.parseTwoDigitYear(e)}),em("Y",function(e,t){t[0]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return ec(e)+(ec(e)>68?1900:2e3)};var ew=ep("FullYear",!0);function ep(e,n){return function(s){return null!=s?(ek(this,e,s),t.updateOffset(this,n),this):ev(this,e)}}function ev(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function ek(e,t,n){var s,i,r,a;if(!(!e.isValid()||isNaN(n))){switch(s=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?s.setUTCMilliseconds(n):s.setMilliseconds(n));case"Seconds":return void(i?s.setUTCSeconds(n):s.setSeconds(n));case"Minutes":return void(i?s.setUTCMinutes(n):s.setMinutes(n));case"Hours":return void(i?s.setUTCHours(n):s.setHours(n));case"Date":return void(i?s.setUTCDate(n):s.setDate(n));case"FullYear":break;default:return}r=e.month(),a=29!==(a=e.date())||1!==r||ey(n)?a:28,i?s.setUTCFullYear(n,r,a):s.setFullYear(n,r,a)}}function eM(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?ey(e)?29:28:31-n%7%2}eA=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return -1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),el("M",J,eo),el("MM",J,z),el("MMM",function(e,t){return t.monthsShortRegex(e)}),el("MMMM",function(e,t){return t.monthsRegex(e)}),em(["M","MM"],function(e,t){t[1]=ec(e)-1}),em(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[1]=i:c(n).invalidMonth=e});var eD="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),eY=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;function eS(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(s=0,this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];s<12;++s)r=d([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=eA.call(this._shortMonthsParse,a))?i:null:-1!==(i=eA.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=eA.call(this._shortMonthsParse,a))?i:-1!==(i=eA.call(this._longMonthsParse,a))?i:null:-1!==(i=eA.call(this._longMonthsParse,a))?i:-1!==(i=eA.call(this._shortMonthsParse,a))?i:null}function eO(e,t){if(!e.isValid())return e;if("string"==typeof t){if(/^\d+$/.test(t))t=ec(t);else if(!o(t=e.localeData().monthsParse(t)))return e}var n=t,s=e.date();return s=s<29?s:Math.min(s,eM(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,s):e._d.setMonth(n,s),e}function eb(e){return null!=e?(eO(this,e),t.updateOffset(this,!0),this):ev(this,"Month")}function eT(){function e(e,t){return t.length-e.length}var t,n,s,i,r=[],a=[],o=[];for(t=0;t<12;t++)n=d([2e3,t]),s=eh(this.monthsShort(n,"")),i=eh(this.months(n,"")),r.push(s),a.push(i),o.push(i),o.push(s);r.sort(e),a.sort(e),o.sort(e),this._monthsRegex=RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=RegExp("^("+r.join("|")+")","i")}function ex(e,t,n,s,i,r,a){var o;return e<100&&e>=0?isFinite((o=new Date(e+400,t,n,s,i,r,a)).getFullYear())&&o.setFullYear(e):o=new Date(e,t,n,s,i,r,a),o}function eN(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,isFinite((t=new Date(Date.UTC.apply(null,n))).getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function eW(e,t,n){var s=7+t-n;return-((7+eN(e,0,s).getUTCDay()-t)%7)+s-1}function eP(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+eW(e,s,i);return o<=0?a=eg(r=e-1)+o:o>eg(e)?(r=e+1,a=o-eg(e)):(r=e,a=o),{year:r,dayOfYear:a}}function eR(e,t,n){var s,i,r=eW(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+eC(i=e.year()-1,t,n):a>eC(e.year(),t,n)?(s=a-eC(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function eC(e,t,n){var s=eW(e,t,n),i=eW(e+1,t,n);return(eg(e)-s+i)/7}function eU(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),el("w",J,eo),el("ww",J,z),el("W",J,eo),el("WW",J,z),e_(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=ec(e)}),C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),el("d",J),el("e",J),el("E",J),el("dd",function(e,t){return t.weekdaysMinRegex(e)}),el("ddd",function(e,t){return t.weekdaysShortRegex(e)}),el("dddd",function(e,t){return t.weekdaysRegex(e)}),e_(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:c(n).invalidWeekday=e}),e_(["d","e","E"],function(e,t,n,s){t[s]=ec(e)});var eH="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function eF(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(s=0,this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];s<7;++s)r=d([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=eA.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=eA.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=eA.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=eA.call(this._weekdaysParse,a))||-1!==(i=eA.call(this._shortWeekdaysParse,a))?i:-1!==(i=eA.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=eA.call(this._shortWeekdaysParse,a))||-1!==(i=eA.call(this._weekdaysParse,a))?i:-1!==(i=eA.call(this._minWeekdaysParse,a))?i:null:-1!==(i=eA.call(this._minWeekdaysParse,a))||-1!==(i=eA.call(this._weekdaysParse,a))?i:-1!==(i=eA.call(this._shortWeekdaysParse,a))?i:null}function eL(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),s=eh(this.weekdaysMin(n,"")),i=eh(this.weekdaysShort(n,"")),r=eh(this.weekdays(n,"")),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=RegExp("^("+a.join("|")+")","i")}function eE(){return this.hours()%12||12}function eV(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function eG(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,eE),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+eE.apply(this)+x(this.minutes(),2)}),C("hmmss",0,0,function(){return""+eE.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+x(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)}),eV("a",!0),eV("A",!1),el("a",eG),el("A",eG),el("H",J,eu),el("h",J,eo),el("k",J,eo),el("HH",J,z),el("hh",J,z),el("kk",J,z),el("hmm",Q),el("hmmss",X),el("Hmm",Q),el("Hmmss",X),em(["H","HH"],3),em(["k","kk"],function(e,t,n){var s=ec(e);t[3]=24===s?0:s}),em(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),em(["h","hh"],function(e,t,n){t[3]=ec(e),c(n).bigHour=!0}),em("hmm",function(e,t,n){var s=e.length-2;t[3]=ec(e.substr(0,s)),t[4]=ec(e.substr(s)),c(n).bigHour=!0}),em("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[3]=ec(e.substr(0,s)),t[4]=ec(e.substr(s,2)),t[5]=ec(e.substr(i)),c(n).bigHour=!0}),em("Hmm",function(e,t,n){var s=e.length-2;t[3]=ec(e.substr(0,s)),t[4]=ec(e.substr(s))}),em("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[3]=ec(e.substr(0,s)),t[4]=ec(e.substr(s,2)),t[5]=ec(e.substr(i))});var eA,eI,ej=ep("Hours",!0),eZ={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:eD,week:{dow:0,doy:6},weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysShort:eH,meridiemParse:/[ap]\.?m?\.?/i},ez={},e$={};function eq(e){return e?e.toLowerCase().replace("_","-"):e}function eB(t){var n=null;if(void 0===ez[t]&&e&&e.exports&&t&&t.match("^[^/\\\\]*$"))try{n=eI._abbr,function(){var e=Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),eJ(n)}catch(e){ez[t]=null}return ez[t]}function eJ(e,t){var n;return e&&((n=a(t)?eX(e):eQ(e,t))?eI=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),eI._abbr}function eQ(e,t){if(null===t)return delete ez[e],null;var n,s=eZ;if(t.abbr=e,null!=ez[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=ez[e]._config;else if(null!=t.parentLocale){if(null!=ez[t.parentLocale])s=ez[t.parentLocale]._config;else{if(null==(n=eB(t.parentLocale)))return e$[t.parentLocale]||(e$[t.parentLocale]=[]),e$[t.parentLocale].push({name:e,config:t}),null;s=n._config}}return ez[e]=new T(b(s,t)),e$[e]&&e$[e].forEach(function(e){eQ(e.name,e.config)}),eJ(e),ez[e]}function eX(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return eI;if(!n(e)){if(t=eB(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=eq(e[r]).split("-")).length,n=(n=eq(e[r+1]))?n.split("-"):null;t>0;){if(s=eB(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n<s;n+=1)if(e[n]!==t[n])return n;return s}(i,n)>=t-1)break;t--}r++}return eI}(e)}function eK(e){var t,n=e._a;return n&&-2===c(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>eM(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,c(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),c(e)._overflowWeeks&&-1===t&&(t=7),c(e)._overflowWeekday&&-1===t&&(t=8),c(e).overflow=t),e}var e0=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e1=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e2=/Z|[+-]\d\d(?::?\d\d)?/,e4=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],e3=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],e6=/^\/?Date\((-?\d+)/i,e5=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,e7={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function e9(e){var t,n,s,i,r,a,o=e._i,u=e0.exec(o)||e1.exec(o),l=e4.length,h=e3.length;if(u){for(t=0,c(e).iso=!0,n=l;t<n;t++)if(e4[t][1].exec(u[1])){i=e4[t][0],s=!1!==e4[t][2];break}if(null==i){e._isValid=!1;return}if(u[3]){for(t=0,n=h;t<n;t++)if(e3[t][1].exec(u[3])){r=(u[2]||" ")+e3[t][0];break}if(null==r){e._isValid=!1;return}}if(!s&&null!=r){e._isValid=!1;return}if(u[4]){if(e2.exec(u[4]))a="Z";else{e._isValid=!1;return}}e._f=i+(r||"")+(a||""),tn(e)}else e._isValid=!1}function e8(e){var t,n,s,i,r,a,o,u,l,h=e5.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(h){if(n=h[4],s=h[3],i=h[2],r=h[5],a=h[6],o=h[7],u=[(t=parseInt(n,10))<=49?2e3+t:t<=999?1900+t:t,eD.indexOf(s),parseInt(i,10),parseInt(r,10),parseInt(a,10)],o&&u.push(parseInt(o,10)),(l=h[1])&&eH.indexOf(l)!==new Date(u[0],u[1],u[2]).getDay()&&(c(e).weekdayMismatch=!0,e._isValid=!1,1))return;e._a=u,e._tzm=function(e,t,n){if(e)return e7[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(h[8],h[9],h[10]),e._d=eN.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),c(e).rfc2822=!0}else e._isValid=!1}function te(e,t,n){return null!=e?e:null!=t?t:n}function tt(e){var n,s,i,r,a,o,u,l,h,d,f,m,_,y,g,w=[];if(!e._d){for(d=new Date(t.now()),_=e._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()],e._w&&null==e._a[2]&&null==e._a[1]&&(null!=(n=e._w).GG||null!=n.W||null!=n.E?(a=1,o=4,s=te(n.GG,e._a[0],eR(tr(),1,4).year),i=te(n.W,1),((r=te(n.E,1))<1||r>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,h=eR(tr(),a,o),s=te(n.gg,e._a[0],h.year),i=te(n.w,h.week),null!=n.d?((r=n.d)<0||r>6)&&(l=!0):null!=n.e?(r=n.e+a,(n.e<0||n.e>6)&&(l=!0)):r=a),i<1||i>eC(s,a,o)?c(e)._overflowWeeks=!0:null!=l?c(e)._overflowWeekday=!0:(u=eP(s,i,r,a,o),e._a[0]=u.year,e._dayOfYear=u.dayOfYear)),null!=e._dayOfYear&&(g=te(e._a[0],_[0]),(e._dayOfYear>eg(g)||0===e._dayOfYear)&&(c(e)._overflowDayOfYear=!0),m=eN(g,0,e._dayOfYear),e._a[1]=m.getUTCMonth(),e._a[2]=m.getUTCDate()),f=0;f<3&&null==e._a[f];++f)e._a[f]=w[f]=_[f];for(;f<7;f++)e._a[f]=w[f]=null==e._a[f]?2===f?1:0:e._a[f];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?eN:ex).apply(null,w),y=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==y&&(c(e).weekdayMismatch=!0)}}function tn(e){if(e._f===t.ISO_8601){e9(e);return}if(e._f===t.RFC_2822){e8(e);return}e._a=[],c(e).empty=!0;var n,s,r,a,o,u,l,h,d,f,m,_=""+e._i,y=_.length,g=0;for(o=0,m=(l=H(e._f,e._locale).match(N)||[]).length;o<m;o++)(h=l[o],(u=(_.match(i(I,h)?I[h](e._strict,e._locale):new RegExp(eh(h.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i}))))||[])[0])&&((d=_.substr(0,_.indexOf(u))).length>0&&c(e).unusedInput.push(d),_=_.slice(_.indexOf(u)+u.length),g+=u.length),R[h])?(u?c(e).empty=!1:c(e).unusedTokens.push(h),null!=u&&i(ef,h)&&ef[h](u,e._a,e,h)):e._strict&&!u&&c(e).unusedTokens.push(h);c(e).charsLeftOver=y-g,_.length>0&&c(e).unusedInput.push(_),e._a[3]<=12&&!0===c(e).bigHour&&e._a[3]>0&&(c(e).bigHour=void 0),c(e).parsedDateParts=e._a.slice(0),c(e).meridiem=e._meridiem,e._a[3]=(n=e._locale,s=e._a[3],null==(r=e._meridiem)?s:null!=n.meridiemHour?n.meridiemHour(s,r):(null!=n.isPM&&((a=n.isPM(r))&&s<12&&(s+=12),a||12!==s||(s=0)),s)),null!==(f=c(e).era)&&(e._a[0]=e._locale.erasConvertYear(f,e._a[0])),tt(e),eK(e)}function ts(e){var i,r=e._i,d=e._f;return(e._locale=e._locale||eX(e._l),null===r||void 0===d&&""===r)?m({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),k(r))?new v(eK(r)):(u(r)?e._d=r:n(d)?function(e){var t,n,s,i,r,a,o=!1,u=e._f.length;if(0===u){c(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<u;i++)r=0,a=!1,t=p({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],tn(t),f(t)&&(a=!0),r+=c(t).charsLeftOver+10*c(t).unusedTokens.length,c(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));h(e,n||t)}(e):d?tn(e):a(i=e._i)?e._d=new Date(t.now()):u(i)?e._d=new Date(i.valueOf()):"string"==typeof i?function(e){var n=e6.exec(e._i);if(null!==n){e._d=new Date(+n[1]);return}e9(e),!1===e._isValid&&(delete e._isValid,e8(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:t.createFromInputFallback(e)))}(e):n(i)?(e._a=l(i.slice(0),function(e){return parseInt(e,10)}),tt(e)):s(i)?function(e){if(!e._d){var t=E(e._i),n=void 0===t.day?t.date:t.day;e._a=l([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),tt(e)}}(e):o(i)?e._d=new Date(i):t.createFromInputFallback(e),f(e)||(e._d=null),e)}function ti(e,t,i,a,o){var u,l={};return(!0===t||!1===t)&&(a=t,t=void 0),(!0===i||!1===i)&&(a=i,i=void 0),(s(e)&&r(e)||n(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=i,l._i=e,l._f=t,l._strict=a,(u=new v(eK(ts(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function tr(e,t,n,s){return ti(e,t,n,s,!1)}t.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var ta=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()}),to=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=tr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()});function tu(e,t){var s,i;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return tr();for(i=1,s=t[0];i<t.length;++i)(!t[i].isValid()||t[i][e](s))&&(s=t[i]);return s}var tl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function th(e){var t=E(e),n=t.year||0,s=t.quarter||0,r=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,h=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,s=!1,r=tl.length;for(t in e)if(i(e,t)&&!(-1!==eA.call(tl,t)&&(null==e[t]||!isNaN(e[t]))))return!1;for(n=0;n<r;++n)if(e[tl[n]]){if(s)return!1;parseFloat(e[tl[n]])!==ec(e[tl[n]])&&(s=!0)}return!0}(t),this._milliseconds=+d+1e3*h+6e4*l+36e5*u,this._days=+o+7*a,this._months=+r+3*s+12*n,this._data={},this._locale=eX(),this._bubble()}function td(e){return e instanceof th}function tc(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function tf(e,t){C(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+x(~~(e/60),2)+t+x(~~e%60,2)})}tf("Z",":"),tf("ZZ",""),el("Z",er),el("ZZ",er),em(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=t_(er,e)});var tm=/([\+\-]|\d\d)/gi;function t_(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=+(60*(n=((i[i.length-1]||[])+"").match(tm)||["-",0,0])[1])+ec(n[2]))?0:"+"===n[0]?s:-s}function ty(e,n){var s,i;return n._isUTC?(s=n.clone(),i=(k(e)||u(e)?e.valueOf():tr(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),t.updateOffset(s,!1),s):tr(e).local()}function tg(e){return-Math.round(e._d.getTimezoneOffset())}function tw(){return!!this.isValid()&&this._isUTC&&0===this._offset}t.updateOffset=function(){};var tp=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,tv=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function tk(e,t){var n,s,r,a,u,l,h=e,d=null;return td(e)?h={ms:e._milliseconds,d:e._days,M:e._months}:o(e)||!isNaN(+e)?(h={},t?h[t]=+e:h.milliseconds=+e):(d=tp.exec(e))?(a="-"===d[1]?-1:1,h={y:0,d:ec(d[2])*a,h:ec(d[3])*a,m:ec(d[4])*a,s:ec(d[5])*a,ms:ec(tc(1e3*d[6]))*a}):(d=tv.exec(e))?(a="-"===d[1]?-1:1,h={y:tM(d[2],a),M:tM(d[3],a),w:tM(d[4],a),d:tM(d[5],a),h:tM(d[6],a),m:tM(d[7],a),s:tM(d[8],a)}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(n=tr(h.from),s=tr(h.to),l=n.isValid()&&s.isValid()?(s=ty(s,n),n.isBefore(s)?r=tD(n,s):((r=tD(s,n)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0},(h={}).ms=l.milliseconds,h.M=l.months),u=new th(h),td(e)&&i(e,"_locale")&&(u._locale=e._locale),td(e)&&i(e,"_isValid")&&(u._isValid=e._isValid),u}function tM(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function tD(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function tY(e,t){return function(n,s){var i;return null===s||isNaN(+s)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),tS(this,tk(n,s),e),this}}function tS(e,n,s,i){var r=n._milliseconds,a=tc(n._days),o=tc(n._months);e.isValid()&&(i=null==i||i,o&&eO(e,ev(e,"Month")+o*s),a&&ek(e,"Date",ev(e,"Date")+a*s),r&&e._d.setTime(e._d.valueOf()+r*s),i&&t.updateOffset(e,a||o))}tk.fn=th.prototype,tk.invalid=function(){return tk(NaN)};var tO=tY(1,"add"),tb=tY(-1,"subtract");function tT(e){return"string"==typeof e||e instanceof String}function tx(e,t){if(e.date()<t.date())return-tx(t,e);var n,s=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(s,"months");return n=t-i<0?(t-i)/(i-e.clone().add(s-1,"months")):(t-i)/(e.clone().add(s+1,"months")-i),-(s+n)||0}function tN(e){var t;return void 0===e?this._locale._abbr:(null!=(t=eX(e))&&(this._locale=t),this)}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tW=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function tP(){return this._locale}function tR(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function tC(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tU(e,t){return t.erasAbbrRegex(e)}function tH(){var e,t,n,s,i,r=[],a=[],o=[],u=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=eh(l[e].name),s=eh(l[e].abbr),i=eh(l[e].narrow),a.push(n),r.push(s),o.push(i),u.push(n),u.push(s),u.push(i);this._erasRegex=RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=RegExp("^("+o.join("|")+")","i")}function tF(e,t){C(0,[e,e.length],0,t)}function tL(e,t,n,s,i){var r;return null==e?eR(this,s,i).year:(t>(r=eC(e,s,i))&&(t=r),tE.call(this,e,t,n,s,i))}function tE(e,t,n,s,i){var r=eP(e,t,n,s,i),a=eN(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),el("N",tU),el("NN",tU),el("NNN",tU),el("NNNN",function(e,t){return t.erasNameRegex(e)}),el("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),em(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?c(n).era=i:c(n).invalidEra=e}),el("y",en),el("yy",en),el("yyy",en),el("yyyy",en),el("yo",function(e,t){return t._eraYearOrdinalRegex||en}),em(["y","yy","yyy","yyyy"],0),em(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tF("gggg","weekYear"),tF("ggggg","weekYear"),tF("GGGG","isoWeekYear"),tF("GGGGG","isoWeekYear"),el("G",es),el("g",es),el("GG",J,z),el("gg",J,z),el("GGGG",ee,q),el("gggg",ee,q),el("GGGGG",et,B),el("ggggg",et,B),e_(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=ec(e)}),e_(["gg","GG"],function(e,n,s,i){n[i]=t.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),el("Q",Z),em("Q",function(e,t){t[1]=(ec(e)-1)*3}),C("D",["DD",2],"Do","date"),el("D",J,eo),el("DD",J,z),el("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),em(["D","DD"],2),em("Do",function(e,t){t[2]=ec(e.match(J)[0])});var tV=ep("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),el("DDD",K),el("DDDD",$),em(["DDD","DDDD"],function(e,t,n){n._dayOfYear=ec(e)}),C("m",["mm",2],0,"minute"),el("m",J,eu),el("mm",J,z),em(["m","mm"],4);var tG=ep("Minutes",!1);C("s",["ss",2],0,"second"),el("s",J,eu),el("ss",J,z),em(["s","ss"],5);var tA=ep("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),el("S",K,Z),el("SS",K,z),el("SSS",K,$),_="SSSS";_.length<=9;_+="S")el(_,en);function tI(e,t){t[6]=ec(("0."+e)*1e3)}for(_="S";_.length<=9;_+="S")em(_,tI);y=ep("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var tj=v.prototype;function tZ(e){return e}tj.add=tO,tj.calendar=function(e,a){if(1==arguments.length){if(arguments[0]){var l,h,d;(l=arguments[0],k(l)||u(l)||tT(l)||o(l)||(h=n(l),d=!1,h&&(d=0===l.filter(function(e){return!o(e)&&tT(l)}).length),h&&d)||function(e){var t,n,a=s(e)&&!r(e),o=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=u.length;for(t=0;t<l;t+=1)n=u[t],o=o||i(e,n);return a&&o}(l)||null==l)?(e=arguments[0],a=void 0):function(e){var t,n,a=s(e)&&!r(e),o=!1,u=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<u.length;t+=1)n=u[t],o=o||i(e,n);return a&&o}(arguments[0])&&(a=arguments[0],e=void 0)}else e=void 0,a=void 0}var c=e||tr(),f=ty(c,this).startOf("day"),m=t.calendarFormat(this,f)||"sameElse",_=a&&(O(a[m])?a[m].call(this,c):a[m]);return this.format(_||this.localeData().calendar(m,this,tr(c)))},tj.clone=function(){return new v(this)},tj.diff=function(e,t,n){var s,i,r;if(!this.isValid()||!(s=ty(e,this)).isValid())return NaN;switch(i=(s.utcOffset()-this.utcOffset())*6e4,t=L(t)){case"year":r=tx(this,s)/12;break;case"month":r=tx(this,s);break;case"quarter":r=tx(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:ed(r)},tj.endOf=function(e){var n,s;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?tC:tR,e){case"year":n=s(this.year()+1,0,1)-1;break;case"quarter":n=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=s(this.year(),this.month()+1,1)-1;break;case"week":n=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=36e5-((n+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5-1;break;case"minute":n=this._d.valueOf(),n+=6e4-(n%6e4+6e4)%6e4-1;break;case"second":n=this._d.valueOf(),n+=1e3-(n%1e3+1e3)%1e3-1}return this._d.setTime(n),t.updateOffset(this,!0),this},tj.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=U(this,e);return this.localeData().postformat(n)},tj.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||tr(e).isValid())?tk({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tj.fromNow=function(e){return this.from(tr(),e)},tj.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||tr(e).isValid())?tk({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tj.toNow=function(e){return this.to(tr(),e)},tj.get=function(e){return O(this[e=L(e)])?this[e]():this},tj.invalidAt=function(){return c(this).overflow},tj.isAfter=function(e,t){var n=k(e)?e:tr(e);return!!(this.isValid()&&n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},tj.isBefore=function(e,t){var n=k(e)?e:tr(e);return!!(this.isValid()&&n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},tj.isBetween=function(e,t,n,s){var i=k(e)?e:tr(e),r=k(t)?t:tr(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n))},tj.isSame=function(e,t){var n,s=k(e)?e:tr(e);return!!(this.isValid()&&s.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},tj.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},tj.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},tj.isValid=function(){return f(this)},tj.lang=tW,tj.locale=tN,tj.localeData=tP,tj.max=to,tj.min=ta,tj.parsingFlags=function(){return h({},c(this))},tj.set=function(e,t){if("object"==typeof e){var n,s=function(e){var t,n=[];for(t in e)i(e,t)&&n.push({unit:t,priority:j[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=E(e)),r=s.length;for(n=0;n<r;n++)this[s[n].unit](e[s[n].unit])}else if(O(this[e=L(e)]))return this[e](t);return this},tj.startOf=function(e){var n,s;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?tC:tR,e){case"year":n=s(this.year(),0,1);break;case"quarter":n=s(this.year(),this.month()-this.month()%3,1);break;case"month":n=s(this.year(),this.month(),1);break;case"week":n=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=s(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=((n+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5;break;case"minute":n=this._d.valueOf(),n-=(n%6e4+6e4)%6e4;break;case"second":n=this._d.valueOf(),n-=(n%1e3+1e3)%1e3}return this._d.setTime(n),t.updateOffset(this,!0),this},tj.subtract=tb,tj.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},tj.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},tj.toDate=function(){return new Date(this.valueOf())},tj.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return 0>n.year()||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+6e4*this.utcOffset()).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},tj.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+i+'("]',t=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",s=r+'[")]',this.format(e+t+n+s)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(tj[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),tj.toJSON=function(){return this.isValid()?this.toISOString():null},tj.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},tj.unix=function(){return Math.floor(this.valueOf()/1e3)},tj.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},tj.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},tj.eraName=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return s[e].name;return""},tj.eraNarrow=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return s[e].narrow;return""},tj.eraAbbr=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return s[e].abbr;return""},tj.eraYear=function(){var e,n,s,i,r=this.localeData().eras();for(e=0,n=r.length;e<n;++e)if(s=r[e].since<=r[e].until?1:-1,i=this.clone().startOf("day").valueOf(),r[e].since<=i&&i<=r[e].until||r[e].until<=i&&i<=r[e].since)return(this.year()-t(r[e].since).year())*s+r[e].offset;return this.year()},tj.year=ew,tj.isLeapYear=function(){return ey(this.year())},tj.weekYear=function(e){return tL.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},tj.isoWeekYear=function(e){return tL.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},tj.quarter=tj.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)},tj.month=eb,tj.daysInMonth=function(){return eM(this.year(),this.month())},tj.week=tj.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add((e-t)*7,"d")},tj.isoWeek=tj.isoWeeks=function(e){var t=eR(this,1,4).week;return null==e?t:this.add((e-t)*7,"d")},tj.weeksInYear=function(){var e=this.localeData()._week;return eC(this.year(),e.dow,e.doy)},tj.weeksInWeekYear=function(){var e=this.localeData()._week;return eC(this.weekYear(),e.dow,e.doy)},tj.isoWeeksInYear=function(){return eC(this.year(),1,4)},tj.isoWeeksInISOWeekYear=function(){return eC(this.isoWeekYear(),1,4)},tj.date=tV,tj.day=tj.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=ev(this,"Day");return null==e?s:(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d"))},tj.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},tj.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n=(t=this.localeData(),"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?n:n-7)},tj.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},tj.hour=tj.hours=ej,tj.minute=tj.minutes=tG,tj.second=tj.seconds=tA,tj.millisecond=tj.milliseconds=y,tj.utcOffset=function(e,n,s){var i,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?r:tg(this);if("string"==typeof e){if(null===(e=t_(er,e)))return this}else 16>Math.abs(e)&&!s&&(e*=60);return!this._isUTC&&n&&(i=tg(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r===e||(!n||this._changeInProgress?tS(this,tk(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this},tj.utc=function(e){return this.utcOffset(0,e)},tj.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(tg(this),"m")),this},tj.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=t_(ei,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},tj.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?tr(e).utcOffset():0,(this.utcOffset()-e)%60==0)},tj.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},tj.isLocal=function(){return!!this.isValid()&&!this._isUTC},tj.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},tj.isUtc=tw,tj.isUTC=tw,tj.zoneAbbr=function(){return this._isUTC?"UTC":""},tj.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},tj.dates=D("dates accessor is deprecated. Use date instead.",tV),tj.months=D("months accessor is deprecated. Use month instead",eb),tj.years=D("years accessor is deprecated. Use year instead",ew),tj.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),tj.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return p(t,this),(t=ts(t))._a?(e=t._isUTC?d(t._a):tr(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)ec(e[s])!==ec(t[s])&&a++;return a+r}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var tz=T.prototype;function t$(e,t,n,s){var i=eX(),r=d().set(s,t);return i[n](r,e)}function tq(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return t$(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=t$(e,s,n,"month");return i}function tB(e,t,n,s){"boolean"==typeof e||(n=t=e,e=!1),o(t)&&(n=t,t=void 0),t=t||"";var i,r=eX(),a=e?r._week.dow:0,u=[];if(null!=n)return t$(t,(n+a)%7,s,"day");for(i=0;i<7;i++)u[i]=t$(t,(i+a)%7,s,"day");return u}tz.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,n):s},tz.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},tz.invalidDate=function(){return this._invalidDate},tz.ordinal=function(e){return this._ordinal.replace("%d",e)},tz.preparse=tZ,tz.postformat=tZ,tz.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return O(i)?i(e,t,n,s):i.replace(/%d/i,e)},tz.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},tz.set=function(e){var t,n;for(n in e)i(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},tz.eras=function(e,n){var s,i,r,a=this._eras||eX("en")._eras;for(s=0,i=a.length;s<i;++s)switch("string"==typeof a[s].since&&(r=t(a[s].since).startOf("day"),a[s].since=r.valueOf()),typeof a[s].until){case"undefined":a[s].until=Infinity;break;case"string":r=t(a[s].until).startOf("day").valueOf(),a[s].until=r.valueOf()}return a},tz.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(s=0,e=e.toUpperCase(),i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s]}else if([r,a,o].indexOf(e)>=0)return u[s]},tz.erasConvertYear=function(e,n){var s=e.since<=e.until?1:-1;return void 0===n?t(e.since).year():t(e.since).year()+(n-e.offset)*s},tz.erasAbbrRegex=function(e){return i(this,"_erasAbbrRegex")||tH.call(this),e?this._erasAbbrRegex:this._erasRegex},tz.erasNameRegex=function(e){return i(this,"_erasNameRegex")||tH.call(this),e?this._erasNameRegex:this._erasRegex},tz.erasNarrowRegex=function(e){return i(this,"_erasNarrowRegex")||tH.call(this),e?this._erasNarrowRegex:this._erasRegex},tz.months=function(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||eY).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone},tz.monthsShort=function(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[eY.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},tz.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return eS.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++)if(i=d([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e)||n&&"MMM"===t&&this._shortMonthsParse[s].test(e)||!n&&this._monthsParse[s].test(e))return s},tz.monthsRegex=function(e){return this._monthsParseExact?(i(this,"_monthsRegex")||eT.call(this),e)?this._monthsStrictRegex:this._monthsRegex:(i(this,"_monthsRegex")||(this._monthsRegex=ea),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},tz.monthsShortRegex=function(e){return this._monthsParseExact?(i(this,"_monthsRegex")||eT.call(this),e)?this._monthsShortStrictRegex:this._monthsShortRegex:(i(this,"_monthsShortRegex")||(this._monthsShortRegex=ea),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},tz.week=function(e){return eR(e,this._week.dow,this._week.doy).week},tz.firstDayOfYear=function(){return this._week.doy},tz.firstDayOfWeek=function(){return this._week.dow},tz.weekdays=function(e,t){var s=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?eU(s,this._week.dow):e?s[e.day()]:s},tz.weekdaysMin=function(e){return!0===e?eU(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},tz.weekdaysShort=function(e){return!0===e?eU(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},tz.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return eF.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=d([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e)||n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},tz.weekdaysRegex=function(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||eL.call(this),e)?this._weekdaysStrictRegex:this._weekdaysRegex:(i(this,"_weekdaysRegex")||(this._weekdaysRegex=ea),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},tz.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||eL.call(this),e)?this._weekdaysShortStrictRegex:this._weekdaysShortRegex:(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ea),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},tz.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||eL.call(this),e)?this._weekdaysMinStrictRegex:this._weekdaysMinRegex:(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ea),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},tz.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tz.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},eJ("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===ec(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),t.lang=D("moment.lang is deprecated. Use moment.locale instead.",eJ),t.langData=D("moment.langData is deprecated. Use moment.localeData instead.",eX);var tJ=Math.abs;function tQ(e,t,n,s){var i=tk(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function tX(e){return e<0?Math.floor(e):Math.ceil(e)}function tK(e){return 4800*e/146097}function t0(e){return 146097*e/4800}function t1(e){return function(){return this.as(e)}}var t2=t1("ms"),t4=t1("s"),t3=t1("m"),t6=t1("h"),t5=t1("d"),t7=t1("w"),t9=t1("M"),t8=t1("Q"),ne=t1("y");function nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var nn=nt("milliseconds"),ns=nt("seconds"),ni=nt("minutes"),nr=nt("hours"),na=nt("days"),no=nt("months"),nu=nt("years"),nl=Math.round,nh={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nd(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}var nc=Math.abs;function nf(e){return(e>0)-(e<0)||+e}function nm(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=nc(this._milliseconds)/1e3,l=nc(this._days),h=nc(this._months),d=this.asSeconds();return d?(e=ed(u/60),t=ed(e/60),u%=60,e%=60,n=ed(h/12),h%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=nf(this._months)!==nf(d)?"-":"",a=nf(this._days)!==nf(d)?"-":"",o=nf(this._milliseconds)!==nf(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(h?r+h+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var n_=th.prototype;return n_.isValid=function(){return this._isValid},n_.abs=function(){var e=this._data;return this._milliseconds=tJ(this._milliseconds),this._days=tJ(this._days),this._months=tJ(this._months),e.milliseconds=tJ(e.milliseconds),e.seconds=tJ(e.seconds),e.minutes=tJ(e.minutes),e.hours=tJ(e.hours),e.months=tJ(e.months),e.years=tJ(e.years),this},n_.add=function(e,t){return tQ(this,e,t,1)},n_.subtract=function(e,t){return tQ(this,e,t,-1)},n_.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=L(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+tK(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(t0(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw Error("Unknown unit "+e)}},n_.asMilliseconds=t2,n_.asSeconds=t4,n_.asMinutes=t3,n_.asHours=t6,n_.asDays=t5,n_.asWeeks=t7,n_.asMonths=t9,n_.asQuarters=t8,n_.asYears=ne,n_.valueOf=t2,n_._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*tX(t0(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=ed(r/1e3),u.seconds=e%60,t=ed(e/60),u.minutes=t%60,n=ed(t/60),u.hours=n%24,a+=ed(n/24),o+=i=ed(tK(a)),a-=tX(t0(i)),s=ed(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},n_.clone=function(){return tk(this)},n_.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},n_.milliseconds=nn,n_.seconds=ns,n_.minutes=ni,n_.hours=nr,n_.days=na,n_.weeks=function(){return ed(this.days()/7)},n_.months=no,n_.years=nu,n_.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i,r,a,o,u,l,h,d,c,f,m,_=!1,y=nh;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(_=e),"object"==typeof t&&(y=Object.assign({},nh,t),null!=t.s&&null==t.ss&&(y.ss=t.s-1)),f=this.localeData(),n=!_,s=y,i=tk(this).abs(),r=nl(i.as("s")),a=nl(i.as("m")),o=nl(i.as("h")),u=nl(i.as("d")),l=nl(i.as("M")),h=nl(i.as("w")),d=nl(i.as("y")),c=r<=s.ss&&["s",r]||r<s.s&&["ss",r]||a<=1&&["m"]||a<s.m&&["mm",a]||o<=1&&["h"]||o<s.h&&["hh",o]||u<=1&&["d"]||u<s.d&&["dd",u],null!=s.w&&(c=c||h<=1&&["w"]||h<s.w&&["ww",h]),(c=c||l<=1&&["M"]||l<s.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,c[3]=+this>0,c[4]=f,m=nd.apply(null,c),_&&(m=f.pastFuture(+this,m)),f.postformat(m)},n_.toISOString=nm,n_.toString=nm,n_.toJSON=nm,n_.locale=tN,n_.localeData=tP,n_.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nm),n_.lang=tW,C("X",0,0,"unix"),C("x",0,0,"valueOf"),el("x",es),el("X",/[+-]?\d+(\.\d{1,3})?/),em("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),em("x",function(e,t,n){n._d=new Date(ec(e))}),t.version="2.30.1",V=tr,t.fn=tj,t.min=function(){var e=[].slice.call(arguments,0);return tu("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return tu("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=d,t.unix=function(e){return tr(1e3*e)},t.months=function(e,t){return tq(e,t,"months")},t.isDate=u,t.locale=eJ,t.invalid=m,t.duration=tk,t.isMoment=k,t.weekdays=function(e,t,n){return tB(e,t,n,"weekdays")},t.parseZone=function(){return tr.apply(null,arguments).parseZone()},t.localeData=eX,t.isDuration=td,t.monthsShort=function(e,t){return tq(e,t,"monthsShort")},t.weekdaysMin=function(e,t,n){return tB(e,t,n,"weekdaysMin")},t.defineLocale=eQ,t.updateLocale=function(e,t){if(null!=t){var n,s,i=eZ;null!=ez[e]&&null!=ez[e].parentLocale?ez[e].set(b(ez[e]._config,t)):(null!=(s=eB(e))&&(i=s._config),t=b(i,t),null==s&&(t.abbr=e),(n=new T(t)).parentLocale=ez[e],ez[e]=n),eJ(e)}else null!=ez[e]&&(null!=ez[e].parentLocale?(ez[e]=ez[e].parentLocale,e===eJ()&&eJ(e)):null!=ez[e]&&delete ez[e]);return ez[e]},t.locales=function(){return A(ez)},t.weekdaysShort=function(e,t,n){return tB(e,t,n,"weekdaysShort")},t.normalizeUnits=L,t.relativeTimeRounding=function(e){return void 0===e?nl:"function"==typeof e&&(nl=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==nh[e]&&(void 0===t?nh[e]:(nh[e]=t,"s"===e&&(nh.ss=t-1),!0))},t.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},t.prototype=tj,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t},e.exports=s()}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/250-a75ee9d79f1140b0.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/250-a75ee9d79f1140b0.js new file mode 100644 index 00000000..882840d1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/250-a75ee9d79f1140b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[250],{19250:function(e,t,o){o.d(t,{$I:function(){return H},AZ:function(){return V},Au:function(){return ew},BL:function(){return eA},Br:function(){return b},E9:function(){return ez},EG:function(){return eZ},EY:function(){return eH},Eb:function(){return j},FC:function(){return er},Gh:function(){return eC},H1:function(){return P},H2:function(){return a},Hx:function(){return ep},I1:function(){return E},It:function(){return S},J$:function(){return Q},K8:function(){return i},K_:function(){return eD},LY:function(){return eP},Lp:function(){return ex},N3:function(){return e_},N8:function(){return K},NL:function(){return e$},NV:function(){return y},Nc:function(){return eN},O3:function(){return eJ},OD:function(){return ey},OU:function(){return ec},Of:function(){return C},Og:function(){return u},Ov:function(){return T},PT:function(){return Z},Qg:function(){return eT},RQ:function(){return k},Rg:function(){return q},Sb:function(){return eO},So:function(){return $},Tj:function(){return eM},VA:function(){return v},Vt:function(){return eV},W_:function(){return J},X:function(){return W},XO:function(){return g},Xd:function(){return ef},Xm:function(){return F},YU:function(){return eR},Zr:function(){return f},a6:function(){return x},ao:function(){return eL},b1:function(){return en},cq:function(){return G},cu:function(){return eF},eH:function(){return D},eZ:function(){return ej},fP:function(){return X},g:function(){return eq},gX:function(){return eE},h3:function(){return eo},hT:function(){return eg},hy:function(){return p},ix:function(){return U},j2:function(){return ee},jA:function(){return eU},jE:function(){return eG},kK:function(){return w},kn:function(){return L},lP:function(){return d},lg:function(){return em},mR:function(){return Y},m_:function(){return A},mp:function(){return eI},n$:function(){return ed},nd:function(){return eY},o6:function(){return M},oC:function(){return ek},pf:function(){return ev},qI:function(){return m},qk:function(){return eK},qm:function(){return h},r6:function(){return B},rs:function(){return N},s0:function(){return R},sN:function(){return eS},t$:function(){return O},t0:function(){return eu},t3:function(){return eX},tN:function(){return ea},u5:function(){return et},um:function(){return eb},v9:function(){return eh},vh:function(){return eB},wX:function(){return _},wd:function(){return es},xA:function(){return ei},zg:function(){return el}});var r=o(41021);let a=null;console.log=function(){};let n=0,c=e=>new Promise(t=>setTimeout(t,e)),s=async e=>{let t=Date.now();t-n>6e4?(e.includes("Authentication Error - Expired Key")&&(r.ZP.info("UI Session Expired. Logging out."),n=t,await c(3e3),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.href="/"),n=t):console.log("Error suppressed to prevent spam:",e)},l="Authorization";function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Authorization";console.log("setGlobalLitellmHeaderName: ".concat(e)),l=e}let d=async()=>{let e=a?"".concat(a,"/openapi.json"):"/openapi.json",t=await fetch(e);return await t.json()},h=async e=>{try{let t=a?"".concat(a,"/get/litellm_model_cost_map"):"/get/litellm_model_cost_map",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}}),r=await o.json();return console.log("received litellm model cost data: ".concat(r)),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},w=async(e,t)=>{try{let c=a?"".concat(a,"/model/new"):"/model/new",s=await fetch(c,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!s.ok){var o,n;let e=await s.json(),t=(null===(n=e.error)||void 0===n?void 0:null===(o=n.message)||void 0===o?void 0:o.error)||"Network response was not ok";throw r.ZP.error(t),Error(t)}let i=await s.json();return console.log("API Response:",i),r.ZP.destroy(),r.ZP.success("Model ".concat(t.model_name," created successfully"),2),i}catch(e){throw console.error("Failed to create key:",e),e}},p=async e=>{try{let t=a?"".concat(a,"/model/settings"):"/model/settings",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},u=async(e,t)=>{console.log("model_id in model delete call: ".concat(t));try{let o=a?"".concat(a,"/model/delete"):"/model/delete",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},y=async(e,t)=>{if(console.log("budget_id in budget delete call: ".concat(t)),null!=e)try{let o=a?"".concat(a,"/budget/delete"):"/budget/delete",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},f=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let o=a?"".concat(a,"/budget/new"):"/budget/new",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},m=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let o=a?"".concat(a,"/budget/update"):"/budget/update",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},g=async(e,t)=>{try{let o=a?"".concat(a,"/invitation/new"):"/invitation/new",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},k=async e=>{try{let t=a?"".concat(a,"/alerting/settings"):"/alerting/settings",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},_=async(e,t,o)=>{try{if(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",o);let r=a?"".concat(a,"/key/generate"):"/key/generate",n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error(e)}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},T=async(e,t,o)=>{try{if(console.log("Form Values in keyCreateCall:",o),o.description&&(o.metadata||(o.metadata={}),o.metadata.description=o.description,delete o.description,o.metadata=JSON.stringify(o.metadata)),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",o);let r=a?"".concat(a,"/user/new"):"/user/new",n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error(e)}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},E=async(e,t)=>{try{let o=a?"".concat(a,"/key/delete"):"/key/delete";console.log("in keyDeleteCall:",t);let r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},j=async(e,t)=>{try{let o=a?"".concat(a,"/user/delete"):"/user/delete";console.log("in userDeleteCall:",t);let r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},N=async(e,t)=>{try{let o=a?"".concat(a,"/team/delete"):"/team/delete";console.log("in teamDeleteCall:",t);let r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},C=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{let n=a?"".concat(a,"/user/list"):"/user/list";console.log("in userListCall");let c=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");c.append("user_ids",e)}o&&c.append("page",o.toString()),r&&c.append("page_size",r.toString());let i=c.toString();i&&(n+="?".concat(i));let d=await fetch(n,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.text();throw s(e),Error("Network response was not ok")}let h=await d.json();return console.log("/user/list API Response:",h),h}catch(e){throw console.error("Failed to create key:",e),e}},b=async function(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0;try{let i;if(r){i=a?"".concat(a,"/user/list"):"/user/list";let e=new URLSearchParams;null!=n&&e.append("page",n.toString()),null!=c&&e.append("page_size",c.toString()),i+="?".concat(e.toString())}else i=a?"".concat(a,"/user/info"):"/user/info","Admin"===o||"Admin Viewer"===o||t&&(i+="?user_id=".concat(t));console.log("Requesting user data from:",i);let d=await fetch(i,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!d.ok){let e=await d.text();throw s(e),Error("Network response was not ok")}let h=await d.json();return console.log("API Response:",h),h}catch(e){throw console.error("Failed to fetch user data:",e),e}},F=async(e,t)=>{try{let o=a?"".concat(a,"/team/info"):"/team/info";t&&(o="".concat(o,"?team_id=").concat(t)),console.log("in teamInfoCall");let r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},S=async function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;try{let r=a?"".concat(a,"/team/list"):"/team/list";console.log("in teamInfoCall");let n=new URLSearchParams;o&&n.append("user_id",o.toString()),t&&n.append("organization_id",t.toString());let c=n.toString();c&&(r+="?".concat(c));let i=await fetch(r,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!i.ok){let e=await i.text();throw s(e),Error("Network response was not ok")}let d=await i.json();return console.log("/team/list API Response:",d),d}catch(e){throw console.error("Failed to create key:",e),e}},x=async e=>{try{let t=a?"".concat(a,"/team/available"):"/team/available";console.log("in availableTeamListCall");let o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log("/team/available_teams API Response:",r),r}catch(e){throw e}},B=async e=>{try{let t=a?"".concat(a,"/organization/list"):"/organization/list",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},O=async(e,t)=>{try{let o=a?"".concat(a,"/organization/info"):"/organization/info";t&&(o="".concat(o,"?organization_id=").concat(t)),console.log("in teamInfoCall");let r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},P=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let o=a?"".concat(a,"/organization/new"):"/organization/new",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},v=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let o=a?"".concat(a,"/organization/update"):"/organization/update",r=await fetch(o,{method:"PATCH",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{try{let o=a?"".concat(a,"/organization/delete"):"/organization/delete",r=await fetch(o,{method:"DELETE",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!r.ok){let e=await r.text();throw s(e),Error("Error deleting organization: ".concat(e))}return await r.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},J=async e=>{try{let t=a?"".concat(a,"/onboarding/get_token"):"/onboarding/get_token";t+="?invite_link=".concat(e);let o=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},A=async(e,t,o,r)=>{let n=a?"".concat(a,"/onboarding/claim_token"):"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:o,password:r})});if(!a.ok){let e=await a.text();throw s(e),Error("Network response was not ok")}let c=await a.json();return console.log(c),c}catch(e){throw console.error("Failed to delete key:",e),e}},R=async(e,t,o)=>{try{let r=a?"".concat(a,"/key/").concat(t,"/regenerate"):"/key/".concat(t,"/regenerate"),n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!n.ok){let e=await n.text();throw s(e),Error("Network response was not ok")}let c=await n.json();return console.log("Regenerate key Response:",c),c}catch(e){throw console.error("Failed to regenerate key:",e),e}},I=!1,z=null,V=async(e,t,o)=>{try{let t=a?"".concat(a,"/v2/model/info"):"/v2/model/info",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw e+="error shown=".concat(I),I||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),r.ZP.info(e,10),I=!0,z&&clearTimeout(z),z=setTimeout(()=>{I=!1},1e4)),Error("Network response was not ok")}let n=await o.json();return console.log("modelInfoCall:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},U=async(e,t)=>{try{let o=a?"".concat(a,"/v1/model/info"):"/v1/model/info";o+="?litellm_model_id=".concat(t);let r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok)throw await r.text(),Error("Network response was not ok");let n=await r.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},L=async e=>{try{let t=a?"".concat(a,"/model_group/info"):"/model_group/info",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let r=await o.json();return console.log("modelHubCall:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},Z=async e=>{try{let t=a?"".concat(a,"/get/allowed_ips"):"/get/allowed_ips",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw Error("Network response was not ok: ".concat(e))}let r=await o.json();return console.log("getAllowedIPs:",r),r.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},D=async(e,t)=>{try{let o=a?"".concat(a,"/add/allowed_ip"):"/add/allowed_ip",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!r.ok){let e=await r.text();throw Error("Network response was not ok: ".concat(e))}let n=await r.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},H=async(e,t)=>{try{let o=a?"".concat(a,"/delete/allowed_ip"):"/delete/allowed_ip",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!r.ok){let e=await r.text();throw Error("Network response was not ok: ".concat(e))}let n=await r.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},M=async(e,t,o,r,n,c,i,d)=>{try{let t=a?"".concat(a,"/model/metrics"):"/model/metrics";r&&(t="".concat(t,"?_selected_model_group=").concat(r,"&startTime=").concat(n,"&endTime=").concat(c,"&api_key=").concat(i,"&customer=").concat(d));let o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t,o,r)=>{try{let n=a?"".concat(a,"/model/streaming_metrics"):"/model/streaming_metrics";t&&(n="".concat(n,"?_selected_model_group=").concat(t,"&startTime=").concat(o,"&endTime=").concat(r));let c=await fetch(n,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw s(e),Error("Network response was not ok")}return await c.json()}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t,o,r,n,c,i,d)=>{try{let t=a?"".concat(a,"/model/metrics/slow_responses"):"/model/metrics/slow_responses";r&&(t="".concat(t,"?_selected_model_group=").concat(r,"&startTime=").concat(n,"&endTime=").concat(c,"&api_key=").concat(i,"&customer=").concat(d));let o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t,o,r,n,c,i,d)=>{try{let t=a?"".concat(a,"/model/metrics/exceptions"):"/model/metrics/exceptions";r&&(t="".concat(t,"?_selected_model_group=").concat(r,"&startTime=").concat(n,"&endTime=").concat(c,"&api_key=").concat(i,"&customer=").concat(d));let o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},$=async function(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;console.log("in /models calls, globalLitellmHeaderName",l);try{let t=a?"".concat(a,"/models"):"/models",o=new URLSearchParams;!0===r&&o.append("return_wildcard_routes","True"),n&&o.append("team_id",n.toString()),o.toString()&&(t+="?".concat(o.toString()));let c=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok){let e=await c.text();throw s(e),Error("Network response was not ok")}return await c.json()}catch(e){throw console.error("Failed to create key:",e),e}},Y=async e=>{try{let t=a?"".concat(a,"/global/spend/teams"):"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let o=await fetch("".concat(t),{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t,o,r)=>{try{let n=a?"".concat(a,"/global/spend/tags"):"/global/spend/tags";t&&o&&(n="".concat(n,"?start_date=").concat(t,"&end_date=").concat(o)),r&&(n+="".concat(n,"&tags=").concat(r.join(","))),console.log("in tagsSpendLogsCall:",n);let c=await fetch("".concat(n),{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},W=async e=>{try{let t=a?"".concat(a,"/global/spend/all_tag_names"):"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let r=await o.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},ee=async e=>{try{let t=a?"".concat(a,"/global/all_end_users"):"/global/all_end_users";console.log("in global/all_end_users call",t);let o=await fetch("".concat(t),{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let r=await o.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t)=>{try{let o=a?"".concat(a,"/user/filter/ui"):"/user/filter/ui";t.get("user_email")&&(o+="?user_email=".concat(t.get("user_email"))),t.get("user_id")&&(o+="?user_id=".concat(t.get("user_id")));let r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t,o,r,n,c,i,d,h)=>{try{let w=a?"".concat(a,"/spend/logs/ui"):"/spend/logs/ui",p=new URLSearchParams;t&&p.append("api_key",t),o&&p.append("team_id",o),r&&p.append("request_id",r),n&&p.append("start_date",n),c&&p.append("end_date",c),i&&p.append("page",i.toString()),d&&p.append("page_size",d.toString()),h&&p.append("user_id",h);let u=p.toString();u&&(w+="?".concat(u));let y=await fetch(w,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!y.ok){let e=await y.text();throw s(e),Error("Network response was not ok")}let f=await y.json();return console.log("Spend Logs Response:",f),f}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},er=async e=>{try{let t=a?"".concat(a,"/global/spend/logs"):"/global/spend/logs",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},ea=async e=>{try{let t=a?"".concat(a,"/global/spend/keys?limit=5"):"/global/spend/keys?limit=5",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t,o,r)=>{try{let n=a?"".concat(a,"/global/spend/end_users"):"/global/spend/end_users",c="";c=t?JSON.stringify({api_key:t,startTime:o,endTime:r}):JSON.stringify({startTime:o,endTime:r});let i={method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:c},d=await fetch(n,i);if(!d.ok){let e=await d.text();throw s(e),Error("Network response was not ok")}let h=await d.json();return console.log(h),h}catch(e){throw console.error("Failed to create key:",e),e}},ec=async(e,t,o,r)=>{try{let n=a?"".concat(a,"/global/spend/provider"):"/global/spend/provider";o&&r&&(n+="?start_date=".concat(o,"&end_date=").concat(r)),t&&(n+="&api_key=".concat(t));let c={method:"GET",headers:{[l]:"Bearer ".concat(e)}},i=await fetch(n,c);if(!i.ok){let e=await i.text();throw s(e),Error("Network response was not ok")}let d=await i.json();return console.log(d),d}catch(e){throw console.error("Failed to fetch spend data:",e),e}},es=async(e,t,o)=>{try{let r=a?"".concat(a,"/global/activity"):"/global/activity";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o));let n={method:"GET",headers:{[l]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},el=async(e,t,o)=>{try{let r=a?"".concat(a,"/global/activity/cache_hits"):"/global/activity/cache_hits";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o));let n={method:"GET",headers:{[l]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},ei=async(e,t,o)=>{try{let r=a?"".concat(a,"/global/activity/model"):"/global/activity/model";t&&o&&(r+="?start_date=".concat(t,"&end_date=").concat(o));let n={method:"GET",headers:{[l]:"Bearer ".concat(e)}},c=await fetch(r,n);if(!c.ok)throw await c.text(),Error("Network response was not ok");let s=await c.json();return console.log(s),s}catch(e){throw console.error("Failed to fetch spend data:",e),e}},ed=async(e,t,o,r)=>{try{let n=a?"".concat(a,"/global/activity/exceptions"):"/global/activity/exceptions";t&&o&&(n+="?start_date=".concat(t,"&end_date=").concat(o)),r&&(n+="&model_group=".concat(r));let c={method:"GET",headers:{[l]:"Bearer ".concat(e)}},s=await fetch(n,c);if(!s.ok)throw await s.text(),Error("Network response was not ok");let i=await s.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eh=async(e,t,o,r)=>{try{let n=a?"".concat(a,"/global/activity/exceptions/deployment"):"/global/activity/exceptions/deployment";t&&o&&(n+="?start_date=".concat(t,"&end_date=").concat(o)),r&&(n+="&model_group=".concat(r));let c={method:"GET",headers:{[l]:"Bearer ".concat(e)}},s=await fetch(n,c);if(!s.ok)throw await s.text(),Error("Network response was not ok");let i=await s.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},ew=async e=>{try{let t=a?"".concat(a,"/global/spend/models?limit=5"):"/global/spend/models?limit=5",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log(r),r}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=a?"".concat(a,"/health/test_connection"):"/health/test_connection",c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[l]:"Bearer ".concat(e)},body:JSON.stringify({litellm_params:t,mode:o})}),s=c.headers.get("content-type");if(!s||!s.includes("application/json")){let e=await c.text();throw console.error("Received non-JSON response:",e),Error("Received non-JSON response (".concat(c.status,": ").concat(c.statusText,"). Check network tab for details."))}let i=await c.json();if(!c.ok||"error"===i.status){if("error"===i.status);else{var r;return{status:"error",message:(null===(r=i.error)||void 0===r?void 0:r.message)||"Connection test failed: ".concat(c.status," ").concat(c.statusText)}}}return i}catch(e){throw console.error("Model connection test error:",e),e}},eu=async(e,t)=>{try{let o=a?"".concat(a,"/key/info"):"/key/info";o="".concat(o,"?key=").concat(t);let r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch key info:",e),e}},ey=async(e,t,o,r,n)=>{try{let c=a?"".concat(a,"/key/list"):"/key/list";console.log("in keyListCall");let i=new URLSearchParams;o&&i.append("team_id",o.toString()),t&&i.append("organization_id",t.toString()),r&&i.append("page",r.toString()),n&&i.append("size",n.toString()),i.append("return_full_object","true"),i.append("include_team_keys","true");let d=i.toString();d&&(c+="?".concat(d));let h=await fetch(c,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!h.ok){let e=await h.text();throw s(e),Error("Network response was not ok")}let w=await h.json();return console.log("/team/list API Response:",w),w}catch(e){throw console.error("Failed to create key:",e),e}},ef=async(e,t)=>{try{let o=a?"".concat(a,"/user/get_users?role=").concat(t):"/user/get_users?role=".concat(t);console.log("in userGetAllUsersCall:",o);let r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to get requested models:",e),e}},em=async e=>{try{let t=a?"".concat(a,"/user/available_roles"):"/user/available_roles",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");let r=await o.json();return console.log("response from user/available_role",r),r}catch(e){throw e}},eg=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=a?"".concat(a,"/team/new"):"/team/new",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ek=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let o=a?"".concat(a,"/credentials"):"/credentials",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},e_=async e=>{try{let t=a?"".concat(a,"/credentials"):"/credentials";console.log("in credentialListCall");let o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log("/credentials API Response:",r),r}catch(e){throw console.error("Failed to create key:",e),e}},eT=async(e,t,o)=>{try{let r=a?"".concat(a,"/credentials"):"/credentials";t?r+="/by_name/".concat(t):o&&(r+="/by_model/".concat(o)),console.log("in credentialListCall");let n=await fetch(r,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw s(e),Error("Network response was not ok")}let c=await n.json();return console.log("/credentials API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eE=async(e,t)=>{try{let o=a?"".concat(a,"/credentials/").concat(t):"/credentials/".concat(t);console.log("in credentialDeleteCall:",t);let r=await fetch(o,{method:"DELETE",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,o)=>{try{if(console.log("Form Values in credentialUpdateCall:",o),o.metadata){console.log("formValues.metadata:",o.metadata);try{o.metadata=JSON.parse(o.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=a?"".concat(a,"/credentials/").concat(t):"/credentials/".concat(t),n=await fetch(r,{method:"PATCH",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eN=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let o=a?"".concat(a,"/key/update"):"/key/update",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eC=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let o=a?"".concat(a,"/team/update"):"/team/update",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eb=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let o=a?"".concat(a,"/model/update"):"/model/update",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let n=await r.json();return console.log("Update model Response:",n),n}catch(e){throw console.error("Failed to update model:",e),e}},eF=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=a?"".concat(a,"/team/member_add"):"/team/member_add",n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eS=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=a?"".concat(a,"/team/member_update"):"/team/member_update",n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,role:o.role,user_id:o.user_id})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=a?"".concat(a,"/team/member_delete"):"/team/member_delete",n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==o.user_email&&{user_email:o.user_email},...void 0!==o.user_id&&{user_id:o.user_id}})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},eB=async(e,t,o)=>{try{console.log("Form Values in teamMemberAddCall:",o);let r=a?"".concat(a,"/organization/member_add"):"/organization/member_add",n=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error(e)}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to create organization member:",e),e}},eO=async(e,t,o)=>{try{console.log("Form Values in organizationMemberDeleteCall:",o);let r=a?"".concat(a,"/organization/member_delete"):"/organization/member_delete",n=await fetch(r,{method:"DELETE",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to delete organization member:",e),e}},eP=async(e,t,o)=>{try{console.log("Form Values in organizationMemberUpdateCall:",o);let r=a?"".concat(a,"/organization/member_update"):"/organization/member_update",n=await fetch(r,{method:"PATCH",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...o})});if(!n.ok){let e=await n.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let c=await n.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to update organization member:",e),e}},ev=async(e,t,o)=>{try{console.log("Form Values in userUpdateUserCall:",t);let r=a?"".concat(a,"/user/update"):"/user/update",n={...t};null!==o&&(n.user_role=o),n=JSON.stringify(n);let c=await fetch(r,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:n});if(!c.ok){let e=await c.text();throw s(e),console.error("Error response from the server:",e),Error("Network response was not ok")}let i=await c.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},eG=async(e,t)=>{try{let o=a?"".concat(a,"/health/services?service=").concat(t):"/health/services?service=".concat(t);console.log("Checking Slack Budget Alerts service health");let n=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw s(e),Error(e)}let c=await n.json();return r.ZP.success("Test request to ".concat(t," made - check logs/alerts on ").concat(t," to verify")),c}catch(e){throw console.error("Failed to perform health check:",e),e}},eJ=async e=>{try{let t=a?"".concat(a,"/budget/list"):"/budget/list",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},eA=async(e,t,o)=>{try{let t=a?"".concat(a,"/get/config/callbacks"):"/get/config/callbacks",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},eR=async e=>{try{let t=a?"".concat(a,"/config/list?config_type=general_settings"):"/config/list?config_type=general_settings",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},eI=async e=>{try{let t=a?"".concat(a,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},ez=async(e,t)=>{try{let o=a?"".concat(a,"/config/field/info?field_name=").concat(t):"/config/field/info?field_name=".concat(t),r=await fetch(o,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok)throw await r.text(),Error("Network response was not ok");return await r.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},eV=async(e,t)=>{try{let o=a?"".concat(a,"/config/pass_through_endpoint"):"/config/pass_through_endpoint",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},eU=async(e,t,o)=>{try{let n=a?"".concat(a,"/config/field/update"):"/config/field/update",c=await fetch(n,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:o,config_type:"general_settings"})});if(!c.ok){let e=await c.text();throw s(e),Error("Network response was not ok")}let i=await c.json();return r.ZP.success("Successfully updated value!"),i}catch(e){throw console.error("Failed to set callbacks:",e),e}},eL=async(e,t)=>{try{let o=a?"".concat(a,"/config/field/delete"):"/config/field/delete",n=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!n.ok){let e=await n.text();throw s(e),Error("Network response was not ok")}let c=await n.json();return r.ZP.success("Field reset on proxy"),c}catch(e){throw console.error("Failed to get callbacks:",e),e}},eZ=async(e,t)=>{try{let o=a?"".concat(a,"/config/pass_through_endpoint?endpoint_id=").concat(t):"/config/pass_through_endpoint".concat(t),r=await fetch(o,{method:"DELETE",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},eD=async(e,t)=>{try{let o=a?"".concat(a,"/config/update"):"/config/update",r=await fetch(o,{method:"POST",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!r.ok){let e=await r.text();throw s(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},eH=async e=>{try{let t=a?"".concat(a,"/health"):"/health",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}return await o.json()}catch(e){throw console.error("Failed to call /health:",e),e}},eM=async e=>{try{let t=a?"".concat(a,"/cache/ping"):"/cache/ping",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},eq=async e=>{try{let t=a?"".concat(a,"/sso/get/ui_settings"):"/sso/get/ui_settings",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok)throw await o.text(),Error("Network response was not ok");return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},eX=async e=>{try{let t=a?"".concat(a,"/guardrails/list"):"/guardrails/list",o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log("Guardrails list response:",r),r}catch(e){throw console.error("Failed to fetch guardrails list:",e),e}},eK=async(e,t,o)=>{try{let r=a?"".concat(a,"/spend/logs/ui/").concat(t,"?start_date=").concat(encodeURIComponent(o)):"/spend/logs/ui/".concat(t,"?start_date=").concat(encodeURIComponent(o));console.log("Fetching log details from:",r);let n=await fetch(r,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw s(e),Error("Network response was not ok")}let c=await n.json();return console.log("Fetched log details:",c),c}catch(e){throw console.error("Failed to fetch log details:",e),e}},e$=async e=>{try{let t=a?"".concat(a,"/get/internal_user_settings"):"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let o=await fetch(t,{method:"GET",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw s(e),Error("Network response was not ok")}let r=await o.json();return console.log("Fetched SSO settings:",r),r}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},eY=async(e,t)=>{try{let o=a?"".concat(a,"/update/internal_user_settings"):"/update/internal_user_settings";console.log("Updating internal user settings:",t);let n=await fetch(o,{method:"PATCH",headers:{[l]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw s(e),Error("Network response was not ok")}let c=await n.json();return console.log("Updated internal user settings:",c),r.ZP.success("Internal user settings updated successfully"),c}catch(e){throw console.error("Failed to update internal user settings:",e),e}}}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/261-57d48f76eec1e568.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/261-57d48f76eec1e568.js new file mode 100644 index 00000000..44e5f1be --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/261-57d48f76eec1e568.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[261],{23639:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},o=n(55015),s=r.forwardRef(function(e,t){return r.createElement(o.Z,(0,a.Z)({},e,{ref:t,icon:i}))})},77565:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},o=n(55015),s=r.forwardRef(function(e,t){return r.createElement(o.Z,(0,a.Z)({},e,{ref:t,icon:i}))})},12485:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var a=n(5853),r=n(31492),i=n(26898),o=n(65954),s=n(1153),l=n(2265),c=n(35242),u=n(42698);n(64016),n(8710),n(33232);let d=(0,s.fn)("Tab"),p=l.forwardRef((e,t)=>{let{icon:n,className:p,children:g}=e,m=(0,a._T)(e,["icon","className","children"]),b=(0,l.useContext)(c.O),f=(0,l.useContext)(u.Z);return l.createElement(r.O,Object.assign({ref:t,className:(0,o.q)(d("root"),"flex whitespace-nowrap truncate max-w-xs outline-none focus:ring-0 text-tremor-default transition duration-100",f?(0,s.bM)(f,i.K.text).selectTextColor:"solid"===b?"ui-selected:text-tremor-content-emphasis dark:ui-selected:text-dark-tremor-content-emphasis":"ui-selected:text-tremor-brand dark:ui-selected:text-dark-tremor-brand",function(e,t){switch(e){case"line":return(0,o.q)("ui-selected:border-b-2 hover:border-b-2 border-transparent transition duration-100 -mb-px px-2 py-2","hover:border-tremor-content hover:text-tremor-content-emphasis text-tremor-content","dark:hover:border-dark-tremor-content-emphasis dark:hover:text-dark-tremor-content-emphasis dark:text-dark-tremor-content",t?(0,s.bM)(t,i.K.border).selectBorderColor:"ui-selected:border-tremor-brand dark:ui-selected:border-dark-tremor-brand");case"solid":return(0,o.q)("border-transparent border rounded-tremor-small px-2.5 py-1","ui-selected:border-tremor-border ui-selected:bg-tremor-background ui-selected:shadow-tremor-input hover:text-tremor-content-emphasis ui-selected:text-tremor-brand","dark:ui-selected:border-dark-tremor-border dark:ui-selected:bg-dark-tremor-background dark:ui-selected:shadow-dark-tremor-input dark:hover:text-dark-tremor-content-emphasis dark:ui-selected:text-dark-tremor-brand",t?(0,s.bM)(t,i.K.text).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}(b,f),p)},m),n?l.createElement(n,{className:(0,o.q)(d("icon"),"flex-none h-5 w-5",g?"mr-2":"")}):null,g?l.createElement("span",null,g):null)});p.displayName="Tab"},18135:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(5853),r=n(31492),i=n(65954),o=n(1153),s=n(2265);let l=(0,o.fn)("TabGroup"),c=s.forwardRef((e,t)=>{let{defaultIndex:n,index:o,onIndexChange:c,children:u,className:d}=e,p=(0,a._T)(e,["defaultIndex","index","onIndexChange","children","className"]);return s.createElement(r.O.Group,Object.assign({as:"div",ref:t,defaultIndex:n,selectedIndex:o,onChange:c,className:(0,i.q)(l("root"),"w-full",d)},p),u)});c.displayName="TabGroup"},35242:function(e,t,n){"use strict";n.d(t,{O:function(){return c},Z:function(){return d}});var a=n(5853),r=n(2265),i=n(42698);n(64016),n(8710),n(33232);var o=n(31492),s=n(65954);let l=(0,n(1153).fn)("TabList"),c=(0,r.createContext)("line"),u={line:(0,s.q)("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:(0,s.q)("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},d=r.forwardRef((e,t)=>{let{color:n,variant:d="line",children:p,className:g}=e,m=(0,a._T)(e,["color","variant","children","className"]);return r.createElement(o.O.List,Object.assign({ref:t,className:(0,s.q)(l("root"),"justify-start overflow-x-clip",u[d],g)},m),r.createElement(c.Provider,{value:d},r.createElement(i.Z.Provider,{value:n},p)))});d.displayName="TabList"},29706:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var a=n(5853);n(42698);var r=n(64016);n(8710);var i=n(33232),o=n(65954),s=n(1153),l=n(2265);let c=(0,s.fn)("TabPanel"),u=l.forwardRef((e,t)=>{let{children:n,className:s}=e,u=(0,a._T)(e,["children","className"]),{selectedValue:d}=(0,l.useContext)(i.Z),p=d===(0,l.useContext)(r.Z);return l.createElement("div",Object.assign({ref:t,className:(0,o.q)(c("root"),"w-full mt-2",p?"":"hidden",s),"aria-selected":p?"true":"false"},u),n)});u.displayName="TabPanel"},77991:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var a=n(5853),r=n(31492);n(42698);var i=n(64016);n(8710);var o=n(33232),s=n(65954),l=n(1153),c=n(2265);let u=(0,l.fn)("TabPanels"),d=c.forwardRef((e,t)=>{let{children:n,className:l}=e,d=(0,a._T)(e,["children","className"]);return c.createElement(r.O.Panels,Object.assign({as:"div",ref:t,className:(0,s.q)(u("root"),"w-full",l)},d),e=>{let{selectedIndex:t}=e;return c.createElement(o.Z.Provider,{value:{selectedValue:t}},c.Children.map(n,(e,t)=>c.createElement(i.Z.Provider,{value:t},e)))})});d.displayName="TabPanels"},42698:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var a=n(2265),r=n(7084);n(65954);let i=(0,a.createContext)(r.fr.Blue)},64016:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});let a=(0,n(2265).createContext)(0)},8710:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});let a=(0,n(2265).createContext)(void 0)},33232:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});let a=(0,n(2265).createContext)({selectedValue:void 0,handleValueChange:void 0})},93942:function(e,t,n){"use strict";n.d(t,{i:function(){return s}});var a=n(2265),r=n(50506),i=n(13959),o=n(71744);function s(e){return t=>a.createElement(i.ZP,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,Object.assign({},t)))}t.Z=(e,t,n,i)=>s(s=>{let{prefixCls:l,style:c}=s,u=a.useRef(null),[d,p]=a.useState(0),[g,m]=a.useState(0),[b,f]=(0,r.Z)(!1,{value:s.open}),{getPrefixCls:E}=a.useContext(o.E_),h=E(t||"select",l);a.useEffect(()=>{if(f(!0),"undefined"!=typeof ResizeObserver){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),m(t.offsetWidth)}),t=setInterval(()=>{var a;let r=n?".".concat(n(h)):".".concat(h,"-dropdown"),i=null===(a=u.current)||void 0===a?void 0:a.querySelector(r);i&&(clearInterval(t),e.observe(i))},10);return()=>{clearInterval(t),e.disconnect()}}},[]);let S=Object.assign(Object.assign({},s),{style:Object.assign(Object.assign({},c),{margin:0}),open:b,visible:b,getPopupContainer:()=>u.current});return i&&(S=i(S)),a.createElement("div",{ref:u,style:{paddingBottom:d,position:"relative",minWidth:g}},a.createElement(e,Object.assign({},S)))})},51369:function(e,t,n){"use strict";let a;n.d(t,{Z:function(){return eY}});var r=n(83145),i=n(2265),o=n(18404),s=n(71744),l=n(13959),c=n(8900),u=n(39725),d=n(54537),p=n(55726),g=n(36760),m=n.n(g),b=n(62236),f=n(68710),E=n(55274),h=n(29961),S=n(69819),y=n(73002),T=n(51248),A=e=>{let{type:t,children:n,prefixCls:a,buttonProps:r,close:o,autoFocus:s,emitEvent:l,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=e,p=i.useRef(!1),g=i.useRef(null),[m,b]=(0,S.Z)(!1),f=function(){null==o||o.apply(void 0,arguments)};i.useEffect(()=>{let e=null;return s&&(e=setTimeout(()=>{var e;null===(e=g.current)||void 0===e||e.focus()})),()=>{e&&clearTimeout(e)}},[]);let E=e=>{e&&e.then&&(b(!0),e.then(function(){b(!1,!0),f.apply(void 0,arguments),p.current=!1},e=>{if(b(!1,!0),p.current=!1,null==c||!c())return Promise.reject(e)}))};return i.createElement(y.ZP,Object.assign({},(0,T.nx)(t),{onClick:e=>{let t;if(!p.current){if(p.current=!0,!d){f();return}if(l){var n;if(t=d(e),u&&!((n=t)&&n.then)){p.current=!1,f(e);return}}else if(d.length)t=d(o),p.current=!1;else if(!(t=d())){f();return}E(t)}},loading:m,prefixCls:a},r,{ref:g}),n)};let R=i.createContext({}),{Provider:I}=R;var N=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:a,mergedOkCancel:r,rootPrefixCls:o,close:s,onCancel:l,onConfirm:c}=(0,i.useContext)(R);return r?i.createElement(A,{isSilent:a,actionFn:l,close:function(){null==s||s.apply(void 0,arguments),null==c||c(!1)},autoFocus:"cancel"===e,buttonProps:t,prefixCls:"".concat(o,"-btn")},n):null},_=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:a,rootPrefixCls:r,okTextLocale:o,okType:s,onConfirm:l,onOk:c}=(0,i.useContext)(R);return i.createElement(A,{isSilent:n,type:s||"primary",actionFn:c,close:function(){null==t||t.apply(void 0,arguments),null==l||l(!0)},autoFocus:"ok"===e,buttonProps:a,prefixCls:"".concat(r,"-btn")},o)},v=n(49638),w=n(1119),k=n(26365),C=n(28036),O=i.createContext({}),x=n(31686),L=n(2161),D=n(92491),P=n(95814),M=n(18242);function F(e,t,n){var a=t;return!a&&n&&(a="".concat(e,"-").concat(n)),a}function U(e,t){var n=e["page".concat(t?"Y":"X","Offset")],a="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[a])&&(n=r.body[a])}return n}var B=n(47970),G=n(28791),$=i.memo(function(e){return e.children},function(e,t){return!t.shouldUpdate}),H={width:0,height:0,overflow:"hidden",outline:"none"},z=i.forwardRef(function(e,t){var n,a,r,o=e.prefixCls,s=e.className,l=e.style,c=e.title,u=e.ariaId,d=e.footer,p=e.closable,g=e.closeIcon,b=e.onClose,f=e.children,E=e.bodyStyle,h=e.bodyProps,S=e.modalRender,y=e.onMouseDown,T=e.onMouseUp,A=e.holderRef,R=e.visible,I=e.forceRender,N=e.width,_=e.height,v=e.classNames,k=e.styles,C=i.useContext(O).panel,L=(0,G.x1)(A,C),D=(0,i.useRef)(),P=(0,i.useRef)();i.useImperativeHandle(t,function(){return{focus:function(){var e;null===(e=D.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===P.current?D.current.focus():e||t!==D.current||P.current.focus()}}});var M={};void 0!==N&&(M.width=N),void 0!==_&&(M.height=_),d&&(n=i.createElement("div",{className:m()("".concat(o,"-footer"),null==v?void 0:v.footer),style:(0,x.Z)({},null==k?void 0:k.footer)},d)),c&&(a=i.createElement("div",{className:m()("".concat(o,"-header"),null==v?void 0:v.header),style:(0,x.Z)({},null==k?void 0:k.header)},i.createElement("div",{className:"".concat(o,"-title"),id:u},c))),p&&(r=i.createElement("button",{type:"button",onClick:b,"aria-label":"Close",className:"".concat(o,"-close")},g||i.createElement("span",{className:"".concat(o,"-close-x")})));var F=i.createElement("div",{className:m()("".concat(o,"-content"),null==v?void 0:v.content),style:null==k?void 0:k.content},r,a,i.createElement("div",(0,w.Z)({className:m()("".concat(o,"-body"),null==v?void 0:v.body),style:(0,x.Z)((0,x.Z)({},E),null==k?void 0:k.body)},h),f),n);return i.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":c?u:null,"aria-modal":"true",ref:L,style:(0,x.Z)((0,x.Z)({},l),M),className:m()(o,s),onMouseDown:y,onMouseUp:T},i.createElement("div",{tabIndex:0,ref:D,style:H,"aria-hidden":"true"}),i.createElement($,{shouldUpdate:R||I},S?S(F):F),i.createElement("div",{tabIndex:0,ref:P,style:H,"aria-hidden":"true"}))}),j=i.forwardRef(function(e,t){var n=e.prefixCls,a=e.title,r=e.style,o=e.className,s=e.visible,l=e.forceRender,c=e.destroyOnClose,u=e.motionName,d=e.ariaId,p=e.onVisibleChanged,g=e.mousePosition,b=(0,i.useRef)(),f=i.useState(),E=(0,k.Z)(f,2),h=E[0],S=E[1],y={};function T(){var e,t,n,a,r,i=(n={left:(t=(e=b.current).getBoundingClientRect()).left,top:t.top},r=(a=e.ownerDocument).defaultView||a.parentWindow,n.left+=U(r),n.top+=U(r,!0),n);S(g?"".concat(g.x-i.left,"px ").concat(g.y-i.top,"px"):"")}return h&&(y.transformOrigin=h),i.createElement(B.ZP,{visible:s,onVisibleChanged:p,onAppearPrepare:T,onEnterPrepare:T,forceRender:l,motionName:u,removeOnLeave:c,ref:b},function(s,l){var c=s.className,u=s.style;return i.createElement(z,(0,w.Z)({},e,{ref:t,title:a,ariaId:d,prefixCls:n,holderRef:l,style:(0,x.Z)((0,x.Z)((0,x.Z)({},u),r),y),className:m()(o,c)}))})});function V(e){var t=e.prefixCls,n=e.style,a=e.visible,r=e.maskProps,o=e.motionName,s=e.className;return i.createElement(B.ZP,{key:"mask",visible:a,motionName:o,leavedClassName:"".concat(t,"-mask-hidden")},function(e,a){var o=e.className,l=e.style;return i.createElement("div",(0,w.Z)({ref:a,style:(0,x.Z)((0,x.Z)({},l),n),className:m()("".concat(t,"-mask"),o,s)},r))})}function W(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,a=e.zIndex,r=e.visible,o=void 0!==r&&r,s=e.keyboard,l=void 0===s||s,c=e.focusTriggerAfterClose,u=void 0===c||c,d=e.wrapStyle,p=e.wrapClassName,g=e.wrapProps,b=e.onClose,f=e.afterOpenChange,E=e.afterClose,h=e.transitionName,S=e.animation,y=e.closable,T=e.mask,A=void 0===T||T,R=e.maskTransitionName,I=e.maskAnimation,N=e.maskClosable,_=e.maskStyle,v=e.maskProps,C=e.rootClassName,O=e.classNames,U=e.styles,B=(0,i.useRef)(),G=(0,i.useRef)(),$=(0,i.useRef)(),H=i.useState(o),z=(0,k.Z)(H,2),W=z[0],q=z[1],Y=(0,D.Z)();function K(e){null==b||b(e)}var Z=(0,i.useRef)(!1),X=(0,i.useRef)(),Q=null;return(void 0===N||N)&&(Q=function(e){Z.current?Z.current=!1:G.current===e.target&&K(e)}),(0,i.useEffect)(function(){o&&(q(!0),(0,L.Z)(G.current,document.activeElement)||(B.current=document.activeElement))},[o]),(0,i.useEffect)(function(){return function(){clearTimeout(X.current)}},[]),i.createElement("div",(0,w.Z)({className:m()("".concat(n,"-root"),C)},(0,M.Z)(e,{data:!0})),i.createElement(V,{prefixCls:n,visible:A&&o,motionName:F(n,R,I),style:(0,x.Z)((0,x.Z)({zIndex:a},_),null==U?void 0:U.mask),maskProps:v,className:null==O?void 0:O.mask}),i.createElement("div",(0,w.Z)({tabIndex:-1,onKeyDown:function(e){if(l&&e.keyCode===P.Z.ESC){e.stopPropagation(),K(e);return}o&&e.keyCode===P.Z.TAB&&$.current.changeActive(!e.shiftKey)},className:m()("".concat(n,"-wrap"),p,null==O?void 0:O.wrapper),ref:G,onClick:Q,style:(0,x.Z)((0,x.Z)((0,x.Z)({zIndex:a},d),null==U?void 0:U.wrapper),{},{display:W?null:"none"})},g),i.createElement(j,(0,w.Z)({},e,{onMouseDown:function(){clearTimeout(X.current),Z.current=!0},onMouseUp:function(){X.current=setTimeout(function(){Z.current=!1})},ref:$,closable:void 0===y||y,ariaId:Y,prefixCls:n,visible:o&&W,onClose:K,onVisibleChanged:function(e){if(e)!function(){if(!(0,L.Z)(G.current,document.activeElement)){var e;null===(e=$.current)||void 0===e||e.focus()}}();else{if(q(!1),A&&B.current&&u){try{B.current.focus({preventScroll:!0})}catch(e){}B.current=null}W&&(null==E||E())}null==f||f(e)},motionName:F(n,h,S)}))))}j.displayName="Content",n(32559);var q=function(e){var t=e.visible,n=e.getContainer,a=e.forceRender,r=e.destroyOnClose,o=void 0!==r&&r,s=e.afterClose,l=e.panelRef,c=i.useState(t),u=(0,k.Z)(c,2),d=u[0],p=u[1],g=i.useMemo(function(){return{panel:l}},[l]);return(i.useEffect(function(){t&&p(!0)},[t]),a||!o||d)?i.createElement(O.Provider,{value:g},i.createElement(C.Z,{open:t||a||d,autoDestroy:!1,getContainer:n,autoLock:t||d},i.createElement(W,(0,w.Z)({},e,{destroyOnClose:o,afterClose:function(){null==s||s(),p(!1)}})))):null};q.displayName="Dialog";var Y=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.createElement(v.Z,null),r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if("boolean"==typeof e?!e:void 0===t?!r:!1===t||null===t)return[!1,null];let o="boolean"==typeof t||null==t?a:t;return[!0,n?n(o):o]},K=n(94981),Z=n(95140),X=n(39109),Q=n(65658),J=n(74126);function ee(){}let et=i.createContext({add:ee,remove:ee});var en=n(86586),ea=()=>{let{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,i.useContext)(R);return i.createElement(y.ZP,Object.assign({onClick:n},e),t)},er=()=>{let{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:a,onOk:r}=(0,i.useContext)(R);return i.createElement(y.ZP,Object.assign({},(0,T.nx)(n),{loading:e,onClick:r},t),a)},ei=n(92246);function eo(e,t){return i.createElement("span",{className:"".concat(e,"-close-x")},t||i.createElement(v.Z,{className:"".concat(e,"-close-icon")}))}let es=e=>{let t;let{okText:n,okType:a="primary",cancelText:o,confirmLoading:s,onOk:l,onCancel:c,okButtonProps:u,cancelButtonProps:d,footer:p}=e,[g]=(0,E.Z)("Modal",(0,ei.A)()),m={confirmLoading:s,okButtonProps:u,cancelButtonProps:d,okTextLocale:n||(null==g?void 0:g.okText),cancelTextLocale:o||(null==g?void 0:g.cancelText),okType:a,onOk:l,onCancel:c},b=i.useMemo(()=>m,(0,r.Z)(Object.values(m)));return"function"==typeof p||void 0===p?(t=i.createElement(i.Fragment,null,i.createElement(ea,null),i.createElement(er,null)),"function"==typeof p&&(t=p(t,{OkBtn:er,CancelBtn:ea})),t=i.createElement(I,{value:b},t)):t=p,i.createElement(en.n,{disabled:!1},t)};var el=n(12918),ec=n(11699),eu=n(691),ed=n(3104),ep=n(80669),eg=n(352);function em(e){return{position:e,inset:0}}let eb=e=>{let{componentCls:t,antCls:n}=e;return[{["".concat(t,"-root")]:{["".concat(t).concat(n,"-zoom-enter, ").concat(t).concat(n,"-zoom-appear")]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},["".concat(t).concat(n,"-zoom-leave ").concat(t,"-content")]:{pointerEvents:"none"},["".concat(t,"-mask")]:Object.assign(Object.assign({},em("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",["".concat(t,"-hidden")]:{display:"none"}}),["".concat(t,"-wrap")]:Object.assign(Object.assign({},em("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch",["&:has(".concat(t).concat(n,"-zoom-enter), &:has(").concat(t).concat(n,"-zoom-appear)")]:{pointerEvents:"none"}})}},{["".concat(t,"-root")]:(0,ec.J$)(e)}]},ef=e=>{let{componentCls:t}=e;return[{["".concat(t,"-root")]:{["".concat(t,"-wrap-rtl")]:{direction:"rtl"},["".concat(t,"-centered")]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},["@media (max-width: ".concat(e.screenSMMax,"px)")]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:"".concat((0,eg.bf)(e.marginXS)," auto")},["".concat(t,"-centered")]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},(0,el.Wf)(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:"calc(100vw - ".concat((0,eg.bf)(e.calc(e.margin).mul(2).equal()),")"),margin:"0 auto",paddingBottom:e.paddingLG,["".concat(t,"-title")]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},["".concat(t,"-content")]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},["".concat(t,"-close")]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:"color ".concat(e.motionDurationMid,", background-color ").concat(e.motionDurationMid),"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:"".concat((0,eg.bf)(e.modalCloseBtnSize)),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.closeBtnHoverBg,textDecoration:"none"},"&:active":{backgroundColor:e.closeBtnActiveBg}},(0,el.Qy)(e)),["".concat(t,"-header")]:{color:e.colorText,background:e.headerBg,borderRadius:"".concat((0,eg.bf)(e.borderRadiusLG)," ").concat((0,eg.bf)(e.borderRadiusLG)," 0 0"),marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},["".concat(t,"-body")]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding},["".concat(t,"-footer")]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,["> ".concat(e.antCls,"-btn + ").concat(e.antCls,"-btn")]:{marginInlineStart:e.marginXS}},["".concat(t,"-open")]:{overflow:"hidden"}})},{["".concat(t,"-pure-panel")]:{top:"auto",padding:0,display:"flex",flexDirection:"column",["".concat(t,"-content,\n ").concat(t,"-body,\n ").concat(t,"-confirm-body-wrapper")]:{display:"flex",flexDirection:"column",flex:"auto"},["".concat(t,"-confirm-body")]:{marginBottom:"auto"}}}]},eE=e=>{let{componentCls:t}=e;return{["".concat(t,"-root")]:{["".concat(t,"-wrap-rtl")]:{direction:"rtl",["".concat(t,"-confirm-body")]:{direction:"rtl"}}}}},eh=e=>{let t=e.padding,n=e.fontSizeHeading5,a=e.lineHeightHeading5;return(0,ed.TS)(e,{modalHeaderHeight:e.calc(e.calc(a).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalIconHoverColor:e.colorIconHover,modalCloseIconColor:e.colorIcon,modalCloseBtnSize:e.fontHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},eS=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent,closeBtnActiveBg:e.wireframe?"transparent":e.colorFillContentHover,contentPadding:e.wireframe?0:"".concat((0,eg.bf)(e.paddingMD)," ").concat((0,eg.bf)(e.paddingContentHorizontalLG)),headerPadding:e.wireframe?"".concat((0,eg.bf)(e.padding)," ").concat((0,eg.bf)(e.paddingLG)):0,headerBorderBottom:e.wireframe?"".concat((0,eg.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit):"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?"".concat((0,eg.bf)(e.paddingXS)," ").concat((0,eg.bf)(e.padding)):0,footerBorderTop:e.wireframe?"".concat((0,eg.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit):"none",footerBorderRadius:e.wireframe?"0 0 ".concat((0,eg.bf)(e.borderRadiusLG)," ").concat((0,eg.bf)(e.borderRadiusLG)):0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?"".concat((0,eg.bf)(2*e.padding)," ").concat((0,eg.bf)(2*e.padding)," ").concat((0,eg.bf)(e.paddingLG)):0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM});var ey=(0,ep.I$)("Modal",e=>{let t=eh(e);return[ef(t),eE(t),eb(t),(0,eu._y)(t,"zoom")]},eS,{unitless:{titleLineHeight:!0}}),eT=n(64024),eA=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)0>t.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};(0,K.Z)()&&window.document.documentElement&&document.documentElement.addEventListener("click",e=>{a={x:e.pageX,y:e.pageY},setTimeout(()=>{a=null},100)},!0);var eR=e=>{var t;let{getPopupContainer:n,getPrefixCls:r,direction:o,modal:l}=i.useContext(s.E_),c=t=>{let{onCancel:n}=e;null==n||n(t)},{prefixCls:u,className:d,rootClassName:p,open:g,wrapClassName:E,centered:h,getContainer:S,closeIcon:y,closable:T,focusTriggerAfterClose:A=!0,style:R,visible:I,width:N=520,footer:_,classNames:w,styles:k}=e,C=eA(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","closable","focusTriggerAfterClose","style","visible","width","footer","classNames","styles"]),O=r("modal",u),x=r(),L=(0,eT.Z)(O),[D,P,M]=ey(O,L),F=m()(E,{["".concat(O,"-centered")]:!!h,["".concat(O,"-wrap-rtl")]:"rtl"===o}),U=null!==_&&i.createElement(es,Object.assign({},e,{onOk:t=>{let{onOk:n}=e;null==n||n(t)},onCancel:c})),[B,G]=Y(T,y,e=>eo(O,e),i.createElement(v.Z,{className:"".concat(O,"-close-icon")}),!0),$=function(e){let t=i.useContext(et),n=i.useRef();return(0,J.zX)(a=>{if(a){let r=e?a.querySelector(e):a;t.add(r),n.current=r}else t.remove(n.current)})}(".".concat(O,"-content")),[H,z]=(0,b.Cn)("Modal",C.zIndex);return D(i.createElement(Q.BR,null,i.createElement(X.Ux,{status:!0,override:!0},i.createElement(Z.Z.Provider,{value:z},i.createElement(q,Object.assign({width:N},C,{zIndex:H,getContainer:void 0===S?n:S,prefixCls:O,rootClassName:m()(P,p,M,L),footer:U,visible:null!=g?g:I,mousePosition:null!==(t=C.mousePosition)&&void 0!==t?t:a,onClose:c,closable:B,closeIcon:G,focusTriggerAfterClose:A,transitionName:(0,f.m)(x,"zoom",e.transitionName),maskTransitionName:(0,f.m)(x,"fade",e.maskTransitionName),className:m()(P,d,null==l?void 0:l.className),style:Object.assign(Object.assign({},null==l?void 0:l.style),R),classNames:Object.assign(Object.assign({wrapper:F},null==l?void 0:l.classNames),w),styles:Object.assign(Object.assign({},null==l?void 0:l.styles),k),panelRef:$}))))))};let eI=e=>{let{componentCls:t,titleFontSize:n,titleLineHeight:a,modalConfirmIconSize:r,fontSize:i,lineHeight:o,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=e,u="".concat(t,"-confirm");return{[u]:{"&-rtl":{direction:"rtl"},["".concat(e.antCls,"-modal-header")]:{display:"none"},["".concat(u,"-body-wrapper")]:Object.assign({},(0,el.dF)()),["&".concat(t," ").concat(t,"-body")]:{padding:c},["".concat(u,"-body")]:{display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(e.iconCls)]:{flex:"none",fontSize:r,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(r).equal()).div(2).equal()},["&-has-title > ".concat(e.iconCls)]:{marginTop:e.calc(e.calc(s).sub(r).equal()).div(2).equal()}},["".concat(u,"-paragraph")]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:"calc(100% - ".concat((0,eg.bf)(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal()),")")},["".concat(u,"-title")]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:a},["".concat(u,"-content")]:{color:e.colorText,fontSize:i,lineHeight:o},["".concat(u,"-btns")]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,["".concat(e.antCls,"-btn + ").concat(e.antCls,"-btn")]:{marginBottom:0,marginInlineStart:e.marginXS}}},["".concat(u,"-error ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorError},["".concat(u,"-warning ").concat(u,"-body > ").concat(e.iconCls,",\n ").concat(u,"-confirm ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorWarning},["".concat(u,"-info ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorInfo},["".concat(u,"-success ").concat(u,"-body > ").concat(e.iconCls)]:{color:e.colorSuccess}}};var eN=(0,ep.bk)(["Modal","confirm"],e=>[eI(eh(e))],eS,{order:-1e3}),e_=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)0>t.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function ev(e){let{prefixCls:t,icon:n,okText:a,cancelText:o,confirmPrefixCls:s,type:l,okCancel:g,footer:b,locale:f}=e,h=e_(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]),S=n;if(!n&&null!==n)switch(l){case"info":S=i.createElement(p.Z,null);break;case"success":S=i.createElement(c.Z,null);break;case"error":S=i.createElement(u.Z,null);break;default:S=i.createElement(d.Z,null)}let y=null!=g?g:"confirm"===l,T=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),[A]=(0,E.Z)("Modal"),R=f||A,v=a||(y?null==R?void 0:R.okText:null==R?void 0:R.justOkText),w=Object.assign({autoFocusButton:T,cancelTextLocale:o||(null==R?void 0:R.cancelText),okTextLocale:v,mergedOkCancel:y},h),k=i.useMemo(()=>w,(0,r.Z)(Object.values(w))),C=i.createElement(i.Fragment,null,i.createElement(N,null),i.createElement(_,null)),O=void 0!==e.title&&null!==e.title,x="".concat(s,"-body");return i.createElement("div",{className:"".concat(s,"-body-wrapper")},i.createElement("div",{className:m()(x,{["".concat(x,"-has-title")]:O})},S,i.createElement("div",{className:"".concat(s,"-paragraph")},O&&i.createElement("span",{className:"".concat(s,"-title")},e.title),i.createElement("div",{className:"".concat(s,"-content")},e.content))),void 0===b||"function"==typeof b?i.createElement(I,{value:k},i.createElement("div",{className:"".concat(s,"-btns")},"function"==typeof b?b(C,{OkBtn:_,CancelBtn:N}):C)):b,i.createElement(eN,{prefixCls:t}))}let ew=e=>{let{close:t,zIndex:n,afterClose:a,open:r,keyboard:o,centered:s,getContainer:l,maskStyle:c,direction:u,prefixCls:d,wrapClassName:p,rootPrefixCls:g,bodyStyle:E,closable:S=!1,closeIcon:y,modalRender:T,focusTriggerAfterClose:A,onConfirm:R,styles:I}=e,N="".concat(d,"-confirm"),_=e.width||416,v=e.style||{},w=void 0===e.mask||e.mask,k=void 0!==e.maskClosable&&e.maskClosable,C=m()(N,"".concat(N,"-").concat(e.type),{["".concat(N,"-rtl")]:"rtl"===u},e.className),[,O]=(0,h.ZP)(),x=i.useMemo(()=>void 0!==n?n:O.zIndexPopupBase+b.u6,[n,O]);return i.createElement(eR,{prefixCls:d,className:C,wrapClassName:m()({["".concat(N,"-centered")]:!!e.centered},p),onCancel:()=>{null==t||t({triggerCancel:!0}),null==R||R(!1)},open:r,title:"",footer:null,transitionName:(0,f.m)(g||"","zoom",e.transitionName),maskTransitionName:(0,f.m)(g||"","fade",e.maskTransitionName),mask:w,maskClosable:k,style:v,styles:Object.assign({body:E,mask:c},I),width:_,zIndex:x,afterClose:a,keyboard:o,centered:s,getContainer:l,closable:S,closeIcon:y,modalRender:T,focusTriggerAfterClose:A},i.createElement(ev,Object.assign({},e,{confirmPrefixCls:N})))};var ek=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:a,theme:r}=e;return i.createElement(l.ZP,{prefixCls:t,iconPrefixCls:n,direction:a,theme:r},i.createElement(ew,Object.assign({},e)))},eC=[];let eO="",ex=e=>{var t,n;let{prefixCls:a,getContainer:r,direction:o}=e,l=(0,ei.A)(),c=(0,i.useContext)(s.E_),u=eO||c.getPrefixCls(),d=a||"".concat(u,"-modal"),p=r;return!1===p&&(p=void 0),i.createElement(ek,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:null!=o?o:c.direction,locale:null!==(n=null===(t=c.locale)||void 0===t?void 0:t.Modal)&&void 0!==n?n:l,getContainer:p}))};function eL(e){let t;let n=(0,l.w6)(),a=document.createDocumentFragment(),s=Object.assign(Object.assign({},e),{close:d,open:!0});function c(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];let s=n.some(e=>e&&e.triggerCancel);e.onCancel&&s&&e.onCancel.apply(e,[()=>{}].concat((0,r.Z)(n.slice(1))));for(let e=0;e<eC.length;e++)if(eC[e]===d){eC.splice(e,1);break}(0,o.v)(a)}function u(e){clearTimeout(t),t=setTimeout(()=>{let t=n.getPrefixCls(void 0,eO),r=n.getIconPrefixCls(),s=n.getTheme(),c=i.createElement(ex,Object.assign({},e));(0,o.s)(i.createElement(l.ZP,{prefixCls:t,iconPrefixCls:r,theme:s},n.holderRender?n.holderRender(c):c),a)})}function d(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];(s=Object.assign(Object.assign({},s),{open:!1,afterClose:()=>{"function"==typeof e.afterClose&&e.afterClose(),c.apply(this,n)}})).visible&&delete s.visible,u(s)}return u(s),eC.push(d),{destroy:d,update:function(e){u(s="function"==typeof e?e(s):Object.assign(Object.assign({},s),e))}}}function eD(e){return Object.assign(Object.assign({},e),{type:"warning"})}function eP(e){return Object.assign(Object.assign({},e),{type:"info"})}function eM(e){return Object.assign(Object.assign({},e),{type:"success"})}function eF(e){return Object.assign(Object.assign({},e),{type:"error"})}function eU(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var eB=n(93942),eG=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)0>t.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},e$=(0,eB.i)(e=>{let{prefixCls:t,className:n,closeIcon:a,closable:r,type:o,title:l,children:c,footer:u}=e,d=eG(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:p}=i.useContext(s.E_),g=p(),b=t||p("modal"),f=(0,eT.Z)(g),[E,h,S]=ey(b,f),y="".concat(b,"-confirm"),T={};return T=o?{closable:null!=r&&r,title:"",footer:"",children:i.createElement(ev,Object.assign({},e,{prefixCls:b,confirmPrefixCls:y,rootPrefixCls:g,content:c}))}:{closable:null==r||r,title:l,footer:null!==u&&i.createElement(es,Object.assign({},e)),children:c},E(i.createElement(z,Object.assign({prefixCls:b,className:m()(h,"".concat(b,"-pure-panel"),o&&y,o&&"".concat(y,"-").concat(o),n,S,f)},d,{closeIcon:eo(b,a),closable:r},T)))}),eH=n(13823),ez=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)0>t.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},ej=i.forwardRef((e,t)=>{var n,{afterClose:a,config:o}=e,l=ez(e,["afterClose","config"]);let[c,u]=i.useState(!0),[d,p]=i.useState(o),{direction:g,getPrefixCls:m}=i.useContext(s.E_),b=m("modal"),f=m(),h=function(){u(!1);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let a=t.some(e=>e&&e.triggerCancel);d.onCancel&&a&&d.onCancel.apply(d,[()=>{}].concat((0,r.Z)(t.slice(1))))};i.useImperativeHandle(t,()=>({destroy:h,update:e=>{p(t=>Object.assign(Object.assign({},t),e))}}));let S=null!==(n=d.okCancel)&&void 0!==n?n:"confirm"===d.type,[y]=(0,E.Z)("Modal",eH.Z.Modal);return i.createElement(ek,Object.assign({prefixCls:b,rootPrefixCls:f},d,{close:h,open:c,afterClose:()=>{var e;a(),null===(e=d.afterClose)||void 0===e||e.call(d)},okText:d.okText||(S?null==y?void 0:y.okText:null==y?void 0:y.justOkText),direction:d.direction||g,cancelText:d.cancelText||(null==y?void 0:y.cancelText)},l))});let eV=0,eW=i.memo(i.forwardRef((e,t)=>{let[n,a]=function(){let[e,t]=i.useState([]);return[e,i.useCallback(e=>(t(t=>[].concat((0,r.Z)(t),[e])),()=>{t(t=>t.filter(t=>t!==e))}),[])]}();return i.useImperativeHandle(t,()=>({patchElement:a}),[]),i.createElement(i.Fragment,null,n)}));function eq(e){return eL(eD(e))}eR.useModal=function(){let e=i.useRef(null),[t,n]=i.useState([]);i.useEffect(()=>{t.length&&((0,r.Z)(t).forEach(e=>{e()}),n([]))},[t]);let a=i.useCallback(t=>function(a){var o;let s,l;eV+=1;let c=i.createRef(),u=new Promise(e=>{s=e}),d=!1,p=i.createElement(ej,{key:"modal-".concat(eV),config:t(a),ref:c,afterClose:()=>{null==l||l()},isSilent:()=>d,onConfirm:e=>{s(e)}});return(l=null===(o=e.current)||void 0===o?void 0:o.patchElement(p))&&eC.push(l),{destroy:()=>{function e(){var e;null===(e=c.current)||void 0===e||e.destroy()}c.current?e():n(t=>[].concat((0,r.Z)(t),[e]))},update:e=>{function t(){var t;null===(t=c.current)||void 0===t||t.update(e)}c.current?t():n(e=>[].concat((0,r.Z)(e),[t]))},then:e=>(d=!0,u.then(e))}},[]);return[i.useMemo(()=>({info:a(eP),success:a(eM),error:a(eF),warning:a(eD),confirm:a(eU)}),[]),i.createElement(eW,{key:"modal-holder",ref:e})]},eR.info=function(e){return eL(eP(e))},eR.success=function(e){return eL(eM(e))},eR.error=function(e){return eL(eF(e))},eR.warning=eq,eR.warn=eq,eR.confirm=function(e){return eL(eU(e))},eR.destroyAll=function(){for(;eC.length;){let e=eC.pop();e&&e()}},eR.config=function(e){let{rootPrefixCls:t}=e;eO=t},eR._InternalPanelDoNotUseOrYouWillBeFired=e$;var eY=eR},11699:function(e,t,n){"use strict";n.d(t,{J$:function(){return s}});var a=n(352),r=n(37133);let i=new a.E4("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),o=new a.E4("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{antCls:n}=e,a="".concat(n,"-fade"),s=t?"&":"";return[(0,r.R)(a,i,o,e.motionDurationMid,t),{["\n ".concat(s).concat(a,"-enter,\n ").concat(s).concat(a,"-appear\n ")]:{opacity:0,animationTimingFunction:"linear"},["".concat(s).concat(a,"-leave")]:{animationTimingFunction:"linear"}}]}},26035:function(e){"use strict";e.exports=function(e,n){for(var a,r,i,o=e||"",s=n||"div",l={},c=0;c<o.length;)t.lastIndex=c,i=t.exec(o),(a=o.slice(c,i?i.index:o.length))&&(r?"#"===r?l.id=a:l.className?l.className.push(a):l.className=[a]:s=a,c+=a.length),i&&(r=i[0],c++);return{type:"element",tagName:s,properties:l,children:[]}};var t=/[#.]/g},24748:function(e,t,n){"use strict";var a=n(93821),r=n(96532),i=n(26035),o=n(99700).Q,s=n(58369).Q;e.exports=function(e,t,n){var r=n?function(e){for(var t,n=e.length,a=-1,r={};++a<n;)r[(t=e[a]).toLowerCase()]=t;return r}(n):null;return function(n,u){var d,p,g,m,b=i(n,t),f=Array.prototype.slice.call(arguments,2),E=b.tagName.toLowerCase();if(b.tagName=r&&l.call(r,E)?r[E]:E,u&&("string"==typeof(d=u)||"length"in d||(p=b.tagName,g=d.type,"input"!==p&&g&&"string"==typeof g&&("object"==typeof d.children&&"length"in d.children||((g=g.toLowerCase(),"button"===p)?"menu"!==g&&"submit"!==g&&"reset"!==g&&"button"!==g:"value"in d))))&&(f.unshift(u),u=null),u)for(m in u)!function(t,n,r){var i,l,u;null!=r&&r==r&&(l=(i=a(e,n)).property,"string"==typeof(u=r)&&(i.spaceSeparated?u=o(u):i.commaSeparated?u=s(u):i.commaOrSpaceSeparated&&(u=o(s(u).join(" ")))),"style"===l&&"string"!=typeof r&&(u=function(e){var t,n=[];for(t in e)n.push([t,e[t]].join(": "));return n.join("; ")}(u)),"className"===l&&t.className&&(u=t.className.concat(u)),t[l]=function(e,t,n){var a,r,i;if("object"!=typeof n||!("length"in n))return c(e,t,n);for(r=n.length,a=-1,i=[];++a<r;)i[a]=c(e,t,n[a]);return i}(i,l,u))}(b.properties,m,u[m]);return function e(t,n){var a,r;if("string"==typeof n||"number"==typeof n){t.push({type:"text",value:String(n)});return}if("object"==typeof n&&"length"in n){for(a=-1,r=n.length;++a<r;)e(t,n[a]);return}if("object"!=typeof n||!("type"in n))throw Error("Expected node, nodes, or string, got `"+n+"`");t.push(n)}(b.children,f),"template"===b.tagName&&(b.content={type:"root",children:b.children},b.children=[]),b}};var l={}.hasOwnProperty;function c(e,t,n){var a=n;return e.number||e.positiveNumber?isNaN(a)||""===a||(a=Number(a)):(e.boolean||e.overloadedBoolean)&&"string"==typeof a&&(""===a||r(n)===r(t))&&(a=!0),a}},98007:function(e,t,n){"use strict";var a=n(30466),r=n(24748)(a,"div");r.displayName="html",e.exports=r},33819:function(e,t,n){"use strict";e.exports=n(98007)},58369:function(e,t){"use strict";t.Q=function(e){for(var t,n=[],a=String(e||""),r=a.indexOf(","),i=0,o=!1;!o;)-1===r&&(r=a.length,o=!0),((t=a.slice(i,r).trim())||!o)&&n.push(t),i=r+1,r=a.indexOf(",",i);return n}},93821:function(e,t,n){"use strict";var a=n(96532),r=n(51351),i=n(24192),o="data";e.exports=function(e,t){var n,p,g,m=a(t),b=t,f=i;return m in e.normal?e.property[e.normal[m]]:(m.length>4&&m.slice(0,4)===o&&s.test(t)&&("-"===t.charAt(4)?b=o+(n=t.slice(5).replace(l,d)).charAt(0).toUpperCase()+n.slice(1):(g=(p=t).slice(4),t=l.test(g)?p:("-"!==(g=g.replace(c,u)).charAt(0)&&(g="-"+g),o+g)),f=r),new f(b,t))};var s=/^data[-\w.:]+$/i,l=/-[a-z]/g,c=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},30466:function(e,t,n){"use strict";var a=n(82855),r=n(64541),i=n(80808),o=n(44987),s=n(72731),l=n(98946);e.exports=a([i,r,o,s,l])},72731:function(e,t,n){"use strict";var a=n(20321),r=n(41757),i=a.booleanish,o=a.number,s=a.spaceSeparated;e.exports=r({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:i,ariaAutoComplete:null,ariaBusy:i,ariaChecked:i,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:i,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:i,ariaFlowTo:s,ariaGrabbed:i,ariaHasPopup:null,ariaHidden:i,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:i,ariaMultiLine:i,ariaMultiSelectable:i,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:i,ariaReadOnly:i,ariaRelevant:null,ariaRequired:i,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:i,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},98946:function(e,t,n){"use strict";var a=n(20321),r=n(41757),i=n(53296),o=a.boolean,s=a.overloadedBoolean,l=a.booleanish,c=a.number,u=a.spaceSeparated,d=a.commaSeparated;e.exports=r({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:i,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:o,allowPaymentRequest:o,allowUserMedia:o,alt:null,as:null,async:o,autoCapitalize:null,autoComplete:u,autoFocus:o,autoPlay:o,capture:o,charSet:null,checked:o,cite:null,className:u,cols:c,colSpan:null,content:null,contentEditable:l,controls:o,controlsList:u,coords:c|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:o,defer:o,dir:null,dirName:null,disabled:o,download:s,draggable:l,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:o,formTarget:null,headers:u,height:c,hidden:o,high:c,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:d,inputMode:null,integrity:null,is:null,isMap:o,itemId:null,itemProp:u,itemRef:u,itemScope:o,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:o,low:c,manifest:null,max:null,maxLength:c,media:null,method:null,min:null,minLength:c,multiple:o,muted:o,name:null,nonce:null,noModule:o,noValidate:o,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:o,optimum:c,pattern:null,ping:u,placeholder:null,playsInline:o,poster:null,preload:null,readOnly:o,referrerPolicy:null,rel:u,required:o,reversed:o,rows:c,rowSpan:c,sandbox:u,scope:null,scoped:o,seamless:o,selected:o,shape:null,size:c,sizes:null,slot:null,span:c,spellCheck:l,src:null,srcDoc:null,srcLang:null,srcSet:d,start:c,step:null,style:null,tabIndex:c,target:null,title:null,translate:null,type:null,typeMustMatch:o,useMap:null,value:l,width:c,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:c,borderColor:null,bottomMargin:c,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:o,declare:o,event:null,face:null,frame:null,frameBorder:null,hSpace:c,leftMargin:c,link:null,longDesc:null,lowSrc:null,marginHeight:c,marginWidth:c,noResize:o,noHref:o,noShade:o,noWrap:o,object:null,profile:null,prompt:null,rev:null,rightMargin:c,rules:null,scheme:null,scrolling:l,standby:null,summary:null,text:null,topMargin:c,valueType:null,version:null,vAlign:null,vLink:null,vSpace:c,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:o,disableRemotePlayback:o,prefix:null,property:null,results:c,security:null,unselectable:null}})},53296:function(e,t,n){"use strict";var a=n(38781);e.exports=function(e,t){return a(e,t.toLowerCase())}},38781:function(e){"use strict";e.exports=function(e,t){return t in e?e[t]:t}},41757:function(e,t,n){"use strict";var a=n(96532),r=n(61723),i=n(51351);e.exports=function(e){var t,n,o=e.space,s=e.mustUseProperty||[],l=e.attributes||{},c=e.properties,u=e.transform,d={},p={};for(t in c)n=new i(t,u(l,t),c[t],o),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),d[t]=n,p[a(t)]=t,p[a(n.attribute)]=t;return new r(d,p,o)}},51351:function(e,t,n){"use strict";var a=n(24192),r=n(20321);e.exports=s,s.prototype=new a,s.prototype.defined=!0;var i=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],o=i.length;function s(e,t,n,s){var l,c,u,d=-1;for(s&&(this.space=s),a.call(this,e,t);++d<o;)l=u=i[d],(c=(n&r[u])===r[u])&&(this[l]=c)}},24192:function(e){"use strict";e.exports=n;var t=n.prototype;function n(e,t){this.property=e,this.attribute=t}t.space=null,t.attribute=null,t.property=null,t.boolean=!1,t.booleanish=!1,t.overloadedBoolean=!1,t.number=!1,t.commaSeparated=!1,t.spaceSeparated=!1,t.commaOrSpaceSeparated=!1,t.mustUseProperty=!1,t.defined=!1},82855:function(e,t,n){"use strict";var a=n(33881),r=n(61723);e.exports=function(e){for(var t,n,i=e.length,o=[],s=[],l=-1;++l<i;)t=e[l],o.push(t.property),s.push(t.normal),n=t.space;return new r(a.apply(null,o),a.apply(null,s),n)}},61723:function(e){"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},20321:function(e,t){"use strict";var n=0;function a(){return Math.pow(2,++n)}t.boolean=a(),t.booleanish=a(),t.overloadedBoolean=a(),t.number=a(),t.spaceSeparated=a(),t.commaSeparated=a(),t.commaOrSpaceSeparated=a()},64541:function(e,t,n){"use strict";var a=n(41757);e.exports=a({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}})},80808:function(e,t,n){"use strict";var a=n(41757);e.exports=a({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}})},44987:function(e,t,n){"use strict";var a=n(41757),r=n(53296);e.exports=a({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:r,properties:{xmlns:null,xmlnsXLink:null}})},96532:function(e){"use strict";e.exports=function(e){return e.toLowerCase()}},99700:function(e,t){"use strict";t.Q=function(e){var t=String(e||"").trim();return""===t?[]:t.split(n)};var n=/[ \t\n\r\f]+/g},18242:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var a=n(31686),r="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function i(e,t){return 0===e.indexOf(t)}function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,a.Z)({},n);var o={};return Object.keys(e).forEach(function(n){(t.aria&&("role"===n||i(n,"aria-"))||t.data&&i(n,"data-")||t.attr&&r.includes(n))&&(o[n]=e[n])}),o}},17906:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var a,r,i=n(6989),o=n(83145),s=n(11993),l=n(2265),c=n(1119);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){(0,s.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var p={},g=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){(0,s.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var f=/\n/g;function E(e){var t,n,a,r,i=e.codeString,o=e.codeStyle,s=e.containerStyle,c=e.numberStyle,u=e.startingLineNumber;return l.createElement("code",{style:Object.assign({},o,void 0===s?{float:"left",paddingRight:"10px"}:s)},(n=(t={lines:i.replace(/\n$/,"").split("\n"),style:void 0===c?{}:c,startingLineNumber:u}).lines,a=t.startingLineNumber,r=t.style,n.map(function(e,t){var n=t+a;return l.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(n):r},"".concat(n,"\n"))})))}function h(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function S(e,t,n){var a={display:"inline-block",minWidth:"".concat(n.toString().length,".25em"),paddingRight:"1em",textAlign:"right",userSelect:"none"},r="function"==typeof e?e(t):e;return b(b({},a),r)}function y(e){var t=e.children,n=e.lineNumber,a=e.lineNumberStyle,r=e.largestLineNumber,i=e.showInlineLineNumbers,s=e.lineProps,l=void 0===s?{}:s,c=e.className,u=void 0===c?[]:c,d=e.showLineNumbers,p=e.wrapLongLines,g=e.wrapLines,m=void 0!==g&&g?b({},"function"==typeof l?l(n):l):{};if(m.className=m.className?[].concat((0,o.Z)(m.className.trim().split(/\s+/)),(0,o.Z)(u)):u,n&&i){var f=S(a,n,r);t.unshift(h(n,f))}return p&d&&(m.style=b({display:"flex"},m.style)),{type:"element",tagName:"span",properties:m,children:t}}function T(e){var t=e.rows,n=e.stylesheet,a=e.useInlineStyles;return t.map(function(e,t){return function e(t){var n=t.node,a=t.stylesheet,r=t.style,i=t.useInlineStyles,o=t.key,s=n.properties,u=n.type,g=n.tagName,m=n.value;if("text"===u)return m;if(g){var b,f,E=(b=0,function(t){return b+=1,t.map(function(t,n){return e({node:t,stylesheet:a,useInlineStyles:i,key:"code-segment-".concat(b,"-").concat(n)})})});if(i){var h=Object.keys(a).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),S=s.className&&s.className.includes("token")?["token"]:[],y=s.className&&S.concat(s.className.filter(function(e){return!h.includes(e)}));f=d(d({},s),{},{className:y.join(" ")||void 0,style:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return(function(e){if(0===e.length||1===e.length)return e;var t,n=e.join(".");return p[n]||(p[n]=0===(t=e.length)||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0),p[n]})(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return d(d({},e),n[t])},t)}(s.className,Object.assign({},s.style,void 0===r?{}:r),a)})}else f=d(d({},s),{},{className:s.className.join(" ")});var T=E(n.children);return l.createElement(g,(0,c.Z)({key:o},f),T)}}({node:e,stylesheet:n,useInlineStyles:a,key:"code-segement".concat(t)})})}function A(e){return e&&void 0!==e.highlightAuto}var R=n(99113),I=(a=n.n(R)(),r={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(e){var t=e.language,n=e.children,s=e.style,c=void 0===s?r:s,u=e.customStyle,d=void 0===u?{}:u,p=e.codeTagProps,m=void 0===p?{className:t?"language-".concat(t):void 0,style:b(b({},c['code[class*="language-"]']),c['code[class*="language-'.concat(t,'"]')])}:p,R=e.useInlineStyles,I=void 0===R||R,N=e.showLineNumbers,_=void 0!==N&&N,v=e.showInlineLineNumbers,w=void 0===v||v,k=e.startingLineNumber,C=void 0===k?1:k,O=e.lineNumberContainerStyle,x=e.lineNumberStyle,L=void 0===x?{}:x,D=e.wrapLines,P=e.wrapLongLines,M=void 0!==P&&P,F=e.lineProps,U=e.renderer,B=e.PreTag,G=void 0===B?"pre":B,$=e.CodeTag,H=void 0===$?"code":$,z=e.code,j=void 0===z?(Array.isArray(n)?n[0]:n)||"":z,V=e.astGenerator,W=(0,i.Z)(e,g);V=V||a;var q=_?l.createElement(E,{containerStyle:O,codeStyle:m.style||{},numberStyle:L,startingLineNumber:C,codeString:j}):null,Y=c.hljs||c['pre[class*="language-"]']||{backgroundColor:"#fff"},K=A(V)?"hljs":"prismjs",Z=I?Object.assign({},W,{style:Object.assign({},Y,d)}):Object.assign({},W,{className:W.className?"".concat(K," ").concat(W.className):K,style:Object.assign({},d)});if(M?m.style=b({whiteSpace:"pre-wrap"},m.style):m.style=b({whiteSpace:"pre"},m.style),!V)return l.createElement(G,Z,q,l.createElement(H,m,j));(void 0===D&&U||M)&&(D=!0),U=U||T;var X=[{type:"text",value:j}],Q=function(e){var t=e.astGenerator,n=e.language,a=e.code,r=e.defaultCodeValue;if(A(t)){var i=-1!==t.listLanguages().indexOf(n);return"text"===n?{value:r,language:"text"}:i?t.highlight(n,a):t.highlightAuto(a)}try{return n&&"text"!==n?{value:t.highlight(a,n)}:{value:r}}catch(e){return{value:r}}}({astGenerator:V,language:t,code:j,defaultCodeValue:X});null===Q.language&&(Q.value=X);var J=Q.value.length;1===J&&"text"===Q.value[0].type&&(J=Q.value[0].value.split("\n").length);var ee=J+C,et=function(e,t,n,a,r,i,s,l,c){var u,d=function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<t.length;r++){var i=t[r];if("text"===i.type)a.push(y({children:[i],className:(0,o.Z)(new Set(n))}));else if(i.children){var s=n.concat(i.properties.className);e(i.children,s).forEach(function(e){return a.push(e)})}}return a}(e.value),p=[],g=-1,m=0;function b(e,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||o.length>0?function(e,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return y({children:e,lineNumber:i,lineNumberStyle:l,largestLineNumber:s,showInlineLineNumbers:r,lineProps:n,className:o,showLineNumbers:a,wrapLongLines:c,wrapLines:t})}(e,i,o):function(e,t){if(a&&t&&r){var n=S(l,t,s);e.unshift(h(t,n))}return e}(e,i)}for(;m<d.length;)!function(){var e=d[m],t=e.children[0].value;if(t.match(f)){var n=t.split("\n");n.forEach(function(t,r){var o=a&&p.length+i,s={type:"text",value:"".concat(t,"\n")};if(0===r){var l=b(d.slice(g+1,m).concat(y({children:[s],className:e.properties.className})),o);p.push(l)}else if(r===n.length-1){var c=d[m+1]&&d[m+1].children&&d[m+1].children[0],u={type:"text",value:"".concat(t)};if(c){var f=y({children:[u],className:e.properties.className});d.splice(m+1,0,f)}else{var E=b([u],o,e.properties.className);p.push(E)}}else{var h=b([s],o,e.properties.className);p.push(h)}}),g=m}m++}();if(g!==d.length-1){var E=d.slice(g+1,d.length);if(E&&E.length){var T=b(E,a&&p.length+i);p.push(T)}}return t?p:(u=[]).concat.apply(u,p)}(Q,D,void 0===F?{}:F,_,w,C,ee,L,M);return l.createElement(G,Z,l.createElement(H,m,!w&&q,U({rows:et,stylesheet:c,useInlineStyles:I})))});I.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var N=I},15913:function(e,t,n){"use strict";var a,r,i="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof n.g?n.g:{},o=(r=(a="Prism"in i)?i.Prism:void 0,function(){a?i.Prism=r:delete i.Prism,a=void 0,r=void 0});i.Prism={manual:!0,disableWorkerMessageHandler:!0};var s=n(33819),l=n(21470),c=n(40741),u=n(94719),d=n(88934),p=n(64146),g=n(64467);o();var m={}.hasOwnProperty;function b(){}b.prototype=c;var f=new b;function E(e){if("function"!=typeof e||!e.displayName)throw Error("Expected `function` for `grammar`, got `"+e+"`");void 0===f.languages[e.displayName]&&e(f)}e.exports=f,f.highlight=function(e,t){var n,a=c.highlight;if("string"!=typeof e)throw Error("Expected `string` for `value`, got `"+e+"`");if("Object"===f.util.type(t))n=t,t=null;else{if("string"!=typeof t)throw Error("Expected `string` for `name`, got `"+t+"`");if(m.call(f.languages,t))n=f.languages[t];else throw Error("Unknown language: `"+t+"` is not registered")}return a.call(this,e,n,t)},f.register=E,f.alias=function(e,t){var n,a,r,i,o=f.languages,s=e;for(n in t&&((s={})[e]=t),s)for(r=(a="string"==typeof(a=s[n])?[a]:a).length,i=-1;++i<r;)o[a[i]]=o[n]},f.registered=function(e){if("string"!=typeof e)throw Error("Expected `string` for `language`, got `"+e+"`");return m.call(f.languages,e)},f.listLanguages=function(){var e,t=f.languages,n=[];for(e in t)m.call(t,e)&&"object"==typeof t[e]&&n.push(e);return n},E(u),E(d),E(p),E(g),f.util.encode=function(e){return e},f.Token.stringify=function(e,t,n){var a;return"string"==typeof e?{type:"text",value:e}:"Array"===f.util.type(e)?function(e,t){for(var n,a=[],r=e.length,i=-1;++i<r;)""!==(n=e[i])&&null!=n&&a.push(n);for(i=-1,r=a.length;++i<r;)n=a[i],a[i]=f.Token.stringify(n,t,a);return a}(e,t):(a={type:e.type,content:f.Token.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n},e.alias&&(a.classes=a.classes.concat(e.alias)),f.hooks.run("wrap",a),s(a.tag+"."+a.classes.join("."),function(e){var t;for(t in e)e[t]=l(e[t]);return e}(a.attributes),a.content))}},99113:function(e,t,n){"use strict";var a=n(15913);e.exports=a,a.register(n(1774)),a.register(n(36463)),a.register(n(25276)),a.register(n(82679)),a.register(n(80943)),a.register(n(34168)),a.register(n(25262)),a.register(n(60486)),a.register(n(5134)),a.register(n(94048)),a.register(n(51228)),a.register(n(29606)),a.register(n(59760)),a.register(n(36023)),a.register(n(26894)),a.register(n(30227)),a.register(n(78909)),a.register(n(82592)),a.register(n(12346)),a.register(n(9243)),a.register(n(14537)),a.register(n(90780)),a.register(n(52698)),a.register(n(85820)),a.register(n(26560)),a.register(n(81620)),a.register(n(85124)),a.register(n(44171)),a.register(n(47117)),a.register(n(18033)),a.register(n(13407)),a.register(n(86579)),a.register(n(37184)),a.register(n(85925)),a.register(n(35619)),a.register(n(76370)),a.register(n(25785)),a.register(n(27088)),a.register(n(95146)),a.register(n(43453)),a.register(n(96703)),a.register(n(66858)),a.register(n(43413)),a.register(n(748)),a.register(n(85028)),a.register(n(46700)),a.register(n(53494)),a.register(n(63289)),a.register(n(1580)),a.register(n(86546)),a.register(n(76374)),a.register(n(98816)),a.register(n(98486)),a.register(n(94394)),a.register(n(59024)),a.register(n(47690)),a.register(n(6335)),a.register(n(54459)),a.register(n(16600)),a.register(n(12893)),a.register(n(4298)),a.register(n(91675)),a.register(n(84297)),a.register(n(89540)),a.register(n(69027)),a.register(n(56551)),a.register(n(7013)),a.register(n(18128)),a.register(n(26177)),a.register(n(45660)),a.register(n(73477)),a.register(n(28484)),a.register(n(89375)),a.register(n(96930)),a.register(n(14939)),a.register(n(33420)),a.register(n(71602)),a.register(n(16029)),a.register(n(10757)),a.register(n(83577)),a.register(n(45864)),a.register(n(13711)),a.register(n(86150)),a.register(n(62109)),a.register(n(71655)),a.register(n(36378)),a.register(n(9352)),a.register(n(25985)),a.register(n(31276)),a.register(n(79617)),a.register(n(76276)),a.register(n(71750)),a.register(n(14506)),a.register(n(6332)),a.register(n(82784)),a.register(n(13136)),a.register(n(74937)),a.register(n(18970)),a.register(n(76507)),a.register(n(21022)),a.register(n(20406)),a.register(n(93423)),a.register(n(58181)),a.register(n(28046)),a.register(n(98823)),a.register(n(16682)),a.register(n(30177)),a.register(n(90935)),a.register(n(78721)),a.register(n(46114)),a.register(n(72699)),a.register(n(38468)),a.register(n(64288)),a.register(n(99215)),a.register(n(23002)),a.register(n(15994)),a.register(n(4392)),a.register(n(34293)),a.register(n(84615)),a.register(n(20115)),a.register(n(42863)),a.register(n(46717)),a.register(n(63408)),a.register(n(8297)),a.register(n(92454)),a.register(n(91986)),a.register(n(56963)),a.register(n(15349)),a.register(n(16176)),a.register(n(47815)),a.register(n(26367)),a.register(n(96400)),a.register(n(28203)),a.register(n(15417)),a.register(n(18391)),a.register(n(45514)),a.register(n(35307)),a.register(n(71584)),a.register(n(68721)),a.register(n(84873)),a.register(n(48439)),a.register(n(80811)),a.register(n(73798)),a.register(n(96868)),a.register(n(49902)),a.register(n(378)),a.register(n(32211)),a.register(n(392)),a.register(n(14415)),a.register(n(11944)),a.register(n(60139)),a.register(n(27960)),a.register(n(21451)),a.register(n(54844)),a.register(n(60348)),a.register(n(68143)),a.register(n(40999)),a.register(n(84799)),a.register(n(81856)),a.register(n(99909)),a.register(n(61002)),a.register(n(31077)),a.register(n(76602)),a.register(n(26434)),a.register(n(72937)),a.register(n(72348)),a.register(n(15271)),a.register(n(20621)),a.register(n(23565)),a.register(n(9401)),a.register(n(9138)),a.register(n(61454)),a.register(n(58882)),a.register(n(65861)),a.register(n(56036)),a.register(n(51727)),a.register(n(82402)),a.register(n(56923)),a.register(n(99736)),a.register(n(63082)),a.register(n(97010)),a.register(n(8867)),a.register(n(82817)),a.register(n(83499)),a.register(n(35952)),a.register(n(94068)),a.register(n(3624)),a.register(n(5541)),a.register(n(81966)),a.register(n(35801)),a.register(n(47756)),a.register(n(77570)),a.register(n(53746)),a.register(n(59228)),a.register(n(8667)),a.register(n(73326)),a.register(n(33478)),a.register(n(44175)),a.register(n(12078)),a.register(n(51184)),a.register(n(8061)),a.register(n(27374)),a.register(n(78960)),a.register(n(94738)),a.register(n(52321)),a.register(n(68220)),a.register(n(87116)),a.register(n(93132)),a.register(n(86606)),a.register(n(69067)),a.register(n(46982)),a.register(n(11866)),a.register(n(38287)),a.register(n(69004)),a.register(n(66768)),a.register(n(2344)),a.register(n(22351)),a.register(n(69096)),a.register(n(2608)),a.register(n(34248)),a.register(n(23229)),a.register(n(35890)),a.register(n(65325)),a.register(n(93711)),a.register(n(52284)),a.register(n(12023)),a.register(n(16570)),a.register(n(76785)),a.register(n(31997)),a.register(n(12782)),a.register(n(36857)),a.register(n(5400)),a.register(n(82481)),a.register(n(11173)),a.register(n(42283)),a.register(n(47943)),a.register(n(98062)),a.register(n(13223)),a.register(n(59851)),a.register(n(31976)),a.register(n(98332)),a.register(n(15281)),a.register(n(74006)),a.register(n(46329)),a.register(n(73638)),a.register(n(3517)),a.register(n(44785)),a.register(n(58275)),a.register(n(75791)),a.register(n(54700)),a.register(n(33080)),a.register(n(78197)),a.register(n(91880)),a.register(n(302)),a.register(n(88672)),a.register(n(47303)),a.register(n(25260)),a.register(n(2738)),a.register(n(54617)),a.register(n(77105)),a.register(n(38730)),a.register(n(4779)),a.register(n(37665)),a.register(n(34411)),a.register(n(66331)),a.register(n(63285)),a.register(n(95787)),a.register(n(23840)),a.register(n(56275)),a.register(n(81890)),a.register(n(22173)),a.register(n(97793)),a.register(n(31634))},1774:function(e){"use strict";function t(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}e.exports=t,t.displayName="abap",t.aliases=[]},36463:function(e){"use strict";function t(e){var t;t="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)",e.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+t+"|<"+t+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}}e.exports=t,t.displayName="abnf",t.aliases=[]},25276:function(e){"use strict";function t(e){e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}e.exports=t,t.displayName="actionscript",t.aliases=[]},82679:function(e){"use strict";function t(e){e.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}}e.exports=t,t.displayName="ada",t.aliases=[]},80943:function(e){"use strict";function t(e){e.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}⦃⦄.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}}e.exports=t,t.displayName="agda",t.aliases=[]},34168:function(e){"use strict";function t(e){e.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}}e.exports=t,t.displayName="al",t.aliases=[]},25262:function(e){"use strict";function t(e){e.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},e.languages.g4=e.languages.antlr4}e.exports=t,t.displayName="antlr4",t.aliases=["g4"]},60486:function(e){"use strict";function t(e){e.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}}e.exports=t,t.displayName="apacheconf",t.aliases=[]},5134:function(e,t,n){"use strict";var a=n(12782);function r(e){e.register(a),function(e){var t=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,n=/\b(?:(?=[a-z_]\w*\s*[<\[])|(?!<keyword>))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(/<keyword>/g,function(){return t.source});function a(e){return RegExp(e.replace(/<CLASS-NAME>/g,function(){return n}),"i")}var r={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:a(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)<CLASS-NAME>/.source),lookbehind:!0,inside:r},{pattern:a(/(\(\s*)<CLASS-NAME>(?=\s*\)\s*[\w(])/.source),lookbehind:!0,inside:r},{pattern:a(/<CLASS-NAME>(?=\s*\w+\s*[;=,(){:])/.source),inside:r}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<<?=?|>{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(e)}e.exports=r,r.displayName="apex",r.aliases=[]},94048:function(e){"use strict";function t(e){e.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}}e.exports=t,t.displayName="apl",t.aliases=[]},51228:function(e){"use strict";function t(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}e.exports=t,t.displayName="applescript",t.aliases=[]},29606:function(e){"use strict";function t(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}e.exports=t,t.displayName="aql",t.aliases=[]},59760:function(e,t,n){"use strict";var a=n(85028);function r(e){e.register(a),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}e.exports=r,r.displayName="arduino",r.aliases=["ino"]},36023:function(e){"use strict";function t(e){e.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/}}e.exports=t,t.displayName="arff",t.aliases=[]},26894:function(e){"use strict";function t(e){!function(e){var t={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},n=e.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:t,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:t.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:t,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function a(e){e=e.split(" ");for(var t={},a=0,r=e.length;a<r;a++)t[e[a]]=n[e[a]];return t}t.inside.interpreted.inside.rest=a("macro inline replacement entity"),n["passthrough-block"].inside.rest=a("macro"),n["literal-block"].inside.rest=a("callout"),n.table.inside.rest=a("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"),n["other-block"].inside.rest=a("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"),n.title.inside.rest=a("macro inline replacement entity"),e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),e.languages.adoc=e.languages.asciidoc}(e)}e.exports=t,t.displayName="asciidoc",t.aliases=["adoc"]},30227:function(e){"use strict";function t(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}e.exports=t,t.displayName="asm6502",t.aliases=[]},78909:function(e){"use strict";function t(e){e.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[12]\d|3[01])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}}e.exports=t,t.displayName="asmatmel",t.aliases=[]},82592:function(e,t,n){"use strict";var a=n(53494);function r(e){e.register(a),e.languages.aspnet=e.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:e.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:e.languages.csharp}}}),e.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.insertBefore("inside","punctuation",{directive:e.languages.aspnet.directive},e.languages.aspnet.tag.inside["attr-value"]),e.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),e.languages.insertBefore("aspnet",e.languages.javascript?"script":"tag",{"asp-script":{pattern:/(<script(?=.*runat=['"]?server\b)[^>]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:e.languages.csharp||{}}})}e.exports=r,r.displayName="aspnet",r.aliases=[]},12346:function(e){"use strict";function t(e){e.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}}e.exports=t,t.displayName="autohotkey",t.aliases=[]},9243:function(e){"use strict";function t(e){e.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}}e.exports=t,t.displayName="autoit",t.aliases=[]},14537:function(e){"use strict";function t(e){!function(e){function t(e,t,n){return RegExp(e.replace(/<<(\d+)>>/g,function(e,n){return t[+n]}),n||"")}var n=/bool|clip|float|int|string|val/.source,a=[[/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,/apply|assert|default|eval|import|nop|select|undefined/.source,/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,/hex(?:value)?|value/.source,/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,/a?sinh?|a?cosh?|a?tan[2h]?/.source,/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,/isversionorgreater|version(?:number|string)/.source,/buildpixeltype|colorspacenametopixeltype/.source,/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source].join("|"),[/has(?:audio|video)/.source,/height|width/.source,/frame(?:count|rate)|framerate(?:denominator|numerator)/.source,/getparity|is(?:field|frame)based/.source,/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source].join("|"),[/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,/imagewriter/.source,/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source].join("|")].join("|");e.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:t(/\b(?:<<0>>)\s+("?)\w+\1/.source,[n],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:t(/\b(?:<<0>>)\b/.source,[a],"i"),alias:"function"},"type-cast":{pattern:t(/\b(?:<<0>>)(?=\s*\()/.source,[n],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},e.languages.avs=e.languages.avisynth}(e)}e.exports=t,t.displayName="avisynth",t.aliases=["avs"]},90780:function(e){"use strict";function t(e){e.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},e.languages.avdl=e.languages["avro-idl"]}e.exports=t,t.displayName="avroIdl",t.aliases=[]},52698:function(e){"use strict";function t(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o<r.length;o++)i[r[o]]=e.languages.bash[r[o]];e.languages.shell=e.languages.bash}(e)}e.exports=t,t.displayName="bash",t.aliases=["shell"]},85820:function(e){"use strict";function t(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}e.exports=t,t.displayName="basic",t.aliases=[]},26560:function(e){"use strict";function t(e){var t,n,a,r;t=/%%?[~:\w]+%?|!\S+!/,n={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},a=/"(?:[\\"]"|[^"])*"(?!")/,r=/(?:\b|-)\d+\b/,e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:a,parameter:n,variable:t,number:r,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:a,parameter:n,variable:t,number:r,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:a,parameter:n,variable:[t,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:r,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:a,parameter:n,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:t,number:r,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}e.exports=t,t.displayName="batch",t.aliases=[]},81620:function(e){"use strict";function t(e){e.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},e.languages.shortcode=e.languages.bbcode}e.exports=t,t.displayName="bbcode",t.aliases=["shortcode"]},85124:function(e){"use strict";function t(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}e.exports=t,t.displayName="bicep",t.aliases=[]},44171:function(e){"use strict";function t(e){e.languages.birb=e.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),e.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}})}e.exports=t,t.displayName="birb",t.aliases=[]},47117:function(e,t,n){"use strict";var a=n(35619);function r(e){e.register(a),e.languages.bison=e.languages.extend("c",{}),e.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:e.languages.c}},comment:e.languages.c.comment,string:e.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}})}e.exports=r,r.displayName="bison",r.aliases=[]},18033:function(e){"use strict";function t(e){e.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},e.languages.rbnf=e.languages.bnf}e.exports=t,t.displayName="bnf",t.aliases=["rbnf"]},13407:function(e){"use strict";function t(e){e.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/}}e.exports=t,t.displayName="brainfuck",t.aliases=[]},86579:function(e){"use strict";function t(e){e.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},e.languages.brightscript["directive-statement"].inside.expression.inside=e.languages.brightscript}e.exports=t,t.displayName="brightscript",t.aliases=[]},37184:function(e){"use strict";function t(e){e.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,lookbehind:!0},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/(\bconst[ \t]+)\w+/i,lookbehind:!0},keyword:/\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="bro",t.aliases=[]},85925:function(e){"use strict";function t(e){e.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},e.languages.oscript=e.languages.bsl}e.exports=t,t.displayName="bsl",t.aliases=[]},35619:function(e){"use strict";function t(e){e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}e.exports=t,t.displayName="c",t.aliases=[]},76370:function(e){"use strict";function t(e){e.languages.cfscript=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),e.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete e.languages.cfscript["class-name"],e.languages.cfc=e.languages.cfscript}e.exports=t,t.displayName="cfscript",t.aliases=[]},25785:function(e,t,n){"use strict";var a=n(85028);function r(e){e.register(a),e.languages.chaiscript=e.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[e.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),e.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),e.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}})}e.exports=r,r.displayName="chaiscript",r.aliases=[]},27088:function(e){"use strict";function t(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}e.exports=t,t.displayName="cil",t.aliases=[]},64146:function(e){"use strict";function t(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="clike",t.aliases=[]},95146:function(e){"use strict";function t(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}e.exports=t,t.displayName="clojure",t.aliases=[]},43453:function(e){"use strict";function t(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}e.exports=t,t.displayName="cmake",t.aliases=[]},96703:function(e){"use strict";function t(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}e.exports=t,t.displayName="cobol",t.aliases=[]},66858:function(e){"use strict";function t(e){var t,n;t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"},e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}e.exports=t,t.displayName="coffeescript",t.aliases=["coffee"]},43413:function(e){"use strict";function t(e){e.languages.concurnas={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,lookbehind:!0,greedy:!0},langext:{pattern:/\b\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,inside:{"class-name":/^\w+/,string:{pattern:/(^\s*\|\|)[\s\S]+(?=\|\|$)/,lookbehind:!0},punctuation:/\|\|/}},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,alias:"builtin"}},e.languages.insertBefore("concurnas","langext",{"regex-literal":{pattern:/\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},regex:/[\s\S]+/}},"string-literal":{pattern:/(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},string:/[\s\S]+/}}}),e.languages.conc=e.languages.concurnas}e.exports=t,t.displayName="concurnas",t.aliases=["conc"]},748:function(e){"use strict";function t(e){!function(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(/<comment>/g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(e)}e.exports=t,t.displayName="coq",t.aliases=[]},85028:function(e,t,n){"use strict";var a=n(35619);function r(e){var t,n;e.register(a),t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source}),e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}e.exports=r,r.displayName="cpp",r.aliases=[]},46700:function(e,t,n){"use strict";var a=n(11866);function r(e){e.register(a),e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}e.exports=r,r.displayName="crystal",r.aliases=[]},53494:function(e){"use strict";function t(e){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,a){return RegExp(t(e,n),a||"")}function a(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var r="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(i),u=RegExp(l(r+" "+i+" "+o+" "+s)),d=l(i+" "+o+" "+s),p=l(r+" "+i+" "+s),g=a(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),m=a(/\((?:[^()]|<<self>>)*\)/.source,2),b=/@?\b[A-Za-z_]\w*\b/.source,f=t(/<<0>>(?:\s*<<1>>)?/.source,[b,g]),E=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,f]),h=/\[\s*(?:,\s*)*\]/.source,S=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[E,h]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[g,m,h]),T=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),A=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[T,E,h]),R={keyword:u,punctuation:/[<>()?,.:[\]]/},I=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,N=/"(?:\\.|[^\\"\r\n])*"/.source,_=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[_]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[N]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[E]),lookbehind:!0,inside:R},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[b,A]),lookbehind:!0,inside:R},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[b]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,f]),lookbehind:!0,inside:R},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[E]),lookbehind:!0,inside:R},{pattern:n(/(\bwhere\s+)<<0>>/.source,[b]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[S]),lookbehind:!0,inside:R},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[A,p,b]),inside:R}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[b]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[b]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:R},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[A,E]),inside:R,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[A]),lookbehind:!0,inside:R,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[b,g]),inside:{function:n(/^<<0>>/.source,[b]),generic:{pattern:RegExp(g),alias:"class-name",inside:R}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,f,b,A,u.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[f,m]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(A),greedy:!0,inside:R},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var v=N+"|"+I,w=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[v]),k=a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[w]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,O=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[E,k]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,O]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[k]),inside:e.languages.csharp},"class-name":{pattern:RegExp(E),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var x=/:[^}\r\n]+/.source,L=a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[w]),2),D=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,x]),P=a(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[v]),2),M=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,x]);function F(t,a){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[a,x]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[D]),lookbehind:!0,greedy:!0,inside:F(D,L)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[M]),lookbehind:!0,greedy:!0,inside:F(M,P)}],char:{pattern:RegExp(I),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(e)}e.exports=t,t.displayName="csharp",t.aliases=["dotnet","cs"]},63289:function(e,t,n){"use strict";var a=n(53494);function r(e){e.register(a),function(e){var t=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,n=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function a(e,a){for(var r=0;r<a;r++)e=e.replace(/<self>/g,function(){return"(?:"+e+")"});return e.replace(/<self>/g,"[^\\s\\S]").replace(/<str>/g,"(?:"+n+")").replace(/<comment>/g,"(?:"+t+")")}var r=a(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source,2),i=a(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source,2),o=a(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source,2),s=a(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source,2),l=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/.source,c=/(?!\d)[^\s>\/=$<%]+/.source+l+/\s*\/?>/.source,u=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+l+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source)+c+"|"+a(/<\1/.source+l+/\s*>/.source+"(?:"+(/[^<]/.source+"|")+/<\/?(?!\1\b)/.source+c+"|<self>)*"+/<\/\1\s*>/.source,2)+")*"+/<\/\1\s*>/.source+"|"+/</.source+c+")";e.languages.cshtml=e.languages.extend("markup",{});var d={pattern:/\S[\s\S]*/,alias:"language-csharp",inside:e.languages.insertBefore("csharp","string",{html:{pattern:RegExp(u),greedy:!0,inside:e.languages.cshtml}},{csharp:e.languages.extend("csharp",{})})};e.languages.insertBefore("cshtml","prolog",{"razor-comment":{pattern:/@\*[\s\S]*?\*@/,greedy:!0,alias:"comment"},block:{pattern:RegExp(/(^|[^@])@/.source+"(?:"+[o,/(?:code|functions)\s*/.source+o,/(?:for|foreach|lock|switch|using|while)\s*/.source+r+/\s*/.source+o,/do\s*/.source+o+/\s*while\s*/.source+r+/(?:\s*;)?/.source,/try\s*/.source+o+/\s*catch\s*/.source+r+/\s*/.source+o+/\s*finally\s*/.source+o,/if\s*/.source+r+/\s*/.source+o+"(?:"+/\s*else/.source+"(?:"+/\s+if\s*/.source+r+")?"+/\s*/.source+o+")*"].join("|")+")"),lookbehind:!0,greedy:!0,inside:{keyword:/^@\w*/,csharp:d}},directive:{pattern:/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,lookbehind:!0,greedy:!0,inside:{keyword:/^@\w+/,csharp:d}},value:{pattern:RegExp(/(^|[^@])@/.source+/(?:await\b\s*)?/.source+"(?:"+/\w+\b/.source+"|"+r+")(?:"+/[?!]?\.\w+\b/.source+"|"+r+"|"+i+"|"+s+r+")*"),lookbehind:!0,greedy:!0,alias:"variable",inside:{keyword:/^@/,csharp:d}},"delegate-operator":{pattern:/(^|[^@])@(?=<)/,lookbehind:!0,alias:"operator"}}),e.languages.razor=e.languages.cshtml}(e)}e.exports=r,r.displayName="cshtml",r.aliases=["razor"]},1580:function(e){"use strict";function t(e){!function(e){function t(e){return RegExp(/([ \t])/.source+"(?:"+e+")"+/(?=[\s;]|$)/.source,"i")}e.languages.csp={directive:{pattern:/(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,lookbehind:!0,alias:"property"},scheme:{pattern:t(/[a-z][a-z0-9.+-]*:/.source),lookbehind:!0},none:{pattern:t(/'none'/.source),lookbehind:!0,alias:"keyword"},nonce:{pattern:t(/'nonce-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},hash:{pattern:t(/'sha(?:256|384|512)-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},host:{pattern:t(/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source+"|"+/\*[^\s;,']*/.source+"|"+/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source),lookbehind:!0,alias:"url",inside:{important:/\*/}},keyword:[{pattern:t(/'unsafe-[a-z-]+'/.source),lookbehind:!0,alias:"unsafe"},{pattern:t(/'[a-z-]+'/.source),lookbehind:!0,alias:"safe"}],punctuation:/;/}}(e)}e.exports=t,t.displayName="csp",t.aliases=[]},86546:function(e){"use strict";function t(e){!function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var a={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:a,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:a,number:r})}(e)}e.exports=t,t.displayName="cssExtras",t.aliases=[]},88934:function(e){"use strict";function t(e){var t,n;t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,(n=e.languages.markup)&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}e.exports=t,t.displayName="css",t.aliases=[]},76374:function(e){"use strict";function t(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}e.exports=t,t.displayName="csv",t.aliases=[]},98816:function(e){"use strict";function t(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}e.exports=t,t.displayName="cypher",t.aliases=[]},98486:function(e){"use strict";function t(e){e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}e.exports=t,t.displayName="d",t.aliases=[]},94394:function(e){"use strict";function t(e){var t,n,a;t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],a={pattern:RegExp((n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source)+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}},e.languages.dart=e.languages.extend("clike",{"class-name":[a,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:a.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}e.exports=t,t.displayName="dart",t.aliases=[]},59024:function(e){"use strict";function t(e){e.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}}e.exports=t,t.displayName="dataweave",t.aliases=[]},47690:function(e){"use strict";function t(e){e.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}}e.exports=t,t.displayName="dax",t.aliases=[]},6335:function(e){"use strict";function t(e){e.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},e.languages.dhall.string.inside.interpolation.inside.expression.inside=e.languages.dhall}e.exports=t,t.displayName="dhall",t.aliases=[]},54459:function(e){"use strict";function t(e){var t;e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]},Object.keys(t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"}).forEach(function(n){var a=t[n],r=[];/^\w+$/.test(n)||r.push(/\w+/.exec(n)[0]),"diff"===n&&r.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+a+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:r,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}e.exports=t,t.displayName="diff",t.aliases=[]},16600:function(e,t,n){"use strict";var a=n(392);function r(e){var t,n;e.register(a),e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/},t=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,n=e.languages["markup-templating"],e.hooks.add("before-tokenize",function(e){n.buildPlaceholders(e,"django",t)}),e.hooks.add("after-tokenize",function(e){n.tokenizePlaceholders(e,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(e){n.buildPlaceholders(e,"jinja2",t)}),e.hooks.add("after-tokenize",function(e){n.tokenizePlaceholders(e,"jinja2")})}e.exports=r,r.displayName="django",r.aliases=["jinja2"]},12893:function(e){"use strict";function t(e){e.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},e.languages["dns-zone"]=e.languages["dns-zone-file"]}e.exports=t,t.displayName="dnsZoneFile",t.aliases=[]},4298:function(e){"use strict";function t(e){!function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),a=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,r=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return a}),i={pattern:RegExp(a),greedy:!0},o={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(e,t){return RegExp(e=e.replace(/<OPT>/g,function(){return r}).replace(/<SP>/g,function(){return n}),t)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[i,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:o,string:i,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:o},e.languages.dockerfile=e.languages.docker}(e)}e.exports=t,t.displayName="docker",t.aliases=["dockerfile"]},91675:function(e){"use strict";function t(e){!function(e){var t="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source].join("|")+")",n={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:e.languages.markup}};function a(e,n){return RegExp(e.replace(/<ID>/g,function(){return t}),n)}e.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:a(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:n},"attr-value":{pattern:a(/(=[ \t\r\n]*)<ID>/.source),lookbehind:!0,greedy:!0,inside:n},"attr-name":{pattern:a(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:n},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:a(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),lookbehind:!0,greedy:!0,inside:n},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},e.languages.gv=e.languages.dot}(e)}e.exports=t,t.displayName="dot",t.aliases=["gv"]},84297:function(e){"use strict";function t(e){e.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}}e.exports=t,t.displayName="ebnf",t.aliases=[]},89540:function(e){"use strict";function t(e){e.languages.editorconfig={comment:/[;#].*/,section:{pattern:/(^[ \t]*)\[.+\]/m,lookbehind:!0,alias:"selector",inside:{regex:/\\\\[\[\]{},!?.*]/,operator:/[!?]|\.\.|\*{1,2}/,punctuation:/[\[\]{},]/}},key:{pattern:/(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/=.*/,alias:"attr-value",inside:{punctuation:/^=/}}}}e.exports=t,t.displayName="editorconfig",t.aliases=[]},69027:function(e){"use strict";function t(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}e.exports=t,t.displayName="eiffel",t.aliases=[]},56551:function(e,t,n){"use strict";var a=n(392);function r(e){e.register(a),e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"ejs",/<%(?!%)[\s\S]+?%>/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ejs")}),e.languages.eta=e.languages.ejs}e.exports=r,r.displayName="ejs",r.aliases=["eta"]},7013:function(e){"use strict";function t(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach(function(t){t.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}})}e.exports=t,t.displayName="elixir",t.aliases=[]},18128:function(e){"use strict";function t(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}e.exports=t,t.displayName="elm",t.aliases=[]},26177:function(e,t,n){"use strict";var a=n(11866),r=n(392);function i(e){e.register(a),e.register(r),e.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:e.languages.ruby}},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"erb")})}e.exports=i,i.displayName="erb",i.aliases=[]},45660:function(e){"use strict";function t(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}e.exports=t,t.displayName="erlang",t.aliases=[]},73477:function(e,t,n){"use strict";var a=n(96868),r=n(392);function i(e){e.register(a),e.register(r),e.languages.etlua={delimiter:{pattern:/^<%[-=]?|-?%>$/,alias:"punctuation"},"language-lua":{pattern:/[\s\S]+/,inside:e.languages.lua}},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"etlua",/<%[\s\S]+?%>/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"etlua")})}e.exports=i,i.displayName="etlua",i.aliases=[]},28484:function(e){"use strict";function t(e){e.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},e.languages.xlsx=e.languages.xls=e.languages["excel-formula"]}e.exports=t,t.displayName="excelFormula",t.aliases=[]},89375:function(e){"use strict";function t(e){var t,n,a,r,i,o;a={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:t={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/}},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:t}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:(n={number:/\\[^\s']|%\w/}).number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:n},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:n}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:n}},r=function(e){return(e+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},i=function(e){return RegExp("(^|\\s)(?:"+e.map(r).join("|")+")(?=\\s|$)")},Object.keys(o={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","<wrapper>","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated","<PRIVATE",">>>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","<slice>","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","<iota>","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","<reversed>","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","<repetition>","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","<fp-nan>","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]}).forEach(function(e){a[e].pattern=i(o[e])}),a.combinators.pattern=i(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","input<sequence","append-outputs","drop-inputs","inputs","smart-2reduce","drop-outputs","smart-reduce","preserving","smart-when","outputs","append-outputs-as","smart-unless","smart-if*","sum-outputs","input<sequence-unsafe","output>sequence"]),e.languages.factor=a}e.exports=t,t.displayName="factor",t.aliases=[]},96930:function(e){"use strict";function t(e){e.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()<BDO®]/,alias:"bold"}}}e.exports=t,t.displayName="$false",t.aliases=[]},14939:function(e){"use strict";function t(e){e.languages["firestore-security-rules"]=e.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete e.languages["firestore-security-rules"]["class-name"],e.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/\//}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}})}e.exports=t,t.displayName="firestoreSecurityRules",t.aliases=[]},33420:function(e){"use strict";function t(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,alias:"tag"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}e.exports=t,t.displayName="flow",t.aliases=[]},71602:function(e){"use strict";function t(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}e.exports=t,t.displayName="fortran",t.aliases=[]},16029:function(e){"use strict";function t(e){e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}e.exports=t,t.displayName="fsharp",t.aliases=[]},10757:function(e,t,n){"use strict";var a=n(392);function r(e){e.register(a),function(e){for(var t=/[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,n=0;n<2;n++)t=t.replace(/<expr>/g,function(){return t});t=t.replace(/<expr>/g,/[^\s\S]/.source);var a={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:<expr>))*\})*\1/.source.replace(/<expr>/g,function(){return t})),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:<expr>))*\}/.source.replace(/<expr>/g,function(){return t})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};a.string[1].inside.interpolation.inside.rest=a,e.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:a}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:a}}}},e.hooks.add("before-tokenize",function(n){var a=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:<expr>)*?>|\$\{(?:<expr>)*?\}/.source.replace(/<expr>/g,function(){return t}),"gi");e.languages["markup-templating"].buildPlaceholders(n,"ftl",a)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"ftl")})}(e)}e.exports=r,r.displayName="ftl",r.aliases=[]},83577:function(e){"use strict";function t(e){e.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},e.languages.gap.shell.inside.gap.inside=e.languages.gap}e.exports=t,t.displayName="gap",t.aliases=[]},45864:function(e){"use strict";function t(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}e.exports=t,t.displayName="gcode",t.aliases=[]},13711:function(e){"use strict";function t(e){e.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}}e.exports=t,t.displayName="gdscript",t.aliases=[]},86150:function(e){"use strict";function t(e){e.languages.gedcom={"line-value":{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,lookbehind:!0,inside:{pointer:{pattern:/^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,alias:"variable"}}},tag:{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,lookbehind:!0,alias:"string"},level:{pattern:/(^[\t ]*)\d+/m,lookbehind:!0,alias:"number"},pointer:{pattern:/@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,alias:"variable"}}}e.exports=t,t.displayName="gedcom",t.aliases=[]},62109:function(e){"use strict";function t(e){var t;t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source,e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}e.exports=t,t.displayName="gherkin",t.aliases=[]},71655:function(e){"use strict";function t(e){e.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}e.exports=t,t.displayName="git",t.aliases=[]},36378:function(e,t,n){"use strict";var a=n(35619);function r(e){e.register(a),e.languages.glsl=e.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/})}e.exports=r,r.displayName="glsl",r.aliases=[]},9352:function(e){"use strict";function t(e){e.languages.gamemakerlanguage=e.languages.gml=e.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/})}e.exports=t,t.displayName="gml",t.aliases=[]},25985:function(e){"use strict";function t(e){e.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},e.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=e.languages.gn,e.languages.gni=e.languages.gn}e.exports=t,t.displayName="gn",t.aliases=["gni"]},31276:function(e){"use strict";function t(e){e.languages["go-mod"]=e.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/}}e.exports=t,t.displayName="goModule",t.aliases=[]},79617:function(e){"use strict";function t(e){e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}e.exports=t,t.displayName="go",t.aliases=[]},76276:function(e){"use strict";function t(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n<t.length;){var a=t[n++];if("keyword"===a.type&&"mutation"===a.content){var r=[];if(u(["definition-mutation","punctuation"])&&"("===t[n+1].content){n+=2;var i=d(/^\($/,/^\)$/);if(-1===i)continue;for(;n<i;n++){var o=t[n+0];"variable"===o.type&&(p(o,"variable-input"),r.push(o.content))}n=i+1}if(u(["punctuation","property-query"])&&"{"===t[n+0].content&&(p(t[++n+0],"property-mutation"),r.length>0)){var s=d(/^\{$/,/^\}$/);if(-1===s)continue;for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&r.indexOf(c.content)>=0&&p(c,"variable-input")}}}}function u(e,a){a=a||0;for(var r=0;r<e.length;r++){var i=t[n+(r+a)];if(!i||i.type!==e[r])return!1}return!0}function d(e,a){for(var r=1,i=n;i<t.length;i++){var o=t[i],s=o.content;if("punctuation"===o.type&&"string"==typeof s){if(e.test(s))r++;else if(a.test(s)&&0==--r)return i}}return -1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})}e.exports=t,t.displayName="graphql",t.aliases=[]},71750:function(e){"use strict";function t(e){e.languages.groovy=e.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),e.hooks.add("wrap",function(t){if("groovy"===t.language&&"string"===t.type){var n=t.content.value[0];if("'"!=n){var a=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===n&&(a=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),t.content.value=t.content.value.replace(/</g,"<").replace(/&/g,"&"),t.content=e.highlight(t.content.value,{expression:{pattern:a,lookbehind:!0,inside:e.languages.groovy}}),t.classes.push("/"===n?"regex":"gstring")}}})}e.exports=t,t.displayName="groovy",t.aliases=[]},14506:function(e,t,n){"use strict";var a=n(11866);function r(e){e.register(a),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},a=0,r=t.length;a<r;a++){var i=t[a];i="string"==typeof i?{filter:i,language:i}:i,e.languages[i.language]&&(n["filter-"+i.filter]={pattern:RegExp("((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+".replace("{{filter_name}}",function(){return i.filter})),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"},text:{pattern:/[\s\S]+/,alias:[i.language,"language-"+i.language],inside:e.languages[i.language]}}})}e.languages.insertBefore("haml","filter",n)}(e)}e.exports=r,r.displayName="haml",r.aliases=[]},6332:function(e,t,n){"use strict";var a=n(392);function r(e){e.register(a),e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}),e.languages.hbs=e.languages.handlebars}e.exports=r,r.displayName="handlebars",r.aliases=["hbs"]},82784:function(e){"use strict";function t(e){e.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},e.languages.hs=e.languages.haskell}e.exports=t,t.displayName="haskell",t.aliases=["hs"]},13136:function(e){"use strict";function t(e){e.languages.haxe=e.languages.extend("clike",{string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},"class-name":[{pattern:/(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,function:{pattern:/\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,greedy:!0},operator:/\.{3}|\+\+|--|&&|\|\||->|=>|(?:<<?|>{1,3}|[-+*/%!=&|^])=?|[?:~]/}),e.languages.insertBefore("haxe","string",{"string-interpolation":{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^{}]+\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.haxe}}},string:/[\s\S]+/}}}),e.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,greedy:!0,inside:{"regex-flags":/\b[a-z]+$/,"regex-source":{pattern:/^(~\/)[\s\S]+(?=\/$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^~\/|\/$/}}}),e.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#(?:else|elseif|end|if)\b.*/,alias:"property"},metadata:{pattern:/@:?[\w.]+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"important"}})}e.exports=t,t.displayName="haxe",t.aliases=[]},74937:function(e){"use strict";function t(e){e.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}}e.exports=t,t.displayName="hcl",t.aliases=[]},18970:function(e,t,n){"use strict";var a=n(35619);function r(e){e.register(a),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}e.exports=r,r.displayName="hlsl",r.aliases=[]},76507:function(e){"use strict";function t(e){e.languages.hoon={comment:{pattern:/::.*/,greedy:!0},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},constant:/%(?:\.[ny]|[\w-]+)/,"class-name":/@(?:[a-z0-9-]*[a-z0-9])?|\*/i,function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,keyword:/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}}e.exports=t,t.displayName="hoon",t.aliases=[]},21022:function(e){"use strict";function t(e){e.languages.hpkp={directive:{pattern:/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}e.exports=t,t.displayName="hpkp",t.aliases=[]},20406:function(e){"use strict";function t(e){e.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}e.exports=t,t.displayName="hsts",t.aliases=[]},93423:function(e){"use strict";function t(e){!function(e){function t(e){return RegExp("(^(?:"+e+"):[ ]*(?![ ]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var n,a=e.languages,r={"application/javascript":a.javascript,"application/json":a.json||a.javascript,"application/xml":a.xml,"text/xml":a.xml,"text/html":a.html,"text/css":a.css,"text/plain":a.plain},i={"application/json":!0,"application/xml":!0};for(var o in r)if(r[o]){n=n||{};var s=i[o]?function(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-]))"}(o):o;n[o.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+s+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:r[o]}}n&&e.languages.insertBefore("http","header",n)}(e)}e.exports=t,t.displayName="http",t.aliases=[]},58181:function(e){"use strict";function t(e){e.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}}e.exports=t,t.displayName="ichigojam",t.aliases=[]},28046:function(e){"use strict";function t(e){e.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}}e.exports=t,t.displayName="icon",t.aliases=[]},98823:function(e){"use strict";function t(e){!function(e){function t(e,n){return n<=0?/[]/.source:e.replace(/<SELF>/g,function(){return t(e,n-1)})}var n=/'[{}:=,](?:[^']|'')*'(?!')/,a={pattern:/''/,greedy:!0,alias:"operator"},r=t(/\{(?:[^{}']|'(?![{},'])|''|<STR>|<SELF>)*\}/.source.replace(/<STR>/g,function(){return n.source}),8),i={pattern:RegExp(r),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};e.languages["icu-message-format"]={argument:{pattern:RegExp(r),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":i,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":i,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp(/(^\s*,\s*(?=\S))/.source+t(/(?:[^{}']|'[^']*'|\{(?:<SELF>)?\})+/.source,8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:a,string:{pattern:n,greedy:!0,inside:{escape:a}}},i.inside.message.inside=e.languages["icu-message-format"],e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=e.languages["icu-message-format"]}(e)}e.exports=t,t.displayName="icuMessageFormat",t.aliases=[]},16682:function(e,t,n){"use strict";var a=n(82784);function r(e){e.register(a),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}e.exports=r,r.displayName="idris",r.aliases=["idr"]},30177:function(e){"use strict";function t(e){e.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:[/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],"class-name":/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,address:{pattern:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,alias:"symbol"},number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,operator:/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,punctuation:/[()[\].,;]/}}e.exports=t,t.displayName="iecst",t.aliases=[]},90935:function(e){"use strict";function t(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}e.exports=t,t.displayName="ignore",t.aliases=["gitignore","hgignore","npmignore"]},78721:function(e){"use strict";function t(e){e.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},e.languages.inform7.string.inside.substitution.inside.rest=e.languages.inform7,e.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}}e.exports=t,t.displayName="inform7",t.aliases=[]},46114:function(e){"use strict";function t(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}e.exports=t,t.displayName="ini",t.aliases=[]},72699:function(e){"use strict";function t(e){e.languages.io={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,lookbehind:!0,greedy:!0},"triple-quoted-string":{pattern:/"""(?:\\[\s\S]|(?!""")[^\\])*"""/,greedy:!0,alias:"string"},string:{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},keyword:/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,builtin:/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,boolean:/\b(?:false|nil|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,operator:/[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:and|not|or|return)\b|@@?|\?\??|\.\./,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="io",t.aliases=[]},38468:function(e){"use strict";function t(e){e.languages.j={comment:{pattern:/\bNB\..*/,greedy:!0},string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}}e.exports=t,t.displayName="j",t.aliases=[]},64288:function(e){"use strict";function t(e){var t,n,a;t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a={pattern:RegExp((n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source)+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}},e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[a,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}e.exports=t,t.displayName="java",t.aliases=[]},99215:function(e,t,n){"use strict";var a=n(64288),r=n(23002);function i(e){var t,n,i;e.register(a),e.register(r),t=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,n=/#\s*\w+(?:\s*\([^()]*\))?/.source,i=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(/<mem>/g,function(){return n}),e.languages.javadoc=e.languages.extend("javadoclike",{}),e.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+i+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:e.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:t,lookbehind:!0,inside:e.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:t,lookbehind:!0,inside:{tag:e.languages.markup.tag,entity:e.languages.markup.entity,code:{pattern:/.+/,inside:e.languages.java,alias:"language-java"}}}}}],tag:e.languages.markup.tag,entity:e.languages.markup.entity}),e.languages.javadoclike.addSupport("java",e.languages.javadoc)}e.exports=i,i.displayName="javadoc",i.aliases=[]},23002:function(e){"use strict";function t(e){var t;Object.defineProperty(t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/},"addSupport",{value:function(t,n){"string"==typeof t&&(t=[t]),t.forEach(function(t){!function(t,n){var a="doc-comment",r=e.languages[t];if(r){var i=r[a];if(!i){var o={};o[a]={pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"},i=(r=e.languages.insertBefore(t,"comment",o))[a]}if(i instanceof RegExp&&(i=r[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),n(i[s]);else n(i)}}(t,function(e){e.inside||(e.inside={}),e.inside.rest=n})})}}),t.addSupport(["java","javascript","php"],t)}e.exports=t,t.displayName="javadoclike",t.aliases=[]},64467:function(e){"use strict";function t(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|")+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}e.exports=t,t.displayName="javascript",t.aliases=["js"]},15994:function(e){"use strict";function t(e){e.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:<init>|[\w$]+)\()/,function:/(?:<init>|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}}e.exports=t,t.displayName="javastacktrace",t.aliases=[]},4392:function(e){"use strict";function t(e){e.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}}e.exports=t,t.displayName="jexl",t.aliases=[]},34293:function(e){"use strict";function t(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}e.exports=t,t.displayName="jolie",t.aliases=[]},84615:function(e){"use strict";function t(e){var t,n,a,r;t=/\\\((?:[^()]|\([^()]*\))*\)/.source,n=RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g,function(){return t})),a={interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+t),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},r=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(n.source+/(?=\s*:(?!:))/.source),lookbehind:!0,greedy:!0,inside:a},string:{pattern:n,lookbehind:!0,greedy:!0,inside:a},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}},a.interpolation.inside.content.inside=r}e.exports=t,t.displayName="jq",t.aliases=[]},20115:function(e){"use strict";function t(e){!function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],a=0;a<n.length;a++){var r=n[a],i=e.languages.javascript[r];"RegExp"===e.util.type(i)&&(i=e.languages.javascript[r]={pattern:i});var o=i.inside||{};i.inside=o,o["maybe-class-name"]=/^[A-Z][\s\S]*/}}(e)}e.exports=t,t.displayName="jsExtras",t.aliases=[]},42863:function(e){"use strict";function t(e){!function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,a=t.inside.interpolation,r=a.inside["interpolation-punctuation"],i=a.pattern.source;function o(t,a){if(e.languages[t])return{pattern:RegExp("((?:"+a+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,a){var r={code:t,grammar:n,language:a};return e.hooks.run("before-tokenize",r),r.tokens=e.tokenize(r.code,r.grammar),e.hooks.run("after-tokenize",r),r.tokens}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};e.hooks.add("after-tokenize",function(t){t.language in l&&function t(n){for(var o=0,l=n.length;o<l;o++){var c=n[o];if("string"!=typeof c){var u=c.content;if(!Array.isArray(u)){"string"!=typeof u&&t([u]);continue}if("template-string"===c.type){var d=u[1];if(3===u.length&&"string"!=typeof d&&"embedded-code"===d.type){var p=function e(t){return"string"==typeof t?t:Array.isArray(t)?t.map(e).join(""):e(t.content)}(d),g=d.alias,m=Array.isArray(g)?g[0]:g,b=e.languages[m];if(!b)continue;u[1]=function(t,n,o){var l=e.tokenize(t,{interpolation:{pattern:RegExp(i),lookbehind:!0}}),c=0,u={},d=s(l.map(function(e){if("string"==typeof e)return e;for(var n,a,r=e.content;-1!==t.indexOf((n=c++,a="___"+o.toUpperCase()+"_"+n+"___")););return u[a]=r,a}).join(""),n,o),p=Object.keys(u);return c=0,!function t(n){for(var i=0;i<n.length;i++){if(c>=p.length)return;var o=n[i];if("string"==typeof o||"string"==typeof o.content){var l=p[c],d="string"==typeof o?o:o.content,g=d.indexOf(l);if(-1!==g){++c;var m=d.substring(0,g),b=function(t){var n={};n["interpolation-punctuation"]=r;var i=e.tokenize(t,n);if(3===i.length){var o=[1,1];o.push.apply(o,s(i[1],e.languages.javascript,"javascript")),i.splice.apply(i,o)}return new e.Token("interpolation",i,a.alias,t)}(u[l]),f=d.substring(g+l.length),E=[];if(m&&E.push(m),E.push(b),f){var h=[f];t(h),E.push.apply(E,h)}"string"==typeof o?(n.splice.apply(n,[i,1].concat(E)),i+=E.length-1):o.content=E}}else{var S=o.content;Array.isArray(S)?t(S):t([S])}}}(d),new e.Token(o,d,"language-"+o,t)}(p,b,m)}}else t(u)}}}(t.tokens)})}(e)}e.exports=t,t.displayName="jsTemplates",t.aliases=[]},46717:function(e,t,n){"use strict";var a=n(23002),r=n(58275);function i(e){var t,n,i;e.register(a),e.register(r),t=e.languages.javascript,i="(@(?:arg|argument|param|property)\\s+(?:"+(n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source)+"\\s+)?)",e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}e.exports=i,i.displayName="jsdoc",i.aliases=[]},63408:function(e){"use strict";function t(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}e.exports=t,t.displayName="json",t.aliases=["webmanifest"]},8297:function(e,t,n){"use strict";var a=n(63408);function r(e){var t;e.register(a),t=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/,e.languages.json5=e.languages.extend("json",{property:[{pattern:RegExp(t.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:t,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}e.exports=r,r.displayName="json5",r.aliases=[]},92454:function(e,t,n){"use strict";var a=n(63408);function r(e){e.register(a),e.languages.jsonp=e.languages.extend("json",{punctuation:/[{}[\]();,.]/}),e.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/})}e.exports=r,r.displayName="jsonp",r.aliases=[]},91986:function(e){"use strict";function t(e){e.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}}e.exports=t,t.displayName="jsstacktrace",t.aliases=[]},56963:function(e){"use strict";function t(e){!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,r=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return RegExp(e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return r}),t)}r=i(r).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},s=function(t){for(var n=[],a=0;a<t.length;a++){var r=t[a],i=!1;if("string"!=typeof r&&("tag"===r.type&&r.content[0]&&"tag"===r.content[0].type?"</"===r.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===o(r.content[0].content[1])&&n.pop():"/>"===r.content[r.content.length-1].content||n.push({tagName:o(r.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===r.type&&"{"===r.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===r.type&&"}"===r.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof r)&&n.length>0&&0===n[n.length-1].openedBraces){var l=o(r);a<t.length-1&&("string"==typeof t[a+1]||"plain-text"===t[a+1].type)&&(l+=o(t[a+1]),t.splice(a+1,1)),a>0&&("string"==typeof t[a-1]||"plain-text"===t[a-1].type)&&(l=o(t[a-1])+l,t.splice(a-1,1),a--),t[a]=new e.Token("plain-text",l,null,l)}r.content&&"string"!=typeof r.content&&s(r.content)}};e.hooks.add("after-tokenize",function(e){("jsx"===e.language||"tsx"===e.language)&&s(e.tokens)})}(e)}e.exports=t,t.displayName="jsx",t.aliases=[]},15349:function(e){"use strict";function t(e){e.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/}}e.exports=t,t.displayName="julia",t.aliases=[]},16176:function(e){"use strict";function t(e){e.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}<ipv4>|(?:[\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\da-f]{1,4}:){0,5}<ipv4>|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|<ipv4>(?:\/\d{1,2})?)\b/.source.replace(/<ipv4>/g,function(){return/(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source}),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}}e.exports=t,t.displayName="keepalived",t.aliases=[]},47815:function(e){"use strict";function t(e){e.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|nomatch|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/}}e.exports=t,t.displayName="keyman",t.aliases=[]},26367:function(e){"use strict";function t(e){var t;e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}},e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}e.exports=t,t.displayName="kotlin",t.aliases=["kt","kts"]},96400:function(e){"use strict";function t(e){!function(e){var t=/\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;function n(e,n){return RegExp(e.replace(/<nonId>/g,t),n)}e.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:n(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),lookbehind:!0},"operator-word":{pattern:n(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:n(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},type:[{pattern:n(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"builtin"},{pattern:n(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"important"}],keyword:{pattern:n(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),lookbehind:!0},name:{pattern:n(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),lookbehind:!0},number:{pattern:n(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source,"i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},e.languages.kum=e.languages.kumir}(e)}e.exports=t,t.displayName="kumir",t.aliases=["kum"]},28203:function(e){"use strict";function t(e){e.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}}e.exports=t,t.displayName="kusto",t.aliases=[]},15417:function(e){"use strict";function t(e){var t,n;n={"equation-command":{pattern:t=/\\(?:[^a-z()[\]]|[a-z*]+)/i,alias:"regex"}},e.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:t,alias:"selector"},punctuation:/[[\]{}&]/},e.languages.tex=e.languages.latex,e.languages.context=e.languages.latex}e.exports=t,t.displayName="latex",t.aliases=["tex","context"]},18391:function(e,t,n){"use strict";var a=n(392),r=n(97010);function i(e){var t;e.register(a),e.register(r),e.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:e.languages.php}},t=e.languages.extend("markup",{}),e.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.php}}}}}},t.tag),e.hooks.add("before-tokenize",function(n){"latte"===n.language&&(e.languages["markup-templating"].buildPlaceholders(n,"latte",/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g),n.grammar=t)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"latte")})}e.exports=i,i.displayName="latte",i.aliases=[]},45514:function(e){"use strict";function t(e){e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}e.exports=t,t.displayName="less",t.aliases=[]},35307:function(e,t,n){"use strict";var a=n(22351);function r(e){e.register(a),function(e){for(var t=/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source,n=0;n<5;n++)t=t.replace(/<expr>/g,function(){return t});t=t.replace(/<expr>/g,/[^\s\S]/.source);var a=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g,function(){return t}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};a["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=a,e.languages.ly=a}(e)}e.exports=r,r.displayName="lilypond",r.aliases=[]},71584:function(e,t,n){"use strict";var a=n(392);function r(e){e.register(a),e.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},e.hooks.add("before-tokenize",function(t){var n=!1;e.languages["markup-templating"].buildPlaceholders(t,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var a=t[1];if("raw"===a&&!n)return n=!0,!0;if("endraw"===a)return n=!1,!0}return!n})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"liquid")})}e.exports=r,r.displayName="liquid",r.aliases=[]},68721:function(e){"use strict";function t(e){!function(e){function t(e){return RegExp(/(\()/.source+"(?:"+e+")"+/(?=[\s\)])/.source)}function n(e){return RegExp(/([\s([])/.source+"(?:"+e+")"+/(?=[\s)])/.source)}var a=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,r="&"+a,i="(\\()",o="(?=\\s)",s=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+a+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+a),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+a),alias:"property"},splice:{pattern:RegExp(",@?"+a),alias:["symbol","variable"]},keyword:[{pattern:RegExp(i+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+o),lookbehind:!0},{pattern:RegExp(i+"(?:append|by|collect|concat|do|finally|for|in|return)"+o),lookbehind:!0}],declare:{pattern:t(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:t(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:n(/nil|t/.source),lookbehind:!0},number:{pattern:n(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(i+"def(?:const|custom|group|var)\\s+"+a),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(a)}},defun:{pattern:RegExp(i+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+a+/\s+\(/.source+s+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+a),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(i+"lambda\\s+\\(\\s*(?:&?"+a+"(?:\\s+&?"+a+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(i+a),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},c={"lisp-marker":RegExp(r),varform:{pattern:RegExp(/\(/.source+a+/\s+(?=\S)/.source+s+/\)/.source),inside:l},argument:{pattern:RegExp(/(^|[\s(])/.source+a),lookbehind:!0,alias:"variable"},rest:l},u="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(i+s+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+u),inside:c},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+u),inside:c},keys:{pattern:RegExp("&key\\s+"+u+"(?:\\s+&allow-other-keys)?"),inside:c},argument:{pattern:RegExp(a),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=d,l.defun.inside.arguments=e.util.clone(d),l.defun.inside.arguments.inside.sublist=d,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(e)}e.exports=t,t.displayName="lisp",t.aliases=[]},84873:function(e){"use strict";function t(e){e.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},e.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=e.languages.livescript}e.exports=t,t.displayName="livescript",t.aliases=[]},48439:function(e){"use strict";function t(e){e.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}}e.exports=t,t.displayName="llvm",t.aliases=[]},80811:function(e){"use strict";function t(e){e.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:e.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source+"|"+/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source+"|"+/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,"i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}}e.exports=t,t.displayName="log",t.aliases=[]},73798:function(e){"use strict";function t(e){e.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}}e.exports=t,t.displayName="lolcode",t.aliases=[]},96868:function(e){"use strict";function t(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}e.exports=t,t.displayName="lua",t.aliases=[]},49902:function(e){"use strict";function t(e){e.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}}e.exports=t,t.displayName="magma",t.aliases=[]},378:function(e){"use strict";function t(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}e.exports=t,t.displayName="makefile",t.aliases=[]},32211:function(e){"use strict";function t(e){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,r=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+r+i+"(?:"+r+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+r+i+")(?:"+r+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+r+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+r+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){("markdown"===e.language||"md"===e.language)&&function e(t){if(t&&"string"!=typeof t)for(var n=0,a=t.length;n<a;n++){var r=t[n];if("code"!==r.type){e(r.content);continue}var i=r.content[1],o=r.content[3];if(i&&o&&"code-language"===i.type&&"code-block"===o.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());o.alias?"string"==typeof o.alias?o.alias=[o.alias,l]:o.alias.push(l):o.alias=[l]}}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n,a="",r=0,i=t.classes.length;r<i;r++){var c=t.classes[r],u=/language-(.+)/.exec(c);if(u){a=u[1];break}}var d=e.languages[a];if(d)t.content=e.highlight(t.content.value.replace(o,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){return"#"===(t=t.toLowerCase())[0]?l("x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1))):s[t]||e}),d,a);else if(a&&"none"!==a&&e.plugins.autoloader){var p="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(a,function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[a],a))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(e)}e.exports=t,t.displayName="markdown",t.aliases=["md"]},392:function(e){"use strict";function t(e){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,a,r,i){if(n.language===a){var o=n.tokenStack=[];n.code=n.code.replace(r,function(e){if("function"==typeof i&&!i(e))return e;for(var r,s=o.length;-1!==n.code.indexOf(r=t(a,s));)++s;return o[s]=e,r}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,a){if(n.language===a&&n.tokenStack){n.grammar=e.languages[a];var r=0,i=Object.keys(n.tokenStack);!function o(s){for(var l=0;l<s.length&&!(r>=i.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=i[r],d=n.tokenStack[u],p="string"==typeof c?c:c.content,g=t(a,u),m=p.indexOf(g);if(m>-1){++r;var b=p.substring(0,m),f=new e.Token(a,e.tokenize(d,n.grammar),"language-"+a,d),E=p.substring(m+g.length),h=[];b&&h.push.apply(h,o([b])),h.push(f),E&&h.push.apply(h,o([E])),"string"==typeof c?s.splice.apply(s,[l,1].concat(h)):c.content=h}}else c.content&&o(c.content)}return s}(n.tokens)}}}})}(e)}e.exports=t,t.displayName="markupTemplating",t.aliases=[]},94719:function(e){"use strict";function t(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var a={};a["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};r["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:r},e.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}e.exports=t,t.displayName="markup",t.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},14415:function(e){"use strict";function t(e){e.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}}e.exports=t,t.displayName="matlab",t.aliases=[]},11944:function(e){"use strict";function t(e){var t;t=/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,e.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-call":{pattern:RegExp("((?:"+(/^/.source+"|")+/[;=<>+\-*/^({\[]/.source+"|"+/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source+")[ ]*)(?!"+t.source+")"+/[a-z_]\w*\b/.source+"(?=[ ]*(?:"+("(?!"+t.source+")"+/[a-z_]/.source+"|")+/\d|-\.?\d/.source+"|"+/[({'"$@#?]/.source+"))","im"),lookbehind:!0,greedy:!0,alias:"function"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/i,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:t,boolean:/\b(?:false|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,color:{pattern:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^?]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}}e.exports=t,t.displayName="maxscript",t.aliases=[]},60139:function(e){"use strict";function t(e){e.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:/\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,operator:[/\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,:;?\[\](){}]/},e.languages.mel.code.inside.rest=e.languages.mel}e.exports=t,t.displayName="mel",t.aliases=[]},27960:function(e){"use strict";function t(e){e.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[<ox](?:==+|--+|-\.*-)[>ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}}e.exports=t,t.displayName="mermaid",t.aliases=[]},21451:function(e){"use strict";function t(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e.exports=t,t.displayName="mizar",t.aliases=[]},54844:function(e){"use strict";function t(e){var t;t="(?:"+["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"].map(function(e){return e.replace("$","\\$")}).join("|")+")\\b",e.languages.mongodb=e.languages.extend("javascript",{}),e.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),e.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},e.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:ObjectId|Code|BinData|DBRef|Timestamp|NumberLong|NumberDecimal|MaxKey|MinKey|RegExp|ISODate|UUID)\\b"),alias:"keyword"}})}e.exports=t,t.displayName="mongodb",t.aliases=[]},60348:function(e){"use strict";function t(e){e.languages.monkey={comment:{pattern:/^#Rem\s[\s\S]*?^#End|'.+/im,greedy:!0},string:{pattern:/"[^"\r\n]*"/,greedy:!0},preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,greedy:!0,alias:"property"},function:/\b\w+(?=\()/,"type-char":{pattern:/\b[?%#$]/,alias:"class-name"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}}e.exports=t,t.displayName="monkey",t.aliases=[]},68143:function(e){"use strict";function t(e){e.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},e.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=e.languages.moonscript,e.languages.moon=e.languages.moonscript}e.exports=t,t.displayName="moonscript",t.aliases=["moon"]},40999:function(e){"use strict";function t(e){e.languages.n1ql={comment:{pattern:/\/\*[\s\S]*?(?:$|\*\/)|--.*/,greedy:!0},string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},parameter:/\$[\w.]+/,keyword:/\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}}e.exports=t,t.displayName="n1ql",t.aliases=[]},84799:function(e){"use strict";function t(e){e.languages.n4js=e.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),e.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),e.languages.n4jsd=e.languages.n4js}e.exports=t,t.displayName="n4js",t.aliases=["n4jsd"]},81856:function(e){"use strict";function t(e){e.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}}e.exports=t,t.displayName="nand2tetrisHdl",t.aliases=[]},99909:function(e){"use strict";function t(e){var t,n;n={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:t=/\{[^\r\n\[\]{}]*\}/,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]},e.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:t,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:n}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:t,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:n},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},e.languages.nani=e.languages.naniscript,e.hooks.add("after-tokenize",function(e){e.tokens.forEach(function(e){if("string"!=typeof e&&"generic-text"===e.type){var t=function e(t){return"string"==typeof t?t:Array.isArray(t)?t.map(e).join(""):e(t.content)}(e);!function(e){for(var t=[],n=0;n<e.length;n++){var a=e[n],r="[]{}".indexOf(a);if(-1!==r){if(r%2==0)t.push(r+1);else if(t.pop()!==r)return!1}}return 0===t.length}(t)&&(e.type="bad-line",e.content=t)}})})}e.exports=t,t.displayName="naniscript",t.aliases=[]},61002:function(e){"use strict";function t(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}e.exports=t,t.displayName="nasm",t.aliases=[]},31077:function(e){"use strict";function t(e){e.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}}e.exports=t,t.displayName="neon",t.aliases=[]},76602:function(e){"use strict";function t(e){e.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}}e.exports=t,t.displayName="nevod",t.aliases=[]},26434:function(e){"use strict";function t(e){var t;t=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i,e.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:t}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:t}},punctuation:/[{};]/}}e.exports=t,t.displayName="nginx",t.aliases=[]},72937:function(e){"use strict";function t(e){e.languages.nim={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,greedy:!0},char:{pattern:/'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,greedy:!0},function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,greedy:!0,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}}e.exports=t,t.displayName="nim",t.aliases=[]},72348:function(e){"use strict";function t(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}e.exports=t,t.displayName="nix",t.aliases=[]},15271:function(e){"use strict";function t(e){e.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}}e.exports=t,t.displayName="nsis",t.aliases=[]},20621:function(e,t,n){"use strict";var a=n(35619);function r(e){e.register(a),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}e.exports=r,r.displayName="objectivec",r.aliases=["objc"]},23565:function(e){"use strict";function t(e){e.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/}}e.exports=t,t.displayName="ocaml",t.aliases=[]},9401:function(e,t,n){"use strict";var a=n(35619);function r(e){var t;e.register(a),e.languages.opencl=e.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),e.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}}),t={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}},e.languages.insertBefore("c","keyword",t),e.languages.cpp&&(t["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},e.languages.insertBefore("cpp","keyword",t))}e.exports=r,r.displayName="opencl",r.aliases=[]},9138:function(e){"use strict";function t(e){e.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},e.languages.qasm=e.languages.openqasm}e.exports=t,t.displayName="openqasm",t.aliases=["qasm"]},61454:function(e){"use strict";function t(e){e.languages.oz={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/`(?:[^`\\]|\\.)+`/,"attr-name":/\b\w+(?=[ \t]*:(?![:=]))/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}}e.exports=t,t.displayName="oz",t.aliases=[]},58882:function(e){"use strict";function t(e){e.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:RegExp("\\b(?:"+["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"].map(function(e){return e.split("").join(" *")}).join("|")+")\\b"),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}}e.exports=t,t.displayName="parigp",t.aliases=[]},65861:function(e){"use strict";function t(e){var t;t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/}),t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}e.exports=t,t.displayName="parser",t.aliases=[]},56036:function(e){"use strict";function t(e){e.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},e.languages.pascal.asm.inside=e.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),e.languages.objectpascal=e.languages.pascal}e.exports=t,t.displayName="pascal",t.aliases=["objectpascal"]},51727:function(e){"use strict";function t(e){var t,n,a,r;t=/\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source,n=/(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g,function(){return t}),a=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g,function(){return n}),"i"),inside:null},{pattern:RegExp(/(:\s*)<type>/.source.replace(/<type>/g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},r=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,t){return e[t]=a[t],e},{}),a["class-name"].forEach(function(e){e.inside=r})}e.exports=t,t.displayName="pascaligo",t.aliases=[]},82402:function(e){"use strict";function t(e){e.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},e.languages.px=e.languages.pcaxis}e.exports=t,t.displayName="pcaxis",t.aliases=["px"]},56923:function(e){"use strict";function t(e){e.languages.peoplecode={comment:RegExp([/\/\*[\s\S]*?\*\//.source,/\bREM[^;]*;/.source,/<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,/\/\+[\s\S]*?\+\//.source].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},e.languages.pcode=e.languages.peoplecode}e.exports=t,t.displayName="peoplecode",t.aliases=["pcode"]},99736:function(e){"use strict";function t(e){var t;t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source,e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}e.exports=t,t.displayName="perl",t.aliases=[]},63082:function(e,t,n){"use strict";var a=n(97010);function r(e){e.register(a),e.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}})}e.exports=r,r.displayName="phpExtras",r.aliases=[]},97010:function(e,t,n){"use strict";var a=n(392);function r(e){var t,n,r,i,o,s,l;e.register(a),t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/,e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php}}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}],e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}e.exports=r,r.displayName="php",r.aliases=[]},8867:function(e,t,n){"use strict";var a=n(97010),r=n(23002);function i(e){var t;e.register(a),e.register(r),t=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source,e.languages.phpdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+t+"\\s+)?)\\$\\w+"),lookbehind:!0}}),e.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+t),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),e.languages.javadoclike.addSupport("php",e.languages.phpdoc)}e.exports=i,i.displayName="phpdoc",i.aliases=[]},82817:function(e,t,n){"use strict";var a=n(12782);function r(e){e.register(a),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}e.exports=r,r.displayName="plsql",r.aliases=[]},83499:function(e){"use strict";function t(e){e.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},string:{pattern:/(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"class-name"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},e.languages.pq=e.languages.powerquery,e.languages.mscript=e.languages.powerquery}e.exports=t,t.displayName="powerquery",t.aliases=[]},35952:function(e){"use strict";function t(e){var t;(t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/}).string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}e.exports=t,t.displayName="powershell",t.aliases=[]},94068:function(e){"use strict";function t(e){e.languages.processing=e.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,function:/\b\w+(?=\s*\()/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),e.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"class-name"}})}e.exports=t,t.displayName="processing",t.aliases=[]},3624:function(e){"use strict";function t(e){e.languages.prolog={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,greedy:!0},builtin:/\b(?:fx|fy|xf[xy]?|yfx?)\b/,function:/\b[a-z]\w*(?:(?=\()|\/\d+)/,number:/\b\d+(?:\.\d*)?/,operator:/[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,punctuation:/[(){}\[\],]/}}e.exports=t,t.displayName="prolog",t.aliases=[]},5541:function(e){"use strict";function t(e){var t,n;n=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(t=["on","ignoring","group_right","group_left","by","without"],["offset"]),e.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:RegExp("((?:"+t.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:RegExp("\\b(?:"+n.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}}e.exports=t,t.displayName="promql",t.aliases=[]},81966:function(e){"use strict";function t(e){e.languages.properties={comment:/^[ \t]*[#!].*$/m,"attr-value":{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0},"attr-name":/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,punctuation:/[=:]/}}e.exports=t,t.displayName="properties",t.aliases=[]},35801:function(e){"use strict";function t(e){var t;t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/,e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}e.exports=t,t.displayName="protobuf",t.aliases=[]},47756:function(e){"use strict";function t(e){e.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,boolean:/\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:/\b[_a-z]\w*\b(?=\s*\()/i,number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}}e.exports=t,t.displayName="psl",t.aliases=[]},77570:function(e){"use strict";function t(e){!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:/\S[\s\S]*/}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=/(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source,n=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],a={},r=0,i=n.length;r<i;r++){var o=n[r];o="string"==typeof o?{filter:o,language:o}:o,e.languages[o.language]&&(a["filter-"+o.filter]={pattern:RegExp(t.replace("<filter_name>",function(){return o.filter}),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:{pattern:/\S[\s\S]*/,alias:[o.language,"language-"+o.language],inside:e.languages[o.language]}}})}e.languages.insertBefore("pug","filter",a)}(e)}e.exports=t,t.displayName="pug",t.aliases=[]},53746:function(e){"use strict";function t(e){var t;e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/},t=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}],e.languages.puppet.heredoc[0].inside.interpolation=t,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=t}e.exports=t,t.displayName="puppet",t.aliases=[]},59228:function(e){"use strict";function t(e){var t;e.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/},t=/%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source,["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(n){var a=n;if("string"!=typeof n&&(a=n.alias,n=n.lang),e.languages[a]){var r={};r["inline-lang-"+a]={pattern:RegExp(t.replace("<lang>",n.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:e.util.clone(e.languages.pure["inline-lang"].inside)},r["inline-lang-"+a].inside.rest=e.util.clone(e.languages[a]),e.languages.insertBefore("pure","inline-lang",r)}}),e.languages.c&&(e.languages.pure["inline-lang"].inside.rest=e.util.clone(e.languages.c))}e.exports=t,t.displayName="pure",t.aliases=[]},8667:function(e){"use strict";function t(e){e.languages.purebasic=e.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/}),e.languages.insertBefore("purebasic","keyword",{tag:/#\w+\$?/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete e.languages.purebasic["class-name"],delete e.languages.purebasic.boolean,e.languages.pbfasm=e.languages.purebasic}e.exports=t,t.displayName="purebasic",t.aliases=[]},73326:function(e,t,n){"use strict";var a=n(82784);function r(e){e.register(a),e.languages.purescript=e.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[e.languages.haskell.operator[0],e.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),e.languages.purs=e.languages.purescript}e.exports=r,r.displayName="purescript",r.aliases=["purs"]},33478:function(e){"use strict";function t(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}e.exports=t,t.displayName="python",t.aliases=["py"]},44175:function(e){"use strict";function t(e){e.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}}e.exports=t,t.displayName="q",t.aliases=[]},12078:function(e){"use strict";function t(e){!function(e){for(var t=/"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source,n=/\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source,a=/(?:[^\\()[\]{}"'/]|<string>|\/(?![*/])|<comment>|\(<expr>*\)|\[<expr>*\]|\{<expr>*\}|\\[\s\S])/.source.replace(/<string>/g,function(){return t}).replace(/<comment>/g,function(){return n}),r=0;r<2;r++)a=a.replace(/<expr>/g,function(){return a});a=a.replace(/<expr>/g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(<js>*\)\s*\{<js>*\}/.source.replace(/<js>/g,function(){return a}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}])<js>)+/.source.replace(/<js>/g,function(){return a}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(e)}e.exports=t,t.displayName="qml",t.aliases=[]},51184:function(e){"use strict";function t(e){e.languages.qore=e.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/})}e.exports=t,t.displayName="qore",t.aliases=[]},8061:function(e){"use strict";function t(e){!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,a){return RegExp(t(e,n),a||"")}var a=RegExp("\\b(?:"+"Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within".trim().replace(/ /g,"|")+")\\b"),r=/\b[A-Za-z_]\w*\b/.source,i=t(/<<0>>(?:\s*\.\s*<<0>>)*/.source,[r]),o={keyword:a,punctuation:/[<>()?,.:[\]]/},s=/"(?:\\.|[^\\"])*"/.source;e.languages.qsharp=e.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[s]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source,[i]),lookbehind:!0,inside:o},{pattern:n(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source,[i]),lookbehind:!0,inside:o}],keyword:a,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),e.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var l=function(e,t){for(var n=0;n<2;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}(t(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source,[s]),0);e.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:n(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source,[l]),greedy:!0,inside:{interpolation:{pattern:n(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source,[l]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:e.languages.qsharp}}},string:/[\s\S]+/}}})}(e),e.languages.qs=e.languages.qsharp}e.exports=t,t.displayName="qsharp",t.aliases=["qs"]},27374:function(e){"use strict";function t(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}e.exports=t,t.displayName="r",t.aliases=[]},78960:function(e,t,n){"use strict";var a=n(22351);function r(e){e.register(a),e.languages.racket=e.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),e.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),e.languages.rkt=e.languages.racket}e.exports=r,r.displayName="racket",r.aliases=["rkt"]},94738:function(e){"use strict";function t(e){e.languages.reason=e.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),e.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete e.languages.reason.function}e.exports=t,t.displayName="reason",t.aliases=[]},52321:function(e){"use strict";function t(e){var t,n,a,r,i;t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=RegExp((a="(?:[^\\\\-]|"+(n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")")+"-"+a),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}e.exports=t,t.displayName="regex",t.aliases=[]},68220:function(e){"use strict";function t(e){e.languages.rego={comment:/#.*/,property:{pattern:/(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,boolean:/\b(?:false|true)\b/,function:{pattern:/\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,inside:{namespace:/\b\w+\b(?=\s*\.)/,punctuation:/\./}},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/[-+*/%|&]|[<>:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}}e.exports=t,t.displayName="rego",t.aliases=[]},87116:function(e){"use strict";function t(e){e.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},e.languages.rpy=e.languages.renpy}e.exports=t,t.displayName="renpy",t.aliases=["rpy"]},93132:function(e){"use strict";function t(e){e.languages.rest={table:[{pattern:/(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( )(?! )[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^[\t ]*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^[\t ]*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^[\t ]*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}}e.exports=t,t.displayName="rest",t.aliases=[]},86606:function(e){"use strict";function t(e){e.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}}e.exports=t,t.displayName="rip",t.aliases=[]},69067:function(e){"use strict";function t(e){e.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}}e.exports=t,t.displayName="roboconf",t.aliases=[]},46982:function(e){"use strict";function t(e){!function(e){var t={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},n={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function a(e,a){var r={};for(var i in r["section-header"]={pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"},a)r[i]=a[i];return r.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},r.variable=n,r.comment=t,{pattern:RegExp(/^ ?\*{3}[ \t]*<name>[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(/<name>/g,function(){return e}),"im"),alias:"section",inside:r}}var r={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},i={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:n}},o={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:n}};e.languages.robotframework={settings:a("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:a("Variables"),"test-cases":a("Test Cases",{"test-name":i,documentation:r,property:o}),keywords:a("Keywords",{"keyword-name":i,documentation:r,property:o}),tasks:a("Tasks",{"task-name":i,documentation:r,property:o}),comment:t},e.languages.robot=e.languages.robotframework}(e)}e.exports=t,t.displayName="robotframework",t.aliases=[]},11866:function(e){"use strict";function t(e){var t,n,a;e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}},delete e.languages.ruby.function,n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",a=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source,e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+a),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+a+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}e.exports=t,t.displayName="ruby",t.aliases=["rb"]},38287:function(e){"use strict";function t(e){!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(e)}e.exports=t,t.displayName="rust",t.aliases=[]},69004:function(e){"use strict";function t(e){var t,n,a,r,i,o,s,l,c,u,d,p,g,m,b,f,E,h;t=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,n=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,a={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},o={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],d={function:u={pattern:/%?\b\w+(?=\()/,alias:"keyword"},"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":r={pattern:/&[a-z_]\w*/i},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:n,"numeric-constant":a,punctuation:c=/[$%@.(){}\[\];,\\]/,string:l={pattern:RegExp(t),greedy:!0}},p={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},g={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},m={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},b={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},f=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,E={pattern:RegExp(/(^|\s)(?:action\s+)?(?:<act>)\.[a-z]+\b[^;]+/.source.replace(/<act>/g,function(){return f}),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:<act>)\.[a-z]+\b/.source.replace(/<act>/g,function(){return f}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:s,function:u,"arg-value":d["arg-value"],operator:d.operator,argument:d.arg,number:n,"numeric-constant":a,punctuation:c,string:l}},h={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0},e.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:<str>|[^;"'])+;/.source.replace(/<str>/g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":m,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:n,"numeric-constant":a,punctuation:c,string:l}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:h,"submit-statement":b,"global-statements":m,number:n,"numeric-constant":a,punctuation:c,string:l}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:h,"submit-statement":b,"global-statements":m,number:n,"numeric-constant":a,punctuation:c,string:l}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:d}},"cas-actions":E,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:d},step:o,keyword:h,function:u,format:p,altformat:g,"global-statements":m,number:n,"numeric-constant":a,punctuation:c,string:l}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|<str>)+;/.source.replace(/<str>/g,function(){return t}),"im"),lookbehind:!0,inside:d},"macro-keyword":i,"macro-variable":r,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":i,"macro-variable":r,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:n,"numeric-constant":a}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:d},"cas-actions":E,comment:s,function:u,format:p,altformat:g,"numeric-constant":a,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:l,step:o,keyword:h,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:n,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,punctuation:c}}e.exports=t,t.displayName="sas",t.aliases=[]},66768:function(e){"use strict";function t(e){var t,n;e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule,t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}e.exports=t,t.displayName="sass",t.aliases=[]},2344:function(e,t,n){"use strict";var a=n(64288);function r(e){e.register(a),e.languages.scala=e.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),e.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.scala}}},string:/[\s\S]+/}}}),delete e.languages.scala["class-name"],delete e.languages.scala.function}e.exports=r,r.displayName="scala",r.aliases=[]},22351:function(e){"use strict";function t(e){e.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(e){for(var t in e)e[t]=e[t].replace(/<[\w\s]+>/g,function(t){return"(?:"+e[t].trim()+")"});return e[t]}({"<ureal dec>":/\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,"<real dec>":/[+-]?<ureal dec>|[+-](?:inf|nan)\.0/.source,"<imaginary dec>":/[+-](?:<ureal dec>|(?:inf|nan)\.0)?i/.source,"<complex dec>":/<real dec>(?:@<real dec>|<imaginary dec>)?|<imaginary dec>/.source,"<num dec>":/(?:#d(?:#[ei])?|#[ei](?:#d)?)?<complex dec>/.source,"<ureal box>":/[0-9a-f]+(?:\/[0-9a-f]+)?/.source,"<real box>":/[+-]?<ureal box>|[+-](?:inf|nan)\.0/.source,"<imaginary box>":/[+-](?:<ureal box>|(?:inf|nan)\.0)?i/.source,"<complex box>":/<real box>(?:@<real box>|<imaginary box>)?|<imaginary box>/.source,"<num box>":/#[box](?:#[ei])?|(?:#[ei])?#[box]<complex box>/.source,"<number>":/(^|[()\[\]\s])(?:<num dec>|<num box>)(?=[()\[\]\s]|$)/.source}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}}e.exports=t,t.displayName="scheme",t.aliases=[]},69096:function(e){"use strict";function t(e){e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}e.exports=t,t.displayName="scss",t.aliases=[]},2608:function(e,t,n){"use strict";var a=n(52698);function r(e){var t;e.register(a),t=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|"),e.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<<str>>)+/.source.replace(/<<str>>/g,function(){return t}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:e.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},e.languages["sh-session"]=e.languages.shellsession=e.languages["shell-session"]}e.exports=r,r.displayName="shellSession",r.aliases=[]},34248:function(e){"use strict";function t(e){e.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}}e.exports=t,t.displayName="smali",t.aliases=[]},23229:function(e){"use strict";function t(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}e.exports=t,t.displayName="smalltalk",t.aliases=[]},35890:function(e,t,n){"use strict";var a=n(392);function r(e){var t,n;e.register(a),e.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:e.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},e.languages.smarty["embedded-php"].inside.smarty.inside=e.languages.smarty,e.languages.smarty.string[0].inside.interpolation.inside.expression.inside=e.languages.smarty,t=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,n=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>)*\})*\})*\}/.source.replace(/<str>/g,function(){return t.source}),"g"),e.hooks.add("before-tokenize",function(t){var a=!1;e.languages["markup-templating"].buildPlaceholders(t,"smarty",n,function(e){return"{/literal}"===e&&(a=!1),!a&&("{literal}"===e&&(a=!0),!0)})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"smarty")})}e.exports=r,r.displayName="smarty",r.aliases=[]},65325:function(e){"use strict";function t(e){var t;t=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i,e.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp(/((?:^|[^:]):\s*)<TERMINAL>(?:\s*(?:(?:\*|->)\s*<TERMINAL>|,\s*<TERMINAL>(?:(?=<NOT-LAST>)|(?!<NOT-LAST>)\s+<LONG-ID>)))*/.source.replace(/<NOT-LAST>/g,function(){return/\s*(?:[*,]|->)/.source}).replace(/<TERMINAL>/g,function(){return/(?:'[\w']*|<LONG-ID>|\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+<LONG-ID>)*/.source}).replace(/<LONG-ID>/g,function(){return/(?!<KEYWORD>)[a-z\d_][\w'.]*/.source}).replace(/<KEYWORD>/g,function(){return t.source}),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:t,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},e.languages.sml["class-name"][0].inside=e.languages.sml,e.languages.smlnj=e.languages.sml}e.exports=t,t.displayName="sml",t.aliases=["smlnj"]},93711:function(e){"use strict";function t(e){e.languages.solidity=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),e.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),e.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),e.languages.sol=e.languages.solidity}e.exports=t,t.displayName="solidity",t.aliases=["sol"]},52284:function(e){"use strict";function t(e){var t;t={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}},e.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:t}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:t}},guid:t,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},e.languages.sln=e.languages["solution-file"]}e.exports=t,t.displayName="solutionFile",t.aliases=[]},12023:function(e,t,n){"use strict";var a=n(392);function r(e){var t,n;e.register(a),t=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/,e.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:t,greedy:!0},number:n,punctuation:/[\[\].?]/}},string:{pattern:t,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:n,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},e.hooks.add("before-tokenize",function(t){var n=!1;e.languages["markup-templating"].buildPlaceholders(t,"soy",/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,function(e){return"{/literal}"===e&&(n=!1),!n&&("{literal}"===e&&(n=!0),!0)})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"soy")})}e.exports=r,r.displayName="soy",r.aliases=[]},16570:function(e,t,n){"use strict";var a=n(3517);function r(e){e.register(a),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}e.exports=r,r.displayName="sparql",r.aliases=["rq"]},76785:function(e){"use strict";function t(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}e.exports=t,t.displayName="splunkSpl",t.aliases=[]},31997:function(e){"use strict";function t(e){e.languages.sqf=e.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),e.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:e.languages.sqf.comment}}}),delete e.languages.sqf["class-name"]}e.exports=t,t.displayName="sqf",t.aliases=[]},12782:function(e){"use strict";function t(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}e.exports=t,t.displayName="sql",t.aliases=[]},36857:function(e){"use strict";function t(e){e.languages.squirrel=e.languages.extend("clike",{comment:[e.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),e.languages.insertBefore("squirrel","string",{char:{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}})}e.exports=t,t.displayName="squirrel",t.aliases=[]},5400:function(e){"use strict";function t(e){var t;t=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/,e.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+t.source+/\s*\(\s*/.source+")"+/[a-zA-Z]\w*/.source),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,t],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},e.languages.stan.constraint.inside.expression.inside=e.languages.stan}e.exports=t,t.displayName="stan",t.aliases=[]},82481:function(e){"use strict";function t(e){var t,n,a;(a={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},number:n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/}).interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:a}},a.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:a}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:a}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:a}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:a}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:a.interpolation}},rest:a}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:a.interpolation,comment:a.comment,punctuation:/[{},]/}},func:a.func,string:a.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:a.interpolation,punctuation:/[{}()\[\];:.]/}}e.exports=t,t.displayName="stylus",t.aliases=[]},11173:function(e){"use strict";function t(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=e.languages.swift})}e.exports=t,t.displayName="swift",t.aliases=[]},42283:function(e){"use strict";function t(e){var t,n;t={pattern:/^[;#].*/m,greedy:!0},n=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source,e.languages.systemd={comment:t,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+n+'|(?=[^"\r\n]))(?:'+(/[^\s\\]/.source+'|[ ]+(?:(?![ "])|')+n+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:t,quoted:{pattern:RegExp(/(^|\s)/.source+n),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}}e.exports=t,t.displayName="systemd",t.aliases=[]},47943:function(e,t,n){"use strict";var a=n(98062),r=n(53494);function i(e){e.register(a),e.register(r),e.languages.t4=e.languages["t4-cs"]=e.languages["t4-templating"].createT4("csharp")}e.exports=i,i.displayName="t4Cs",i.aliases=[]},98062:function(e){"use strict";function t(e){!function(e){function t(e,t,n){return{pattern:RegExp("<#"+e+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+e+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:t,alias:n}}}}e.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:function(n){var a=e.languages[n],r="language-"+n;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:t("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:t("=",a,r),"class-feature":t("\\+",a,r),standard:t("",a,r)}}}}})}(e)}e.exports=t,t.displayName="t4Templating",t.aliases=[]},13223:function(e,t,n){"use strict";var a=n(98062),r=n(88672);function i(e){e.register(a),e.register(r),e.languages["t4-vb"]=e.languages["t4-templating"].createT4("vbnet")}e.exports=i,i.displayName="t4Vb",i.aliases=[]},59851:function(e,t,n){"use strict";var a=n(22173);function r(e){e.register(a),e.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:e.languages.yaml,alias:"language-yaml"}}}e.exports=r,r.displayName="tap",r.aliases=[]},31976:function(e){"use strict";function t(e){e.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}e.exports=t,t.displayName="tcl",t.aliases=[]},98332:function(e){"use strict";function t(e){!function(e){var t=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,n=/\)|\((?![^|()\n]+\))/.source;function a(e,a){return RegExp(e.replace(/<MOD>/g,function(){return"(?:"+t+")"}).replace(/<PAR>/g,function(){return"(?:"+n+")"}),a||"")}var r={css:{pattern:/\{[^{}]+\}/,inside:{rest:e.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},i=e.languages.textile=e.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:a(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),inside:{modifier:{pattern:a(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),lookbehind:!0,inside:r},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:a(/^[*#]+<MOD>*\s+\S.*/.source,"m"),inside:{modifier:{pattern:a(/(^[*#]+)<MOD>+/.source),lookbehind:!0,inside:r},punctuation:/^[*#]+/}},table:{pattern:a(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:a(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:r},punctuation:/\||^\./}},inline:{pattern:a(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:a(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:a(/(^(__?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:a(/(^\?\?<MOD>*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:a(/(^@<MOD>*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:a(/(^\+<MOD>*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:a(/(^-<MOD>*).+?(?=-)/.source),lookbehind:!0},span:{pattern:a(/(^%<MOD>*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:a(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),lookbehind:!0,inside:r},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:a(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:a(/(^"<MOD>*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:a(/(^")<MOD>+/.source),lookbehind:!0,inside:r},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:a(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:a(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:a(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),lookbehind:!0,inside:r},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),o=i.phrase.inside,s={inline:o.inline,link:o.link,image:o.image,footnote:o.footnote,acronym:o.acronym,mark:o.mark};i.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var l=o.inline.inside;l.bold.inside=s,l.italic.inside=s,l.inserted.inside=s,l.deleted.inside=s,l.span.inside=s;var c=o.table.inside;c.inline=s.inline,c.link=s.link,c.image=s.image,c.footnote=s.footnote,c.acronym=s.acronym,c.mark=s.mark}(e)}e.exports=t,t.displayName="textile",t.aliases=[]},15281:function(e){"use strict";function t(e){!function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(e){return e.replace(/__/g,function(){return t})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}(e)}e.exports=t,t.displayName="toml",t.aliases=[]},74006:function(e){"use strict";function t(e){var t;e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/},t=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source,e.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+t+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+t+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(t),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}e.exports=t,t.displayName="tremor",t.aliases=[]},46329:function(e,t,n){"use strict";var a=n(56963),r=n(58275);function i(e){var t,n;e.register(a),e.register(r),t=e.util.clone(e.languages.typescript),e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],(n=e.languages.tsx.tag).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}e.exports=i,i.displayName="tsx",i.aliases=[]},73638:function(e,t,n){"use strict";var a=n(392);function r(e){e.register(a),e.languages.tt2=e.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),e.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),e.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),e.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete e.languages.tt2.string,e.hooks.add("before-tokenize",function(t){e.languages["markup-templating"].buildPlaceholders(t,"tt2",/\[%[\s\S]+?%\]/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"tt2")})}e.exports=r,r.displayName="tt2",r.aliases=[]},3517:function(e){"use strict";function t(e){e.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:false|true)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:base|graph|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},e.languages.trig=e.languages.turtle}e.exports=t,t.displayName="turtle",t.aliases=[]},44785:function(e,t,n){"use strict";var a=n(392);function r(e){e.register(a),e.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},e.hooks.add("before-tokenize",function(t){"twig"===t.language&&e.languages["markup-templating"].buildPlaceholders(t,"twig",/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"twig")})}e.exports=r,r.displayName="twig",r.aliases=[]},58275:function(e){"use strict";function t(e){var t;e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"],t=e.languages.extend("typescript",{}),delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}e.exports=t,t.displayName="typescript",t.aliases=["ts"]},75791:function(e){"use strict";function t(e){var t;t=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/,e.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern:/<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:t}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:t,number:/^\d+$/,punctuation:/[,|:]/}},keyword:t,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},e.languages.tsconfig=e.languages.typoscript}e.exports=t,t.displayName="typoscript",t.aliases=["tsconfig"]},54700:function(e){"use strict";function t(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}e.exports=t,t.displayName="unrealscript",t.aliases=["uc","uscript"]},33080:function(e){"use strict";function t(e){e.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}e.exports=t,t.displayName="uorazor",t.aliases=[]},78197:function(e){"use strict";function t(e){e.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+("(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source)+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")"+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},e.languages.url=e.languages.uri}e.exports=t,t.displayName="uri",t.aliases=["url"]},91880:function(e){"use strict";function t(e){var t;t={pattern:/[\s\S]+/,inside:null},e.languages.v=e.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":t}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),t.inside=e.languages.v,e.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),e.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),e.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:e.languages.v.generic.inside}}}})}e.exports=t,t.displayName="v",t.aliases=[]},302:function(e){"use strict";function t(e){e.languages.vala=e.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),e.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:e.languages.vala}},string:/[\s\S]+/}}}),e.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}e.exports=t,t.displayName="vala",t.aliases=[]},88672:function(e,t,n){"use strict";var a=n(85820);function r(e){e.register(a),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}e.exports=r,r.displayName="vbnet",r.aliases=[]},47303:function(e){"use strict";function t(e){var t;e.languages.velocity=e.languages.extend("markup",{}),(t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/}).variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}e.exports=t,t.displayName="velocity",t.aliases=[]},25260:function(e){"use strict";function t(e){e.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}e.exports=t,t.displayName="verilog",t.aliases=[]},2738:function(e){"use strict";function t(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="vhdl",t.aliases=[]},54617:function(e){"use strict";function t(e){e.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}e.exports=t,t.displayName="vim",t.aliases=[]},77105:function(e){"use strict";function t(e){e.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},e.languages.vb=e.languages["visual-basic"],e.languages.vba=e.languages["visual-basic"]}e.exports=t,t.displayName="visualBasic",t.aliases=[]},38730:function(e){"use strict";function t(e){e.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}e.exports=t,t.displayName="warpscript",t.aliases=[]},4779:function(e){"use strict";function t(e){e.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}e.exports=t,t.displayName="wasm",t.aliases=[]},37665:function(e){"use strict";function t(e){!function(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,n="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,a={};for(var r in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:a},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+n),lookbehind:!0,inside:a},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+n),lookbehind:!0,inside:a},{pattern:RegExp(/(\btypedef\b\s*)/.source+n),lookbehind:!0,inside:a},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(n+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:a}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==r&&(a[r]=e.languages["web-idl"][r]);e.languages.webidl=e.languages["web-idl"]}(e)}e.exports=t,t.displayName="webIdl",t.aliases=[]},34411:function(e){"use strict";function t(e){e.languages.wiki=e.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:e.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),e.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:e.languages.markup.tag.inside}}}})}e.exports=t,t.displayName="wiki",t.aliases=[]},66331:function(e){"use strict";function t(e){e.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.mathematica=e.languages.wolfram,e.languages.wl=e.languages.wolfram,e.languages.nb=e.languages.wolfram}e.exports=t,t.displayName="wolfram",t.aliases=["mathematica","wl","nb"]},63285:function(e){"use strict";function t(e){e.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},e.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:e.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}e.exports=t,t.displayName="wren",t.aliases=[]},95787:function(e){"use strict";function t(e){e.languages.xeora=e.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),e.languages.insertBefore("inside","punctuation",{variable:e.languages.xeora["function-inline"].inside.variable},e.languages.xeora["function-block"]),e.languages.xeoracube=e.languages.xeora}e.exports=t,t.displayName="xeora",t.aliases=["xeoracube"]},23840:function(e){"use strict";function t(e){!function(e){function t(t,n){e.languages[t]&&e.languages.insertBefore(t,"comment",{"doc-comment":n})}var n=e.languages.markup.tag,a={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:n}};t("csharp",a),t("fsharp",a),t("vbnet",{pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:n}})}(e)}e.exports=t,t.displayName="xmlDoc",t.aliases=[]},56275:function(e){"use strict";function t(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}e.exports=t,t.displayName="xojo",t.aliases=[]},81890:function(e){"use strict";function t(e){!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(a){for(var r=[],i=0;i<a.length;i++){var o=a[i],s=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?r.length>0&&r[r.length-1].tagName===t(o.content[0].content[1])&&r.pop():"/>"===o.content[o.content.length-1].content||r.push({tagName:t(o.content[0].content[1]),openedBraces:0}):!(r.length>0)||"punctuation"!==o.type||"{"!==o.content||a[i+1]&&"punctuation"===a[i+1].type&&"{"===a[i+1].content||a[i-1]&&"plain-text"===a[i-1].type&&"{"===a[i-1].content?r.length>0&&r[r.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?r[r.length-1].openedBraces--:"comment"!==o.type&&(s=!0):r[r.length-1].openedBraces++),(s||"string"==typeof o)&&r.length>0&&0===r[r.length-1].openedBraces){var l=t(o);i<a.length-1&&("string"==typeof a[i+1]||"plain-text"===a[i+1].type)&&(l+=t(a[i+1]),a.splice(i+1,1)),i>0&&("string"==typeof a[i-1]||"plain-text"===a[i-1].type)&&(l=t(a[i-1])+l,a.splice(i-1,1),i--),/^\s+$/.test(l)?a[i]=l:a[i]=new e.Token("plain-text",l,null,l)}o.content&&"string"!=typeof o.content&&n(o.content)}};e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}(e)}e.exports=t,t.displayName="xquery",t.aliases=[]},22173:function(e){"use strict";function t(e){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",r=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){return t=(t||"").replace(/m/g,"")+"m",RegExp(/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<value>>/g,function(){return e}),t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return a})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<key>>/g,function(){return"(?:"+r+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(i),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(e)}e.exports=t,t.displayName="yaml",t.aliases=["yml"]},97793:function(e){"use strict";function t(e){e.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}e.exports=t,t.displayName="yang",t.aliases=[]},31634:function(e){"use strict";function t(e){!function(e){function t(e){return function(){return e}}var n=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+n.source+")(?!\\d)\\w+\\b",r=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,i="(?!\\s)(?:!?\\s*(?:"+/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*<ALIGN>|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(/<ALIGN>/g,t(r))+"\\s*)*"+/(?:\bpromise\b|(?:\berror\.)?<ID>(?:\.<ID>)*(?!\s+<ID>))/.source.replace(/<ID>/g,t(a))+")+";e.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?[=;,)])|<TYPE>(?=\s*(?:<ALIGN>\s*)?\{)/.source.replace(/<TYPE>/g,t(i)).replace(/<ALIGN>/g,t(r))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?;)/.source.replace(/<TYPE>/g,t(i)).replace(/<ALIGN>/g,t(r))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:n,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},e.languages.zig["class-name"].forEach(function(t){null===t.inside&&(t.inside=e.languages.zig)})}(e)}e.exports=t,t.displayName="zig",t.aliases=[]},75767:function(e){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},97978:function(e,t,n){"use strict";var a=n(75767),r=n(84734);e.exports=function(e){return a(e)||r(e)}},84734:function(e){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},79252:function(e){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},61997:function(e){"use strict";var t;e.exports=function(e){var n,a="&"+e+";";return(t=t||document.createElement("i")).innerHTML=a,(59!==(n=t.textContent).charCodeAt(n.length-1)||"semi"===e)&&n!==a&&n}},21470:function(e,t,n){"use strict";var a=n(72890),r=n(55229),i=n(84734),o=n(79252),s=n(97978),l=n(61997);e.exports=function(e,t){var n,i,o={};for(i in t||(t={}),p)n=t[i],o[i]=null==n?p[i]:n;return(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start),function(e,t){var n,i,o,p,S,y,T,A,R,I,N,_,v,w,k,C,O,x,L,D,P,M=t.additional,F=t.nonTerminated,U=t.text,B=t.reference,G=t.warning,$=t.textContext,H=t.referenceContext,z=t.warningContext,j=t.position,V=t.indent||[],W=e.length,q=0,Y=-1,K=j.column||1,Z=j.line||1,X="",Q=[];for("string"==typeof M&&(M=M.charCodeAt(0)),x=J(),I=G?function(e,t){var n=J();n.column+=t,n.offset+=t,G.call(z,h[e],n,e)}:d,q--,W++;++q<W;)if(10===T&&(K=V[Y]||1),38===(T=e.charCodeAt(q))){if(9===(R=e.charCodeAt(q+1))||10===R||12===R||32===R||38===R||60===R||R!=R||M&&R===M){X+=u(T),K++;continue}for(w=k=q+1,P=k,35===R?(P=++w,88===(R=e.charCodeAt(P))||120===R?(C=m,P=++w):C=b):C=g,o="",v="",y="",O=E[C],P--;++P<W&&O(R=e.charCodeAt(P));)y+=u(R),C===g&&c.call(a,y)&&(o=y,v=a[y]);(S=59===e.charCodeAt(P))&&(P++,(p=C===g&&l(y))&&(o=y,v=p)),D=1+P-k,(S||F)&&(y?C===g?(S&&!v?I(5,1):(o!==y&&(D=1+(P=w+o.length)-w,S=!1),S||(N=o?1:3,t.attribute?61===(R=e.charCodeAt(P))?(I(N,D),v=null):s(R)?v=null:I(N,D):I(N,D))),A=v):(S||I(2,D),(n=A=parseInt(y,f[C]))>=55296&&n<=57343||n>1114111?(I(7,D),A=u(65533)):A in r?(I(6,D),A=r[A]):(_="",((i=A)>=1&&i<=8||11===i||i>=13&&i<=31||i>=127&&i<=159||i>=64976&&i<=65007||(65535&i)==65535||(65535&i)==65534)&&I(6,D),A>65535&&(A-=65536,_+=u(A>>>10|55296),A=56320|1023&A),A=_+u(A))):C!==g&&I(4,D)),A?(ee(),x=J(),q=P-1,K+=P-k+1,Q.push(A),L=J(),L.offset++,B&&B.call(H,A,{start:x,end:L},e.slice(k-1,P)),x=L):(y=e.slice(k-1,P),X+=y,K+=y.length,q=P-1)}else 10===T&&(Z++,Y++,K=0),T==T?(X+=u(T),K++):ee();return Q.join("");function J(){return{line:Z,column:K,offset:q+(j.offset||0)}}function ee(){X&&(Q.push(X),U&&U.call($,X,{start:x,end:J()}),X="")}}(e,o)};var c={}.hasOwnProperty,u=String.fromCharCode,d=Function.prototype,p={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},g="named",m="hexadecimal",b="decimal",f={};f[m]=16,f[b]=10;var E={};E[g]=s,E[b]=i,E[m]=o;var h={};h[1]="Named character references must be terminated by a semicolon",h[2]="Numeric character references must be terminated by a semicolon",h[3]="Named character references cannot be empty",h[4]="Numeric character references cannot be empty",h[5]="Named character references must be known",h[6]="Numeric character references cannot be disallowed",h[7]="Numeric character references cannot be outside the permissible Unicode range"},40741:function(e,t,n){var a=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var a,i;switch(n=n||{},r.util.type(t)){case"Object":if(n[i=r.util.objId(t)])return n[i];for(var o in a={},n[i]=a,t)t.hasOwnProperty(o)&&(a[o]=e(t[o],n));return a;case"Array":if(n[i=r.util.objId(t)])return n[i];return a=[],n[i]=a,t.forEach(function(t,r){a[r]=e(t,n)}),a;default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw Error()}catch(a){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var a="no-"+t;e;){var r=e.classList;if(r.contains(t))return!0;if(r.contains(a))return!1;e=e.parentElement}return!!n}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var i=(a=a||r.languages)[e],o={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(o[l]=n[l]);n.hasOwnProperty(s)||(o[s]=i[s])}var c=a[e];return a[e]=o,r.languages.DFS(r.languages,function(t,n){n===c&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,a,i){i=i||{};var o=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||i[o(l)]?"Array"!==c||i[o(l)]||(i[o(l)]=!0,e(l,n,s,i)):(i[o(l)]=!0,e(l,n,null,i))}}},plugins:{},highlightAll:function(e,t){r.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),r.hooks.run("before-all-elements-highlight",a);for(var i,o=0;i=a.elements[o++];)r.highlightElement(i,!0===t,a.callback)},highlightElement:function(t,n,a){var i=r.util.getLanguage(t),o=r.languages[i];r.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&r.util.setLanguage(s,i);var l=t.textContent,c={element:t,language:i,grammar:o,code:l};function u(e){c.highlightedCode=e,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,r.hooks.run("after-highlight",c),r.hooks.run("complete",c),a&&a.call(c.element)}if(r.hooks.run("before-sanity-check",c),(s=c.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!c.code){r.hooks.run("complete",c),a&&a.call(c.element);return}if(r.hooks.run("before-highlight",c),!c.grammar){u(r.util.encode(c.code));return}if(n&&e.Worker){var d=new Worker(r.filename);d.onmessage=function(e){u(e.data)},d.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else u(r.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",a),!a.grammar)throw Error('The language "'+a.language+'" has no grammar.');return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run("after-tokenize",a),i.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var a in n)t[a]=n[a];delete t.rest}var c=new s;return l(c,c.head,e),function e(t,n,a,s,c,u){for(var d in a)if(a.hasOwnProperty(d)&&a[d]){var p=a[d];p=Array.isArray(p)?p:[p];for(var g=0;g<p.length;++g){if(u&&u.cause==d+","+g)return;var m=p[g],b=m.inside,f=!!m.lookbehind,E=!!m.greedy,h=m.alias;if(E&&!m.pattern.global){var S=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,S+"g")}for(var y=m.pattern||m,T=s.next,A=c;T!==n.tail&&(!u||!(A>=u.reach));A+=T.value.length,T=T.next){var R,I=T.value;if(n.length>t.length)return;if(!(I instanceof i)){var N=1;if(E){if(!(R=o(y,A,t,f))||R.index>=t.length)break;var _=R.index,v=R.index+R[0].length,w=A;for(w+=T.value.length;_>=w;)w+=(T=T.next).value.length;if(w-=T.value.length,A=w,T.value instanceof i)continue;for(var k=T;k!==n.tail&&(w<v||"string"==typeof k.value);k=k.next)N++,w+=k.value.length;N--,I=t.slice(A,w),R.index-=A}else if(!(R=o(y,0,I,f)))continue;var _=R.index,C=R[0],O=I.slice(0,_),x=I.slice(_+C.length),L=A+I.length;u&&L>u.reach&&(u.reach=L);var D=T.prev;if(O&&(D=l(n,D,O),A+=O.length),function(e,t,n){for(var a=t.next,r=0;r<n&&a!==e.tail;r++)a=a.next;t.next=a,a.prev=t,e.length-=r}(n,D,N),T=l(n,D,new i(d,b?r.tokenize(C,b):C,h,C)),x&&l(n,T,x),N>1){var P={cause:d+","+g,reach:L};e(t,n,a,T.prev,A,P),u&&P.reach>u.reach&&(u.reach=P.reach)}}}}}}(e,c,t,c.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(c)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,i=0;a=n[i++];)a(t)}},Token:i};function i(e,t,n,a){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length}function o(e,t,n,a){e.lastIndex=t;var r=e.exec(n);if(r&&a&&r[1]){var i=r[1].length;r.index+=i,r[0]=r[0].slice(i)}return r}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var a=t.next,r={value:n,prev:t,next:a};return t.next=r,a.prev=r,e.length++,r}if(e.Prism=r,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach(function(t){a+=e(t,n)}),a}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(i.classes,o):i.classes.push(o)),r.hooks.run("wrap",i);var s="";for(var l in i.attributes)s+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener&&(r.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),a=n.language,i=n.code,o=n.immediateClose;e.postMessage(r.highlight(i,r.languages[a],a)),o&&e.close()},!1)),r;var c=r.util.currentScript();function u(){r.manual||r.highlightAll()}if(c&&(r.filename=c.src,c.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var d=document.readyState;"loading"===d||"interactive"===d&&c&&c.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=a),void 0!==n.g&&(n.g.Prism=a)},33881:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var a=arguments[n];for(var r in a)t.call(a,r)&&(e[r]=a[r])}return e};var t=Object.prototype.hasOwnProperty},37388:function(e,t,n){"use strict";let a;n.d(t,{R:function(){return r}});var r=((a=r||{}).Space=" ",a.Enter="Enter",a.Escape="Escape",a.Backspace="Backspace",a.Delete="Delete",a.ArrowLeft="ArrowLeft",a.ArrowUp="ArrowUp",a.ArrowRight="ArrowRight",a.ArrowDown="ArrowDown",a.Home="Home",a.End="End",a.PageUp="PageUp",a.PageDown="PageDown",a.Tab="Tab",a)},31492:function(e,t,n){"use strict";let a,r,i;n.d(t,{O:function(){return M}});var o=n(2265),s=n(37388),l=n(13323),c=n(17684),u=n(64518),d=n(31948),p=n(80004),g=n(93689),m=n(93394),b=n(38198);function f(e){let{onFocus:t}=e,[n,a]=(0,o.useState)(!0),r=(0,m.t)();return n?o.createElement(b._,{as:"button",type:"button",features:b.A.Focusable,onFocus:e=>{e.preventDefault();let n,i=50;n=requestAnimationFrame(function e(){if(i--<=0){n&&cancelAnimationFrame(n);return}if(t()){if(cancelAnimationFrame(n),!r.current)return;a(!1);return}n=requestAnimationFrame(e)})}}):null}var E=n(37105),h=n(24536),S=n(96822),y=n(40293),T=n(27847);let A=o.createContext(null);function R(e){let{children:t}=e,n=o.useRef({groups:new Map,get(e,t){var n;let a=this.groups.get(e);a||(a=new Map,this.groups.set(e,a));let r=null!=(n=a.get(t))?n:0;return a.set(t,r+1),[Array.from(a.keys()).indexOf(t),function(){let e=a.get(t);e>1?a.set(t,e-1):a.delete(t)}]}});return o.createElement(A.Provider,{value:n},t)}function I(e){let t=o.useContext(A);if(!t)throw Error("You must wrap your component in a <StableCollection>");let n=function(){var e,t,n;let a=null!=(n=null==(t=null==(e=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)?void 0:e.ReactCurrentOwner)?void 0:t.current)?n:null;if(!a)return Symbol();let r=[],i=a;for(;i;)r.push(i.index),i=i.return;return"$."+r.join(".")}(),[a,r]=t.current.get(e,n);return o.useEffect(()=>r,[]),a}var N=((a=N||{})[a.Forwards=0]="Forwards",a[a.Backwards=1]="Backwards",a),_=((r=_||{})[r.Less=-1]="Less",r[r.Equal=0]="Equal",r[r.Greater=1]="Greater",r),v=((i=v||{})[i.SetSelectedIndex=0]="SetSelectedIndex",i[i.RegisterTab=1]="RegisterTab",i[i.UnregisterTab=2]="UnregisterTab",i[i.RegisterPanel=3]="RegisterPanel",i[i.UnregisterPanel=4]="UnregisterPanel",i);let w={0(e,t){var n;let a=(0,E.z2)(e.tabs,e=>e.current),r=(0,E.z2)(e.panels,e=>e.current),i=a.filter(e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))}),o={...e,tabs:a,panels:r};if(t.index<0||t.index>a.length-1){let n=(0,h.E)(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>(0,h.E)(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===i.length)return o;let r=(0,h.E)(n,{0:()=>a.indexOf(i[0]),1:()=>a.indexOf(i[i.length-1])});return{...o,selectedIndex:-1===r?e.selectedIndex:r}}let s=a.slice(0,t.index),l=[...a.slice(t.index),...s].find(e=>i.includes(e));if(!l)return o;let c=null!=(n=a.indexOf(l))?n:e.selectedIndex;return -1===c&&(c=e.selectedIndex),{...o,selectedIndex:c}},1(e,t){var n;if(e.tabs.includes(t.tab))return e;let a=e.tabs[e.selectedIndex],r=(0,E.z2)([...e.tabs,t.tab],e=>e.current),i=null!=(n=r.indexOf(a))?n:e.selectedIndex;return -1===i&&(i=e.selectedIndex),{...e,tabs:r,selectedIndex:i}},2:(e,t)=>({...e,tabs:e.tabs.filter(e=>e!==t.tab)}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:(0,E.z2)([...e.panels,t.panel],e=>e.current)},4:(e,t)=>({...e,panels:e.panels.filter(e=>e!==t.panel)})},k=(0,o.createContext)(null);function C(e){let t=(0,o.useContext)(k);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Tab.Group /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,C),t}return t}k.displayName="TabsDataContext";let O=(0,o.createContext)(null);function x(e){let t=(0,o.useContext)(O);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Tab.Group /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,x),t}return t}function L(e,t){return(0,h.E)(t.type,w,e,t)}O.displayName="TabsActionsContext";let D=o.Fragment,P=T.AN.RenderStrategy|T.AN.Static,M=Object.assign((0,T.yV)(function(e,t){var n,a;let r=(0,c.M)(),{id:i="headlessui-tabs-tab-".concat(r),...d}=e,{orientation:m,activation:b,selectedIndex:f,tabs:A,panels:R}=C("Tab"),N=x("Tab"),_=C("Tab"),v=(0,o.useRef)(null),w=(0,g.T)(v,t);(0,u.e)(()=>N.registerTab(v),[N,v]);let k=I("tabs"),O=A.indexOf(v);-1===O&&(O=k);let L=O===f,D=(0,l.z)(e=>{var t;let n=e();if(n===E.fE.Success&&"auto"===b){let e=null==(t=(0,y.r)(v))?void 0:t.activeElement,n=_.tabs.findIndex(t=>t.current===e);-1!==n&&N.change(n)}return n}),P=(0,l.z)(e=>{let t=A.map(e=>e.current).filter(Boolean);if(e.key===s.R.Space||e.key===s.R.Enter){e.preventDefault(),e.stopPropagation(),N.change(O);return}switch(e.key){case s.R.Home:case s.R.PageUp:return e.preventDefault(),e.stopPropagation(),D(()=>(0,E.jA)(t,E.TO.First));case s.R.End:case s.R.PageDown:return e.preventDefault(),e.stopPropagation(),D(()=>(0,E.jA)(t,E.TO.Last))}if(D(()=>(0,h.E)(m,{vertical:()=>e.key===s.R.ArrowUp?(0,E.jA)(t,E.TO.Previous|E.TO.WrapAround):e.key===s.R.ArrowDown?(0,E.jA)(t,E.TO.Next|E.TO.WrapAround):E.fE.Error,horizontal:()=>e.key===s.R.ArrowLeft?(0,E.jA)(t,E.TO.Previous|E.TO.WrapAround):e.key===s.R.ArrowRight?(0,E.jA)(t,E.TO.Next|E.TO.WrapAround):E.fE.Error}))===E.fE.Success)return e.preventDefault()}),M=(0,o.useRef)(!1),F=(0,l.z)(()=>{var e;M.current||(M.current=!0,null==(e=v.current)||e.focus({preventScroll:!0}),N.change(O),(0,S.Y)(()=>{M.current=!1}))}),U=(0,l.z)(e=>{e.preventDefault()}),B=(0,o.useMemo)(()=>({selected:L}),[L]),G={ref:w,onKeyDown:P,onMouseDown:U,onClick:F,id:i,role:"tab",type:(0,p.f)(e,v),"aria-controls":null==(a=null==(n=R[O])?void 0:n.current)?void 0:a.id,"aria-selected":L,tabIndex:L?0:-1};return(0,T.sY)({ourProps:G,theirProps:d,slot:B,defaultTag:"button",name:"Tabs.Tab"})}),{Group:(0,T.yV)(function(e,t){let{defaultIndex:n=0,vertical:a=!1,manual:r=!1,onChange:i,selectedIndex:s=null,...c}=e,p=a?"vertical":"horizontal",m=r?"manual":"auto",b=null!==s,h=(0,g.T)(t),[S,y]=(0,o.useReducer)(L,{selectedIndex:null!=s?s:n,tabs:[],panels:[]}),A=(0,o.useMemo)(()=>({selectedIndex:S.selectedIndex}),[S.selectedIndex]),I=(0,d.E)(i||(()=>{})),N=(0,d.E)(S.tabs),_=(0,o.useMemo)(()=>({orientation:p,activation:m,...S}),[p,m,S]),v=(0,l.z)(e=>(y({type:1,tab:e}),()=>y({type:2,tab:e}))),w=(0,l.z)(e=>(y({type:3,panel:e}),()=>y({type:4,panel:e}))),C=(0,l.z)(e=>{x.current!==e&&I.current(e),b||y({type:0,index:e})}),x=(0,d.E)(b?e.selectedIndex:S.selectedIndex),P=(0,o.useMemo)(()=>({registerTab:v,registerPanel:w,change:C}),[]);return(0,u.e)(()=>{y({type:0,index:null!=s?s:n})},[s]),(0,u.e)(()=>{if(void 0===x.current||S.tabs.length<=0)return;let e=(0,E.z2)(S.tabs,e=>e.current);e.some((e,t)=>S.tabs[t]!==e)&&C(e.indexOf(S.tabs[x.current]))}),o.createElement(R,null,o.createElement(O.Provider,{value:P},o.createElement(k.Provider,{value:_},_.tabs.length<=0&&o.createElement(f,{onFocus:()=>{var e,t;for(let n of N.current)if((null==(e=n.current)?void 0:e.tabIndex)===0)return null==(t=n.current)||t.focus(),!0;return!1}}),(0,T.sY)({ourProps:{ref:h},theirProps:c,slot:A,defaultTag:D,name:"Tabs"}))))}),List:(0,T.yV)(function(e,t){let{orientation:n,selectedIndex:a}=C("Tab.List"),r=(0,g.T)(t);return(0,T.sY)({ourProps:{ref:r,role:"tablist","aria-orientation":n},theirProps:e,slot:{selectedIndex:a},defaultTag:"div",name:"Tabs.List"})}),Panels:(0,T.yV)(function(e,t){let{selectedIndex:n}=C("Tab.Panels"),a=(0,g.T)(t),r=(0,o.useMemo)(()=>({selectedIndex:n}),[n]);return(0,T.sY)({ourProps:{ref:a},theirProps:e,slot:r,defaultTag:"div",name:"Tabs.Panels"})}),Panel:(0,T.yV)(function(e,t){var n,a,r,i;let s=(0,c.M)(),{id:l="headlessui-tabs-panel-".concat(s),tabIndex:d=0,...p}=e,{selectedIndex:m,tabs:f,panels:E}=C("Tab.Panel"),h=x("Tab.Panel"),S=(0,o.useRef)(null),y=(0,g.T)(S,t);(0,u.e)(()=>h.registerPanel(S),[h,S]);let A=I("panels"),R=E.indexOf(S);-1===R&&(R=A);let N=R===m,_=(0,o.useMemo)(()=>({selected:N}),[N]),v={ref:y,id:l,role:"tabpanel","aria-labelledby":null==(a=null==(n=f[R])?void 0:n.current)?void 0:a.id,tabIndex:N?d:-1};return N||null!=(r=p.unmount)&&!r||null!=(i=p.static)&&i?(0,T.sY)({ourProps:v,theirProps:p,slot:_,defaultTag:"div",features:P,visible:N,name:"Tabs.Panel"}):o.createElement(b._,{as:"span","aria-hidden":"true",...v})})})},13323:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var a=n(2265),r=n(31948);let i=function(e){let t=(0,r.E)(e);return a.useCallback(function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.current(...n)},[t])}},17684:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var a,r=n(2265),i=n(61424),o=n(64518),s=n(72238);let l=null!=(a=r.useId)?a:function(){let e=(0,s.H)(),[t,n]=r.useState(e?()=>i.O.nextId():null);return(0,o.e)(()=>{null===t&&n(i.O.nextId())},[t]),null!=t?""+t:void 0}},93394:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var a=n(2265),r=n(64518);function i(){let e=(0,a.useRef)(!1);return(0,r.e)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}},64518:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var a=n(2265),r=n(61424);let i=(e,t)=>{r.O.isServer?(0,a.useEffect)(e,t):(0,a.useLayoutEffect)(e,t)}},31948:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var a=n(2265),r=n(64518);function i(e){let t=(0,a.useRef)(e);return(0,r.e)(()=>{t.current=e},[e]),t}},80004:function(e,t,n){"use strict";n.d(t,{f:function(){return o}});var a=n(2265),r=n(64518);function i(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase())return"button"}function o(e,t){let[n,o]=(0,a.useState)(()=>i(e));return(0,r.e)(()=>{o(i(e))},[e.type,e.as]),(0,r.e)(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&o("button")},[n,t]),n}},72238:function(e,t,n){"use strict";n.d(t,{H:function(){return o}});var a,r=n(2265),i=n(61424);function o(){let e;let t=(e="undefined"==typeof document,(0,(a||(a=n.t(r,2))).useSyncExternalStore)(()=>()=>{},()=>!1,()=>!e)),[o,s]=r.useState(i.O.isHandoffComplete);return o&&!1===i.O.isHandoffComplete&&s(!1),r.useEffect(()=>{!0!==o&&s(!0)},[o]),r.useEffect(()=>i.O.handoff(),[]),!t&&o}},93689:function(e,t,n){"use strict";n.d(t,{T:function(){return s},h:function(){return o}});var a=n(2265),r=n(13323);let i=Symbol();function o(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return Object.assign(e,{[i]:t})}function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let o=(0,a.useRef)(t);(0,a.useEffect)(()=>{o.current=t},[t]);let s=(0,r.z)(e=>{for(let t of o.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return t.every(e=>null==e||(null==e?void 0:e[i]))?void 0:s}},38198:function(e,t,n){"use strict";let a;n.d(t,{A:function(){return i},_:function(){return o}});var r=n(27847),i=((a=i||{})[a.None=1]="None",a[a.Focusable=2]="Focusable",a[a.Hidden=4]="Hidden",a);let o=(0,r.yV)(function(e,t){var n;let{features:a=1,...i}=e,o={ref:t,"aria-hidden":(2&a)==2||(null!=(n=i["aria-hidden"])?n:void 0),style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&a)==4&&(2&a)!=2&&{display:"none"}}};return(0,r.sY)({ourProps:o,theirProps:i,slot:{},defaultTag:"div",name:"Hidden"})})},42120:function(e,t,n){"use strict";function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.from(new Set(t.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}n.d(t,{A:function(){return a}})},61424:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var a=Object.defineProperty,r=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,i=(e,t,n)=>(r(e,"symbol"!=typeof t?t+"":t,n),n);class o{set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}constructor(){i(this,"current",this.detect()),i(this,"handoffState","pending"),i(this,"currentId",0)}}let s=new o},37105:function(e,t,n){"use strict";let a,r,i,o,s;n.d(t,{GO:function(){return m},TO:function(){return d},fE:function(){return p},jA:function(){return S},sP:function(){return f},tJ:function(){return b},z2:function(){return h}});var l=n(24536),c=n(40293);let u=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>"".concat(e,":not([tabindex='-1'])")).join(",");var d=((a=d||{})[a.First=1]="First",a[a.Previous=2]="Previous",a[a.Next=4]="Next",a[a.Last=8]="Last",a[a.WrapAround=16]="WrapAround",a[a.NoScroll=32]="NoScroll",a),p=((r=p||{})[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r),g=((i=g||{})[i.Previous=-1]="Previous",i[i.Next=1]="Next",i);function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(u)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var b=((o=b||{})[o.Strict=0]="Strict",o[o.Loose=1]="Loose",o);function f(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(t=(0,c.r)(e))?void 0:t.body)&&(0,l.E)(n,{0:()=>e.matches(u),1(){let t=e;for(;null!==t;){if(t.matches(u))return!0;t=t.parentElement}return!1}})}var E=((s=E||{})[s.Keyboard=0]="Keyboard",s[s.Mouse=1]="Mouse",s);function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.slice().sort((e,n)=>{let a=t(e),r=t(n);if(null===a||null===r)return 0;let i=a.compareDocumentPosition(r);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function S(e,t){var n,a,r;let{sorted:i=!0,relativeTo:o=null,skipElements:s=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,c=Array.isArray(e)?i?h(e):e:m(e);s.length>0&&c.length>1&&(c=c.filter(e=>!s.includes(e))),o=null!=o?o:l.activeElement;let u=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(o))-1;if(4&t)return Math.max(0,c.indexOf(o))+1;if(8&t)return c.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=32&t?{preventScroll:!0}:{},g=0,b=c.length,f;do{if(g>=b||g+b<=0)return 0;let e=d+g;if(16&t)e=(e+b)%b;else{if(e<0)return 3;if(e>=b)return 1}null==(f=c[e])||f.focus(p),g+=u}while(f!==l.activeElement);return 6&t&&null!=(r=null==(a=null==(n=f)?void 0:n.matches)?void 0:a.call(n,"textarea,input"))&&r&&f.select(),2}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0))},24536:function(e,t,n){"use strict";function a(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let o=Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map(e=>'"'.concat(e,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(o,a),o}n.d(t,{E:function(){return a}})},96822:function(e,t,n){"use strict";function a(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}n.d(t,{Y:function(){return a}})},40293:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});var a=n(61424);function r(e){return a.O.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}},27847:function(e,t,n){"use strict";let a,r;n.d(t,{AN:function(){return l},Y2:function(){return p},l4:function(){return c},oA:function(){return f},sY:function(){return u},yV:function(){return b}});var i=n(2265),o=n(42120),s=n(24536),l=((a=l||{})[a.None=0]="None",a[a.RenderStrategy=1]="RenderStrategy",a[a.Static=2]="Static",a),c=((r=c||{})[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r);function u(e){let{ourProps:t,theirProps:n,slot:a,defaultTag:r,features:i,visible:o=!0,name:l,mergeRefs:c}=e;c=null!=c?c:g;let u=m(n,t);if(o)return d(u,a,r,l,c);let p=null!=i?i:0;if(2&p){let{static:e=!1,...t}=u;if(e)return d(t,a,r,l,c)}if(1&p){let{unmount:e=!0,...t}=u;return(0,s.E)(e?0:1,{0:()=>null,1:()=>d({...t,hidden:!0,style:{display:"none"}},a,r,l,c)})}return d(u,a,r,l,c)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,{as:s=n,children:l,refName:c="ref",...u}=E(e,["unmount","static"]),d=void 0!==e.ref?{[c]:e.ref}:{},p="function"==typeof l?l(t):l;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t));let g={};if(t){let e=!1,n=[];for(let[a,r]of Object.entries(t))"boolean"==typeof r&&(e=!0),!0===r&&n.push(a);e&&(g["data-headlessui-state"]=n.join(" "))}if(s===i.Fragment&&Object.keys(f(u)).length>0){if(!(0,i.isValidElement)(p)||Array.isArray(p)&&p.length>1)throw Error(['Passing props on "Fragment"!',"","The current component <".concat(a,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(u).map(e=>" - ".concat(e)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>" - ".concat(e)).join("\n")].join("\n"));let e=p.props,t="function"==typeof(null==e?void 0:e.className)?function(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];return(0,o.A)(null==e?void 0:e.className(...n),u.className)}:(0,o.A)(null==e?void 0:e.className,u.className);return(0,i.cloneElement)(p,Object.assign({},m(p.props,f(E(u,["ref"]))),g,d,{ref:r(p.ref,d.ref)},t?{className:t}:{}))}return(0,i.createElement)(s,Object.assign({},E(u,["ref"]),s!==i.Fragment&&d,s!==i.Fragment&&g),p)}function p(){let e=(0,i.useRef)([]),t=(0,i.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return function(){for(var n=arguments.length,a=Array(n),r=0;r<n;r++)a[r]=arguments[r];if(!a.every(e=>null==e))return e.current=a,t}}function g(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>null==e)?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function m(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let a={},r={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=r[t]||(r[t]=[]),r[t].push(e[t])):a[t]=e[t];if(a.disabled||a["aria-disabled"])return Object.assign(a,Object.fromEntries(Object.keys(r).map(e=>[e,void 0])));for(let e in r)Object.assign(a,{[e](t){for(var n=arguments.length,a=Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];for(let n of r[e]){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...a)}}});return a}function b(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function f(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}},72890:function(e){"use strict";e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},55229:function(e){"use strict";e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/3014691f-0b72c78cfebbd712.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/3014691f-0b72c78cfebbd712.js new file mode 100644 index 00000000..e3ec2741 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/3014691f-0b72c78cfebbd712.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[665],{84566:function(e,t,s){s.d(t,{GH$:function(){return l}});var c=s(2265);let l=({color:e="currentColor",size:t=24,className:s,...l})=>c.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...l,className:"remixicon "+(s||"")},c.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z"}))}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/394-0222ddf4d701e0b4.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/394-0222ddf4d701e0b4.js new file mode 100644 index 00000000..f6dfcd86 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/394-0222ddf4d701e0b4.js @@ -0,0 +1,11 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[394],{12660:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},88009:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},37527:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},9775:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},68208:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},9738:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},44625:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},70464:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},73879:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},39760:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},41169:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},6520:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},15424:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},92403:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},15327:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},48231:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},40428:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},45246:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},28595:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},96473:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},57400:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},29436:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},55322:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},41361:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},3632:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},15883:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},35291:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},a=n(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},58747:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},75105:function(e,t,n){"use strict";n.d(t,{Z:function(){return et}});var r=n(5853),o=n(2265),i=n(47625),a=n(93765),l=n(61994),c=n(59221),s=n(86757),u=n.n(s),d=n(95645),f=n.n(d),p=n(77571),h=n.n(p),m=n(82559),g=n.n(m),v=n(21652),y=n.n(v),b=n(57165),x=n(81889),w=n(9841),S=n(58772),k=n(34067),E=n(16630),C=n(85355),O=n(82944),j=["layout","type","stroke","connectNulls","isRange","ref"];function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(){return(N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function T(e,t){return(T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function A(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t,n){return(t=Z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){var t=function(e,t){if("object"!==P(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==P(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P(t)?t:String(t)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(a,e);var t,n,r,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=_(a);return e=t?Reflect.construct(n,arguments,_(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return A(e)}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return D(A(e=i.call.apply(i,[this].concat(n))),"state",{isAnimationFinished:!0}),D(A(e),"id",(0,E.EL)("recharts-area-")),D(A(e),"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),u()(t)&&t()}),D(A(e),"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),u()(t)&&t()}),e}return n=[{key:"renderDots",value:function(e,t,n){var r=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(r&&!i)return null;var l=this.props,c=l.dot,s=l.points,u=l.dataKey,d=(0,O.L6)(this.props,!1),f=(0,O.L6)(c,!0),p=s.map(function(e,t){var n=I(I(I({key:"dot-".concat(t),r:3},d),f),{},{dataKey:u,cx:e.x,cy:e.y,index:t,value:e.value,payload:e.payload});return a.renderDotItem(c,n)}),h={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(n,")"):null};return o.createElement(w.m,N({className:"recharts-area-dots"},h),p)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].x,l=r[r.length-1].x,c=e*Math.abs(a-l),s=f()(r.map(function(e){return e.y||0}));return((0,E.hj)(n)&&"number"==typeof n?s=Math.max(n,s):n&&Array.isArray(n)&&n.length&&(s=Math.max(f()(n.map(function(e){return e.y||0})),s)),(0,E.hj)(s))?o.createElement("rect",{x:a<l?a:a-c,y:0,width:c,height:Math.floor(s+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].y,l=r[r.length-1].y,c=e*Math.abs(a-l),s=f()(r.map(function(e){return e.x||0}));return((0,E.hj)(n)&&"number"==typeof n?s=Math.max(n,s):n&&Array.isArray(n)&&n.length&&(s=Math.max(f()(n.map(function(e){return e.x||0})),s)),(0,E.hj)(s))?o.createElement("rect",{x:0,y:a<l?a:a-c,width:s+(i?parseInt("".concat(i),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,n,r){var i=this.props,a=i.layout,l=i.type,c=i.stroke,s=i.connectNulls,u=i.isRange,d=(i.ref,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,j));return o.createElement(w.m,{clipPath:n?"url(#clipPath-".concat(r,")"):null},o.createElement(b.H,N({},(0,O.L6)(d,!0),{points:e,connectNulls:s,type:l,baseLine:t,layout:a,stroke:"none",className:"recharts-area-area"})),"none"!==c&&o.createElement(b.H,N({},(0,O.L6)(this.props,!1),{className:"recharts-area-curve",layout:a,type:l,connectNulls:s,fill:"none",points:e})),"none"!==c&&u&&o.createElement(b.H,N({},(0,O.L6)(this.props,!1),{className:"recharts-area-curve",layout:a,type:l,connectNulls:s,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var n=this,r=this.props,i=r.points,a=r.baseLine,l=r.isAnimationActive,s=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationId,p=this.state,m=p.prevPoints,v=p.prevBaseLine;return o.createElement(c.ZP,{begin:s,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"area-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var l=r.t;if(m){var c,s=m.length/i.length,u=i.map(function(e,t){var n=Math.floor(t*s);if(m[n]){var r=m[n],o=(0,E.k4)(r.x,e.x),i=(0,E.k4)(r.y,e.y);return I(I({},e),{},{x:o(l),y:i(l)})}return e});return c=(0,E.hj)(a)&&"number"==typeof a?(0,E.k4)(v,a)(l):h()(a)||g()(a)?(0,E.k4)(v,0)(l):a.map(function(e,t){var n=Math.floor(t*s);if(v[n]){var r=v[n],o=(0,E.k4)(r.x,e.x),i=(0,E.k4)(r.y,e.y);return I(I({},e),{},{x:o(l),y:i(l)})}return e}),n.renderAreaStatically(u,c,e,t)}return o.createElement(w.m,null,o.createElement("defs",null,o.createElement("clipPath",{id:"animationClipPath-".concat(t)},n.renderClipRect(l))),o.createElement(w.m,{clipPath:"url(#animationClipPath-".concat(t,")")},n.renderAreaStatically(i,a,e,t)))})}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,l=a.prevPoints,c=a.prevBaseLine,s=a.totalLength;return i&&r&&r.length&&(!l&&s>0||!y()(l,r)||!y()(c,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,i=t.points,a=t.className,c=t.top,s=t.left,u=t.xAxis,d=t.yAxis,f=t.width,p=t.height,m=t.isAnimationActive,g=t.id;if(n||!i||!i.length)return null;var v=this.state.isAnimationFinished,y=1===i.length,b=(0,l.Z)("recharts-area",a),x=u&&u.allowDataOverflow,k=d&&d.allowDataOverflow,E=x||k,C=h()(g)?this.id:g,j=null!==(e=(0,O.L6)(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},P=j.r,N=j.strokeWidth,M=((0,O.$k)(r)?r:{}).clipDot,I=void 0===M||M,R=2*(void 0===P?3:P)+(void 0===N?2:N);return o.createElement(w.m,{className:b},x||k?o.createElement("defs",null,o.createElement("clipPath",{id:"clipPath-".concat(C)},o.createElement("rect",{x:x?s:s-f/2,y:k?c:c-p/2,width:x?f:2*f,height:k?p:2*p})),!I&&o.createElement("clipPath",{id:"clipPath-dots-".concat(C)},o.createElement("rect",{x:s-R/2,y:c-R/2,width:f+R,height:p+R}))):null,y?null:this.renderArea(E,C),(r||y)&&this.renderDots(E,I,C),(!m||v)&&S.e.renderCallByParent(this.props,i))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],n&&R(a.prototype,n),r&&R(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(o.PureComponent);D(L,"displayName","Area"),D(L,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!k.x.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),D(L,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,l=null!=a?a:i;if((0,E.hj)(l)&&"number"==typeof l)return l;var c="horizontal"===o?r:n,s=c.scale.domain();if("number"===c.type){var u=Math.max(s[0],s[1]),d=Math.min(s[0],s[1]);return"dataMin"===l?d:"dataMax"===l?u:u<0?u:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===l?s[0]:"dataMax"===l?s[1]:s[0]}),D(L,"getComposedData",function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,l=e.yAxisTicks,c=e.bandSize,s=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,h=n.layout,m=u&&u.length,g=L.getBaseValue(n,r,o,i),v="horizontal"===h,y=!1,b=f.map(function(e,t){m?n=u[d+t]:Array.isArray(n=(0,C.F$)(e,s))?y=!0:n=[g,n];var n,r=null==n[1]||m&&null==(0,C.F$)(e,s);return v?{x:(0,C.Hv)({axis:o,ticks:a,bandSize:c,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:(0,C.Hv)({axis:i,ticks:l,bandSize:c,entry:e,index:t}),value:n,payload:e}});return t=m||y?b.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}}):v?i.scale(g):o.scale(g),I({points:b,baseLine:t,layout:h,isRange:y},p)}),D(L,"renderDotItem",function(e,t){return o.isValidElement(e)?o.cloneElement(e,t):u()(e)?e(t):o.createElement(x.o,N({},t,{className:"recharts-area-dot"}))});var z=n(97059),B=n(62994),F=n(25311),H=(0,a.z)({chartName:"AreaChart",GraphicalChild:L,axisComponents:[{axisType:"xAxis",AxisComp:z.K},{axisType:"yAxis",AxisComp:B.B}],formatAxisMap:F.t9}),q=n(56940),W=n(8147),K=n(22190),V=n(54061),U=n(65278),G=n(98593),X=n(69448),$=n(32644),Y=n(7084),Q=n(26898),J=n(65954),ee=n(1153);let et=o.forwardRef((e,t)=>{let{data:n=[],categories:a=[],index:l,stack:c=!1,colors:s=Q.s,valueFormatter:u=ee.Cj,startEndOnly:d=!1,showXAxis:f=!0,showYAxis:p=!0,yAxisWidth:h=56,intervalType:m="equidistantPreserveStart",showAnimation:g=!1,animationDuration:v=900,showTooltip:y=!0,showLegend:b=!0,showGridLines:w=!0,showGradient:S=!0,autoMinValue:k=!1,curveType:E="linear",minValue:C,maxValue:O,connectNulls:j=!1,allowDecimals:P=!0,noDataText:N,className:M,onValueChange:I,enableLegendSlider:R=!1,customTooltip:T,rotateLabelX:A,tickGap:_=5}=e,D=(0,r._T)(e,["data","categories","index","stack","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","showAnimation","animationDuration","showTooltip","showLegend","showGridLines","showGradient","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),Z=(f||p)&&(!d||p)?20:0,[F,et]=(0,o.useState)(60),[en,er]=(0,o.useState)(void 0),[eo,ei]=(0,o.useState)(void 0),ea=(0,$.me)(a,s),el=(0,$.i4)(k,C,O),ec=!!I;function es(e){ec&&(e===eo&&!en||(0,$.FB)(n,e)&&en&&en.dataKey===e?(ei(void 0),null==I||I(null)):(ei(e),null==I||I({eventType:"category",categoryClicked:e})),er(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,J.q)("w-full h-80",M)},D),o.createElement(i.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(H,{data:n,onClick:ec&&(eo||en)?()=>{er(void 0),ei(void 0),null==I||I(null)}:void 0},w?o.createElement(q.q,{className:(0,J.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(z.K,{padding:{left:Z,right:Z},hide:!f,dataKey:l,tick:{transform:"translate(0, 6)"},ticks:d?[n[0][l],n[n.length-1][l]]:void 0,fill:"",stroke:"",className:(0,J.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),interval:d?"preserveStartEnd":m,tickLine:!1,axisLine:!1,minTickGap:_,angle:null==A?void 0:A.angle,dy:null==A?void 0:A.verticalShift,height:null==A?void 0:A.xAxisHeight}),o.createElement(B.B,{width:h,hide:!p,axisLine:!1,tickLine:!1,type:"number",domain:el,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,J.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:u,allowDecimals:P}),o.createElement(W.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:y?e=>{let{active:t,payload:n,label:r}=e;return T?o.createElement(T,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=ea.get(e.dataKey))&&void 0!==t?t:Y.fr.Gray})}),active:t,label:r}):o.createElement(G.ZP,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:ea})}:o.createElement(o.Fragment,null),position:{y:0}}),b?o.createElement(K.D,{verticalAlign:"top",height:F,content:e=>{let{payload:t}=e;return(0,U.Z)({payload:t},ea,et,eo,ec?e=>es(e):void 0,R)}}):null,a.map(e=>{var t,n;return o.createElement("defs",{key:e},S?o.createElement("linearGradient",{className:(0,ee.bM)(null!==(t=ea.get(e))&&void 0!==t?t:Y.fr.Gray,Q.K.text).textColor,id:ea.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},o.createElement("stop",{offset:"5%",stopColor:"currentColor",stopOpacity:en||eo&&eo!==e?.15:.4}),o.createElement("stop",{offset:"95%",stopColor:"currentColor",stopOpacity:0})):o.createElement("linearGradient",{className:(0,ee.bM)(null!==(n=ea.get(e))&&void 0!==n?n:Y.fr.Gray,Q.K.text).textColor,id:ea.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},o.createElement("stop",{stopColor:"currentColor",stopOpacity:en||eo&&eo!==e?.1:.3})))}),a.map(e=>{var t;return o.createElement(L,{className:(0,ee.bM)(null!==(t=ea.get(e))&&void 0!==t?t:Y.fr.Gray,Q.K.text).strokeColor,strokeOpacity:en||eo&&eo!==e?.3:1,activeDot:e=>{var t;let{cx:r,cy:i,stroke:a,strokeLinecap:l,strokeLinejoin:c,strokeWidth:s,dataKey:u}=e;return o.createElement(x.o,{className:(0,J.q)("stroke-tremor-background dark:stroke-dark-tremor-background",I?"cursor-pointer":"",(0,ee.bM)(null!==(t=ea.get(u))&&void 0!==t?t:Y.fr.Gray,Q.K.text).fillColor),cx:r,cy:i,r:5,fill:"",stroke:a,strokeLinecap:l,strokeLinejoin:c,strokeWidth:s,onClick:(t,r)=>{r.stopPropagation(),ec&&(e.index===(null==en?void 0:en.index)&&e.dataKey===(null==en?void 0:en.dataKey)||(0,$.FB)(n,e.dataKey)&&eo&&eo===e.dataKey?(ei(void 0),er(void 0),null==I||I(null)):(ei(e.dataKey),er({index:e.index,dataKey:e.dataKey}),null==I||I(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var r;let{stroke:i,strokeLinecap:a,strokeLinejoin:l,strokeWidth:c,cx:s,cy:u,dataKey:d,index:f}=t;return(0,$.FB)(n,e)&&!(en||eo&&eo!==e)||(null==en?void 0:en.index)===f&&(null==en?void 0:en.dataKey)===e?o.createElement(x.o,{key:f,cx:s,cy:u,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:l,strokeWidth:c,className:(0,J.q)("stroke-tremor-background dark:stroke-dark-tremor-background",I?"cursor-pointer":"",(0,ee.bM)(null!==(r=ea.get(d))&&void 0!==r?r:Y.fr.Gray,Q.K.text).fillColor)}):o.createElement(o.Fragment,{key:f})},key:e,name:e,type:E,dataKey:e,stroke:"",fill:"url(#".concat(ea.get(e),")"),strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:g,animationDuration:v,stackId:c?"a":void 0,connectNulls:j})}),I?a.map(e=>o.createElement(V.x,{className:(0,J.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:E,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:j,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;es(n)}})):null):o.createElement(X.Z,{noDataText:N})))});et.displayName="AreaChart"},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(5853),o=n(7084),i=n(26898),a=n(65954),l=n(1153),c=n(2265),s=n(47625),u=n(93765),d=n(31699),f=n(97059),p=n(62994),h=n(25311),m=(0,u.z)({chartName:"BarChart",GraphicalChild:d.$,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:f.K},{axisType:"yAxis",AxisComp:p.B}],formatAxisMap:h.t9}),g=n(56940),v=n(8147),y=n(22190),b=n(65278),x=n(98593),w=n(69448),S=n(32644);let k=c.forwardRef((e,t)=>{let{data:n=[],categories:u=[],index:h,colors:k=i.s,valueFormatter:E=l.Cj,layout:C="horizontal",stack:O=!1,relative:j=!1,startEndOnly:P=!1,animationDuration:N=900,showAnimation:M=!1,showXAxis:I=!0,showYAxis:R=!0,yAxisWidth:T=56,intervalType:A="equidistantPreserveStart",showTooltip:_=!0,showLegend:D=!0,showGridLines:Z=!0,autoMinValue:L=!1,minValue:z,maxValue:B,allowDecimals:F=!0,noDataText:H,onValueChange:q,enableLegendSlider:W=!1,customTooltip:K,rotateLabelX:V,tickGap:U=5,className:G}=e,X=(0,r._T)(e,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","intervalType","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","noDataText","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap","className"]),$=I||R?20:0,[Y,Q]=(0,c.useState)(60),J=(0,S.me)(u,k),[ee,et]=c.useState(void 0),[en,er]=(0,c.useState)(void 0),eo=!!q;function ei(e,t,n){var r,o,i,a;n.stopPropagation(),q&&((0,S.vZ)(ee,Object.assign(Object.assign({},e.payload),{value:e.value}))?(er(void 0),et(void 0),null==q||q(null)):(er(null===(o=null===(r=e.tooltipPayload)||void 0===r?void 0:r[0])||void 0===o?void 0:o.dataKey),et(Object.assign(Object.assign({},e.payload),{value:e.value})),null==q||q(Object.assign({eventType:"bar",categoryClicked:null===(a=null===(i=e.tooltipPayload)||void 0===i?void 0:i[0])||void 0===a?void 0:a.dataKey},e.payload))))}let ea=(0,S.i4)(L,z,B);return c.createElement("div",Object.assign({ref:t,className:(0,a.q)("w-full h-80",G)},X),c.createElement(s.h,{className:"h-full w-full"},(null==n?void 0:n.length)?c.createElement(m,{data:n,stackOffset:O?"sign":j?"expand":"none",layout:"vertical"===C?"vertical":"horizontal",onClick:eo&&(en||ee)?()=>{et(void 0),er(void 0),null==q||q(null)}:void 0},Z?c.createElement(g.q,{className:(0,a.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:"vertical"!==C,vertical:"vertical"===C}):null,"vertical"!==C?c.createElement(f.K,{padding:{left:$,right:$},hide:!I,dataKey:h,interval:P?"preserveStartEnd":A,tick:{transform:"translate(0, 6)"},ticks:P?[n[0][h],n[n.length-1][h]]:void 0,fill:"",stroke:"",className:(0,a.q)("mt-4 text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,angle:null==V?void 0:V.angle,dy:null==V?void 0:V.verticalShift,height:null==V?void 0:V.xAxisHeight,minTickGap:U}):c.createElement(f.K,{hide:!I,type:"number",tick:{transform:"translate(-3, 0)"},domain:ea,fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,tickFormatter:E,minTickGap:U,allowDecimals:F,angle:null==V?void 0:V.angle,dy:null==V?void 0:V.verticalShift,height:null==V?void 0:V.xAxisHeight}),"vertical"!==C?c.createElement(p.B,{width:T,hide:!R,axisLine:!1,tickLine:!1,type:"number",domain:ea,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:j?e=>"".concat((100*e).toString()," %"):E,allowDecimals:F}):c.createElement(p.B,{width:T,hide:!R,dataKey:h,axisLine:!1,tickLine:!1,ticks:P?[n[0][h],n[n.length-1][h]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},fill:"",stroke:"",className:(0,a.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content")}),c.createElement(v.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:_?e=>{let{active:t,payload:n,label:r}=e;return K?c.createElement(K,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=J.get(e.dataKey))&&void 0!==t?t:o.fr.Gray})}),active:t,label:r}):c.createElement(x.ZP,{active:t,payload:n,label:r,valueFormatter:E,categoryColors:J})}:c.createElement(c.Fragment,null),position:{y:0}}),D?c.createElement(y.D,{verticalAlign:"top",height:Y,content:e=>{let{payload:t}=e;return(0,b.Z)({payload:t},J,Q,en,eo?e=>{eo&&(e!==en||ee?(er(e),null==q||q({eventType:"category",categoryClicked:e})):(er(void 0),null==q||q(null)),et(void 0))}:void 0,W)}}):null,u.map(e=>{var t;return c.createElement(d.$,{className:(0,a.q)((0,l.bM)(null!==(t=J.get(e))&&void 0!==t?t:o.fr.Gray,i.K.background).fillColor,q?"cursor-pointer":""),key:e,name:e,type:"linear",stackId:O||j?"a":void 0,dataKey:e,fill:"",isAnimationActive:M,animationDuration:N,shape:e=>((e,t,n,r)=>{let{fillOpacity:o,name:i,payload:a,value:l}=e,{x:s,width:u,y:d,height:f}=e;return"horizontal"===r&&f<0?(d+=f,f=Math.abs(f)):"vertical"===r&&u<0&&(s+=u,u=Math.abs(u)),c.createElement("rect",{x:s,y:d,width:u,height:f,opacity:t||n&&n!==i?(0,S.vZ)(t,Object.assign(Object.assign({},a),{value:l}))?o:.3:o})})(e,ee,en,C),onClick:ei})})):c.createElement(w.Z,{noDataText:H})))});k.displayName="BarChart"},14042:function(e,t,n){"use strict";n.d(t,{Z:function(){return ez}});var r=n(5853),o=n(7084),i=n(26898),a=n(65954),l=n(1153),c=n(2265),s=n(60474),u=n(47625),d=n(93765),f=n(86757),p=n.n(f),h=n(9841),m=n(81889),g=n(61994),v=n(82944),y=["points","className","baseLinePoints","connectNulls"];function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var S=function(e){return e&&e.x===+e.x&&e.y===+e.y},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){S(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),S(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t},E=function(e,t){var n=k(e);t&&(n=[n.reduce(function(e,t){return[].concat(x(e),x(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},C=function(e,t,n){var r=E(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(E(t.reverse(),n).slice(1))},O=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,o=e.connectNulls,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,y);if(!t||!t.length)return null;var a=(0,g.Z)("recharts-polygon",n);if(r&&r.length){var l=i.stroke&&"none"!==i.stroke,s=C(t,r,o);return c.createElement("g",{className:a},c.createElement("path",b({},(0,v.L6)(i,!0),{fill:"Z"===s.slice(-1)?i.fill:"none",stroke:"none",d:s})),l?c.createElement("path",b({},(0,v.L6)(i,!0),{fill:"none",d:E(t,o)})):null,l?c.createElement("path",b({},(0,v.L6)(i,!0),{fill:"none",d:E(r,o)})):null)}var u=E(t,o);return c.createElement("path",b({},(0,v.L6)(i,!0),{fill:"Z"===u.slice(-1)?i.fill:"none",className:a,d:u}))},j=n(58811),P=n(41637),N=n(39206);function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach(function(t){Z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,L(r.key),r)}}function _(e,t){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Z(e,t,n){return(t=L(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){var t=function(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==M(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===M(t)?t:String(t)}var z=Math.PI/180,B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(i,e);var t,n,r,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=D(i);return e=t?Reflect.construct(n,arguments,D(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return n=[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,i=t.orientation,a=t.tickSize,l=(0,N.op)(n,r,o,e.coordinate),c=(0,N.op)(n,r,o+("inner"===i?-1:1)*(a||8),e.coordinate);return{x1:l.x,y1:l.y,x2:c.x,y2:c.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*z);return n>1e-5?"outer"===t?"start":"end":n<-.00001?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,o=e.axisLine,i=e.axisLineType,a=T(T({},(0,v.L6)(this.props,!1)),{},{fill:"none"},(0,v.L6)(o,!1));if("circle"===i)return c.createElement(m.o,I({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r:r}));var l=this.props.ticks.map(function(e){return(0,N.op)(t,n,r,e.coordinate)});return c.createElement(O,I({className:"recharts-polar-angle-axis-line"},a,{points:l}))}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,o=t.tickLine,a=t.tickFormatter,l=t.stroke,s=(0,v.L6)(this.props,!1),u=(0,v.L6)(r,!1),d=T(T({},s),{},{fill:"none"},(0,v.L6)(o,!1)),f=n.map(function(t,n){var f=e.getTickLineCoord(t),p=T(T(T({textAnchor:e.getTickTextAnchor(t)},s),{},{stroke:"none",fill:l},u),{},{index:n,payload:t,x:f.x2,y:f.y2});return c.createElement(h.m,I({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(t.coordinate)},(0,P.bw)(e.props,t,n)),o&&c.createElement("line",I({className:"recharts-polar-angle-axis-tick-line"},d,f)),r&&i.renderTickItem(r,p,a?a(t.value,n):t.value))});return c.createElement(h.m,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return!(n<=0)&&t&&t.length?c.createElement(h.m,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks()):null}}],r=[{key:"renderTickItem",value:function(e,t,n){return c.isValidElement(e)?c.cloneElement(e,t):p()(e)?e(t):c.createElement(j.x,I({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}],n&&A(i.prototype,n),r&&A(i,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(c.PureComponent);Z(B,"displayName","PolarAngleAxis"),Z(B,"axisType","angleAxis"),Z(B,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var F=n(35802),H=n.n(F),q=n(37891),W=n.n(q),K=n(26680),V=["cx","cy","angle","ticks","axisLine"],U=["ticks","tick","angle","tickFormatter","stroke"];function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(){return(X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){en(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,er(r.key),r)}}function ee(e,t){return(ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function en(e,t,n){return(t=er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function er(e){var t=function(e,t){if("object"!==G(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==G(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===G(t)?t:String(t)}var eo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(i,e);var t,n,r,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=et(i);return e=t?Reflect.construct(n,arguments,et(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return n=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,i=n.cy;return(0,N.op)(o,i,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=H()(o,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:W()(o,function(e){return e.coordinate||0}).coordinate||0,outerRadius:i.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=e.axisLine,a=Q(e,V),l=o.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),s=(0,N.op)(t,n,l[0],r),u=(0,N.op)(t,n,l[1],r),d=Y(Y(Y({},(0,v.L6)(a,!1)),{},{fill:"none"},(0,v.L6)(i,!1)),{},{x1:s.x,y1:s.y,x2:u.x,y2:u.y});return c.createElement("line",X({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,o=t.angle,a=t.tickFormatter,l=t.stroke,s=Q(t,U),u=this.getTickTextAnchor(),d=(0,v.L6)(s,!1),f=(0,v.L6)(r,!1),p=n.map(function(t,n){var s=e.getTickValueCoord(t),p=Y(Y(Y(Y({textAnchor:u,transform:"rotate(".concat(90-o,", ").concat(s.x,", ").concat(s.y,")")},d),{},{stroke:"none",fill:l},f),{},{index:n},s),{},{payload:t});return c.createElement(h.m,X({className:"recharts-polar-radius-axis-tick",key:"tick-".concat(t.coordinate)},(0,P.bw)(e.props,t,n)),i.renderTickItem(r,p,a?a(t.value,n):t.value))});return c.createElement(h.m,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return t&&t.length?c.createElement(h.m,{className:"recharts-polar-radius-axis"},n&&this.renderAxisLine(),r&&this.renderTicks(),K._.renderCallByParent(this.props,this.getViewBox())):null}}],r=[{key:"renderTickItem",value:function(e,t,n){return c.isValidElement(e)?c.cloneElement(e,t):p()(e)?e(t):c.createElement(j.x,X({},t,{className:"recharts-polar-radius-axis-tick-value"}),n)}}],n&&J(i.prototype,n),r&&J(i,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(c.PureComponent);en(eo,"displayName","PolarRadiusAxis"),en(eo,"axisType","radiusAxis"),en(eo,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var ei=n(59221),ea=n(13735),el=n.n(ea),ec=n(21652),es=n.n(ec),eu=n(77571),ed=n.n(eu),ef=n(57165),ep=n(58772),eh=n(20407),em=n(34067),eg=n(16630),ev=n(85355),ey=n(1175),eb=n(11638);function ex(e){return(ex="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ew(){return(ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eS(Object(n),!0).forEach(function(t){eP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eN(r.key),r)}}function eC(e,t){return(eC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eO(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ej(e){return(ej=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eP(e,t,n){return(t=eN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eN(e){var t=function(e,t){if("object"!==ex(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ex(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ex(t)?t:String(t)}var eM=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eC(e,t)}(i,e);var t,n,r,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=ej(i);return e=t?Reflect.construct(n,arguments,ej(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===ex(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return eO(e)}(this,e)});function i(e){var t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),eP(eO(t=o.call(this,e)),"pieRef",null),eP(eO(t),"sectorRefs",[]),eP(eO(t),"id",(0,eg.EL)("recharts-pie-")),eP(eO(t),"handleAnimationEnd",function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),p()(e)&&e()}),eP(eO(t),"handleAnimationStart",function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),p()(e)&&e()}),t.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},t}return n=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var t=this.props,n=t.label,r=t.labelLine,o=t.dataKey,a=t.valueKey,l=(0,v.L6)(this.props,!1),s=(0,v.L6)(n,!1),u=(0,v.L6)(r,!1),d=n&&n.offsetRadius||20,f=e.map(function(e,t){var f=(e.startAngle+e.endAngle)/2,p=(0,N.op)(e.cx,e.cy,e.outerRadius+d,f),m=ek(ek(ek(ek({},l),e),{},{stroke:"none"},s),{},{index:t,textAnchor:i.getTextAnchor(p.x,e.cx)},p),g=ek(ek(ek(ek({},l),e),{},{fill:"none",stroke:e.fill},u),{},{index:t,points:[(0,N.op)(e.cx,e.cy,e.outerRadius,f),p],key:"line"}),v=o;return ed()(o)&&ed()(a)?v="value":ed()(o)&&(v=a),c.createElement(h.m,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle)},r&&i.renderLabelLineItem(r,g),i.renderLabelItem(n,m,(0,ev.F$)(e,v)))});return c.createElement(h.m,{className:"recharts-pie-labels"},f)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props,r=n.activeShape,o=n.blendStroke,i=n.inactiveShape;return e.map(function(n,a){if((null==n?void 0:n.startAngle)===0&&(null==n?void 0:n.endAngle)===0&&1!==e.length)return null;var l=t.isActiveIndex(a),s=i&&t.hasActiveIndex()?i:null,u=ek(ek({},n),{},{stroke:o?n.fill:n.stroke,tabIndex:-1});return c.createElement(h.m,ew({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},(0,P.bw)(t.props,n,a),{key:"sector-".concat(null==n?void 0:n.startAngle,"-").concat(null==n?void 0:n.endAngle,"-").concat(n.midAngle)}),c.createElement(eb.bn,ew({option:l?r:s,isActive:l,shapeType:"sector"},u)))})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,o=t.animationBegin,i=t.animationDuration,a=t.animationEasing,l=t.animationId,s=this.state,u=s.prevSectors,d=s.prevIsAnimationActive;return c.createElement(ei.ZP,{begin:o,duration:i,isActive:r,easing:a,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var r=t.t,o=[],i=(n&&n[0]).startAngle;return n.forEach(function(e,t){var n=u&&u[t],a=t>0?el()(e,"paddingAngle",0):0;if(n){var l=(0,eg.k4)(n.endAngle-n.startAngle,e.endAngle-e.startAngle),c=ek(ek({},e),{},{startAngle:i+a,endAngle:i+l(r)+a});o.push(c),i=c.endAngle}else{var s=e.endAngle,d=e.startAngle,f=(0,eg.k4)(0,s-d)(r),p=ek(ek({},e),{},{startAngle:i+a,endAngle:i+f+a});o.push(p),i=p.endAngle}}),c.createElement(h.m,null,e.renderSectorsStatically(o))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return n&&t&&t.length&&(!r||!es()(r,t))?this.renderSectorsWithAnimation():this.renderSectorsStatically(t)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,o=t.className,i=t.label,a=t.cx,l=t.cy,s=t.innerRadius,u=t.outerRadius,d=t.isAnimationActive,f=this.state.isAnimationFinished;if(n||!r||!r.length||!(0,eg.hj)(a)||!(0,eg.hj)(l)||!(0,eg.hj)(s)||!(0,eg.hj)(u))return null;var p=(0,g.Z)("recharts-pie",o);return c.createElement(h.m,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),i&&this.renderLabels(r),K._.renderCallByParent(this.props,null,!1),(!d||f)&&ep.e.renderCallByParent(this.props,r,!1))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t){return c.isValidElement(e)?c.cloneElement(e,t):p()(e)?e(t):c.createElement(ef.H,ew({},t,{type:"linear",className:"recharts-pie-label-line"}))}},{key:"renderLabelItem",value:function(e,t,n){if(c.isValidElement(e))return c.cloneElement(e,t);var r=n;return p()(e)&&(r=e(t),c.isValidElement(r))?r:c.createElement(j.x,ew({},t,{alignmentBaseline:"middle",className:"recharts-pie-label-text"}),r)}}],n&&eE(i.prototype,n),r&&eE(i,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(c.PureComponent);eP(eM,"displayName","Pie"),eP(eM,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!em.x.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),eP(eM,"parseDeltaAngle",function(e,t){return(0,eg.uY)(t-e)*Math.min(Math.abs(t-e),360)}),eP(eM,"getRealPieData",function(e){var t=e.props,n=t.data,r=t.children,o=(0,v.L6)(e.props,!1),i=(0,v.NN)(r,eh.b);return n&&n.length?n.map(function(e,t){return ek(ek(ek({payload:e},o),e),i&&i[t]&&i[t].props)}):i&&i.length?i.map(function(e){return ek(ek({},o),e.props)}):[]}),eP(eM,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=(0,N.$4)(o,i);return{cx:r+(0,eg.h1)(e.props.cx,o,o/2),cy:n+(0,eg.h1)(e.props.cy,i,i/2),innerRadius:(0,eg.h1)(e.props.innerRadius,a,0),outerRadius:(0,eg.h1)(e.props.outerRadius,a,.8*a),maxRadius:e.props.maxRadius||Math.sqrt(o*o+i*i)/2}}),eP(eM,"getComposedData",function(e){var t,n,r=e.item,o=e.offset,i=eM.getRealPieData(r);if(!i||!i.length)return null;var a=r.props,l=a.cornerRadius,c=a.startAngle,s=a.endAngle,u=a.paddingAngle,d=a.dataKey,f=a.nameKey,p=a.valueKey,h=a.tooltipType,m=Math.abs(r.props.minAngle),g=eM.parseCoordinateOfPie(r,o),v=eM.parseDeltaAngle(c,s),y=Math.abs(v),b=d;ed()(d)&&ed()(p)?((0,ey.Z)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b="value"):ed()(d)&&((0,ey.Z)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b=p);var x=i.filter(function(e){return 0!==(0,ev.F$)(e,b,0)}).length,w=y-x*m-(y>=360?x:x-1)*u,S=i.reduce(function(e,t){var n=(0,ev.F$)(t,b,0);return e+((0,eg.hj)(n)?n:0)},0);return S>0&&(t=i.map(function(e,t){var r,o=(0,ev.F$)(e,b,0),i=(0,ev.F$)(e,f,t),a=((0,eg.hj)(o)?o:0)/S,s=(r=t?n.endAngle+(0,eg.uY)(v)*u*(0!==o?1:0):c)+(0,eg.uY)(v)*((0!==o?m:0)+a*w),d=(r+s)/2,p=(g.innerRadius+g.outerRadius)/2,y=[{name:i,value:o,payload:e,dataKey:b,type:h}],x=(0,N.op)(g.cx,g.cy,p,d);return n=ek(ek(ek({percent:a,cornerRadius:l,name:i,tooltipPayload:y,midAngle:d,middleRadius:p,tooltipPosition:x},e),g),{},{value:(0,ev.F$)(e,b),startAngle:r,endAngle:s,payload:e,paddingAngle:(0,eg.uY)(v)*u})})),ek(ek({},g),{},{sectors:t,data:i})});var eI=(0,d.z)({chartName:"PieChart",GraphicalChild:eM,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:B},{axisType:"radiusAxis",AxisComp:eo}],formatAxisMap:N.t9,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),eR=n(8147),eT=n(69448),eA=n(98593);let e_=e=>{let{active:t,payload:n,valueFormatter:r}=e;if(t&&(null==n?void 0:n[0])){let e=null==n?void 0:n[0];return c.createElement(eA.$B,null,c.createElement("div",{className:(0,a.q)("px-4 py-2")},c.createElement(eA.zX,{value:r(e.value),name:e.name,color:e.payload.color})))}return null},eD=(e,t)=>e.map((e,n)=>{let r=n<t.length?t[n]:o.fr.Gray;return Object.assign(Object.assign({},e),{color:r,className:(0,l.bM)(null!=r?r:o.fr.Gray,i.K.background).fillColor,fill:""})}),eZ=(e,t,n,r)=>e||t((0,l.vP)(n.map(e=>e[r]))),eL=e=>{let{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a,className:l}=e;return c.createElement("g",null,c.createElement(s.L,{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a,className:l,fill:"",opacity:.3,style:{outline:"none"}}))},ez=c.forwardRef((e,t)=>{let{data:n=[],category:s="value",index:d="name",colors:f=i.s,variant:p="donut",valueFormatter:h=l.Cj,label:m,showLabel:g=!0,animationDuration:v=900,showAnimation:y=!1,showTooltip:b=!0,noDataText:x,onValueChange:w,customTooltip:S,className:k}=e,E=(0,r._T)(e,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","noDataText","onValueChange","customTooltip","className"]),C="donut"==p,O=eZ(m,h,n,s),[j,P]=c.useState(void 0),N=!!w;return(0,c.useEffect)(()=>{let e=document.querySelectorAll(".recharts-pie-sector");e&&e.forEach(e=>{e.setAttribute("style","outline: none")})},[j]),c.createElement("div",Object.assign({ref:t,className:(0,a.q)("w-full h-40",k)},E),c.createElement(u.h,{className:"h-full w-full"},(null==n?void 0:n.length)?c.createElement(eI,{onClick:N&&j?()=>{P(void 0),null==w||w(null)}:void 0,margin:{top:0,left:0,right:0,bottom:0}},g&&C?c.createElement("text",{className:(0,a.q)("fill-tremor-content-emphasis","dark:fill-dark-tremor-content-emphasis"),x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle"},O):null,c.createElement(eM,{className:(0,a.q)("stroke-tremor-background dark:stroke-dark-tremor-background",w?"cursor-pointer":"cursor-default"),data:eD(n,f),cx:"50%",cy:"50%",startAngle:90,endAngle:-270,innerRadius:C?"75%":"0%",outerRadius:"100%",stroke:"",strokeLinejoin:"round",dataKey:s,nameKey:d,isAnimationActive:y,animationDuration:v,onClick:function(e,t,n){n.stopPropagation(),N&&(j===t?(P(void 0),null==w||w(null)):(P(t),null==w||w(Object.assign({eventType:"slice"},e.payload.payload))))},activeIndex:j,inactiveShape:eL,style:{outline:"none"}}),c.createElement(eR.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,content:b?e=>{var t;let{active:n,payload:r}=e;return S?c.createElement(S,{payload:null==r?void 0:r.map(e=>{var t,n,i;return Object.assign(Object.assign({},e),{color:null!==(i=null===(n=null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.payload)||void 0===n?void 0:n.color)&&void 0!==i?i:o.fr.Gray})}),active:n,label:null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.name}):c.createElement(e_,{active:n,payload:r,valueFormatter:h})}:c.createElement(c.Fragment,null)})):c.createElement(eT.Z,{noDataText:x})))});ez.displayName="DonutChart"},59664:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r=n(5853),o=n(2265),i=n(47625),a=n(93765),l=n(54061),c=n(97059),s=n(62994),u=n(25311),d=(0,a.z)({chartName:"LineChart",GraphicalChild:l.x,axisComponents:[{axisType:"xAxis",AxisComp:c.K},{axisType:"yAxis",AxisComp:s.B}],formatAxisMap:u.t9}),f=n(56940),p=n(8147),h=n(22190),m=n(81889),g=n(65278),v=n(98593),y=n(69448),b=n(32644),x=n(7084),w=n(26898),S=n(65954),k=n(1153);let E=o.forwardRef((e,t)=>{let{data:n=[],categories:a=[],index:u,colors:E=w.s,valueFormatter:C=k.Cj,startEndOnly:O=!1,showXAxis:j=!0,showYAxis:P=!0,yAxisWidth:N=56,intervalType:M="equidistantPreserveStart",animationDuration:I=900,showAnimation:R=!1,showTooltip:T=!0,showLegend:A=!0,showGridLines:_=!0,autoMinValue:D=!1,curveType:Z="linear",minValue:L,maxValue:z,connectNulls:B=!1,allowDecimals:F=!0,noDataText:H,className:q,onValueChange:W,enableLegendSlider:K=!1,customTooltip:V,rotateLabelX:U,tickGap:G=5}=e,X=(0,r._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),$=j||P?20:0,[Y,Q]=(0,o.useState)(60),[J,ee]=(0,o.useState)(void 0),[et,en]=(0,o.useState)(void 0),er=(0,b.me)(a,E),eo=(0,b.i4)(D,L,z),ei=!!W;function ea(e){ei&&(e===et&&!J||(0,b.FB)(n,e)&&J&&J.dataKey===e?(en(void 0),null==W||W(null)):(en(e),null==W||W({eventType:"category",categoryClicked:e})),ee(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,S.q)("w-full h-80",q)},X),o.createElement(i.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(d,{data:n,onClick:ei&&(et||J)?()=>{ee(void 0),en(void 0),null==W||W(null)}:void 0},_?o.createElement(f.q,{className:(0,S.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(c.K,{padding:{left:$,right:$},hide:!j,dataKey:u,interval:O?"preserveStartEnd":M,tick:{transform:"translate(0, 6)"},ticks:O?[n[0][u],n[n.length-1][u]]:void 0,fill:"",stroke:"",className:(0,S.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:G,angle:null==U?void 0:U.angle,dy:null==U?void 0:U.verticalShift,height:null==U?void 0:U.xAxisHeight}),o.createElement(s.B,{width:N,hide:!P,axisLine:!1,tickLine:!1,type:"number",domain:eo,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,S.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:C,allowDecimals:F}),o.createElement(p.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:T?e=>{let{active:t,payload:n,label:r}=e;return V?o.createElement(V,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=er.get(e.dataKey))&&void 0!==t?t:x.fr.Gray})}),active:t,label:r}):o.createElement(v.ZP,{active:t,payload:n,label:r,valueFormatter:C,categoryColors:er})}:o.createElement(o.Fragment,null),position:{y:0}}),A?o.createElement(h.D,{verticalAlign:"top",height:Y,content:e=>{let{payload:t}=e;return(0,g.Z)({payload:t},er,Q,et,ei?e=>ea(e):void 0,K)}}):null,a.map(e=>{var t;return o.createElement(l.x,{className:(0,S.q)((0,k.bM)(null!==(t=er.get(e))&&void 0!==t?t:x.fr.Gray,w.K.text).strokeColor),strokeOpacity:J||et&&et!==e?.3:1,activeDot:e=>{var t;let{cx:r,cy:i,stroke:a,strokeLinecap:l,strokeLinejoin:c,strokeWidth:s,dataKey:u}=e;return o.createElement(m.o,{className:(0,S.q)("stroke-tremor-background dark:stroke-dark-tremor-background",W?"cursor-pointer":"",(0,k.bM)(null!==(t=er.get(u))&&void 0!==t?t:x.fr.Gray,w.K.text).fillColor),cx:r,cy:i,r:5,fill:"",stroke:a,strokeLinecap:l,strokeLinejoin:c,strokeWidth:s,onClick:(t,r)=>{r.stopPropagation(),ei&&(e.index===(null==J?void 0:J.index)&&e.dataKey===(null==J?void 0:J.dataKey)||(0,b.FB)(n,e.dataKey)&&et&&et===e.dataKey?(en(void 0),ee(void 0),null==W||W(null)):(en(e.dataKey),ee({index:e.index,dataKey:e.dataKey}),null==W||W(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var r;let{stroke:i,strokeLinecap:a,strokeLinejoin:l,strokeWidth:c,cx:s,cy:u,dataKey:d,index:f}=t;return(0,b.FB)(n,e)&&!(J||et&&et!==e)||(null==J?void 0:J.index)===f&&(null==J?void 0:J.dataKey)===e?o.createElement(m.o,{key:f,cx:s,cy:u,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:l,strokeWidth:c,className:(0,S.q)("stroke-tremor-background dark:stroke-dark-tremor-background",W?"cursor-pointer":"",(0,k.bM)(null!==(r=er.get(d))&&void 0!==r?r:x.fr.Gray,w.K.text).fillColor)}):o.createElement(o.Fragment,{key:f})},key:e,name:e,type:Z,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:R,animationDuration:I,connectNulls:B})}),W?a.map(e=>o.createElement(l.x,{className:(0,S.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:Z,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:B,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;ea(n)}})):null):o.createElement(y.Z,{noDataText:H})))});E.displayName="LineChart"},65278:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(2265);let o=(e,t)=>{let[n,o]=(0,r.useState)(t);(0,r.useEffect)(()=>{let t=()=>{o(window.innerWidth),e()};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e,n])};var i=n(5853),a=n(26898),l=n(65954),c=n(1153);let s=e=>{var t=(0,i._T)(e,[]);return r.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.createElement("path",{d:"M8 12L14 6V18L8 12Z"}))},u=e=>{var t=(0,i._T)(e,[]);return r.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.createElement("path",{d:"M16 12L10 18V6L16 12Z"}))},d=(0,c.fn)("Legend"),f=e=>{let{name:t,color:n,onClick:o,activeLegend:i}=e,s=!!o;return r.createElement("li",{className:(0,l.q)(d("legendItem"),"group inline-flex items-center px-2 py-0.5 rounded-tremor-small transition whitespace-nowrap",s?"cursor-pointer":"cursor-default","text-tremor-content",s?"hover:bg-tremor-background-subtle":"","dark:text-dark-tremor-content",s?"dark:hover:bg-dark-tremor-background-subtle":""),onClick:e=>{e.stopPropagation(),null==o||o(t,n)}},r.createElement("svg",{className:(0,l.q)("flex-none h-2 w-2 mr-1.5",(0,c.bM)(n,a.K.text).textColor,i&&i!==t?"opacity-40":"opacity-100"),fill:"currentColor",viewBox:"0 0 8 8"},r.createElement("circle",{cx:4,cy:4,r:4})),r.createElement("p",{className:(0,l.q)("whitespace-nowrap truncate text-tremor-default","text-tremor-content",s?"group-hover:text-tremor-content-emphasis":"","dark:text-dark-tremor-content",i&&i!==t?"opacity-40":"opacity-100",s?"dark:group-hover:text-dark-tremor-content-emphasis":"")},t))},p=e=>{let{icon:t,onClick:n,disabled:o}=e,[i,a]=r.useState(!1),c=r.useRef(null);return r.useEffect(()=>(i?c.current=setInterval(()=>{null==n||n()},300):clearInterval(c.current),()=>clearInterval(c.current)),[i,n]),(0,r.useEffect)(()=>{o&&(clearInterval(c.current),a(!1))},[o]),r.createElement("button",{type:"button",className:(0,l.q)(d("legendSliderButton"),"w-5 group inline-flex items-center truncate rounded-tremor-small transition",o?"cursor-not-allowed":"cursor-pointer",o?"text-tremor-content-subtle":"text-tremor-content hover:text-tremor-content-emphasis hover:bg-tremor-background-subtle",o?"dark:text-dark-tremor-subtle":"dark:text-dark-tremor dark:hover:text-tremor-content-emphasis dark:hover:bg-dark-tremor-background-subtle"),disabled:o,onClick:e=>{e.stopPropagation(),null==n||n()},onMouseDown:e=>{e.stopPropagation(),a(!0)},onMouseUp:e=>{e.stopPropagation(),a(!1)}},r.createElement(t,{className:"w-full"}))},h=r.forwardRef((e,t)=>{var n,o;let{categories:c,colors:h=a.s,className:m,onClickLegendItem:g,activeLegend:v,enableLegendSlider:y=!1}=e,b=(0,i._T)(e,["categories","colors","className","onClickLegendItem","activeLegend","enableLegendSlider"]),x=r.useRef(null),[w,S]=r.useState(null),[k,E]=r.useState(null),C=r.useRef(null),O=(0,r.useCallback)(()=>{let e=null==x?void 0:x.current;e&&S({left:e.scrollLeft>0,right:e.scrollWidth-e.clientWidth>e.scrollLeft})},[S]),j=(0,r.useCallback)(e=>{var t;let n=null==x?void 0:x.current,r=null!==(t=null==n?void 0:n.clientWidth)&&void 0!==t?t:0;n&&y&&(n.scrollTo({left:"left"===e?n.scrollLeft-r:n.scrollLeft+r,behavior:"smooth"}),setTimeout(()=>{O()},400))},[y,O]);r.useEffect(()=>{let e=e=>{"ArrowLeft"===e?j("left"):"ArrowRight"===e&&j("right")};return k?(e(k),C.current=setInterval(()=>{e(k)},300)):clearInterval(C.current),()=>clearInterval(C.current)},[k,j]);let P=e=>{e.stopPropagation(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),E(e.key))},N=e=>{e.stopPropagation(),E(null)};return r.useEffect(()=>{let e=null==x?void 0:x.current;return y&&(O(),null==e||e.addEventListener("keydown",P),null==e||e.addEventListener("keyup",N)),()=>{null==e||e.removeEventListener("keydown",P),null==e||e.removeEventListener("keyup",N)}},[O,y]),r.createElement("ol",Object.assign({ref:t,className:(0,l.q)(d("root"),"relative overflow-hidden",m)},b),r.createElement("div",{ref:x,tabIndex:0,className:(0,l.q)("h-full flex",y?(null==w?void 0:w.right)||(null==w?void 0:w.left)?"pl-4 pr-12 items-center overflow-auto snap-mandatory [&::-webkit-scrollbar]:hidden [scrollbar-width:none]":"":"flex-wrap")},c.map((e,t)=>r.createElement(f,{key:"item-".concat(t),name:e,color:h[t],onClick:g,activeLegend:v}))),y&&((null==w?void 0:w.right)||(null==w?void 0:w.left))?r.createElement(r.Fragment,null,r.createElement("div",{className:(0,l.q)("from-tremor-background","dark:from-dark-tremor-background","absolute top-0 bottom-0 left-0 w-4 bg-gradient-to-r to-transparent pointer-events-none")}),r.createElement("div",{className:(0,l.q)("to-tremor-background","dark:to-dark-tremor-background","absolute top-0 bottom-0 right-10 w-4 bg-gradient-to-r from-transparent pointer-events-none")}),r.createElement("div",{className:(0,l.q)("bg-tremor-background","dark:bg-dark-tremor-background","absolute flex top-0 pr-1 bottom-0 right-0 items-center justify-center h-full")},r.createElement(p,{icon:s,onClick:()=>{E(null),j("left")},disabled:!(null==w?void 0:w.left)}),r.createElement(p,{icon:u,onClick:()=>{E(null),j("right")},disabled:!(null==w?void 0:w.right)}))):null)});h.displayName="Legend";let m=(e,t,n,i,a,l)=>{let{payload:c}=e,s=(0,r.useRef)(null);o(()=>{var e,t;n((t=null===(e=s.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)});let u=c.filter(e=>"none"!==e.type);return r.createElement("div",{ref:s,className:"flex items-center justify-end"},r.createElement(h,{categories:u.map(e=>e.value),colors:u.map(e=>t.get(e.value)),onClickLegendItem:a,activeLegend:i,enableLegendSlider:l}))}},98593:function(e,t,n){"use strict";n.d(t,{$B:function(){return c},ZP:function(){return u},zX:function(){return s}});var r=n(2265),o=n(7084),i=n(26898),a=n(65954),l=n(1153);let c=e=>{let{children:t}=e;return r.createElement("div",{className:(0,a.q)("rounded-tremor-default text-tremor-default border","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border")},t)},s=e=>{let{value:t,name:n,color:o}=e;return r.createElement("div",{className:"flex items-center justify-between space-x-8"},r.createElement("div",{className:"flex items-center space-x-2"},r.createElement("span",{className:(0,a.q)("shrink-0 rounded-tremor-full border-2 h-3 w-3","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",(0,l.bM)(o,i.K.background).bgColor)}),r.createElement("p",{className:(0,a.q)("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),r.createElement("p",{className:(0,a.q)("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t))},u=e=>{let{active:t,payload:n,label:i,categoryColors:l,valueFormatter:u}=e;if(t&&n){let e=n.filter(e=>"none"!==e.type);return r.createElement(c,null,r.createElement("div",{className:(0,a.q)("border-tremor-border border-b px-4 py-2","dark:border-dark-tremor-border")},r.createElement("p",{className:(0,a.q)("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},i)),r.createElement("div",{className:(0,a.q)("px-4 py-2 space-y-1")},e.map((e,t)=>{var n;let{value:i,name:a}=e;return r.createElement(s,{key:"id-".concat(t),value:u(i),name:a,color:null!==(n=l.get(a))&&void 0!==n?n:o.fr.Blue})})))}return null}},69448:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(65954),o=n(2265),i=n(5853);let a=(0,n(1153).fn)("Flex"),l={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},c={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},s={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},u=o.forwardRef((e,t)=>{let{flexDirection:n="row",justifyContent:u="between",alignItems:d="center",children:f,className:p}=e,h=(0,i._T)(e,["flexDirection","justifyContent","alignItems","children","className"]);return o.createElement("div",Object.assign({ref:t,className:(0,r.q)(a("root"),"flex w-full",s[n],l[u],c[d],p)},h),f)});u.displayName="Flex";var d=n(84264);let f=e=>{let{noDataText:t="No data"}=e;return o.createElement(u,{alignItems:"center",justifyContent:"center",className:(0,r.q)("w-full h-full border border-dashed rounded-tremor-default","border-tremor-border","dark:border-dark-tremor-border")},o.createElement(d.Z,{className:(0,r.q)("text-tremor-content","dark:text-dark-tremor-content")},t))}},32644:function(e,t,n){"use strict";n.d(t,{FB:function(){return i},i4:function(){return o},me:function(){return r},vZ:function(){return function e(t,n){if(t===n)return!0;if("object"!=typeof t||"object"!=typeof n||null===t||null===n)return!1;let r=Object.keys(t),o=Object.keys(n);if(r.length!==o.length)return!1;for(let i of r)if(!o.includes(i)||!e(t[i],n[i]))return!1;return!0}}});let r=(e,t)=>{let n=new Map;return e.forEach((e,r)=>{n.set(e,t[r])}),n},o=(e,t,n)=>[e?"auto":null!=t?t:0,null!=n?n:"auto"];function i(e,t){let n=[];for(let r of e)if(Object.prototype.hasOwnProperty.call(r,t)&&(n.push(r[t]),n.length>1))return!1;return!0}},41649:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(5853),o=n(2265),i=n(1526),a=n(7084),l=n(26898),c=n(65954),s=n(1153);let u={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},d={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},f=(0,s.fn)("Badge"),p=o.forwardRef((e,t)=>{let{color:n,icon:p,size:h=a.u8.SM,tooltip:m,className:g,children:v}=e,y=(0,r._T)(e,["color","icon","size","tooltip","className","children"]),b=p||null,{tooltipProps:x,getReferenceProps:w}=(0,i.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([t,x.refs.setReference]),className:(0,c.q)(f("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full",n?(0,c.q)((0,s.bM)(n,l.K.background).bgColor,(0,s.bM)(n,l.K.text).textColor,"bg-opacity-20 dark:bg-opacity-25"):(0,c.q)("bg-tremor-brand-muted text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted dark:text-dark-tremor-brand-emphasis"),u[h].paddingX,u[h].paddingY,u[h].fontSize,g)},w,y),o.createElement(i.Z,Object.assign({text:m},x)),b?o.createElement(b,{className:(0,c.q)(f("icon"),"shrink-0 -ml-1 mr-1.5",d[h].height,d[h].width)}):null,o.createElement("p",{className:(0,c.q)(f("text"),"text-sm whitespace-nowrap")},v))});p.displayName="Badge"},47323:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(5853),o=n(2265),i=n(1526),a=n(7084),l=n(65954),c=n(1153),s=n(26898);let u={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},f={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,c.bM)(t,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.q)((0,c.bM)(t,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},h=(0,c.fn)("Icon"),m=o.forwardRef((e,t)=>{let{icon:n,variant:s="simple",tooltip:m,size:g=a.u8.SM,color:v,className:y}=e,b=(0,r._T)(e,["icon","variant","tooltip","size","color","className"]),x=p(s,v),{tooltipProps:w,getReferenceProps:S}=(0,i.l)();return o.createElement("span",Object.assign({ref:(0,c.lq)([t,w.refs.setReference]),className:(0,l.q)(h("root"),"inline-flex flex-shrink-0 items-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,f[s].rounded,f[s].border,f[s].shadow,f[s].ring,u[g].paddingX,u[g].paddingY,y)},S,b),o.createElement(i.Z,Object.assign({text:m},w)),o.createElement(n,{className:(0,l.q)(h("icon"),"shrink-0",d[g].height,d[g].width)}))});m.displayName="Icon"},53003:function(e,t,n){"use strict";let r,o,i;n.d(t,{Z:function(){return nF}});var a,l,c,s,u=n(5853),d=n(2265),f=n(54887),p=n(13323),h=n(64518),m=n(96822),g=n(40293);function v(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,d.useMemo)(()=>(0,g.r)(...t),[...t])}var y=n(72238),b=n(93689);let x=(0,d.createContext)(!1);var w=n(61424),S=n(27847);let k=d.Fragment,E=d.Fragment,C=(0,d.createContext)(null),O=(0,d.createContext)(null);Object.assign((0,S.yV)(function(e,t){var n;let r,o,i=(0,d.useRef)(null),a=(0,b.T)((0,b.h)(e=>{i.current=e}),t),l=v(i),c=function(e){let t=(0,d.useContext)(x),n=(0,d.useContext)(C),r=v(e),[o,i]=(0,d.useState)(()=>{if(!t&&null!==n||w.O.isServer)return null;let e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;let o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)});return(0,d.useEffect)(()=>{null!==o&&(null!=r&&r.body.contains(o)||null==r||r.body.appendChild(o))},[o,r]),(0,d.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),o}(i),[s]=(0,d.useState)(()=>{var e;return w.O.isServer?null:null!=(e=null==l?void 0:l.createElement("div"))?e:null}),u=(0,d.useContext)(O),g=(0,y.H)();return(0,h.e)(()=>{!c||!s||c.contains(s)||(s.setAttribute("data-headlessui-portal",""),c.appendChild(s))},[c,s]),(0,h.e)(()=>{if(s&&u)return u.register(s)},[u,s]),n=()=>{var e;c&&s&&(s instanceof Node&&c.contains(s)&&c.removeChild(s),c.childNodes.length<=0&&(null==(e=c.parentElement)||e.removeChild(c)))},r=(0,p.z)(n),o=(0,d.useRef)(!1),(0,d.useEffect)(()=>(o.current=!1,()=>{o.current=!0,(0,m.Y)(()=>{o.current&&r()})}),[r]),g&&c&&s?(0,f.createPortal)((0,S.sY)({ourProps:{ref:a},theirProps:e,defaultTag:k,name:"Portal"}),s):null}),{Group:(0,S.yV)(function(e,t){let{target:n,...r}=e,o={ref:(0,b.T)(t)};return d.createElement(C.Provider,{value:n},(0,S.sY)({ourProps:o,theirProps:r,defaultTag:E,name:"Popover.Group"}))})});var j=n(31948),P=n(17684),N=n(98505),M=n(80004),I=n(38198),R=n(3141),T=((r=T||{})[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r);function A(){let e=(0,d.useRef)(0);return(0,R.s)("keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}var _=n(37863),D=n(47634),Z=n(37105),L=n(24536),z=n(37388),B=((o=B||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o),F=((i=F||{})[i.TogglePopover=0]="TogglePopover",i[i.ClosePopover=1]="ClosePopover",i[i.SetButton=2]="SetButton",i[i.SetButtonId=3]="SetButtonId",i[i.SetPanel=4]="SetPanel",i[i.SetPanelId=5]="SetPanelId",i);let H={0:e=>{let t={...e,popoverState:(0,L.E)(e.popoverState,{0:1,1:0})};return 0===t.popoverState&&(t.__demoMode=!1),t},1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},q=(0,d.createContext)(null);function W(e){let t=(0,d.useContext)(q);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Popover /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,W),t}return t}q.displayName="PopoverContext";let K=(0,d.createContext)(null);function V(e){let t=(0,d.useContext)(K);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Popover /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,V),t}return t}K.displayName="PopoverAPIContext";let U=(0,d.createContext)(null);function G(){return(0,d.useContext)(U)}U.displayName="PopoverGroupContext";let X=(0,d.createContext)(null);function $(e,t){return(0,L.E)(t.type,H,e,t)}X.displayName="PopoverPanelContext";let Y=S.AN.RenderStrategy|S.AN.Static,Q=S.AN.RenderStrategy|S.AN.Static,J=Object.assign((0,S.yV)(function(e,t){var n,r,o,i;let a,l,c,s,u,f;let{__demoMode:h=!1,...m}=e,g=(0,d.useRef)(null),y=(0,b.T)(t,(0,b.h)(e=>{g.current=e})),x=(0,d.useRef)([]),w=(0,d.useReducer)($,{__demoMode:h,popoverState:h?0:1,buttons:x,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:(0,d.createRef)(),afterPanelSentinel:(0,d.createRef)()}),[{popoverState:k,button:E,buttonId:C,panel:P,panelId:M,beforePanelSentinel:R,afterPanelSentinel:T},A]=w,D=v(null!=(n=g.current)?n:E),z=(0,d.useMemo)(()=>{if(!E||!P)return!1;for(let e of document.querySelectorAll("body > *"))if(Number(null==e?void 0:e.contains(E))^Number(null==e?void 0:e.contains(P)))return!0;let e=(0,Z.GO)(),t=e.indexOf(E),n=(t+e.length-1)%e.length,r=(t+1)%e.length,o=e[n],i=e[r];return!P.contains(o)&&!P.contains(i)},[E,P]),B=(0,j.E)(C),F=(0,j.E)(M),H=(0,d.useMemo)(()=>({buttonId:B,panelId:F,close:()=>A({type:1})}),[B,F,A]),W=G(),V=null==W?void 0:W.registerPopover,U=(0,p.z)(()=>{var e;return null!=(e=null==W?void 0:W.isFocusWithinPopoverGroup())?e:(null==D?void 0:D.activeElement)&&((null==E?void 0:E.contains(D.activeElement))||(null==P?void 0:P.contains(D.activeElement)))});(0,d.useEffect)(()=>null==V?void 0:V(H),[V,H]);let[Y,Q]=(a=(0,d.useContext)(O),l=(0,d.useRef)([]),c=(0,p.z)(e=>(l.current.push(e),a&&a.register(e),()=>s(e))),s=(0,p.z)(e=>{let t=l.current.indexOf(e);-1!==t&&l.current.splice(t,1),a&&a.unregister(e)}),u=(0,d.useMemo)(()=>({register:c,unregister:s,portals:l}),[c,s,l]),[l,(0,d.useMemo)(()=>function(e){let{children:t}=e;return d.createElement(O.Provider,{value:u},t)},[u])]),J=function(){var e;let{defaultContainers:t=[],portals:n,mainTreeNodeRef:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=(0,d.useRef)(null!=(e=null==r?void 0:r.current)?e:null),i=v(o),a=(0,p.z)(()=>{var e,r,a;let l=[];for(let e of t)null!==e&&(e instanceof HTMLElement?l.push(e):"current"in e&&e.current instanceof HTMLElement&&l.push(e.current));if(null!=n&&n.current)for(let e of n.current)l.push(e);for(let t of null!=(e=null==i?void 0:i.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(o.current)||t.contains(null==(a=null==(r=o.current)?void 0:r.getRootNode())?void 0:a.host)||l.some(e=>t.contains(e))||l.push(t));return l});return{resolveContainers:a,contains:(0,p.z)(e=>a().some(t=>t.contains(e))),mainTreeNodeRef:o,MainTreeNode:(0,d.useMemo)(()=>function(){return null!=r?null:d.createElement(I._,{features:I.A.Hidden,ref:o})},[o,r])}}({mainTreeNodeRef:null==W?void 0:W.mainTreeNodeRef,portals:Y,defaultContainers:[E,P]});r=null==D?void 0:D.defaultView,o="focus",i=e=>{var t,n,r,o;e.target!==window&&e.target instanceof HTMLElement&&0===k&&(U()||E&&P&&(J.contains(e.target)||null!=(n=null==(t=R.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(o=null==(r=T.current)?void 0:r.contains)&&o.call(r,e.target)||A({type:1})))},f=(0,j.E)(i),(0,d.useEffect)(()=>{function e(e){f.current(e)}return(r=null!=r?r:window).addEventListener(o,e,!0),()=>r.removeEventListener(o,e,!0)},[r,o,!0]),(0,N.O)(J.resolveContainers,(e,t)=>{A({type:1}),(0,Z.sP)(t,Z.tJ.Loose)||(e.preventDefault(),null==E||E.focus())},0===k);let ee=(0,p.z)(e=>{A({type:1});let t=e?e instanceof HTMLElement?e:"current"in e&&e.current instanceof HTMLElement?e.current:E:E;null==t||t.focus()}),et=(0,d.useMemo)(()=>({close:ee,isPortalled:z}),[ee,z]),en=(0,d.useMemo)(()=>({open:0===k,close:ee}),[k,ee]);return d.createElement(X.Provider,{value:null},d.createElement(q.Provider,{value:w},d.createElement(K.Provider,{value:et},d.createElement(_.up,{value:(0,L.E)(k,{0:_.ZM.Open,1:_.ZM.Closed})},d.createElement(Q,null,(0,S.sY)({ourProps:{ref:y},theirProps:m,slot:en,defaultTag:"div",name:"Popover"}),d.createElement(J.MainTreeNode,null))))))}),{Button:(0,S.yV)(function(e,t){let n=(0,P.M)(),{id:r="headlessui-popover-button-".concat(n),...o}=e,[i,a]=W("Popover.Button"),{isPortalled:l}=V("Popover.Button"),c=(0,d.useRef)(null),s="headlessui-focus-sentinel-".concat((0,P.M)()),u=G(),f=null==u?void 0:u.closeOthers,h=null!==(0,d.useContext)(X);(0,d.useEffect)(()=>{if(!h)return a({type:3,buttonId:r}),()=>{a({type:3,buttonId:null})}},[h,r,a]);let[m]=(0,d.useState)(()=>Symbol()),g=(0,b.T)(c,t,h?null:e=>{if(e)i.buttons.current.push(m);else{let e=i.buttons.current.indexOf(m);-1!==e&&i.buttons.current.splice(e,1)}i.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),e&&a({type:2,button:e})}),y=(0,b.T)(c,t),x=v(c),w=(0,p.z)(e=>{var t,n,r;if(h){if(1===i.popoverState)return;switch(e.key){case z.R.Space:case z.R.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),a({type:1}),null==(r=i.button)||r.focus()}}else switch(e.key){case z.R.Space:case z.R.Enter:e.preventDefault(),e.stopPropagation(),1===i.popoverState&&(null==f||f(i.buttonId)),a({type:0});break;case z.R.Escape:if(0!==i.popoverState)return null==f?void 0:f(i.buttonId);if(!c.current||null!=x&&x.activeElement&&!c.current.contains(x.activeElement))return;e.preventDefault(),e.stopPropagation(),a({type:1})}}),k=(0,p.z)(e=>{h||e.key===z.R.Space&&e.preventDefault()}),E=(0,p.z)(t=>{var n,r;(0,D.P)(t.currentTarget)||e.disabled||(h?(a({type:1}),null==(n=i.button)||n.focus()):(t.preventDefault(),t.stopPropagation(),1===i.popoverState&&(null==f||f(i.buttonId)),a({type:0}),null==(r=i.button)||r.focus()))}),C=(0,p.z)(e=>{e.preventDefault(),e.stopPropagation()}),O=0===i.popoverState,j=(0,d.useMemo)(()=>({open:O}),[O]),N=(0,M.f)(e,c),R=h?{ref:y,type:N,onKeyDown:w,onClick:E}:{ref:g,id:i.buttonId,type:N,"aria-expanded":0===i.popoverState,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:w,onKeyUp:k,onClick:E,onMouseDown:C},_=A(),B=(0,p.z)(()=>{let e=i.panel;e&&(0,L.E)(_.current,{[T.Forwards]:()=>(0,Z.jA)(e,Z.TO.First),[T.Backwards]:()=>(0,Z.jA)(e,Z.TO.Last)})===Z.fE.Error&&(0,Z.jA)((0,Z.GO)().filter(e=>"true"!==e.dataset.headlessuiFocusGuard),(0,L.E)(_.current,{[T.Forwards]:Z.TO.Next,[T.Backwards]:Z.TO.Previous}),{relativeTo:i.button})});return d.createElement(d.Fragment,null,(0,S.sY)({ourProps:R,theirProps:o,slot:j,defaultTag:"button",name:"Popover.Button"}),O&&!h&&l&&d.createElement(I._,{id:s,features:I.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:B}))}),Overlay:(0,S.yV)(function(e,t){let n=(0,P.M)(),{id:r="headlessui-popover-overlay-".concat(n),...o}=e,[{popoverState:i},a]=W("Popover.Overlay"),l=(0,b.T)(t),c=(0,_.oJ)(),s=null!==c?(c&_.ZM.Open)===_.ZM.Open:0===i,u=(0,p.z)(e=>{if((0,D.P)(e.currentTarget))return e.preventDefault();a({type:1})}),f=(0,d.useMemo)(()=>({open:0===i}),[i]);return(0,S.sY)({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:f,defaultTag:"div",features:Y,visible:s,name:"Popover.Overlay"})}),Panel:(0,S.yV)(function(e,t){let n=(0,P.M)(),{id:r="headlessui-popover-panel-".concat(n),focus:o=!1,...i}=e,[a,l]=W("Popover.Panel"),{close:c,isPortalled:s}=V("Popover.Panel"),u="headlessui-focus-sentinel-before-".concat((0,P.M)()),f="headlessui-focus-sentinel-after-".concat((0,P.M)()),m=(0,d.useRef)(null),g=(0,b.T)(m,t,e=>{l({type:4,panel:e})}),y=v(m),x=(0,S.Y2)();(0,h.e)(()=>(l({type:5,panelId:r}),()=>{l({type:5,panelId:null})}),[r,l]);let w=(0,_.oJ)(),k=null!==w?(w&_.ZM.Open)===_.ZM.Open:0===a.popoverState,E=(0,p.z)(e=>{var t;if(e.key===z.R.Escape){if(0!==a.popoverState||!m.current||null!=y&&y.activeElement&&!m.current.contains(y.activeElement))return;e.preventDefault(),e.stopPropagation(),l({type:1}),null==(t=a.button)||t.focus()}});(0,d.useEffect)(()=>{var t;e.static||1===a.popoverState&&(null==(t=e.unmount)||t)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),(0,d.useEffect)(()=>{if(a.__demoMode||!o||0!==a.popoverState||!m.current)return;let e=null==y?void 0:y.activeElement;m.current.contains(e)||(0,Z.jA)(m.current,Z.TO.First)},[a.__demoMode,o,m,a.popoverState]);let C=(0,d.useMemo)(()=>({open:0===a.popoverState,close:c}),[a,c]),O={ref:g,id:r,onKeyDown:E,onBlur:o&&0===a.popoverState?e=>{var t,n,r,o,i;let c=e.relatedTarget;c&&m.current&&(null!=(t=m.current)&&t.contains(c)||(l({type:1}),(null!=(r=null==(n=a.beforePanelSentinel.current)?void 0:n.contains)&&r.call(n,c)||null!=(i=null==(o=a.afterPanelSentinel.current)?void 0:o.contains)&&i.call(o,c))&&c.focus({preventScroll:!0})))}:void 0,tabIndex:-1},j=A(),N=(0,p.z)(()=>{let e=m.current;e&&(0,L.E)(j.current,{[T.Forwards]:()=>{var t;(0,Z.jA)(e,Z.TO.First)===Z.fE.Error&&(null==(t=a.afterPanelSentinel.current)||t.focus())},[T.Backwards]:()=>{var e;null==(e=a.button)||e.focus({preventScroll:!0})}})}),M=(0,p.z)(()=>{let e=m.current;e&&(0,L.E)(j.current,{[T.Forwards]:()=>{var e;if(!a.button)return;let t=(0,Z.GO)(),n=t.indexOf(a.button),r=t.slice(0,n+1),o=[...t.slice(n+1),...r];for(let t of o.slice())if("true"===t.dataset.headlessuiFocusGuard||null!=(e=a.panel)&&e.contains(t)){let e=o.indexOf(t);-1!==e&&o.splice(e,1)}(0,Z.jA)(o,Z.TO.First,{sorted:!1})},[T.Backwards]:()=>{var t;(0,Z.jA)(e,Z.TO.Previous)===Z.fE.Error&&(null==(t=a.button)||t.focus())}})});return d.createElement(X.Provider,{value:r},k&&s&&d.createElement(I._,{id:u,ref:a.beforePanelSentinel,features:I.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N}),(0,S.sY)({mergeRefs:x,ourProps:O,theirProps:i,slot:C,defaultTag:"div",features:Q,visible:k,name:"Popover.Panel"}),k&&s&&d.createElement(I._,{id:f,ref:a.afterPanelSentinel,features:I.A.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:M}))}),Group:(0,S.yV)(function(e,t){let n;let r=(0,d.useRef)(null),o=(0,b.T)(r,t),[i,a]=(0,d.useState)([]),l={mainTreeNodeRef:n=(0,d.useRef)(null),MainTreeNode:(0,d.useMemo)(()=>function(){return d.createElement(I._,{features:I.A.Hidden,ref:n})},[n])},c=(0,p.z)(e=>{a(t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t})}),s=(0,p.z)(e=>(a(t=>[...t,e]),()=>c(e))),u=(0,p.z)(()=>{var e;let t=(0,g.r)(r);if(!t)return!1;let n=t.activeElement;return!!(null!=(e=r.current)&&e.contains(n))||i.some(e=>{var r,o;return(null==(r=t.getElementById(e.buttonId.current))?void 0:r.contains(n))||(null==(o=t.getElementById(e.panelId.current))?void 0:o.contains(n))})}),f=(0,p.z)(e=>{for(let t of i)t.buttonId.current!==e&&t.close()}),h=(0,d.useMemo)(()=>({registerPopover:s,unregisterPopover:c,isFocusWithinPopoverGroup:u,closeOthers:f,mainTreeNodeRef:l.mainTreeNodeRef}),[s,c,u,f,l.mainTreeNodeRef]),m=(0,d.useMemo)(()=>({}),[]);return d.createElement(U.Provider,{value:h},(0,S.sY)({ourProps:{ref:o},theirProps:e,slot:m,defaultTag:"div",name:"Popover.Group"}),d.createElement(l.MainTreeNode,null))})});var ee=n(33044),et=n(28517);let en=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),d.createElement("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))};var er=n(4537),eo=n(99735),ei=n(7656);function ea(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return t.setHours(0,0,0,0),t}function el(){return ea(Date.now())}function ec(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return t.setDate(1),t.setHours(0,0,0,0),t}var es=n(65954),eu=n(96398),ed=n(41154);function ef(e){var t,n;if((0,ei.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==(0,ed.Z)(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach(function(e){var t=(0,eo.Z)(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)}),n||new Date(NaN)}function ep(e){var t,n;if((0,ei.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==(0,ed.Z)(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach(function(e){var t=(0,eo.Z)(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)}),n||new Date(NaN)}var eh=n(25721),em=n(47869);function eg(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,eh.Z)(e,-n)}var ev=n(55463);function ey(e,t){if((0,ei.Z)(2,arguments),!t||"object"!==(0,ed.Z)(t))return new Date(NaN);var n=t.years?(0,em.Z)(t.years):0,r=t.months?(0,em.Z)(t.months):0,o=t.weeks?(0,em.Z)(t.weeks):0,i=t.days?(0,em.Z)(t.days):0,a=t.hours?(0,em.Z)(t.hours):0,l=t.minutes?(0,em.Z)(t.minutes):0,c=t.seconds?(0,em.Z)(t.seconds):0;return new Date(eg(function(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,ev.Z)(e,-n)}(e,r+12*n),i+7*o).getTime()-1e3*(c+60*(l+60*a)))}function eb(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ex(e){return(0,ei.Z)(1,arguments),e instanceof Date||"object"===(0,ed.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}function ew(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getUTCDay();return t.setUTCDate(t.getUTCDate()-((n<1?7:0)+n-1)),t.setUTCHours(0,0,0,0),t}function eS(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=ew(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=ew(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}var ek={};function eE(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ek.weekStartsOn)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getUTCDay();return d.setUTCDate(d.getUTCDate()-((f<u?7:0)+f-u)),d.setUTCHours(0,0,0,0),d}function eC(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,eo.Z)(e),d=u.getUTCFullYear(),f=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:ek.firstWeekContainsDate)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var h=eE(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var g=eE(m,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=g.getTime()?d:d-1}function eO(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return(e<0?"-":"")+n}var ej={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return eO("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):eO(n+1,2)},d:function(e,t){return eO(e.getUTCDate(),t.length)},h:function(e,t){return eO(e.getUTCHours()%12||12,t.length)},H:function(e,t){return eO(e.getUTCHours(),t.length)},m:function(e,t){return eO(e.getUTCMinutes(),t.length)},s:function(e,t){return eO(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length;return eO(Math.floor(e.getUTCMilliseconds()*Math.pow(10,n-3)),t.length)}},eP={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};function eN(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+(t||"")+eO(i,2)}function eM(e,t){return e%60==0?(e>0?"-":"+")+eO(Math.abs(e)/60,2):eI(e,t)}function eI(e,t){var n=Math.abs(e);return(e>0?"-":"+")+eO(Math.floor(n/60),2)+(t||"")+eO(n%60,2)}var eR={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return ej.y(e,t)},Y:function(e,t,n,r){var o=eC(e,r),i=o>0?o:1-o;return"YY"===t?eO(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):eO(i,t.length)},R:function(e,t){return eO(eS(e),t.length)},u:function(e,t){return eO(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return eO(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return eO(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return ej.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return eO(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=function(e,t){(0,ei.Z)(1,arguments);var n=(0,eo.Z)(e);return Math.round((eE(n,t).getTime()-(function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:ek.firstWeekContainsDate)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1),d=eC(e,t),f=new Date(0);return f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0),eE(f,t)})(n,t).getTime())/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):eO(o,t.length)},I:function(e,t,n){var r=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return Math.round((ew(t).getTime()-(function(e){(0,ei.Z)(1,arguments);var t=eS(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),ew(n)})(t).getTime())/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):eO(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ej.d(e,t)},D:function(e,t,n){var r=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getTime();return t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),Math.floor((n-t.getTime())/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):eO(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return eO(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return eO(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return eO(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?eP.noon:0===o?eP.midnight:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?eP.evening:o>=12?eP.afternoon:o>=4?eP.morning:eP.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ej.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ej.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):eO(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):eO(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ej.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ej.s(e,t)},S:function(e,t){return ej.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return eM(o);case"XXXX":case"XX":return eI(o);default:return eI(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return eM(o);case"xxxx":case"xx":return eI(o);default:return eI(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eN(o,":");default:return"GMT"+eI(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eN(o,":");default:return"GMT"+eI(o,":")}},t:function(e,t,n,r){return eO(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return eO((r._originalDate||e).getTime(),t.length)}},eT=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},eA=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},e_={p:eA,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return eT(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",eT(o,t)).replace("{{time}}",eA(i,t))}};function eD(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var eZ=["D","DD"],eL=["YY","YYYY"];function ez(e,t,n){if("YYYY"===e)throw RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var eB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eF(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var eH={date:eF({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eF({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eF({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function eW(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function eK(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],c=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(c)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(c,function(e){return e.test(l)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(c,function(e){return e.test(l)});return n=e.valueCallback?e.valueCallback(s):s,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(l.length)}}}var eV={code:"en-US",formatDistance:function(e,t,n){var r,o=eB[e];return(r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix)?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:eH,formatRelative:function(e,t,n,r){return eq[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:eW({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:eW({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:eW({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:eW({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:eW({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(a.matchPattern);if(!n)return null;var r=n[0],o=e.match(a.parsePattern);if(!o)return null;var i=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:eK({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:eK({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:eK({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:eK({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:eK({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},eU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eG=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eX=/^'([^]*?)'?$/,e$=/''/g,eY=/[a-zA-Z]/;function eQ(e,t,n){(0,ei.Z)(2,arguments);var r,o,i,a,l,c,s,u,d,f,p,h,m,g,v,y,b,x,w=String(t),S=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:ek.locale)&&void 0!==r?r:eV,k=(0,em.Z)(null!==(i=null!==(a=null!==(l=null!==(c=null==n?void 0:n.firstWeekContainsDate)&&void 0!==c?c:null==n?void 0:null===(s=n.locale)||void 0===s?void 0:null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:ek.firstWeekContainsDate)&&void 0!==a?a:null===(d=ek.locale)||void 0===d?void 0:null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(k>=1&&k<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=(0,em.Z)(null!==(p=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n?void 0:null===(v=n.locale)||void 0===v?void 0:null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:ek.weekStartsOn)&&void 0!==h?h:null===(b=ek.locale)||void 0===b?void 0:null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==p?p:0);if(!(E>=0&&E<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw RangeError("locale must contain localize property");if(!S.formatLong)throw RangeError("locale must contain formatLong property");var C=(0,eo.Z)(e);if(!function(e){return(0,ei.Z)(1,arguments),(!!ex(e)||"number"==typeof e)&&!isNaN(Number((0,eo.Z)(e)))}(C))throw RangeError("Invalid time value");var O=eD(C),j=function(e,t){return(0,ei.Z)(2,arguments),function(e,t){return(0,ei.Z)(2,arguments),new Date((0,eo.Z)(e).getTime()+(0,em.Z)(t))}(e,-(0,em.Z)(t))}(C,O),P={firstWeekContainsDate:k,weekStartsOn:E,locale:S,_originalDate:C};return w.match(eG).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,e_[t])(e,S.formatLong):e}).join("").match(eU).map(function(r){if("''"===r)return"'";var o,i=r[0];if("'"===i)return(o=r.match(eX))?o[1].replace(e$,"'"):r;var a=eR[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||-1===eL.indexOf(r)||ez(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||-1===eZ.indexOf(r)||ez(r,t,String(e)),a(j,r,S.localize,P);if(i.match(eY))throw RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r}).join("")}var eJ=n(1153);let e0=(0,eJ.fn)("DateRangePicker"),e1=(e,t,n,r)=>{var o;if(n&&(e=null===(o=r.get(n))||void 0===o?void 0:o.from),e)return ea(e&&!t?e:ef([e,t]))},e2=(e,t,n,r)=>{var o,i;if(n&&(e=ea(null!==(i=null===(o=r.get(n))||void 0===o?void 0:o.to)&&void 0!==i?i:el())),e)return ea(e&&!t?e:ep([e,t]))},e6=[{value:"tdy",text:"Today",from:el()},{value:"w",text:"Last 7 days",from:ey(el(),{days:7})},{value:"t",text:"Last 30 days",from:ey(el(),{days:30})},{value:"m",text:"Month to Date",from:ec(el())},{value:"y",text:"Year to Date",from:eb(el())}],e4=(e,t,n,r)=>{let o=(null==n?void 0:n.code)||"en-US";if(!e&&!t)return"";if(e&&!t)return r?eQ(e,r):e.toLocaleDateString(o,{year:"numeric",month:"short",day:"numeric"});if(e&&t){if(function(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()===r.getTime()}(e,t))return r?eQ(e,r):e.toLocaleDateString(o,{year:"numeric",month:"short",day:"numeric"});if(e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())return r?"".concat(eQ(e,r)," - ").concat(eQ(t,r)):"".concat(e.toLocaleDateString(o,{month:"short",day:"numeric"})," - \n ").concat(t.getDate(),", ").concat(t.getFullYear());{if(r)return"".concat(eQ(e,r)," - ").concat(eQ(t,r));let n={year:"numeric",month:"short",day:"numeric"};return"".concat(e.toLocaleDateString(o,n)," - \n ").concat(t.toLocaleDateString(o,n))}}return""};function e3(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function e5(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,em.Z)(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var l=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,l)),n}function e8(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,em.Z)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function e7(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function e9(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function te(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()<r.getTime()}function tt(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ek.weekStartsOn)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getDay();return d.setDate(d.getDate()-((f<u?7:0)+f-u)),d.setHours(0,0,0,0),d}function tn(e){return(0,ei.Z)(1,arguments),tt(e,{weekStartsOn:1})}function tr(e,t){(0,ei.Z)(2,arguments);var n=ea(e),r=ea(t);return n.getTime()===r.getTime()}function to(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getTime()>r.getTime()}function ti(e,t){(0,ei.Z)(2,arguments);var n=ea(e),r=ea(t);return Math.round((n.getTime()-eD(n)-(r.getTime()-eD(r)))/864e5)}function ta(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,eh.Z)(e,7*n)}function tl(e,t){(0,ei.Z)(2,arguments);var n=(0,em.Z)(t);return(0,ev.Z)(e,12*n)}function tc(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:ek.weekStartsOn)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,eo.Z)(e),f=d.getDay();return d.setDate(d.getDate()+((f<u?-7:0)+6-(f-u))),d.setHours(23,59,59,999),d}function ts(e){return(0,ei.Z)(1,arguments),tc(e,{weekStartsOn:1})}var tu=function(){return(tu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function td(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var tf={exports:{}},tp={};tf.exports=function(){if(c)return tp;c=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(t,i,a){var l,c={},s=null,u=null;for(l in void 0!==a&&(s=""+a),void 0!==i.key&&(s=""+i.key),void 0!==i.ref&&(u=i.ref),i)n.call(i,l)&&!o.hasOwnProperty(l)&&(c[l]=i[l]);if(t&&t.defaultProps)for(l in i=t.defaultProps)void 0===c[l]&&(c[l]=i[l]);return{$$typeof:e,type:t,key:s,ref:u,props:c,_owner:r.current}}return tp.Fragment=t,tp.jsx=i,tp.jsxs=i,tp}();var th=tf.exports;function tm(e){return"multiple"===e.mode}function tg(e){return"range"===e.mode}function tv(e){return"single"===e.mode}var ty={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"},tb=Object.freeze({__proto__:null,formatCaption:function(e,t){return eQ(e,"LLLL y",t)},formatDay:function(e,t){return eQ(e,"d",t)},formatMonthCaption:function(e,t){return eQ(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return eQ(e,"cccccc",t)},formatYearCaption:function(e,t){return eQ(e,"yyyy",t)}}),tx=Object.freeze({__proto__:null,labelDay:function(e,t,n){return eQ(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return eQ(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}}),tw=(0,d.createContext)(void 0);function tS(e){var t,n,r,o,i,a,l,c,s=e.initialProps,u={captionLayout:"buttons",classNames:ty,formatters:tb,labels:tx,locale:eV,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},d=(t=s.fromYear,n=s.toYear,r=s.fromMonth,o=s.toMonth,i=s.fromDate,a=s.toDate,r?i=ec(r):t&&(i=new Date(t,0,1)),o?a=e3(o):n&&(a=new Date(n,11,31)),{fromDate:i?ea(i):void 0,toDate:a?ea(a):void 0}),f=d.fromDate,p=d.toDate,h=null!==(l=s.captionLayout)&&void 0!==l?l:u.captionLayout;"buttons"===h||f&&p||(h="buttons"),(tv(s)||tm(s)||tg(s))&&(c=s.onSelect);var m=tu(tu(tu({},u),s),{captionLayout:h,classNames:tu(tu({},u.classNames),s.classNames),components:tu({},s.components),formatters:tu(tu({},u.formatters),s.formatters),fromDate:f,labels:tu(tu({},u.labels),s.labels),mode:s.mode||u.mode,modifiers:tu(tu({},u.modifiers),s.modifiers),modifiersClassNames:tu(tu({},u.modifiersClassNames),s.modifiersClassNames),onSelect:c,styles:tu(tu({},u.styles),s.styles),toDate:p});return th.jsx(tw.Provider,{value:m,children:e.children})}function tk(){var e=(0,d.useContext)(tw);if(!e)throw Error("useDayPicker must be used within a DayPickerProvider.");return e}function tE(e){var t=tk(),n=t.locale,r=t.classNames,o=t.styles,i=t.formatters.formatCaption;return th.jsx("div",{className:r.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:n})})}function tC(e){return th.jsx("svg",tu({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:th.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function tO(e){var t,n,r=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,c=e.style,s=tk(),u=null!==(n=null===(t=s.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==n?n:tC;return th.jsxs("div",{className:l,style:c,children:[th.jsx("span",{className:s.classNames.vhidden,children:e["aria-label"]}),th.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:s.classNames.dropdown,style:s.styles.dropdown,value:o,onChange:r,children:i}),th.jsxs("div",{className:s.classNames.caption_label,style:s.styles.caption_label,"aria-hidden":"true",children:[a,th.jsx(u,{className:s.classNames.dropdown_icon,style:s.styles.dropdown_icon})]})]})}function tj(e){var t,n=tk(),r=n.fromDate,o=n.toDate,i=n.styles,a=n.locale,l=n.formatters.formatMonthCaption,c=n.classNames,s=n.components,u=n.labels.labelMonthDropdown;if(!r||!o)return th.jsx(th.Fragment,{});var d=[];if(function(e,t){(0,ei.Z)(2,arguments);var n=(0,eo.Z)(e),r=(0,eo.Z)(t);return n.getFullYear()===r.getFullYear()}(r,o))for(var f=ec(r),p=r.getMonth();p<=o.getMonth();p++)d.push(e5(f,p));else for(var f=ec(new Date),p=0;p<=11;p++)d.push(e5(f,p));var h=null!==(t=null==s?void 0:s.Dropdown)&&void 0!==t?t:tO;return th.jsx(h,{name:"months","aria-label":u(),className:c.dropdown_month,style:i.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=e5(ec(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:d.map(function(e){return th.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())})})}function tP(e){var t,n=e.displayMonth,r=tk(),o=r.fromDate,i=r.toDate,a=r.locale,l=r.styles,c=r.classNames,s=r.components,u=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,f=[];if(!o||!i)return th.jsx(th.Fragment,{});for(var p=o.getFullYear(),h=i.getFullYear(),m=p;m<=h;m++)f.push(e8(eb(new Date),m));var g=null!==(t=null==s?void 0:s.Dropdown)&&void 0!==t?t:tO;return th.jsx(g,{name:"years","aria-label":d(),className:c.dropdown_year,style:l.dropdown_year,onChange:function(t){var r=e8(ec(n),Number(t.target.value));e.onChange(r)},value:n.getFullYear(),caption:u(n,{locale:a}),children:f.map(function(e){return th.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())})})}var tN=(0,d.createContext)(void 0);function tM(e){var t,n,r,o,i,a,l,c,s,u,f,p,h,m,g,v,y=tk(),b=(g=(r=(n=t=tk()).month,o=n.defaultMonth,i=n.today,a=r||o||i||new Date,l=n.toDate,c=n.fromDate,s=n.numberOfMonths,l&&0>e7(l,a)&&(a=(0,ev.Z)(l,-1*((void 0===s?1:s)-1))),c&&0>e7(a,c)&&(a=c),u=ec(a),f=t.month,h=(p=(0,d.useState)(u))[0],m=[void 0===f?h:f,p[1]])[0],v=m[1],[g,function(e){if(!t.disableNavigation){var n,r=ec(e);v(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]),x=b[0],w=b[1],S=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=ec(e),i=e7(ec((0,ev.Z)(o,r)),o),a=[],l=0;l<i;l++){var c=(0,ev.Z)(o,l);a.push(c)}return n&&(a=a.reverse()),a}(x,y),k=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=ec(e);if(!n||!(e7(n,e)<i))return(0,ev.Z)(a,r?i:1)}}(x,y),E=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,o=t.numberOfMonths,i=ec(e);if(!n||!(0>=e7(i,n)))return(0,ev.Z)(i,-(r?void 0===o?1:o:1))}}(x,y),C=function(e){return S.some(function(t){return e9(e,t)})};return th.jsx(tN.Provider,{value:{currentMonth:x,displayMonths:S,goToMonth:w,goToDate:function(e,t){C(e)||(t&&te(e,t)?w((0,ev.Z)(e,1+-1*y.numberOfMonths)):w(e))},previousMonth:E,nextMonth:k,isDateDisplayed:C},children:e.children})}function tI(){var e=(0,d.useContext)(tN);if(!e)throw Error("useNavigation must be used within a NavigationProvider");return e}function tR(e){var t,n=tk(),r=n.classNames,o=n.styles,i=n.components,a=tI().goToMonth,l=function(t){a((0,ev.Z)(t,e.displayIndex?-e.displayIndex:0))},c=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:tE,s=th.jsx(c,{id:e.id,displayMonth:e.displayMonth});return th.jsxs("div",{className:r.caption_dropdowns,style:o.caption_dropdowns,children:[th.jsx("div",{className:r.vhidden,children:s}),th.jsx(tj,{onChange:l,displayMonth:e.displayMonth}),th.jsx(tP,{onChange:l,displayMonth:e.displayMonth})]})}function tT(e){return th.jsx("svg",tu({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:th.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function tA(e){return th.jsx("svg",tu({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:th.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var t_=(0,d.forwardRef)(function(e,t){var n=tk(),r=n.classNames,o=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var a=i.join(" "),l=tu(tu({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),th.jsx("button",tu({},e,{ref:t,type:"button",className:a,style:l}))});function tD(e){var t,n,r=tk(),o=r.dir,i=r.locale,a=r.classNames,l=r.styles,c=r.labels,s=c.labelPrevious,u=c.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return th.jsx(th.Fragment,{});var f=s(e.previousMonth,{locale:i}),p=[a.nav_button,a.nav_button_previous].join(" "),h=u(e.nextMonth,{locale:i}),m=[a.nav_button,a.nav_button_next].join(" "),g=null!==(t=null==d?void 0:d.IconRight)&&void 0!==t?t:tA,v=null!==(n=null==d?void 0:d.IconLeft)&&void 0!==n?n:tT;return th.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&th.jsx(t_,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?th.jsx(g,{className:a.nav_icon,style:l.nav_icon}):th.jsx(v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&th.jsx(t_,{name:"next-month","aria-label":h,className:m,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?th.jsx(v,{className:a.nav_icon,style:l.nav_icon}):th.jsx(g,{className:a.nav_icon,style:l.nav_icon})})]})}function tZ(e){var t=tk().numberOfMonths,n=tI(),r=n.previousMonth,o=n.nextMonth,i=n.goToMonth,a=n.displayMonths,l=a.findIndex(function(t){return e9(e.displayMonth,t)}),c=0===l,s=l===a.length-1;return th.jsx(tD,{displayMonth:e.displayMonth,hideNext:t>1&&(c||!s),hidePrevious:t>1&&(s||!c),nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&i(r)},onNextClick:function(){o&&i(o)}})}function tL(e){var t,n,r=tk(),o=r.classNames,i=r.disableNavigation,a=r.styles,l=r.captionLayout,c=r.components,s=null!==(t=null==c?void 0:c.CaptionLabel)&&void 0!==t?t:tE;return n=i?th.jsx(s,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?th.jsx(tR,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?th.jsxs(th.Fragment,{children:[th.jsx(tR,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),th.jsx(tZ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):th.jsxs(th.Fragment,{children:[th.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),th.jsx(tZ,{displayMonth:e.displayMonth,id:e.id})]}),th.jsx("div",{className:o.caption,style:a.caption,children:n})}function tz(e){var t=tk(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?th.jsx("tfoot",{className:o,style:r.tfoot,children:th.jsx("tr",{children:th.jsx("td",{colSpan:8,children:n})})}):th.jsx(th.Fragment,{})}function tB(){var e=tk(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,s=function(e,t,n){for(var r=n?tn(new Date):tt(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=(0,eh.Z)(r,i);o.push(a)}return o}(o,i,a);return th.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&th.jsx("td",{style:n.head_cell,className:t.head_cell}),s.map(function(e,r){return th.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(e,{locale:o}),children:l(e,{locale:o})},r)})]})}function tF(){var e,t=tk(),n=t.classNames,r=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:tB;return th.jsx("thead",{style:r.head,className:n.head,children:th.jsx(i,{})})}function tH(e){var t=tk(),n=t.locale,r=t.formatters.formatDay;return th.jsx(th.Fragment,{children:r(e.date,{locale:n})})}var tq=(0,d.createContext)(void 0);function tW(e){return tm(e.initialProps)?th.jsx(tK,{initialProps:e.initialProps,children:e.children}):th.jsx(tq.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}function tK(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,a={disabled:[]};return r&&a.disabled.push(function(e){var t=i&&r.length>i-1,n=r.some(function(t){return tr(t,e)});return!!(t&&!n)}),th.jsx(tq.Provider,{value:{selected:r,onDayClick:function(e,n,a){if(null===(l=t.onDayClick)||void 0===l||l.call(t,e,n,a),(!n.selected||!o||(null==r?void 0:r.length)!==o)&&(n.selected||!i||(null==r?void 0:r.length)!==i)){var l,c,s=r?td([],r,!0):[];if(n.selected){var u=s.findIndex(function(t){return tr(e,t)});s.splice(u,1)}else s.push(e);null===(c=t.onSelect)||void 0===c||c.call(t,s,e,n,a)}},modifiers:a},children:n})}function tV(){var e=(0,d.useContext)(tq);if(!e)throw Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var tU=(0,d.createContext)(void 0);function tG(e){return tg(e.initialProps)?th.jsx(tX,{initialProps:e.initialProps,children:e.children}):th.jsx(tU.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}function tX(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,a=o.to,l=t.min,c=t.max,s={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(s.range_start=[i],a?(s.range_end=[a],tr(i,a)||(s.range_middle=[{after:i,before:a}])):s.range_end=[i]):a&&(s.range_start=[a],s.range_end=[a]),l&&(i&&!a&&s.disabled.push({after:eg(i,l-1),before:(0,eh.Z)(i,l-1)}),i&&a&&s.disabled.push({after:i,before:(0,eh.Z)(i,l-1)}),!i&&a&&s.disabled.push({after:eg(a,l-1),before:(0,eh.Z)(a,l-1)})),c){if(i&&!a&&(s.disabled.push({before:(0,eh.Z)(i,-c+1)}),s.disabled.push({after:(0,eh.Z)(i,c-1)})),i&&a){var u=c-(ti(a,i)+1);s.disabled.push({before:eg(i,u)}),s.disabled.push({after:(0,eh.Z)(a,u)})}!i&&a&&(s.disabled.push({before:(0,eh.Z)(a,-c+1)}),s.disabled.push({after:(0,eh.Z)(a,c-1)}))}return th.jsx(tU.Provider,{value:{selected:r,onDayClick:function(e,n,o){null===(c=t.onDayClick)||void 0===c||c.call(t,e,n,o);var i,a,l,c,s,u=(a=(i=r||{}).from,l=i.to,a&&l?tr(l,e)&&tr(a,e)?void 0:tr(l,e)?{from:l,to:void 0}:tr(a,e)?void 0:to(a,e)?{from:e,to:l}:{from:a,to:e}:l?to(e,l)?{from:l,to:e}:{from:e,to:l}:a?te(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0});null===(s=t.onSelect)||void 0===s||s.call(t,u,e,n,o)},modifiers:s},children:n})}function t$(){var e=(0,d.useContext)(tU);if(!e)throw Error("useSelectRange must be used within a SelectRangeProvider");return e}function tY(e){return Array.isArray(e)?td([],e,!0):void 0!==e?[e]:[]}(l=s||(s={})).Outside="outside",l.Disabled="disabled",l.Selected="selected",l.Hidden="hidden",l.Today="today",l.RangeStart="range_start",l.RangeEnd="range_end",l.RangeMiddle="range_middle";var tQ=s.Selected,tJ=s.Disabled,t0=s.Hidden,t1=s.Today,t2=s.RangeEnd,t6=s.RangeMiddle,t4=s.RangeStart,t3=s.Outside,t5=(0,d.createContext)(void 0);function t8(e){var t,n,r,o=tk(),i=tV(),a=t$(),l=((t={})[tQ]=tY(o.selected),t[tJ]=tY(o.disabled),t[t0]=tY(o.hidden),t[t1]=[o.today],t[t2]=[],t[t6]=[],t[t4]=[],t[t3]=[],o.fromDate&&t[tJ].push({before:o.fromDate}),o.toDate&&t[tJ].push({after:o.toDate}),tm(o)?t[tJ]=t[tJ].concat(i.modifiers[tJ]):tg(o)&&(t[tJ]=t[tJ].concat(a.modifiers[tJ]),t[t4]=a.modifiers[t4],t[t6]=a.modifiers[t6],t[t2]=a.modifiers[t2]),t),c=(n=o.modifiers,r={},Object.entries(n).forEach(function(e){var t=e[0],n=e[1];r[t]=tY(n)}),r),s=tu(tu({},l),c);return th.jsx(t5.Provider,{value:s,children:e.children})}function t7(){var e=(0,d.useContext)(t5);if(!e)throw Error("useModifiers must be used within a ModifiersProvider");return e}function t9(e,t,n){var r=Object.keys(t).reduce(function(n,r){return t[r].some(function(t){if("boolean"==typeof t)return t;if(ex(t))return tr(e,t);if(Array.isArray(t)&&t.every(ex))return t.includes(e);if(t&&"object"==typeof t&&"from"in t)return r=t.from,o=t.to,r&&o?(0>ti(o,r)&&(r=(n=[o,r])[0],o=n[1]),ti(e,r)>=0&&ti(o,e)>=0):o?tr(o,e):!!r&&tr(r,e);if(t&&"object"==typeof t&&"dayOfWeek"in t)return t.dayOfWeek.includes(e.getDay());if(t&&"object"==typeof t&&"before"in t&&"after"in t){var n,r,o,i=ti(t.before,e),a=ti(t.after,e),l=i>0,c=a<0;return to(t.before,t.after)?c&&l:l||c}return t&&"object"==typeof t&&"after"in t?ti(e,t.after)>0:t&&"object"==typeof t&&"before"in t?ti(t.before,e)>0:"function"==typeof t&&t(e)})&&n.push(r),n},[]),o={};return r.forEach(function(e){return o[e]=!0}),n&&!e9(e,n)&&(o.outside=!0),o}var ne=(0,d.createContext)(void 0);function nt(e){var t=tI(),n=t7(),r=(0,d.useState)(),o=r[0],i=r[1],a=(0,d.useState)(),l=a[0],c=a[1],s=function(e,t){for(var n,r,o=ec(e[0]),i=e3(e[e.length-1]),a=o;a<=i;){var l=t9(a,t);if(!(!l.disabled&&!l.hidden)){a=(0,eh.Z)(a,1);continue}if(l.selected)return a;l.today&&!r&&(r=a),n||(n=a),a=(0,eh.Z)(a,1)}return r||n}(t.displayMonths,n),u=(null!=o?o:l&&t.isDateDisplayed(l))?l:s,f=function(e){i(e)},p=tk(),h=function(e,r){if(o){var i=function e(t,n){var r=n.moveBy,o=n.direction,i=n.context,a=n.modifiers,l=n.retry,c=void 0===l?{count:0,lastFocused:t}:l,s=i.weekStartsOn,u=i.fromDate,d=i.toDate,f=i.locale,p=({day:eh.Z,week:ta,month:ev.Z,year:tl,startOfWeek:function(e){return i.ISOWeek?tn(e):tt(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return i.ISOWeek?ts(e):tc(e,{locale:f,weekStartsOn:s})}})[r](t,"after"===o?1:-1);"before"===o&&u?p=ef([u,p]):"after"===o&&d&&(p=ep([d,p]));var h=!0;if(a){var m=t9(p,a);h=!m.disabled&&!m.hidden}return h?p:c.count>365?c.lastFocused:e(p,{moveBy:r,direction:o,context:i,modifiers:a,retry:tu(tu({},c),{count:c.count+1})})}(o,{moveBy:e,direction:r,context:p,modifiers:n});tr(o,i)||(t.goToDate(i,o),f(i))}};return th.jsx(ne.Provider,{value:{focusedDay:o,focusTarget:u,blur:function(){c(o),i(void 0)},focus:f,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}},children:e.children})}function nn(){var e=(0,d.useContext)(ne);if(!e)throw Error("useFocusContext must be used within a FocusProvider");return e}var nr=(0,d.createContext)(void 0);function no(e){return tv(e.initialProps)?th.jsx(ni,{initialProps:e.initialProps,children:e.children}):th.jsx(nr.Provider,{value:{selected:void 0},children:e.children})}function ni(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var o,i,a;if(null===(o=t.onDayClick)||void 0===o||o.call(t,e,n,r),n.selected&&!t.required){null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,n,r);return}null===(a=t.onSelect)||void 0===a||a.call(t,e,e,n,r)}};return th.jsx(nr.Provider,{value:r,children:n})}function na(){var e=(0,d.useContext)(nr);if(!e)throw Error("useSelectSingle must be used within a SelectSingleProvider");return e}function nl(e){var t,n,r,o,i,a,l,c,u,f,p,h,m,g,v,y,b,x,w,S,k,E,C,O,j,P,N,M,I,R,T,A,_,D,Z,L,z,B,F,H,q,W,K=(0,d.useRef)(null),V=(t=e.date,n=e.displayMonth,a=tk(),l=nn(),c=t9(t,t7(),n),u=tk(),f=na(),p=tV(),h=t$(),g=(m=nn()).focusDayAfter,v=m.focusDayBefore,y=m.focusWeekAfter,b=m.focusWeekBefore,x=m.blur,w=m.focus,S=m.focusMonthBefore,k=m.focusMonthAfter,E=m.focusYearBefore,C=m.focusYearAfter,O=m.focusStartOfWeek,j=m.focusEndOfWeek,P={onClick:function(e){var n,r,o,i;tv(u)?null===(n=f.onDayClick)||void 0===n||n.call(f,t,c,e):tm(u)?null===(r=p.onDayClick)||void 0===r||r.call(p,t,c,e):tg(u)?null===(o=h.onDayClick)||void 0===o||o.call(h,t,c,e):null===(i=u.onDayClick)||void 0===i||i.call(u,t,c,e)},onFocus:function(e){var n;w(t),null===(n=u.onDayFocus)||void 0===n||n.call(u,t,c,e)},onBlur:function(e){var n;x(),null===(n=u.onDayBlur)||void 0===n||n.call(u,t,c,e)},onKeyDown:function(e){var n;switch(e.key){case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===u.dir?g():v();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===u.dir?v():g();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),y();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),b();break;case"PageUp":e.preventDefault(),e.stopPropagation(),e.shiftKey?E():S();break;case"PageDown":e.preventDefault(),e.stopPropagation(),e.shiftKey?C():k();break;case"Home":e.preventDefault(),e.stopPropagation(),O();break;case"End":e.preventDefault(),e.stopPropagation(),j()}null===(n=u.onDayKeyDown)||void 0===n||n.call(u,t,c,e)},onKeyUp:function(e){var n;null===(n=u.onDayKeyUp)||void 0===n||n.call(u,t,c,e)},onMouseEnter:function(e){var n;null===(n=u.onDayMouseEnter)||void 0===n||n.call(u,t,c,e)},onMouseLeave:function(e){var n;null===(n=u.onDayMouseLeave)||void 0===n||n.call(u,t,c,e)},onPointerEnter:function(e){var n;null===(n=u.onDayPointerEnter)||void 0===n||n.call(u,t,c,e)},onPointerLeave:function(e){var n;null===(n=u.onDayPointerLeave)||void 0===n||n.call(u,t,c,e)},onTouchCancel:function(e){var n;null===(n=u.onDayTouchCancel)||void 0===n||n.call(u,t,c,e)},onTouchEnd:function(e){var n;null===(n=u.onDayTouchEnd)||void 0===n||n.call(u,t,c,e)},onTouchMove:function(e){var n;null===(n=u.onDayTouchMove)||void 0===n||n.call(u,t,c,e)},onTouchStart:function(e){var n;null===(n=u.onDayTouchStart)||void 0===n||n.call(u,t,c,e)}},N=tk(),M=na(),I=tV(),R=t$(),T=tv(N)?M.selected:tm(N)?I.selected:tg(N)?R.selected:void 0,A=!!(a.onDayClick||"default"!==a.mode),(0,d.useEffect)(function(){var e;!c.outside&&l.focusedDay&&A&&tr(l.focusedDay,t)&&(null===(e=K.current)||void 0===e||e.focus())},[l.focusedDay,t,K,A,c.outside]),D=(_=[a.classNames.day],Object.keys(c).forEach(function(e){var t=a.modifiersClassNames[e];if(t)_.push(t);else if(Object.values(s).includes(e)){var n=a.classNames["day_".concat(e)];n&&_.push(n)}}),_).join(" "),Z=tu({},a.styles.day),Object.keys(c).forEach(function(e){var t;Z=tu(tu({},Z),null===(t=a.modifiersStyles)||void 0===t?void 0:t[e])}),L=Z,z=!!(c.outside&&!a.showOutsideDays||c.hidden),B=null!==(i=null===(o=a.components)||void 0===o?void 0:o.DayContent)&&void 0!==i?i:tH,F={style:L,className:D,children:th.jsx(B,{date:t,displayMonth:n,activeModifiers:c}),role:"gridcell"},H=l.focusTarget&&tr(l.focusTarget,t)&&!c.outside,q=l.focusedDay&&tr(l.focusedDay,t),W=tu(tu(tu({},F),((r={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,r.tabIndex=q||H?0:-1,r)),P),{isButton:A,isHidden:z,activeModifiers:c,selectedDays:T,buttonProps:W,divProps:F});return V.isHidden?th.jsx("div",{role:"gridcell"}):V.isButton?th.jsx(t_,tu({name:"day",ref:K},V.buttonProps)):th.jsx("div",tu({},V.divProps))}function nc(e){var t=e.number,n=e.dates,r=tk(),o=r.onWeekNumberClick,i=r.styles,a=r.classNames,l=r.locale,c=r.labels.labelWeekNumber,s=(0,r.formatters.formatWeekNumber)(Number(t),{locale:l});if(!o)return th.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:s});var u=c(Number(t),{locale:l});return th.jsx(t_,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,n,e)},children:s})}function ns(e){var t,n,r,o=tk(),i=o.styles,a=o.classNames,l=o.showWeekNumber,c=o.components,s=null!==(t=null==c?void 0:c.Day)&&void 0!==t?t:nl,u=null!==(n=null==c?void 0:c.WeekNumber)&&void 0!==n?n:nc;return l&&(r=th.jsx("td",{className:a.cell,style:i.cell,children:th.jsx(u,{number:e.weekNumber,dates:e.dates})})),th.jsxs("tr",{className:a.row,style:i.row,children:[r,e.dates.map(function(t){return th.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:th.jsx(s,{displayMonth:e.displayMonth,date:t})},function(e){return(0,ei.Z)(1,arguments),Math.floor(function(e){return(0,ei.Z)(1,arguments),(0,eo.Z)(e).getTime()}(e)/1e3)}(t))})]})}function nu(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?ts(t):tc(t,n),o=(null==n?void 0:n.ISOWeek)?tn(e):tt(e,n),i=ti(r,o),a=[],l=0;l<=i;l++)a.push((0,eh.Z)(o,l));return a.reduce(function(e,t){var r=(null==n?void 0:n.ISOWeek)?function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e);return Math.round((tn(t).getTime()-(function(e){(0,ei.Z)(1,arguments);var t=function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=tn(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=tn(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),tn(n)})(t).getTime())/6048e5)+1}(t):function(e,t){(0,ei.Z)(1,arguments);var n=(0,eo.Z)(e);return Math.round((tt(n,t).getTime()-(function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:ek.firstWeekContainsDate)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1),d=function(e,t){(0,ei.Z)(1,arguments);var n,r,o,i,a,l,c,s,u=(0,eo.Z)(e),d=u.getFullYear(),f=(0,em.Z)(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(a=t.locale)||void 0===a?void 0:null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:ek.firstWeekContainsDate)&&void 0!==r?r:null===(c=ek.locale)||void 0===c?void 0:null===(s=c.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(d+1,0,f),p.setHours(0,0,0,0);var h=tt(p,t),m=new Date(0);m.setFullYear(d,0,f),m.setHours(0,0,0,0);var g=tt(m,t);return u.getTime()>=h.getTime()?d+1:u.getTime()>=g.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(d,0,u),f.setHours(0,0,0,0),tt(f,t)})(n,t).getTime())/6048e5)+1}(t,n),o=e.find(function(e){return e.weekNumber===r});return o?o.dates.push(t):e.push({weekNumber:r,dates:[t]}),e},[])}function nd(e){var t,n,r,o=tk(),i=o.locale,a=o.classNames,l=o.styles,c=o.hideHead,s=o.fixedWeeks,u=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,p=o.ISOWeek,h=function(e,t){var n=nu(ec(e),e3(e),t);if(null==t?void 0:t.useFixedWeeks){var r=function(e,t){return(0,ei.Z)(1,arguments),function(e,t,n){(0,ei.Z)(2,arguments);var r=tt(e,n),o=tt(t,n);return Math.round((r.getTime()-eD(r)-(o.getTime()-eD(o)))/6048e5)}(function(e){(0,ei.Z)(1,arguments);var t=(0,eo.Z)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),ec(e),t)+1}(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=ta(i,6-r),l=nu(ta(i,1),a,t);n.push.apply(n,l)}}return n}(e.displayMonth,{useFixedWeeks:!!s,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),m=null!==(t=null==u?void 0:u.Head)&&void 0!==t?t:tF,g=null!==(n=null==u?void 0:u.Row)&&void 0!==n?n:ns,v=null!==(r=null==u?void 0:u.Footer)&&void 0!==r?r:tz;return th.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&th.jsx(m,{}),th.jsx("tbody",{className:a.tbody,style:l.tbody,children:h.map(function(t){return th.jsx(g,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),th.jsx(v,{displayMonth:e.displayMonth})]})}var nf="undefined"!=typeof window&&window.document&&window.document.createElement?d.useLayoutEffect:d.useEffect,np=!1,nh=0;function nm(){return"react-day-picker-".concat(++nh)}function ng(e){var t,n,r,o,i,a,l,c,s=tk(),u=s.dir,f=s.classNames,p=s.styles,h=s.components,m=tI().displayMonths,g=(r=null!=(t=s.id?"".concat(s.id,"-").concat(e.displayIndex):void 0)?t:np?nm():null,i=(o=(0,d.useState)(r))[0],a=o[1],nf(function(){null===i&&a(nm())},[]),(0,d.useEffect)(function(){!1===np&&(np=!0)},[]),null!==(n=null!=t?t:i)&&void 0!==n?n:void 0),v=s.id?"".concat(s.id,"-grid-").concat(e.displayIndex):void 0,y=[f.month],b=p.month,x=0===e.displayIndex,w=e.displayIndex===m.length-1,S=!x&&!w;"rtl"===u&&(w=(l=[x,w])[0],x=l[1]),x&&(y.push(f.caption_start),b=tu(tu({},b),p.caption_start)),w&&(y.push(f.caption_end),b=tu(tu({},b),p.caption_end)),S&&(y.push(f.caption_between),b=tu(tu({},b),p.caption_between));var k=null!==(c=null==h?void 0:h.Caption)&&void 0!==c?c:tL;return th.jsxs("div",{className:y.join(" "),style:b,children:[th.jsx(k,{id:g,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),th.jsx(nd,{id:v,"aria-labelledby":g,displayMonth:e.displayMonth})]},e.displayIndex)}function nv(e){var t=tk(),n=t.classNames,r=t.styles;return th.jsx("div",{className:n.months,style:r.months,children:e.children})}function ny(e){var t,n,r=e.initialProps,o=tk(),i=nn(),a=tI(),l=(0,d.useState)(!1),c=l[0],s=l[1];(0,d.useEffect)(function(){o.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),s(!0)))},[o.initialFocus,c,i.focus,i.focusTarget,i]);var u=[o.classNames.root,o.className];o.numberOfMonths>1&&u.push(o.classNames.multiple_months),o.showWeekNumber&&u.push(o.classNames.with_weeknumber);var f=tu(tu({},o.styles.root),o.style),p=Object.keys(r).filter(function(e){return e.startsWith("data-")}).reduce(function(e,t){var n;return tu(tu({},e),((n={})[t]=r[t],n))},{}),h=null!==(n=null===(t=r.components)||void 0===t?void 0:t.Months)&&void 0!==n?n:nv;return th.jsx("div",tu({className:u.join(" "),style:f,dir:o.dir,id:o.id,nonce:r.nonce,title:r.title,lang:r.lang},p,{children:th.jsx(h,{children:a.displayMonths.map(function(e,t){return th.jsx(ng,{displayIndex:t,displayMonth:e},t)})})}))}function nb(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(e,["children"]);return th.jsx(tS,{initialProps:n,children:th.jsx(tM,{children:th.jsx(no,{initialProps:n,children:th.jsx(tW,{initialProps:n,children:th.jsx(tG,{initialProps:n,children:th.jsx(t8,{children:th.jsx(nt,{children:t})})})})})})})}function nx(e){return th.jsx(nb,tu({},e,{children:th.jsx(ny,{initialProps:e})}))}let nw=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"}))},nS=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"}))},nk=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"}))},nE=e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"}))};var nC=n(84264);n(41649);var nO=n(1526),nj=n(7084),nP=n(26898);let nN={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-1",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-1.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-lg"},xl:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-xl"}},nM={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},nI={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},nR={[nj.wu.Increase]:{bgColor:(0,eJ.bM)(nj.fr.Emerald,nP.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Emerald,nP.K.text).textColor},[nj.wu.ModerateIncrease]:{bgColor:(0,eJ.bM)(nj.fr.Emerald,nP.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Emerald,nP.K.text).textColor},[nj.wu.Decrease]:{bgColor:(0,eJ.bM)(nj.fr.Rose,nP.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Rose,nP.K.text).textColor},[nj.wu.ModerateDecrease]:{bgColor:(0,eJ.bM)(nj.fr.Rose,nP.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Rose,nP.K.text).textColor},[nj.wu.Unchanged]:{bgColor:(0,eJ.bM)(nj.fr.Orange,nP.K.background).bgColor,textColor:(0,eJ.bM)(nj.fr.Orange,nP.K.text).textColor}},nT={[nj.wu.Increase]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z"}))},[nj.wu.ModerateIncrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z"}))},[nj.wu.Decrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z"}))},[nj.wu.ModerateDecrease]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M14.5895 16.0032L5.98291 7.39664L7.39712 5.98242L16.0037 14.589V7.00324H18.0037V18.0032H7.00373V16.0032H14.5895Z"}))},[nj.wu.Unchanged]:e=>{var t=(0,u._T)(e,[]);return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),d.createElement("path",{d:"M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z"}))}},nA=(0,eJ.fn)("BadgeDelta");d.forwardRef((e,t)=>{let{deltaType:n=nj.wu.Increase,isIncreasePositive:r=!0,size:o=nj.u8.SM,tooltip:i,children:a,className:l}=e,c=(0,u._T)(e,["deltaType","isIncreasePositive","size","tooltip","children","className"]),s=nT[n],f=(0,eJ.Fo)(n,r),p=a?nM:nN,{tooltipProps:h,getReferenceProps:m}=(0,nO.l)();return d.createElement("span",Object.assign({ref:(0,eJ.lq)([t,h.refs.setReference]),className:(0,es.q)(nA("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full bg-opacity-20 dark:bg-opacity-25",nR[f].bgColor,nR[f].textColor,p[o].paddingX,p[o].paddingY,p[o].fontSize,l)},m,c),d.createElement(nO.Z,Object.assign({text:i},h)),d.createElement(s,{className:(0,es.q)(nA("icon"),"shrink-0",a?(0,es.q)("-ml-1 mr-1.5"):nI[o].height,nI[o].width)}),a?d.createElement("p",{className:(0,es.q)(nA("text"),"text-sm whitespace-nowrap")},a):null)}).displayName="BadgeDelta";var n_=n(47323);let nD=e=>{var{onClick:t,icon:n}=e,r=(0,u._T)(e,["onClick","icon"]);return d.createElement("button",Object.assign({type:"button",className:(0,es.q)("flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle select-none dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content")},r),d.createElement(n_.Z,{onClick:t,icon:n,variant:"simple",color:"slate",size:"sm"}))};function nZ(e){var{mode:t,defaultMonth:n,selected:r,onSelect:o,locale:i,disabled:a,enableYearNavigation:l,classNames:c,weekStartsOn:s=0}=e,f=(0,u._T)(e,["mode","defaultMonth","selected","onSelect","locale","disabled","enableYearNavigation","classNames","weekStartsOn"]);return d.createElement(nx,Object.assign({showOutsideDays:!0,mode:t,defaultMonth:n,selected:r,onSelect:o,locale:i,disabled:a,weekStartsOn:s,classNames:Object.assign({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-2 relative items-center",caption_label:"text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium",nav:"space-x-1 flex items-center",nav_button:"flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content",nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"w-9 font-normal text-center text-tremor-content-subtle dark:text-dark-tremor-content-subtle",row:"flex w-full mt-0.5",cell:"text-center p-0 relative focus-within:relative text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",day:"h-9 w-9 p-0 hover:bg-tremor-background-subtle dark:hover:bg-dark-tremor-background-subtle outline-tremor-brand dark:outline-dark-tremor-brand rounded-tremor-default",day_today:"font-bold",day_selected:"aria-selected:bg-tremor-background-emphasis aria-selected:text-tremor-content-inverted dark:aria-selected:bg-dark-tremor-background-emphasis dark:aria-selected:text-dark-tremor-content-inverted ",day_disabled:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle disabled:hover:bg-transparent",day_outside:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle"},c),components:{IconLeft:e=>{var t=(0,u._T)(e,[]);return d.createElement(nw,Object.assign({className:"h-4 w-4"},t))},IconRight:e=>{var t=(0,u._T)(e,[]);return d.createElement(nS,Object.assign({className:"h-4 w-4"},t))},Caption:e=>{var t=(0,u._T)(e,[]);let{goToMonth:n,nextMonth:r,previousMonth:o,currentMonth:a}=tI();return d.createElement("div",{className:"flex justify-between items-center"},d.createElement("div",{className:"flex items-center space-x-1"},l&&d.createElement(nD,{onClick:()=>a&&n(tl(a,-1)),icon:nk}),d.createElement(nD,{onClick:()=>o&&n(o),icon:nw})),d.createElement(nC.Z,{className:"text-tremor-default tabular-nums capitalize text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium"},eQ(t.displayMonth,"LLLL yyy",{locale:i})),d.createElement("div",{className:"flex items-center space-x-1"},d.createElement(nD,{onClick:()=>r&&n(r),icon:nS}),l&&d.createElement(nD,{onClick:()=>a&&n(tl(a,1)),icon:nE})))}}},f))}nZ.displayName="DateRangePicker",n(27281);var nL=n(57365),nz=n(44140);let nB=el(),nF=d.forwardRef((e,t)=>{var n,r;let{value:o,defaultValue:i,onValueChange:a,enableSelect:l=!0,minDate:c,maxDate:s,placeholder:f="Select range",selectPlaceholder:p="Select range",disabled:h=!1,locale:m=eV,enableClear:g=!0,displayFormat:v,children:y,className:b,enableYearNavigation:x=!1,weekStartsOn:w=0,disabledDates:S}=e,k=(0,u._T)(e,["value","defaultValue","onValueChange","enableSelect","minDate","maxDate","placeholder","selectPlaceholder","disabled","locale","enableClear","displayFormat","children","className","enableYearNavigation","weekStartsOn","disabledDates"]),[E,C]=(0,nz.Z)(i,o),[O,j]=(0,d.useState)(!1),[P,N]=(0,d.useState)(!1),M=(0,d.useMemo)(()=>{let e=[];return c&&e.push({before:c}),s&&e.push({after:s}),[...e,...null!=S?S:[]]},[c,s,S]),I=(0,d.useMemo)(()=>{let e=new Map;return y?d.Children.forEach(y,t=>{var n;e.set(t.props.value,{text:null!==(n=(0,eu.qg)(t))&&void 0!==n?n:t.props.value,from:t.props.from,to:t.props.to})}):e6.forEach(t=>{e.set(t.value,{text:t.text,from:t.from,to:nB})}),e},[y]),R=(0,d.useMemo)(()=>{if(y)return(0,eu.sl)(y);let e=new Map;return e6.forEach(t=>e.set(t.value,t.text)),e},[y]),T=(null==E?void 0:E.selectValue)||"",A=e1(null==E?void 0:E.from,c,T,I),_=e2(null==E?void 0:E.to,s,T,I),D=A||_?e4(A,_,m,v):f,Z=ec(null!==(r=null!==(n=null!=_?_:A)&&void 0!==n?n:s)&&void 0!==r?r:nB),L=g&&!h;return d.createElement("div",Object.assign({ref:t,className:(0,es.q)("w-full min-w-[10rem] relative flex justify-between text-tremor-default max-w-sm shadow-tremor-input dark:shadow-dark-tremor-input rounded-tremor-default",b)},k),d.createElement(J,{as:"div",className:(0,es.q)("w-full",l?"rounded-l-tremor-default":"rounded-tremor-default",O&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10")},d.createElement("div",{className:"relative w-full"},d.createElement(J.Button,{onFocus:()=>j(!0),onBlur:()=>j(!1),disabled:h,className:(0,es.q)("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-l-tremor-default flex flex-nowrap border pl-3 py-2","rounded-l-tremor-default border-tremor-border text-tremor-content-emphasis focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",l?"rounded-l-tremor-default":"rounded-tremor-default",L?"pr-8":"pr-4",(0,eu.um)((0,eu.Uh)(A||_),h))},d.createElement(en,{className:(0,es.q)(e0("calendarIcon"),"flex-none shrink-0 h-5 w-5 -ml-0.5 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle"),"aria-hidden":"true"}),d.createElement("p",{className:"truncate"},D)),L&&A?d.createElement("button",{type:"button",className:(0,es.q)("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100 mr-4"),onClick:e=>{e.preventDefault(),null==a||a({}),C({})}},d.createElement(er.Z,{className:(0,es.q)(e0("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null),d.createElement(ee.u,{className:"absolute z-10 min-w-min left-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},d.createElement(J.Panel,{focus:!0,className:(0,es.q)("divide-y overflow-y-auto outline-none rounded-tremor-default p-3 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},d.createElement(nZ,Object.assign({mode:"range",showOutsideDays:!0,defaultMonth:Z,selected:{from:A,to:_},onSelect:e=>{null==a||a({from:null==e?void 0:e.from,to:null==e?void 0:e.to}),C({from:null==e?void 0:e.from,to:null==e?void 0:e.to})},locale:m,disabled:M,enableYearNavigation:x,classNames:{day_range_middle:(0,es.q)("!rounded-none aria-selected:!bg-tremor-background-subtle aria-selected:dark:!bg-dark-tremor-background-subtle aria-selected:!text-tremor-content aria-selected:dark:!bg-dark-tremor-background-subtle"),day_range_start:"rounded-r-none rounded-l-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted",day_range_end:"rounded-l-none rounded-r-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted"},weekStartsOn:w},e))))),l&&d.createElement(et.R,{as:"div",className:(0,es.q)("w-48 -ml-px rounded-r-tremor-default",P&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10"),value:T,onChange:e=>{let{from:t,to:n}=I.get(e),r=null!=n?n:nB;null==a||a({from:t,to:r,selectValue:e}),C({from:t,to:r,selectValue:e})},disabled:h},e=>{var t;let{value:n}=e;return d.createElement(d.Fragment,null,d.createElement(et.R.Button,{onFocus:()=>N(!0),onBlur:()=>N(!1),className:(0,es.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-r-tremor-default transition duration-100 border px-4 py-2","border-tremor-border shadow-tremor-input text-tremor-content-emphasis focus:border-tremor-brand-subtle","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle",(0,eu.um)((0,eu.Uh)(n),h))},n&&null!==(t=R.get(n))&&void 0!==t?t:p),d.createElement(ee.u,{className:"absolute z-10 w-full inset-x-0 right-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},d.createElement(et.R.Options,{className:(0,es.q)("divide-y overflow-y-auto outline-none border my-1","shadow-tremor-dropdown bg-tremor-background border-tremor-border divide-tremor-border rounded-tremor-default","dark:shadow-dark-tremor-dropdown dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border")},null!=y?y:e6.map(e=>d.createElement(nL.Z,{key:e.value,value:e.value},e.text)))))}))});nF.displayName="DateRangePicker"},92414:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(5853),o=n(2265);n(42698),n(64016),n(8710);var i=n(33232),a=n(44140),l=n(58747);let c=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"}))};var s=n(4537),u=n(28517),d=n(33044);let f=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t),o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};var p=n(65954),h=n(1153),m=n(96398);let g=(0,h.fn)("MultiSelect"),v=o.forwardRef((e,t)=>{let{defaultValue:n,value:h,onValueChange:v,placeholder:y="Select...",placeholderSearch:b="Search",disabled:x=!1,icon:w,children:S,className:k}=e,E=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className"]),[C,O]=(0,a.Z)(n,h),{reactElementChildren:j,optionsAvailable:P}=(0,o.useMemo)(()=>{let e=o.Children.toArray(S).filter(o.isValidElement);return{reactElementChildren:e,optionsAvailable:(0,m.n0)("",e)}},[S]),[N,M]=(0,o.useState)(""),I=(null!=C?C:[]).length>0,R=(0,o.useMemo)(()=>N?(0,m.n0)(N,j):P,[N,j,P]),T=()=>{M("")};return o.createElement(u.R,Object.assign({as:"div",ref:t,defaultValue:C,value:C,onChange:e=>{null==v||v(e),O(e)},disabled:x,className:(0,p.q)("w-full min-w-[10rem] relative text-tremor-default",k)},E,{multiple:!0}),e=>{let{value:t}=e;return o.createElement(o.Fragment,null,o.createElement(u.R.Button,{className:(0,p.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-1.5","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",w?"pl-11 -ml-0.5":"pl-3",(0,m.um)(t.length>0,x))},w&&o.createElement("span",{className:(0,p.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(w,{className:(0,p.q)(g("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("div",{className:"h-6 flex items-center"},t.length>0?o.createElement("div",{className:"flex flex-nowrap overflow-x-scroll [&::-webkit-scrollbar]:hidden [scrollbar-width:none] gap-x-1 mr-5 -ml-1.5 relative"},P.filter(e=>t.includes(e.props.value)).map((e,n)=>{var r;return o.createElement("div",{key:n,className:(0,p.q)("max-w-[100px] lg:max-w-[200px] flex justify-center items-center pl-2 pr-1.5 py-1 font-medium","rounded-tremor-small","bg-tremor-background-muted dark:bg-dark-tremor-background-muted","bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle","text-tremor-content-default dark:text-dark-tremor-content-default","text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis")},o.createElement("div",{className:"text-xs truncate "},null!==(r=e.props.children)&&void 0!==r?r:e.props.value),o.createElement("div",{onClick:n=>{n.preventDefault();let r=t.filter(t=>t!==e.props.value);null==v||v(r),O(r)}},o.createElement(f,{className:(0,p.q)(g("clearIconItem"),"cursor-pointer rounded-tremor-full w-3.5 h-3.5 ml-2","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle dark:hover:text-tremor-content")})))})):o.createElement("span",null,y)),o.createElement("span",{className:(0,p.q)("absolute inset-y-0 right-0 flex items-center mr-2.5")},o.createElement(l.Z,{className:(0,p.q)(g("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),I&&!x?o.createElement("button",{type:"button",className:(0,p.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),O([]),null==v||v([])}},o.createElement(s.Z,{className:(0,p.q)(g("clearIconAllItems"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,o.createElement(d.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(u.R.Options,{className:(0,p.q)("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},o.createElement("div",{className:(0,p.q)("flex items-center w-full px-2.5","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted")},o.createElement("span",null,o.createElement(c,{className:(0,p.q)("flex-none w-4 h-4 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:b,className:(0,p.q)("w-full focus:outline-none focus:ring-none bg-transparent text-tremor-default py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onKeyDown:e=>{"Space"===e.code&&""!==e.target.value&&e.stopPropagation()},onChange:e=>M(e.target.value),value:N})),o.createElement(i.Z.Provider,Object.assign({},{onBlur:{handleResetSearch:T}},{value:{selectedValue:t}}),R))))})});v.displayName="MultiSelect"},46030:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853);n(42698),n(64016),n(8710);var o=n(33232),i=n(2265),a=n(65954),l=n(1153),c=n(28517);let s=(0,l.fn)("MultiSelectItem"),u=i.forwardRef((e,t)=>{let{value:n,className:u,children:d}=e,f=(0,r._T)(e,["value","className","children"]),{selectedValue:p}=(0,i.useContext)(o.Z),h=(0,l.NZ)(n,p);return i.createElement(c.R.Option,Object.assign({className:(0,a.q)(s("root"),"flex justify-start items-center cursor-default text-tremor-default p-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",u),ref:t,key:n,value:n},f),i.createElement("input",{type:"checkbox",className:(0,a.q)(s("checkbox"),"flex-none focus:ring-none focus:outline-none cursor-pointer mr-2.5","accent-tremor-brand","dark:accent-dark-tremor-brand"),checked:h,readOnly:!0}),i.createElement("span",{className:"whitespace-nowrap truncate"},null!=d?d:n))});u.displayName="MultiSelectItem"},30150:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(5853),o=n(2265);let i=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M12 4v16m8-8H4"}))},a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M20 12H4"}))};var l=n(65954),c=n(1153),s=n(69262);let u="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",f=o.forwardRef((e,t)=>{let{onSubmit:n,enableStepper:f=!0,disabled:p,onValueChange:h,onChange:m}=e,g=(0,r._T)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),v=(0,o.useRef)(null),[y,b]=o.useState(!1),x=o.useCallback(()=>{b(!0)},[]),w=o.useCallback(()=>{b(!1)},[]),[S,k]=o.useState(!1),E=o.useCallback(()=>{k(!0)},[]),C=o.useCallback(()=>{k(!1)},[]);return o.createElement(s.Z,Object.assign({type:"number",ref:(0,c.lq)([v,t]),disabled:p,makeInputClassName:(0,c.fn)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null===(t=v.current)||void 0===t?void 0:t.value;null==n||n(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&x(),"ArrowUp"===e.key&&E()},onKeyUp:e=>{"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&C()},onChange:e=>{p||(null==h||h(parseFloat(e.target.value)),null==m||m(e))},stepper:f?o.createElement("div",{className:(0,l.q)("flex justify-center align-middle")},o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null===(e=v.current)||void 0===e||e.stepDown(),null===(t=v.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,l.q)(!p&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(a,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null===(e=v.current)||void 0===e||e.stepUp(),null===(t=v.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,l.q)(!p&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(i,{"data-testid":"step-up",className:(S?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},g))});f.displayName="NumberInput"},27281:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(5853),o=n(2265),i=n(58747),a=n(4537),l=n(65954),c=n(1153),s=n(96398),u=n(28517),d=n(33044),f=n(44140);let p=(0,c.fn)("Select"),h=o.forwardRef((e,t)=>{let{defaultValue:n,value:c,onValueChange:h,placeholder:m="Select...",disabled:g=!1,icon:v,enableClear:y=!0,children:b,className:x}=e,w=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","children","className"]),[S,k]=(0,f.Z)(n,c),E=(0,o.useMemo)(()=>{let e=o.Children.toArray(b).filter(o.isValidElement);return(0,s.sl)(e)},[b]);return o.createElement(u.R,Object.assign({as:"div",ref:t,defaultValue:S,value:S,onChange:e=>{null==h||h(e),k(e)},disabled:g,className:(0,l.q)("w-full min-w-[10rem] relative text-tremor-default",x)},w),e=>{var t;let{value:n}=e;return o.createElement(o.Fragment,null,o.createElement(u.R.Button,{className:(0,l.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,s.um)((0,s.Uh)(n),g))},v&&o.createElement("span",{className:(0,l.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},o.createElement(v,{className:(0,l.q)(p("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),o.createElement("span",{className:"w-[90%] block truncate"},n&&null!==(t=E.get(n))&&void 0!==t?t:m),o.createElement("span",{className:(0,l.q)("absolute inset-y-0 right-0 flex items-center mr-3")},o.createElement(i.Z,{className:(0,l.q)(p("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),y&&S?o.createElement("button",{type:"button",className:(0,l.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),k(""),null==h||h("")}},o.createElement(a.Z,{className:(0,l.q)(p("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,o.createElement(d.u,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},o.createElement(u.R.Options,{className:(0,l.q)("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},b)))})});h.displayName="Select"},57365:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(2265),i=n(28517),a=n(65954);let l=(0,n(1153).fn)("SelectItem"),c=o.forwardRef((e,t)=>{let{value:n,icon:c,className:s,children:u}=e,d=(0,r._T)(e,["value","icon","className","children"]);return o.createElement(i.R.Option,Object.assign({className:(0,a.q)(l("root"),"flex justify-start items-center cursor-default text-tremor-default px-2.5 py-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",s),ref:t,key:n,value:n},d),c&&o.createElement(c,{className:(0,a.q)(l("icon"),"flex-none w-5 h-5 mr-1.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}),o.createElement("span",{className:"whitespace-nowrap truncate"},null!=u?u:n))});c.displayName="SelectItem"},92858:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(5853),o=n(2265),i=n(62963),a=n(90945),l=n(13323),c=n(17684),s=n(80004),u=n(93689),d=n(38198),f=n(47634),p=n(56314),h=n(27847),m=n(64518);let g=(0,o.createContext)(null),v=Object.assign((0,h.yV)(function(e,t){let n=(0,c.M)(),{id:r="headlessui-description-".concat(n),...i}=e,a=function e(){let t=(0,o.useContext)(g);if(null===t){let t=Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),l=(0,u.T)(t);(0,m.e)(()=>a.register(r),[r,a.register]);let s={ref:l,...a.props,id:r};return(0,h.sY)({ourProps:s,theirProps:i,slot:a.slot||{},defaultTag:"p",name:a.name||"Description"})}),{});var y=n(37388);let b=(0,o.createContext)(null),x=Object.assign((0,h.yV)(function(e,t){let n=(0,c.M)(),{id:r="headlessui-label-".concat(n),passive:i=!1,...a}=e,l=function e(){let t=(0,o.useContext)(b);if(null===t){let t=Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}(),s=(0,u.T)(t);(0,m.e)(()=>l.register(r),[r,l.register]);let d={ref:s,...l.props,id:r};return i&&("onClick"in d&&(delete d.htmlFor,delete d.onClick),"onClick"in a&&delete a.onClick),(0,h.sY)({ourProps:d,theirProps:a,slot:l.slot||{},defaultTag:"label",name:l.name||"Label"})}),{}),w=(0,o.createContext)(null);w.displayName="GroupContext";let S=o.Fragment,k=Object.assign((0,h.yV)(function(e,t){let n=(0,c.M)(),{id:r="headlessui-switch-".concat(n),checked:m,defaultChecked:g=!1,onChange:v,name:b,value:x,form:S,...k}=e,E=(0,o.useContext)(w),C=(0,o.useRef)(null),O=(0,u.T)(C,t,null===E?null:E.setSwitch),[j,P]=(0,i.q)(m,v,g),N=(0,l.z)(()=>null==P?void 0:P(!j)),M=(0,l.z)(e=>{if((0,f.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),N()}),I=(0,l.z)(e=>{e.key===y.R.Space?(e.preventDefault(),N()):e.key===y.R.Enter&&(0,p.g)(e.currentTarget)}),R=(0,l.z)(e=>e.preventDefault()),T=(0,o.useMemo)(()=>({checked:j}),[j]),A={id:r,ref:O,role:"switch",type:(0,s.f)(e,C),tabIndex:0,"aria-checked":j,"aria-labelledby":null==E?void 0:E.labelledby,"aria-describedby":null==E?void 0:E.describedby,onClick:M,onKeyUp:I,onKeyPress:R},_=(0,a.G)();return(0,o.useEffect)(()=>{var e;let t=null==(e=C.current)?void 0:e.closest("form");t&&void 0!==g&&_.addEventListener(t,"reset",()=>{P(g)})},[C,P]),o.createElement(o.Fragment,null,null!=b&&j&&o.createElement(d._,{features:d.A.Hidden,...(0,h.oA)({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:S,checked:j,name:b,value:x})}),(0,h.sY)({ourProps:A,theirProps:k,slot:T,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[n,r]=(0,o.useState)(null),[i,a]=function(){let[e,t]=(0,o.useState)([]);return[e.length>0?e.join(" "):void 0,(0,o.useMemo)(()=>function(e){let n=(0,l.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),r=(0,o.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return o.createElement(b.Provider,{value:r},e.children)},[t])]}(),[c,s]=function(){let[e,t]=(0,o.useState)([]);return[e.length>0?e.join(" "):void 0,(0,o.useMemo)(()=>function(e){let n=(0,l.z)(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return -1!==r&&n.splice(r,1),n}))),r=(0,o.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props}),[n,e.slot,e.name,e.props]);return o.createElement(g.Provider,{value:r},e.children)},[t])]}(),u=(0,o.useMemo)(()=>({switch:n,setSwitch:r,labelledby:i,describedby:c}),[n,r,i,c]);return o.createElement(s,{name:"Switch.Description"},o.createElement(a,{name:"Switch.Label",props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){n&&("LABEL"===e.currentTarget.tagName&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},o.createElement(w.Provider,{value:u},(0,h.sY)({ourProps:{},theirProps:e,defaultTag:S,name:"Switch.Group"}))))},Label:x,Description:v});var E=n(44140),C=n(26898),O=n(65954),j=n(1153),P=n(1526);let N=(0,j.fn)("Switch"),M=o.forwardRef((e,t)=>{let{checked:n,defaultChecked:i=!1,onChange:a,color:l,name:c,error:s,errorMessage:u,disabled:d,required:f,tooltip:p,id:h}=e,m=(0,r._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:l?(0,j.bM)(l,C.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,j.bM)(l,C.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,y]=(0,E.Z)(i,n),[b,x]=(0,o.useState)(!1),{tooltipProps:w,getReferenceProps:S}=(0,P.l)(300);return o.createElement("div",{className:"flex flex-row items-center justify-start"},o.createElement(P.Z,Object.assign({text:p},w)),o.createElement("div",Object.assign({ref:(0,j.lq)([t,w.refs.setReference]),className:(0,O.q)(N("root"),"flex flex-row relative h-5")},m,S),o.createElement("input",{type:"checkbox",className:(0,O.q)(N("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:c,required:f,checked:v,onChange:e=>{e.preventDefault()}}),o.createElement(k,{checked:v,onChange:e=>{y(e),null==a||a(e)},disabled:d,className:(0,O.q)(N("switch"),"w-10 h-5 group relative inline-flex flex-shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>x(!0),onBlur:()=>x(!1),id:h},o.createElement("span",{className:(0,O.q)(N("sr-only"),"sr-only")},"Switch ",v?"on":"off"),o.createElement("span",{"aria-hidden":"true",className:(0,O.q)(N("background"),v?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),o.createElement("span",{"aria-hidden":"true",className:(0,O.q)(N("round"),v?(0,O.q)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",b?(0,O.q)("ring-2",g.ringColor):"")}))),s&&u?o.createElement("p",{className:(0,O.q)(N("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});M.displayName="Switch"},87452:function(e,t,n){"use strict";n.d(t,{Z:function(){return d},r:function(){return u}});var r=n(5853),o=n(21886);n(42698),n(64016);var i=n(8710);n(33232);var a=n(65954),l=n(1153),c=n(2265);let s=(0,l.fn)("Accordion"),u=(0,c.createContext)({isOpen:!1}),d=c.forwardRef((e,t)=>{var n;let{defaultOpen:l=!1,children:d,className:f}=e,p=(0,r._T)(e,["defaultOpen","children","className"]),h=null!==(n=(0,c.useContext)(i.Z))&&void 0!==n?n:(0,a.q)("rounded-tremor-default border");return c.createElement(o.p,Object.assign({as:"div",ref:t,className:(0,a.q)(s("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",h,f),defaultOpen:l},p),e=>{let{open:t}=e;return c.createElement(u.Provider,{value:{isOpen:t}},d)})});d.displayName="Accordion"},88829:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(2265),i=n(21886),a=n(65954);let l=(0,n(1153).fn)("AccordionBody"),c=o.forwardRef((e,t)=>{let{children:n,className:c}=e,s=(0,r._T)(e,["children","className"]);return o.createElement(i.p.Panel,Object.assign({ref:t,className:(0,a.q)(l("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",c)},s),n)});c.displayName="AccordionBody"},72208:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(5853),o=n(2265),i=n(21886);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var l=n(87452),c=n(65954);let s=(0,n(1153).fn)("AccordionHeader"),u=o.forwardRef((e,t)=>{let{children:n,className:u}=e,d=(0,r._T)(e,["children","className"]),{isOpen:f}=(0,o.useContext)(l.r);return o.createElement(i.p.Button,Object.assign({ref:t,className:(0,c.q)(s("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",u)},d),o.createElement("div",{className:(0,c.q)(s("children"),"flex flex-1 text-inherit mr-4")},n),o.createElement("div",null,o.createElement(a,{className:(0,c.q)(s("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",f?"transition-all":"transition-all -rotate-180")})))});u.displayName="AccordionHeader"},67982:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(65954),i=n(1153),a=n(2265);let l=(0,i.fn)("Divider"),c=a.forwardRef((e,t)=>{let{className:n,children:i}=e,c=(0,r._T)(e,["className","children"]);return a.createElement("div",Object.assign({ref:t,className:(0,o.q)(l("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",n)},c),i?a.createElement(a.Fragment,null,a.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),a.createElement("div",{className:(0,o.q)("text-inherit whitespace-nowrap")},i),a.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):a.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});c.displayName="Divider"},21626:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(2265),i=n(65954);let a=(0,n(1153).fn)("Table"),l=o.forwardRef((e,t)=>{let{children:n,className:l}=e,c=(0,r._T)(e,["children","className"]);return o.createElement("div",{className:(0,i.q)(a("root"),"overflow-auto",l)},o.createElement("table",Object.assign({ref:t,className:(0,i.q)(a("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},c),n))});l.displayName="Table"},97214:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(2265),i=n(65954);let a=(0,n(1153).fn)("TableBody"),l=o.forwardRef((e,t)=>{let{children:n,className:l}=e,c=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:t,className:(0,i.q)(a("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},c),n))});l.displayName="TableBody"},28241:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(2265),i=n(65954);let a=(0,n(1153).fn)("TableCell"),l=o.forwardRef((e,t)=>{let{children:n,className:l}=e,c=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:t,className:(0,i.q)(a("root"),"align-middle whitespace-nowrap text-left p-4",l)},c),n))});l.displayName="TableCell"},58834:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(2265),i=n(65954);let a=(0,n(1153).fn)("TableHead"),l=o.forwardRef((e,t)=>{let{children:n,className:l}=e,c=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:t,className:(0,i.q)(a("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},c),n))});l.displayName="TableHead"},69552:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(2265),i=n(65954);let a=(0,n(1153).fn)("TableHeaderCell"),l=o.forwardRef((e,t)=>{let{children:n,className:l}=e,c=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:t,className:(0,i.q)(a("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content","dark:text-dark-tremor-content",l)},c),n))});l.displayName="TableHeaderCell"},71876:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(2265),i=n(65954);let a=(0,n(1153).fn)("TableRow"),l=o.forwardRef((e,t)=>{let{children:n,className:l}=e,c=(0,r._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:t,className:(0,i.q)(a("row"),l)},c),n))});l.displayName="TableRow"},97765:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),o=n(26898),i=n(65954),a=n(1153),l=n(2265);let c=l.forwardRef((e,t)=>{let{color:n,children:c,className:s}=e,u=(0,r._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,i.q)(n?(0,a.bM)(n,o.K.lightText).textColor:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",s)},u),c)});c.displayName="Subtitle"},96889:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(5853),o=n(2265),i=n(26898),a=n(65954),l=n(1153);let c=(0,l.fn)("BarList"),s=o.forwardRef((e,t)=>{var n;let s;let{data:u=[],color:d,valueFormatter:f=l.Cj,showAnimation:p=!1,className:h}=e,m=(0,r._T)(e,["data","color","valueFormatter","showAnimation","className"]),g=(n=u.map(e=>e.value),s=-1/0,n.forEach(e=>{s=Math.max(s,e)}),n.map(e=>0===e?0:Math.max(e/s*100,1)));return o.createElement("div",Object.assign({ref:t,className:(0,a.q)(c("root"),"flex justify-between space-x-6",h)},m),o.createElement("div",{className:(0,a.q)(c("bars"),"relative w-full")},u.map((e,t)=>{var n,r,s;let f=e.icon;return o.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:e.name,className:(0,a.q)(c("bar"),"flex items-center rounded-tremor-small bg-opacity-30","h-9",e.color||d?(0,l.bM)(null!==(r=e.color)&&void 0!==r?r:d,i.K.background).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",t===u.length-1?"mb-0":"mb-2"),style:{width:"".concat(g[t],"%"),transition:p?"all 1s":""}},o.createElement("div",{className:(0,a.q)("absolute max-w-full flex left-2")},f?o.createElement(f,{className:(0,a.q)(c("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?o.createElement("a",{href:e.href,target:null!==(s=e.target)&&void 0!==s?s:"_blank",rel:"noreferrer",className:(0,a.q)(c("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name):o.createElement("p",{className:(0,a.q)(c("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name)))})),o.createElement("div",{className:"text-right min-w-min"},u.map((e,t)=>{var n;return o.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:e.name,className:(0,a.q)(c("labelWrapper"),"flex justify-end items-center","h-9",t===u.length-1?"mb-0":"mb-2")},o.createElement("p",{className:(0,a.q)(c("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},f(e.value)))})))});s.displayName="BarList"},44140:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2265);let o=(e,t)=>{let n=void 0!==t,[o,i]=(0,r.useState)(e);return[n?t:o,e=>{n||i(e)}]}},51646:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2265);function o(){let[,e]=r.useReducer(e=>e+1,0);return e}},12757:function(e,t,n){"use strict";n.d(t,{F:function(){return a},Z:function(){return i}});var r=n(36760),o=n.n(r);function i(e,t,n){return o()({["".concat(e,"-status-success")]:"success"===t,["".concat(e,"-status-warning")]:"warning"===t,["".concat(e,"-status-error")]:"error"===t,["".concat(e,"-status-validating")]:"validating"===t,["".concat(e,"-has-feedback")]:n})}let a=(e,t)=>t||e},67960:function(e,t,n){"use strict";n.d(t,{Z:function(){return e8}});var r=n(2265),o=n(36760),i=n.n(o),a=n(18694),l=n(71744),c=n(33759),s=e=>{let{prefixCls:t,className:n,style:o,size:a,shape:l}=e,c=i()({["".concat(t,"-lg")]:"large"===a,["".concat(t,"-sm")]:"small"===a}),s=i()({["".concat(t,"-circle")]:"circle"===l,["".concat(t,"-square")]:"square"===l,["".concat(t,"-round")]:"round"===l}),u=r.useMemo(()=>"number"==typeof a?{width:a,height:a,lineHeight:"".concat(a,"px")}:{},[a]);return r.createElement("span",{className:i()(t,c,s,n),style:Object.assign(Object.assign({},u),o)})},u=n(352),d=n(80669),f=n(3104);let p=new u.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),h=e=>({height:e,lineHeight:(0,u.bf)(e)}),m=e=>Object.assign({width:e},h(e)),g=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:p,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),v=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},h(e)),y=e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return{["".concat(t)]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},m(r)),["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"},["".concat(t).concat(t,"-lg")]:Object.assign({},m(o)),["".concat(t).concat(t,"-sm")]:Object.assign({},m(i))}},b=e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return{["".concat(r)]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},v(t,l)),["".concat(r,"-lg")]:Object.assign({},v(o,l)),["".concat(r,"-sm")]:Object.assign({},v(i,l))}},x=e=>Object.assign({width:e},h(e)),w=e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=e;return{["".concat(t)]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:r,borderRadius:o},x(i(n).mul(2).equal())),{["".concat(t,"-path")]:{fill:"#bfbfbf"},["".concat(t,"-svg")]:Object.assign(Object.assign({},x(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),["".concat(t,"-svg").concat(t,"-svg-circle")]:{borderRadius:"50%"}}),["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"}}},S=(e,t,n)=>{let{skeletonButtonCls:r}=e;return{["".concat(n).concat(r,"-circle")]:{width:t,minWidth:t,borderRadius:"50%"},["".concat(n).concat(r,"-round")]:{borderRadius:t}}},k=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},h(e)),E=e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal()},k(r,l))},S(e,r,n)),{["".concat(n,"-lg")]:Object.assign({},k(o,l))}),S(e,o,"".concat(n,"-lg"))),{["".concat(n,"-sm")]:Object.assign({},k(i,l))}),S(e,i,"".concat(n,"-sm")))},C=e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:l,controlHeight:c,controlHeightLG:s,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:p,borderRadius:h,titleHeight:v,blockRadius:x,paragraphLiHeight:S,controlHeightXS:k,paragraphMarginTop:C}=e;return{["".concat(t)]:{display:"table",width:"100%",["".concat(t,"-header")]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},m(c)),["".concat(n,"-circle")]:{borderRadius:"50%"},["".concat(n,"-lg")]:Object.assign({},m(s)),["".concat(n,"-sm")]:Object.assign({},m(u))},["".concat(t,"-content")]:{display:"table-cell",width:"100%",verticalAlign:"top",["".concat(r)]:{width:"100%",height:v,background:d,borderRadius:x,["+ ".concat(o)]:{marginBlockStart:u}},["".concat(o)]:{padding:0,"> li":{width:"100%",height:S,listStyle:"none",background:d,borderRadius:x,"+ li":{marginBlockStart:k}}},["".concat(o,"> li:last-child:not(:first-child):not(:nth-child(2))")]:{width:"61%"}},["&-round ".concat(t,"-content")]:{["".concat(r,", ").concat(o," > li")]:{borderRadius:h}}},["".concat(t,"-with-avatar ").concat(t,"-content")]:{["".concat(r)]:{marginBlockStart:p,["+ ".concat(o)]:{marginBlockStart:C}}},["".concat(t).concat(t,"-element")]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},E(e)),y(e)),b(e)),w(e)),["".concat(t).concat(t,"-block")]:{width:"100%",["".concat(i)]:{width:"100%"},["".concat(a)]:{width:"100%"}},["".concat(t).concat(t,"-active")]:{["\n ".concat(r,",\n ").concat(o," > li,\n ").concat(n,",\n ").concat(i,",\n ").concat(a,",\n ").concat(l,"\n ")]:Object.assign({},g(e))}}};var O=(0,d.I$)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return[C((0,f.TS)(e,{skeletonAvatarCls:"".concat(t,"-avatar"),skeletonTitleCls:"".concat(t,"-title"),skeletonParagraphCls:"".concat(t,"-paragraph"),skeletonButtonCls:"".concat(t,"-button"),skeletonInputCls:"".concat(t,"-input"),skeletonImageCls:"".concat(t,"-image"),imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, ".concat(e.gradientFromColor," 25%, ").concat(e.gradientToColor," 37%, ").concat(e.gradientFromColor," 63%)"),skeletonLoadingMotionDuration:"1.4s"}))]},e=>{let{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),j=n(1119),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},N=n(55015),M=r.forwardRef(function(e,t){return r.createElement(N.Z,(0,j.Z)({},e,{ref:t,icon:P}))}),I=n(83145),R=e=>{let t=t=>{let{width:n,rows:r=2}=e;return Array.isArray(n)?n[t]:r-1===t?n:void 0},{prefixCls:n,className:o,style:a,rows:l}=e,c=(0,I.Z)(Array(l)).map((e,n)=>r.createElement("li",{key:n,style:{width:t(n)}}));return r.createElement("ul",{className:i()(n,o),style:a},c)},T=e=>{let{prefixCls:t,className:n,width:o,style:a}=e;return r.createElement("h3",{className:i()(t,n),style:Object.assign({width:o},a)})};function A(e){return e&&"object"==typeof e?e:{}}let _=e=>{let{prefixCls:t,loading:n,className:o,rootClassName:a,style:c,children:u,avatar:d=!1,title:f=!0,paragraph:p=!0,active:h,round:m}=e,{getPrefixCls:g,direction:v,skeleton:y}=r.useContext(l.E_),b=g("skeleton",t),[x,w,S]=O(b);if(n||!("loading"in e)){let e,t;let n=!!d,l=!!f,u=!!p;if(n){let t=Object.assign(Object.assign({prefixCls:"".concat(b,"-avatar")},l&&!u?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),A(d));e=r.createElement("div",{className:"".concat(b,"-header")},r.createElement(s,Object.assign({},t)))}if(l||u){let e,o;if(l){let t=Object.assign(Object.assign({prefixCls:"".concat(b,"-title")},!n&&u?{width:"38%"}:n&&u?{width:"50%"}:{}),A(f));e=r.createElement(T,Object.assign({},t))}if(u){let e=Object.assign(Object.assign({prefixCls:"".concat(b,"-paragraph")},function(e,t){let n={};return e&&t||(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}(n,l)),A(p));o=r.createElement(R,Object.assign({},e))}t=r.createElement("div",{className:"".concat(b,"-content")},e,o)}let g=i()(b,{["".concat(b,"-with-avatar")]:n,["".concat(b,"-active")]:h,["".concat(b,"-rtl")]:"rtl"===v,["".concat(b,"-round")]:m},null==y?void 0:y.className,o,a,w,S);return x(r.createElement("div",{className:g,style:Object.assign(Object.assign({},null==y?void 0:y.style),c)},e,t))}return void 0!==u?u:null};_.Button=e=>{let{prefixCls:t,className:n,rootClassName:o,active:c,block:u=!1,size:d="default"}=e,{getPrefixCls:f}=r.useContext(l.E_),p=f("skeleton",t),[h,m,g]=O(p),v=(0,a.Z)(e,["prefixCls"]),y=i()(p,"".concat(p,"-element"),{["".concat(p,"-active")]:c,["".concat(p,"-block")]:u},n,o,m,g);return h(r.createElement("div",{className:y},r.createElement(s,Object.assign({prefixCls:"".concat(p,"-button"),size:d},v))))},_.Avatar=e=>{let{prefixCls:t,className:n,rootClassName:o,active:c,shape:u="circle",size:d="default"}=e,{getPrefixCls:f}=r.useContext(l.E_),p=f("skeleton",t),[h,m,g]=O(p),v=(0,a.Z)(e,["prefixCls","className"]),y=i()(p,"".concat(p,"-element"),{["".concat(p,"-active")]:c},n,o,m,g);return h(r.createElement("div",{className:y},r.createElement(s,Object.assign({prefixCls:"".concat(p,"-avatar"),shape:u,size:d},v))))},_.Input=e=>{let{prefixCls:t,className:n,rootClassName:o,active:c,block:u,size:d="default"}=e,{getPrefixCls:f}=r.useContext(l.E_),p=f("skeleton",t),[h,m,g]=O(p),v=(0,a.Z)(e,["prefixCls"]),y=i()(p,"".concat(p,"-element"),{["".concat(p,"-active")]:c,["".concat(p,"-block")]:u},n,o,m,g);return h(r.createElement("div",{className:y},r.createElement(s,Object.assign({prefixCls:"".concat(p,"-input"),size:d},v))))},_.Image=e=>{let{prefixCls:t,className:n,rootClassName:o,style:a,active:c}=e,{getPrefixCls:s}=r.useContext(l.E_),u=s("skeleton",t),[d,f,p]=O(u),h=i()(u,"".concat(u,"-element"),{["".concat(u,"-active")]:c},n,o,f,p);return d(r.createElement("div",{className:h},r.createElement("div",{className:i()("".concat(u,"-image"),n),style:a},r.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(u,"-image-svg")},r.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:"".concat(u,"-image-path")})))))},_.Node=e=>{let{prefixCls:t,className:n,rootClassName:o,style:a,active:c,children:s}=e,{getPrefixCls:u}=r.useContext(l.E_),d=u("skeleton",t),[f,p,h]=O(d),m=i()(d,"".concat(d,"-element"),{["".concat(d,"-active")]:c},p,n,o,h),g=null!=s?s:r.createElement(M,null);return f(r.createElement("div",{className:m},r.createElement("div",{className:i()("".concat(d,"-image"),n),style:a},g)))};var D=n(49638),Z=n(39760),L=n(96473),z=n(11993),B=n(31686),F=n(26365),H=n(41154),q=n(6989),W=n(50506),K=n(79267),V=(0,r.createContext)(null),U=n(31474),G=n(58525),X=n(28791),$=n(53346),Y=function(e){var t=e.activeTabOffset,n=e.horizontal,o=e.rtl,i=e.indicator,a=void 0===i?{}:i,l=a.size,c=a.align,s=void 0===c?"center":c,u=(0,r.useState)(),d=(0,F.Z)(u,2),f=d[0],p=d[1],h=(0,r.useRef)(),m=r.useCallback(function(e){return"function"==typeof l?l(e):"number"==typeof l?l:e},[l]);function g(){$.Z.cancel(h.current)}return(0,r.useEffect)(function(){var e={};if(t){if(n){e.width=m(t.width);var r=o?"right":"left";"start"===s&&(e[r]=t[r]),"center"===s&&(e[r]=t[r]+t.width/2,e.transform=o?"translateX(50%)":"translateX(-50%)"),"end"===s&&(e[r]=t[r]+t.width,e.transform="translateX(-100%)")}else e.height=m(t.height),"start"===s&&(e.top=t.top),"center"===s&&(e.top=t.top+t.height/2,e.transform="translateY(-50%)"),"end"===s&&(e.top=t.top+t.height,e.transform="translateY(-100%)")}return g(),h.current=(0,$.Z)(function(){p(e)}),g},[t,n,o,s,m]),{style:f}},Q={width:0,height:0,left:0,top:0};function J(e,t){var n=r.useRef(e),o=r.useState({}),i=(0,F.Z)(o,2)[1];return[n.current,function(e){var r="function"==typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,i({})}]}var ee=n(27380);function et(e){var t=(0,r.useState)(0),n=(0,F.Z)(t,2),o=n[0],i=n[1],a=(0,r.useRef)(0),l=(0,r.useRef)();return l.current=e,(0,ee.o)(function(){var e;null===(e=l.current)||void 0===e||e.call(l)},[o]),function(){a.current===o&&(a.current+=1,i(a.current))}}var en={width:0,height:0,left:0,top:0,right:0};function er(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}function eo(e){return String(e).replace(/"/g,"TABS_DQ")}function ei(e,t,n,r){return!!n&&!r&&!1!==e&&(void 0!==e||!1!==t&&null!==t)}var ea=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.editable,i=e.locale,a=e.style;return o&&!1!==o.showAdd?r.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){o.onEdit("add",{event:e})}},o.addIcon||"+"):null}),el=r.forwardRef(function(e,t){var n,o=e.position,i=e.prefixCls,a=e.extra;if(!a)return null;var l={};return"object"!==(0,H.Z)(a)||r.isValidElement(a)?l.right=a:l=a,"right"===o&&(n=l.right),"left"===o&&(n=l.left),n?r.createElement("div",{className:"".concat(i,"-extra-content"),ref:t},n):null}),ec=n(71030),es=n(33082),eu=n(95814),ed=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.id,a=e.tabs,l=e.locale,c=e.mobile,s=e.moreIcon,u=e.moreTransitionName,d=e.style,f=e.className,p=e.editable,h=e.tabBarGutter,m=e.rtl,g=e.removeAriaLabel,v=e.onTabClick,y=e.getPopupContainer,b=e.popupClassName,x=(0,r.useState)(!1),w=(0,F.Z)(x,2),S=w[0],k=w[1],E=(0,r.useState)(null),C=(0,F.Z)(E,2),O=C[0],j=C[1],P="".concat(o,"-more-popup"),N="".concat(n,"-dropdown"),M=null!==O?"".concat(P,"-").concat(O):null,I=null==l?void 0:l.dropdownAriaLabel,R=r.createElement(es.ZP,{onClick:function(e){v(e.key,e.domEvent),k(!1)},prefixCls:"".concat(N,"-menu"),id:P,tabIndex:-1,role:"listbox","aria-activedescendant":M,selectedKeys:[O],"aria-label":void 0!==I?I:"expanded dropdown"},a.map(function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,a=e.key,l=e.label,c=ei(t,i,p,n);return r.createElement(es.sN,{key:a,id:"".concat(P,"-").concat(a),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(a),disabled:n},r.createElement("span",null,l),c&&r.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:0,className:"".concat(N,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),e.preventDefault(),e.stopPropagation(),p.onEdit("remove",{key:a,event:e})}},i||p.removeIcon||"\xd7"))}));function T(e){for(var t=a.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===O})||0,r=t.length,o=0;o<r;o+=1){var i=t[n=(n+e+r)%r];if(!i.disabled){j(i.key);return}}}(0,r.useEffect)(function(){var e=document.getElementById(M);e&&e.scrollIntoView&&e.scrollIntoView(!1)},[O]),(0,r.useEffect)(function(){S||j(null)},[S]);var A=(0,z.Z)({},m?"marginRight":"marginLeft",h);a.length||(A.visibility="hidden",A.order=1);var _=i()((0,z.Z)({},"".concat(N,"-rtl"),m)),D=c?null:r.createElement(ec.Z,{prefixCls:N,overlay:R,trigger:["hover"],visible:!!a.length&&S,transitionName:u,onVisibleChange:k,overlayClassName:i()(_,b),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:y},r.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:A,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":P,id:"".concat(o,"-more"),"aria-expanded":S,onKeyDown:function(e){var t=e.which;if(!S){[eu.Z.DOWN,eu.Z.SPACE,eu.Z.ENTER].includes(t)&&(k(!0),e.preventDefault());return}switch(t){case eu.Z.UP:T(-1),e.preventDefault();break;case eu.Z.DOWN:T(1),e.preventDefault();break;case eu.Z.ESC:k(!1);break;case eu.Z.SPACE:case eu.Z.ENTER:null!==O&&v(O,e)}}},void 0===s?"More":s));return r.createElement("div",{className:i()("".concat(n,"-nav-operations"),f),style:d,ref:t},D,r.createElement(ea,{prefixCls:n,locale:l,editable:p}))}),ef=r.memo(ed,function(e,t){return t.tabMoving}),ep=function(e){var t=e.prefixCls,n=e.id,o=e.active,a=e.tab,l=a.key,c=a.label,s=a.disabled,u=a.closeIcon,d=a.icon,f=e.closable,p=e.renderWrapper,h=e.removeAriaLabel,m=e.editable,g=e.onClick,v=e.onFocus,y=e.style,b="".concat(t,"-tab"),x=ei(f,u,m,s);function w(e){s||g(e)}var S=r.useMemo(function(){return d&&"string"==typeof c?r.createElement("span",null,c):c},[c,d]),k=r.createElement("div",{key:l,"data-node-key":eo(l),className:i()(b,(0,z.Z)((0,z.Z)((0,z.Z)({},"".concat(b,"-with-remove"),x),"".concat(b,"-active"),o),"".concat(b,"-disabled"),s)),style:y,onClick:w},r.createElement("div",{role:"tab","aria-selected":o,id:n&&"".concat(n,"-tab-").concat(l),className:"".concat(b,"-btn"),"aria-controls":n&&"".concat(n,"-panel-").concat(l),"aria-disabled":s,tabIndex:s?null:0,onClick:function(e){e.stopPropagation(),w(e)},onKeyDown:function(e){[eu.Z.SPACE,eu.Z.ENTER].includes(e.which)&&(e.preventDefault(),w(e))},onFocus:v},d&&r.createElement("span",{className:"".concat(b,"-icon")},d),c&&S),x&&r.createElement("button",{type:"button","aria-label":h||"remove",tabIndex:0,className:"".concat(b,"-remove"),onClick:function(e){e.stopPropagation(),e.preventDefault(),e.stopPropagation(),m.onEdit("remove",{key:l,event:e})}},u||m.removeIcon||"\xd7"));return p?p(k):k},eh=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,o=e.offsetTop,i=e.offsetLeft,a=e.getBoundingClientRect(),l=a.width,c=a.height,s=a.x,u=a.y;return 1>Math.abs(l-n)?[l,c,s-t.x,u-t.y]:[n,r,i,o]},em=function(e){var t=e.current||{},n=t.offsetWidth,r=void 0===n?0:n,o=t.offsetHeight;if(e.current){var i=e.current.getBoundingClientRect(),a=i.width,l=i.height;if(1>Math.abs(a-r))return[a,l]}return[r,void 0===o?0:o]},eg=function(e,t){return e[t?0:1]},ev=r.forwardRef(function(e,t){var n,o,a,l,c,s,u,d,f,p,h,m,g,v,y,b,x,w,S,k,E,C,O,P,N,M,R,T,A,_,D,Z,L,H,q,W,K,$,ee,ei=e.className,ec=e.style,es=e.id,eu=e.animated,ed=e.activeKey,ev=e.rtl,ey=e.extra,eb=e.editable,ex=e.locale,ew=e.tabPosition,eS=e.tabBarGutter,ek=e.children,eE=e.onTabClick,eC=e.onTabScroll,eO=e.indicator,ej=r.useContext(V),eP=ej.prefixCls,eN=ej.tabs,eM=(0,r.useRef)(null),eI=(0,r.useRef)(null),eR=(0,r.useRef)(null),eT=(0,r.useRef)(null),eA=(0,r.useRef)(null),e_=(0,r.useRef)(null),eD=(0,r.useRef)(null),eZ="top"===ew||"bottom"===ew,eL=J(0,function(e,t){eZ&&eC&&eC({direction:e>t?"left":"right"})}),ez=(0,F.Z)(eL,2),eB=ez[0],eF=ez[1],eH=J(0,function(e,t){!eZ&&eC&&eC({direction:e>t?"top":"bottom"})}),eq=(0,F.Z)(eH,2),eW=eq[0],eK=eq[1],eV=(0,r.useState)([0,0]),eU=(0,F.Z)(eV,2),eG=eU[0],eX=eU[1],e$=(0,r.useState)([0,0]),eY=(0,F.Z)(e$,2),eQ=eY[0],eJ=eY[1],e0=(0,r.useState)([0,0]),e1=(0,F.Z)(e0,2),e2=e1[0],e6=e1[1],e4=(0,r.useState)([0,0]),e3=(0,F.Z)(e4,2),e5=e3[0],e8=e3[1],e7=(n=new Map,o=(0,r.useRef)([]),a=(0,r.useState)({}),l=(0,F.Z)(a,2)[1],c=(0,r.useRef)("function"==typeof n?n():n),s=et(function(){var e=c.current;o.current.forEach(function(t){e=t(e)}),o.current=[],c.current=e,l({})}),[c.current,function(e){o.current.push(e),s()}]),e9=(0,F.Z)(e7,2),te=e9[0],tt=e9[1],tn=(u=eQ[0],(0,r.useMemo)(function(){for(var e=new Map,t=te.get(null===(o=eN[0])||void 0===o?void 0:o.key)||Q,n=t.left+t.width,r=0;r<eN.length;r+=1){var o,i,a=eN[r].key,l=te.get(a);l||(l=te.get(null===(i=eN[r-1])||void 0===i?void 0:i.key)||Q);var c=e.get(a)||(0,B.Z)({},l);c.right=n-c.left-c.width,e.set(a,c)}return e},[eN.map(function(e){return e.key}).join("_"),te,u])),tr=eg(eG,eZ),to=eg(eQ,eZ),ti=eg(e2,eZ),ta=eg(e5,eZ),tl=tr<to+ti,tc=tl?tr-ta:tr-ti,ts="".concat(eP,"-nav-operations-hidden"),tu=0,td=0;function tf(e){return e<tu?tu:e>td?td:e}eZ&&ev?(tu=0,td=Math.max(0,to-tc)):(tu=Math.min(0,tc-to),td=0);var tp=(0,r.useRef)(null),th=(0,r.useState)(),tm=(0,F.Z)(th,2),tg=tm[0],tv=tm[1];function ty(){tv(Date.now())}function tb(){tp.current&&clearTimeout(tp.current)}d=function(e,t){function n(e,t){e(function(e){return tf(e+t)})}return!!tl&&(eZ?n(eF,e):n(eK,t),tb(),ty(),!0)},f=(0,r.useState)(),h=(p=(0,F.Z)(f,2))[0],m=p[1],g=(0,r.useState)(0),y=(v=(0,F.Z)(g,2))[0],b=v[1],x=(0,r.useState)(0),S=(w=(0,F.Z)(x,2))[0],k=w[1],E=(0,r.useState)(),O=(C=(0,F.Z)(E,2))[0],P=C[1],N=(0,r.useRef)(),M=(0,r.useRef)(),(R=(0,r.useRef)(null)).current={onTouchStart:function(e){var t=e.touches[0];m({x:t.screenX,y:t.screenY}),window.clearInterval(N.current)},onTouchMove:function(e){if(h){e.preventDefault();var t=e.touches[0],n=t.screenX,r=t.screenY;m({x:n,y:r});var o=n-h.x,i=r-h.y;d(o,i);var a=Date.now();b(a),k(a-y),P({x:o,y:i})}},onTouchEnd:function(){if(h&&(m(null),P(null),O)){var e=O.x/S,t=O.y/S;if(!(.1>Math.max(Math.abs(e),Math.abs(t)))){var n=e,r=t;N.current=window.setInterval(function(){if(.01>Math.abs(n)&&.01>Math.abs(r)){window.clearInterval(N.current);return}n*=.9046104802746175,r*=.9046104802746175,d(20*n,20*r)},20)}}},onWheel:function(e){var t=e.deltaX,n=e.deltaY,r=0,o=Math.abs(t),i=Math.abs(n);o===i?r="x"===M.current?t:n:o>i?(r=t,M.current="x"):(r=n,M.current="y"),d(-r,-r)&&e.preventDefault()}},r.useEffect(function(){function e(e){R.current.onTouchMove(e)}function t(e){R.current.onTouchEnd(e)}return document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",t,{passive:!1}),eT.current.addEventListener("touchstart",function(e){R.current.onTouchStart(e)},{passive:!1}),eT.current.addEventListener("wheel",function(e){R.current.onWheel(e)}),function(){document.removeEventListener("touchmove",e),document.removeEventListener("touchend",t)}},[]),(0,r.useEffect)(function(){return tb(),tg&&(tp.current=setTimeout(function(){tv(0)},100)),tb},[tg]);var tx=(T=eZ?eB:eW,L=(A=(0,B.Z)((0,B.Z)({},e),{},{tabs:eN})).tabs,H=A.tabPosition,q=A.rtl,["top","bottom"].includes(H)?(_="width",D=q?"right":"left",Z=Math.abs(T)):(_="height",D="top",Z=-T),(0,r.useMemo)(function(){if(!L.length)return[0,0];for(var e=L.length,t=e,n=0;n<e;n+=1){var r=tn.get(L[n].key)||en;if(r[D]+r[_]>Z+tc){t=n-1;break}}for(var o=0,i=e-1;i>=0;i-=1)if((tn.get(L[i].key)||en)[D]<Z){o=i+1;break}return o>=t?[0,0]:[o,t]},[tn,tc,to,ti,ta,Z,H,L.map(function(e){return e.key}).join("_"),q])),tw=(0,F.Z)(tx,2),tS=tw[0],tk=tw[1],tE=(0,G.Z)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ed,t=tn.get(e)||{width:0,height:0,left:0,right:0,top:0};if(eZ){var n=eB;ev?t.right<eB?n=t.right:t.right+t.width>eB+tc&&(n=t.right+t.width-tc):t.left<-eB?n=-t.left:t.left+t.width>-eB+tc&&(n=-(t.left+t.width-tc)),eK(0),eF(tf(n))}else{var r=eW;t.top<-eW?r=-t.top:t.top+t.height>-eW+tc&&(r=-(t.top+t.height-tc)),eF(0),eK(tf(r))}}),tC={};"top"===ew||"bottom"===ew?tC[ev?"marginRight":"marginLeft"]=eS:tC.marginTop=eS;var tO=eN.map(function(e,t){var n=e.key;return r.createElement(ep,{id:es,prefixCls:eP,key:n,tab:e,style:0===t?void 0:tC,closable:e.closable,editable:eb,active:n===ed,renderWrapper:ek,removeAriaLabel:null==ex?void 0:ex.removeAriaLabel,onClick:function(e){eE(n,e)},onFocus:function(){tE(n),ty(),eT.current&&(ev||(eT.current.scrollLeft=0),eT.current.scrollTop=0)}})}),tj=function(){return tt(function(){var e,t=new Map,n=null===(e=eA.current)||void 0===e?void 0:e.getBoundingClientRect();return eN.forEach(function(e){var r,o=e.key,i=null===(r=eA.current)||void 0===r?void 0:r.querySelector('[data-node-key="'.concat(eo(o),'"]'));if(i){var a=eh(i,n),l=(0,F.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];t.set(o,{width:c,height:s,left:u,top:d})}}),t})};(0,r.useEffect)(function(){tj()},[eN.map(function(e){return e.key}).join("_")]);var tP=et(function(){var e=em(eM),t=em(eI),n=em(eR);eX([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=em(eD);e6(r),e8(em(e_));var o=em(eA);eJ([o[0]-r[0],o[1]-r[1]]),tj()}),tN=eN.slice(0,tS),tM=eN.slice(tk+1),tI=[].concat((0,I.Z)(tN),(0,I.Z)(tM)),tR=tn.get(ed),tT=Y({activeTabOffset:tR,horizontal:eZ,indicator:eO,rtl:ev}).style;(0,r.useEffect)(function(){tE()},[ed,tu,td,er(tR),er(tn),eZ]),(0,r.useEffect)(function(){tP()},[ev]);var tA=!!tI.length,t_="".concat(eP,"-nav-wrap");return eZ?ev?(K=eB>0,W=eB!==td):(W=eB<0,K=eB!==tu):($=eW<0,ee=eW!==tu),r.createElement(U.Z,{onResize:tP},r.createElement("div",{ref:(0,X.x1)(t,eM),role:"tablist",className:i()("".concat(eP,"-nav"),ei),style:ec,onKeyDown:function(){ty()}},r.createElement(el,{ref:eI,position:"left",extra:ey,prefixCls:eP}),r.createElement(U.Z,{onResize:tP},r.createElement("div",{className:i()(t_,(0,z.Z)((0,z.Z)((0,z.Z)((0,z.Z)({},"".concat(t_,"-ping-left"),W),"".concat(t_,"-ping-right"),K),"".concat(t_,"-ping-top"),$),"".concat(t_,"-ping-bottom"),ee)),ref:eT},r.createElement(U.Z,{onResize:tP},r.createElement("div",{ref:eA,className:"".concat(eP,"-nav-list"),style:{transform:"translate(".concat(eB,"px, ").concat(eW,"px)"),transition:tg?"none":void 0}},tO,r.createElement(ea,{ref:eD,prefixCls:eP,locale:ex,editable:eb,style:(0,B.Z)((0,B.Z)({},0===tO.length?void 0:tC),{},{visibility:tA?"hidden":null})}),r.createElement("div",{className:i()("".concat(eP,"-ink-bar"),(0,z.Z)({},"".concat(eP,"-ink-bar-animated"),eu.inkBar)),style:tT}))))),r.createElement(ef,(0,j.Z)({},e,{removeAriaLabel:null==ex?void 0:ex.removeAriaLabel,ref:e_,prefixCls:eP,tabs:tI,className:!tA&&ts,tabMoving:!!tg})),r.createElement(el,{ref:eR,position:"right",extra:ey,prefixCls:eP})))}),ey=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.className,a=e.style,l=e.id,c=e.active,s=e.tabKey,u=e.children;return r.createElement("div",{id:l&&"".concat(l,"-panel-").concat(s),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(s),"aria-hidden":!c,style:a,className:i()(n,c&&"".concat(n,"-active"),o),ref:t},u)}),eb=["renderTabBar"],ex=["label","key"],ew=function(e){var t=e.renderTabBar,n=(0,q.Z)(e,eb),o=r.useContext(V).tabs;return t?t((0,B.Z)((0,B.Z)({},n),{},{panes:o.map(function(e){var t=e.label,n=e.key,o=(0,q.Z)(e,ex);return r.createElement(ey,(0,j.Z)({tab:t,key:n,tabKey:n},o))})}),ev):r.createElement(ev,n)},eS=n(47970),ek=["key","forceRender","style","className","destroyInactiveTabPane"],eE=function(e){var t=e.id,n=e.activeKey,o=e.animated,a=e.tabPosition,l=e.destroyInactiveTabPane,c=r.useContext(V),s=c.prefixCls,u=c.tabs,d=o.tabPane,f="".concat(s,"-tabpane");return r.createElement("div",{className:i()("".concat(s,"-content-holder"))},r.createElement("div",{className:i()("".concat(s,"-content"),"".concat(s,"-content-").concat(a),(0,z.Z)({},"".concat(s,"-content-animated"),d))},u.map(function(e){var a=e.key,c=e.forceRender,s=e.style,u=e.className,p=e.destroyInactiveTabPane,h=(0,q.Z)(e,ek),m=a===n;return r.createElement(eS.ZP,(0,j.Z)({key:a,visible:m,forceRender:c,removeOnLeave:!!(l||p),leavedClassName:"".concat(f,"-hidden")},o.tabPaneMotion),function(e,n){var o=e.style,l=e.className;return r.createElement(ey,(0,j.Z)({},h,{prefixCls:f,id:t,tabKey:a,animated:d,active:m,style:(0,B.Z)((0,B.Z)({},s),o),className:i()(u,l),ref:n}))})})))};n(32559);var eC=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],eO=0,ej=r.forwardRef(function(e,t){var n=e.id,o=e.prefixCls,a=void 0===o?"rc-tabs":o,l=e.className,c=e.items,s=e.direction,u=e.activeKey,d=e.defaultActiveKey,f=e.editable,p=e.animated,h=e.tabPosition,m=void 0===h?"top":h,g=e.tabBarGutter,v=e.tabBarStyle,y=e.tabBarExtraContent,b=e.locale,x=e.moreIcon,w=e.moreTransitionName,S=e.destroyInactiveTabPane,k=e.renderTabBar,E=e.onChange,C=e.onTabClick,O=e.onTabScroll,P=e.getPopupContainer,N=e.popupClassName,M=e.indicator,I=(0,q.Z)(e,eC),R=r.useMemo(function(){return(c||[]).filter(function(e){return e&&"object"===(0,H.Z)(e)&&"key"in e})},[c]),T="rtl"===s,A=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:(0,B.Z)({inkBar:!0},"object"===(0,H.Z)(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(p),_=(0,r.useState)(!1),D=(0,F.Z)(_,2),Z=D[0],L=D[1];(0,r.useEffect)(function(){L((0,K.Z)())},[]);var U=(0,W.Z)(function(){var e;return null===(e=R[0])||void 0===e?void 0:e.key},{value:u,defaultValue:d}),G=(0,F.Z)(U,2),X=G[0],$=G[1],Y=(0,r.useState)(function(){return R.findIndex(function(e){return e.key===X})}),Q=(0,F.Z)(Y,2),J=Q[0],ee=Q[1];(0,r.useEffect)(function(){var e,t=R.findIndex(function(e){return e.key===X});-1===t&&(t=Math.max(0,Math.min(J,R.length-1)),$(null===(e=R[t])||void 0===e?void 0:e.key)),ee(t)},[R.map(function(e){return e.key}).join("_"),X,J]);var et=(0,W.Z)(null,{value:n}),en=(0,F.Z)(et,2),er=en[0],eo=en[1];(0,r.useEffect)(function(){n||(eo("rc-tabs-".concat(eO)),eO+=1)},[]);var ei={id:er,activeKey:X,animated:A,tabPosition:m,rtl:T,mobile:Z},ea=(0,B.Z)((0,B.Z)({},ei),{},{editable:f,locale:b,moreIcon:x,moreTransitionName:w,tabBarGutter:g,onTabClick:function(e,t){null==C||C(e,t);var n=e!==X;$(e),n&&(null==E||E(e))},onTabScroll:O,extra:y,style:v,panes:null,getPopupContainer:P,popupClassName:N,indicator:M});return r.createElement(V.Provider,{value:{tabs:R,prefixCls:a}},r.createElement("div",(0,j.Z)({ref:t,id:n,className:i()(a,"".concat(a,"-").concat(m),(0,z.Z)((0,z.Z)((0,z.Z)({},"".concat(a,"-mobile"),Z),"".concat(a,"-editable"),f),"".concat(a,"-rtl"),T),l)},I),r.createElement(ew,(0,j.Z)({},ea,{renderTabBar:k})),r.createElement(eE,(0,j.Z)({destroyInactiveTabPane:S},ei,{animated:A}))))}),eP=n(64024),eN=n(68710);let eM={motionAppear:!1,motionEnter:!0,motionLeave:!0};var eI=n(45287),eR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eT=n(12918),eA=n(18544),e_=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{["".concat(t,"-switch")]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:"opacity ".concat(n)}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:"opacity ".concat(n)}}}}},[(0,eA.oN)(e,"slide-up"),(0,eA.oN)(e,"slide-down")]]};let eD=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:i,itemSelectedColor:a}=e;return{["".concat(t,"-card")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:0,padding:n,background:r,border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i),transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)},["".concat(t,"-tab-active")]:{color:a,background:e.colorBgContainer},["".concat(t,"-ink-bar")]:{visibility:"hidden"}},["&".concat(t,"-top, &").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginLeft:{_skip_check_:!0,value:(0,u.bf)(o)}}}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0")},["".concat(t,"-tab-active")]:{borderBottomColor:e.colorBgContainer}}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"0 0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG))},["".concat(t,"-tab-active")]:{borderTopColor:e.colorBgContainer}}},["&".concat(t,"-left, &").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginTop:(0,u.bf)(o)}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,u.bf)(e.borderRadiusLG)," 0 0 ").concat((0,u.bf)(e.borderRadiusLG))}},["".concat(t,"-tab-active")]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0")}},["".concat(t,"-tab-active")]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},eZ=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{["".concat(t,"-dropdown")]:Object.assign(Object.assign({},(0,eT.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},["".concat(t,"-dropdown-menu")]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:"".concat((0,u.bf)(r)," 0"),overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},eT.vS),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:"".concat((0,u.bf)(e.paddingXXS)," ").concat((0,u.bf)(e.paddingSM)),color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},eL=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:i,verticalItemMargin:a,calc:l}=e;return{["".concat(t,"-top, ").concat(t,"-bottom")]:{flexDirection:"column",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(r),content:"''"},["".concat(t,"-ink-bar")]:{height:e.lineWidthBold,"&-animated":{transition:"width ".concat(e.motionDurationSlow,", left ").concat(e.motionDurationSlow,",\n right ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-wrap")]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},["&".concat(t,"-nav-wrap-ping-left::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-right::after")]:{opacity:1}}}},["".concat(t,"-top")]:{["> ".concat(t,"-nav,\n > div > ").concat(t,"-nav")]:{"&::before":{bottom:0},["".concat(t,"-ink-bar")]:{bottom:0}}},["".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},["".concat(t,"-ink-bar")]:{top:0}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0}},["".concat(t,"-left, ").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{flexDirection:"column",minWidth:l(e.controlHeight).mul(1.25).equal(),["".concat(t,"-tab")]:{padding:i,textAlign:"center"},["".concat(t,"-tab + ").concat(t,"-tab")]:{margin:a},["".concat(t,"-nav-wrap")]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},["&".concat(t,"-nav-wrap-ping-top::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-bottom::after")]:{opacity:1}},["".concat(t,"-ink-bar")]:{width:e.lineWidthBold,"&-animated":{transition:"height ".concat(e.motionDurationSlow,", top ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-list, ").concat(t,"-nav-operations")]:{flex:"1 0 auto",flexDirection:"column"}}},["".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-ink-bar")]:{right:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{marginLeft:{_skip_check_:!0,value:(0,u.bf)(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},["".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,["".concat(t,"-ink-bar")]:{left:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0,marginRight:{_skip_check_:!0,value:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},ez=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,horizontalItemPaddingSM:o,horizontalItemPaddingLG:i}=e;return{[t]:{"&-small":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:i,fontSize:e.titleFontSizeLG}}}},["".concat(t,"-card")]:{["&".concat(t,"-small")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:n}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"0 0 ".concat((0,u.bf)(e.borderRadius)," ").concat((0,u.bf)(e.borderRadius))}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"".concat((0,u.bf)(e.borderRadius)," ").concat((0,u.bf)(e.borderRadius)," 0 0")}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,u.bf)(e.borderRadius)," ").concat((0,u.bf)(e.borderRadius)," 0")}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,u.bf)(e.borderRadius)," 0 0 ").concat((0,u.bf)(e.borderRadius))}}}},["&".concat(t,"-large")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:r}}}}}},eB=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:i,horizontalItemPadding:a,itemSelectedColor:l,itemColor:c}=e,s="".concat(t,"-tab");return{[s]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:c,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},(0,eT.Qy)(e)),"&-btn":{outline:"none",transition:"all 0.3s",["".concat(s,"-icon:not(:last-child)")]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextHeading}},"&:hover":{color:r},["&".concat(s,"-active ").concat(s,"-btn")]:{color:l,textShadow:e.tabsActiveTextShadow},["&".concat(s,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed"},["&".concat(s,"-disabled ").concat(s,"-btn, &").concat(s,"-disabled ").concat(t,"-remove")]:{"&:focus, &:active":{color:e.colorTextDisabled}},["& ".concat(s,"-remove ").concat(o)]:{margin:0},["".concat(o,":not(:last-child)")]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},["".concat(s," + ").concat(s)]:{margin:{_skip_check_:!0,value:i}}}},eF=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:o,calc:i}=e;return{["".concat(t,"-rtl")]:{direction:"rtl",["".concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:{_skip_check_:!0,value:n},["".concat(t,"-tab:last-of-type")]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,u.bf)(e.marginSM)}},["".concat(t,"-tab-remove")]:{marginRight:{_skip_check_:!0,value:(0,u.bf)(e.marginXS)},marginLeft:{_skip_check_:!0,value:(0,u.bf)(i(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav")]:{order:1},["> ".concat(t,"-content-holder")]:{order:0}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav")]:{order:0},["> ".concat(t,"-content-holder")]:{order:1}},["&".concat(t,"-card").concat(t,"-top, &").concat(t,"-card").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},["".concat(t,"-dropdown-rtl")]:{direction:"rtl"},["".concat(t,"-menu-item")]:{["".concat(t,"-dropdown-rtl")]:{textAlign:{_skip_check_:!0,value:"right"}}}}},eH=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:a,colorBorderSecondary:l}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,eT.Wf)(e)),{display:"flex",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{position:"relative",display:"flex",flex:"none",alignItems:"center",["".concat(t,"-nav-wrap")]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:"opacity ".concat(e.motionDurationSlow),content:"''",pointerEvents:"none"}},["".concat(t,"-nav-list")]:{position:"relative",display:"flex",transition:"opacity ".concat(e.motionDurationSlow)},["".concat(t,"-nav-operations")]:{display:"flex",alignSelf:"stretch"},["".concat(t,"-nav-operations-hidden")]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},["".concat(t,"-nav-more")]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},["".concat(t,"-nav-add")]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:o},padding:"0 ".concat((0,u.bf)(e.paddingXS)),background:"transparent",border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(l),borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0"),outline:"none",cursor:"pointer",color:e.colorText,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a}},(0,eT.Qy)(e))},["".concat(t,"-extra-content")]:{flex:"none"},["".concat(t,"-ink-bar")]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),eB(e)),{["".concat(t,"-content")]:{position:"relative",width:"100%"},["".concat(t,"-content-holder")]:{flex:"auto",minWidth:0,minHeight:0},["".concat(t,"-tabpane")]:{outline:"none","&-hidden":{display:"none"}}}),["".concat(t,"-centered")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-nav-wrap")]:{["&:not([class*='".concat(t,"-nav-wrap-ping'])")]:{justifyContent:"center"}}}}}};var eq=(0,d.I$)("Tabs",e=>{let t=(0,f.TS)(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:"0 0 0 ".concat((0,u.bf)(e.horizontalItemGutter)),tabsHorizontalItemMarginRTL:"0 0 0 ".concat((0,u.bf)(e.horizontalItemGutter))});return[ez(t),eF(t),eL(t),eZ(t),eD(t),eH(t),e_(t)]},e=>{let t=e.controlHeightLG;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:t,cardPadding:"".concat((t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth,"px ").concat(e.padding,"px"),cardPaddingSM:"".concat(1.5*e.paddingXXS,"px ").concat(e.padding,"px"),cardPaddingLG:"".concat(e.paddingXS,"px ").concat(e.padding,"px ").concat(1.5*e.paddingXXS,"px"),titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:"0 0 ".concat(e.margin,"px 0"),horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:"".concat(e.paddingSM,"px 0"),horizontalItemPaddingSM:"".concat(e.paddingXS,"px 0"),horizontalItemPaddingLG:"".concat(e.padding,"px 0"),verticalItemPadding:"".concat(e.paddingXS,"px ").concat(e.paddingLG,"px"),verticalItemMargin:"".concat(e.margin,"px 0 0 0"),itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),eW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eK=e=>{var t,n,o,a,s,u;let d;let{type:f,className:p,rootClassName:h,size:m,onEdit:g,hideAdd:v,centered:y,addIcon:b,popupClassName:x,children:w,items:S,animated:k,style:E,indicatorSize:C,indicator:O}=e,j=eW(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:P,moreIcon:N=r.createElement(Z.Z,null)}=j,{direction:M,tabs:I,getPrefixCls:R,getPopupContainer:T}=r.useContext(l.E_),A=R("tabs",P),_=(0,eP.Z)(A),[z,B,F]=eq(A,_);"editable-card"===f&&(d={onEdit:(e,t)=>{let{key:n,event:r}=t;null==g||g("add"===e?r:n,e)},removeIcon:r.createElement(D.Z,null),addIcon:b||r.createElement(L.Z,null),showAdd:!0!==v});let H=R(),q=(0,c.Z)(m),W=S||(0,eI.Z)(w).map(e=>{if(r.isValidElement(e)){let{key:t,props:n}=e,r=n||{},{tab:o}=r,i=eR(r,["tab"]);return Object.assign(Object.assign({key:String(t)},i),{label:o})}return null}).filter(e=>e),K=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return(t=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"==typeof n?n:{})).tabPane&&(t.tabPaneMotion=Object.assign(Object.assign({},eM),{motionName:(0,eN.m)(e,"switch")})),t}(A,k),V=Object.assign(Object.assign({},null==I?void 0:I.style),E),U={align:null!==(t=null==O?void 0:O.align)&&void 0!==t?t:null===(n=null==I?void 0:I.indicator)||void 0===n?void 0:n.align,size:null!==(u=null!==(a=null!==(o=null==O?void 0:O.size)&&void 0!==o?o:C)&&void 0!==a?a:null===(s=null==I?void 0:I.indicator)||void 0===s?void 0:s.size)&&void 0!==u?u:null==I?void 0:I.indicatorSize};return z(r.createElement(ej,Object.assign({direction:M,getPopupContainer:T,moreTransitionName:"".concat(H,"-slide-up")},j,{items:W,className:i()({["".concat(A,"-").concat(q)]:q,["".concat(A,"-card")]:["card","editable-card"].includes(f),["".concat(A,"-editable-card")]:"editable-card"===f,["".concat(A,"-centered")]:y},null==I?void 0:I.className,p,h,B,F,_),popupClassName:i()(x,B,F,_),style:V,editable:d,moreIcon:N,prefixCls:A,animated:K,indicator:U})))};eK.TabPane=()=>null;var eV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},eU=e=>{var{prefixCls:t,className:n,hoverable:o=!0}=e,a=eV(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=r.useContext(l.E_),s=c("card",t),u=i()("".concat(s,"-grid"),n,{["".concat(s,"-grid-hoverable")]:o});return r.createElement("div",Object.assign({},a,{className:u}))};let eG=e=>{let{antCls:t,componentCls:n,headerHeight:r,cardPaddingBase:o,tabsMarginBottom:i}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:"0 ".concat((0,u.bf)(o)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0")},(0,eT.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},eT.vS),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},eX=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n ".concat((0,u.bf)(o)," 0 0 0 ").concat(n,",\n 0 ").concat((0,u.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,u.bf)(o)," ").concat((0,u.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,u.bf)(o)," 0 0 0 ").concat(n," inset,\n 0 ").concat((0,u.bf)(o)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},e$=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:o,colorBorderSecondary:i,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i),display:"flex",borderRadius:"0 0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG))},(0,eT.dF)()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:(0,u.bf)(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:(0,u.bf)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i)}}})},eY=e=>Object.assign(Object.assign({margin:"".concat((0,u.bf)(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,eT.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},eT.vS),"&-description":{color:e.colorTextDescription}}),eQ=e=>{let{componentCls:t,cardPaddingBase:n,colorFillAlter:r}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat((0,u.bf)(n)),background:r,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat((0,u.bf)(e.padding)," ").concat((0,u.bf)(n))}}},eJ=e=>{let{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},e0=e=>{let{antCls:t,componentCls:n,cardShadow:r,cardHeadPadding:o,colorBorderSecondary:i,boxShadowTertiary:a,cardPaddingBase:l,extraColor:c}=e;return{[n]:Object.assign(Object.assign({},(0,eT.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(n,"-bordered)")]:{boxShadow:a},["".concat(n,"-head")]:eG(e),["".concat(n,"-extra")]:{marginInlineStart:"auto",color:c,fontWeight:"normal",fontSize:e.fontSize},["".concat(n,"-body")]:Object.assign({padding:l,borderRadius:" 0 0 ".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG))},(0,eT.dF)()),["".concat(n,"-grid")]:eX(e),["".concat(n,"-cover")]:{"> *":{display:"block",width:"100%"},["img, img + ".concat(t,"-image-mask")]:{borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0")}},["".concat(n,"-actions")]:e$(e),["".concat(n,"-meta")]:eY(e)}),["".concat(n,"-bordered")]:{border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(i),["".concat(n,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(n,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:r}},["".concat(n,"-contain-grid")]:{borderRadius:"".concat((0,u.bf)(e.borderRadiusLG)," ").concat((0,u.bf)(e.borderRadiusLG)," 0 0 "),["".concat(n,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(n,"-loading) ").concat(n,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(n,"-contain-tabs")]:{["> ".concat(n,"-head")]:{minHeight:0,["".concat(n,"-head-title, ").concat(n,"-extra")]:{paddingTop:o}}},["".concat(n,"-type-inner")]:eQ(e),["".concat(n,"-loading")]:eJ(e),["".concat(n,"-rtl")]:{direction:"rtl"}}},e1=e=>{let{componentCls:t,cardPaddingSM:n,headerHeightSM:r,headerFontSizeSM:o}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:r,padding:"0 ".concat((0,u.bf)(n)),fontSize:o,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:n}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var e2=(0,d.I$)("Card",e=>{let t=(0,f.TS)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[e0(t),e1(t)]},e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText})),e6=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let e4=e=>{let{prefixCls:t,actions:n=[]}=e;return r.createElement("ul",{className:"".concat(t,"-actions")},n.map((e,t)=>r.createElement("li",{style:{width:"".concat(100/n.length,"%")},key:"action-".concat(t)},r.createElement("span",null,e))))},e3=r.forwardRef((e,t)=>{let n;let{prefixCls:o,className:s,rootClassName:u,style:d,extra:f,headStyle:p={},bodyStyle:h={},title:m,loading:g,bordered:v=!0,size:y,type:b,cover:x,actions:w,tabList:S,children:k,activeTabKey:E,defaultActiveTabKey:C,tabBarExtraContent:O,hoverable:j,tabProps:P={}}=e,N=e6(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:M,direction:I,card:R}=r.useContext(l.E_),T=r.useMemo(()=>{let e=!1;return r.Children.forEach(k,t=>{t&&t.type&&t.type===eU&&(e=!0)}),e},[k]),A=M("card",o),[D,Z,L]=e2(A),z=r.createElement(_,{loading:!0,active:!0,paragraph:{rows:4},title:!1},k),B=void 0!==E,F=Object.assign(Object.assign({},P),{[B?"activeKey":"defaultActiveKey"]:B?E:C,tabBarExtraContent:O}),H=(0,c.Z)(y),q=H&&"default"!==H?H:"large",W=S?r.createElement(eK,Object.assign({size:q},F,{className:"".concat(A,"-head-tabs"),onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:S.map(e=>{var{tab:t}=e;return Object.assign({label:t},e6(e,["tab"]))})})):null;(m||f||W)&&(n=r.createElement("div",{className:"".concat(A,"-head"),style:p},r.createElement("div",{className:"".concat(A,"-head-wrapper")},m&&r.createElement("div",{className:"".concat(A,"-head-title")},m),f&&r.createElement("div",{className:"".concat(A,"-extra")},f)),W));let K=x?r.createElement("div",{className:"".concat(A,"-cover")},x):null,V=r.createElement("div",{className:"".concat(A,"-body"),style:h},g?z:k),U=w&&w.length?r.createElement(e4,{prefixCls:A,actions:w}):null,G=(0,a.Z)(N,["onTabChange"]),X=i()(A,null==R?void 0:R.className,{["".concat(A,"-loading")]:g,["".concat(A,"-bordered")]:v,["".concat(A,"-hoverable")]:j,["".concat(A,"-contain-grid")]:T,["".concat(A,"-contain-tabs")]:S&&S.length,["".concat(A,"-").concat(H)]:H,["".concat(A,"-type-").concat(b)]:!!b,["".concat(A,"-rtl")]:"rtl"===I},s,u,Z,L),$=Object.assign(Object.assign({},null==R?void 0:R.style),d);return D(r.createElement("div",Object.assign({ref:t},G,{className:X,style:$}),n,K,V,U))});var e5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};e3.Grid=eU,e3.Meta=e=>{let{prefixCls:t,className:n,avatar:o,title:a,description:c}=e,s=e5(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:u}=r.useContext(l.E_),d=u("card",t),f=i()("".concat(d,"-meta"),n),p=o?r.createElement("div",{className:"".concat(d,"-meta-avatar")},o):null,h=a?r.createElement("div",{className:"".concat(d,"-meta-title")},a):null,m=c?r.createElement("div",{className:"".concat(d,"-meta-description")},c):null,g=h||m?r.createElement("div",{className:"".concat(d,"-meta-detail")},h,m):null;return r.createElement("div",Object.assign({},s,{className:f}),p,g)};var e8=e3},69410:function(e,t,n){"use strict";var r=n(54998);t.Z=r.Z},91086:function(e,t,n){"use strict";var r=n(2265),o=n(71744),i=n(85180);t.Z=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,r.useContext)(o.E_),a=n("empty");switch(t){case"Table":case"List":return r.createElement(i.Z,{image:i.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return r.createElement(i.Z,{image:i.Z.PRESENTED_IMAGE_SIMPLE,className:"".concat(a,"-small")});default:return r.createElement(i.Z,null)}}},23496:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(2265),o=n(36760),i=n.n(o),a=n(71744),l=n(352),c=n(12918),s=n(80669),u=n(3104);let d=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},(0,c.Wf)(e)),{borderBlockStart:"".concat((0,l.bf)(o)," solid ").concat(r),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,l.bf)(o)," solid ").concat(r)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,l.bf)(e.dividerHorizontalGutterMargin)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,l.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(r),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,l.bf)(o)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-left")]:{"&::before":{width:"calc(".concat(a," * 100%)")},"&::after":{width:"calc(100% - ".concat(a," * 100%)")}},["&-horizontal".concat(t,"-with-text-right")]:{"&::before":{width:"calc(100% - ".concat(a," * 100%)")},"&::after":{width:"calc(".concat(a," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:"".concat((0,l.bf)(o)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-left").concat(t,"-no-default-orientation-margin-left")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(t,"-with-text-right").concat(t,"-no-default-orientation-margin-right")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:n}}})}};var f=(0,s.I$)("Divider",e=>[d((0,u.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0}))],e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},h=e=>{let{getPrefixCls:t,direction:n,divider:o}=r.useContext(a.E_),{prefixCls:l,type:c="horizontal",orientation:s="center",orientationMargin:u,className:d,rootClassName:h,children:m,dashed:g,plain:v,style:y}=e,b=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),x=t("divider",l),[w,S,k]=f(x),E=s.length>0?"-".concat(s):s,C=!!m,O="left"===s&&null!=u,j="right"===s&&null!=u,P=i()(x,null==o?void 0:o.className,S,k,"".concat(x,"-").concat(c),{["".concat(x,"-with-text")]:C,["".concat(x,"-with-text").concat(E)]:C,["".concat(x,"-dashed")]:!!g,["".concat(x,"-plain")]:!!v,["".concat(x,"-rtl")]:"rtl"===n,["".concat(x,"-no-default-orientation-margin-left")]:O,["".concat(x,"-no-default-orientation-margin-right")]:j},d,h),N=r.useMemo(()=>"number"==typeof u?u:/^\d+$/.test(u)?Number(u):u,[u]),M=Object.assign(Object.assign({},O&&{marginLeft:N}),j&&{marginRight:N});return w(r.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},null==o?void 0:o.style),y)},b,{role:"separator"}),m&&"vertical"!==c&&r.createElement("span",{className:"".concat(x,"-inner-text"),style:M},m)))}},80795:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(2265),o=n(77565),i=n(36760),a=n.n(i),l=n(71030),c=n(74126),s=n(50506),u=n(18694),d=n(62236),f=n(92736),p=n(93942),h=n(19722),m=n(13613),g=n(95140),v=n(71744),y=n(45937),b=n(88208),x=n(29961),w=n(12918),S=n(18544),k=n(29382),E=n(691),C=n(88260),O=n(80669),j=n(3104),P=e=>{let{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i="".concat(n,"-item");return{["".concat(t,", ").concat(t,"-menu-submenu")]:{["".concat(n," ").concat(i)]:{["&".concat(i,"-danger:not(").concat(i,"-disabled)")]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},N=n(34442),M=n(352);let I=e=>{let{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:l,motionDurationMid:c,paddingBlock:s,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:m}=e;return[{[t]:Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},["&-trigger".concat(a,"-btn")]:{["& > ".concat(l,"-down, & > ").concat(a,"-btn-icon > ").concat(l,"-down")]:{fontSize:p}},["".concat(t,"-wrap")]:{position:"relative",["".concat(a,"-btn > ").concat(l,"-down")]:{fontSize:p},["".concat(l,"-down::before")]:{transition:"transform ".concat(c)}},["".concat(t,"-wrap-open")]:{["".concat(l,"-down::before")]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},["&".concat(a,"-slide-down-enter").concat(a,"-slide-down-enter-active").concat(t,"-placement-bottomLeft,\n &").concat(a,"-slide-down-appear").concat(a,"-slide-down-appear-active").concat(t,"-placement-bottomLeft,\n &").concat(a,"-slide-down-enter").concat(a,"-slide-down-enter-active").concat(t,"-placement-bottom,\n &").concat(a,"-slide-down-appear").concat(a,"-slide-down-appear-active").concat(t,"-placement-bottom,\n &").concat(a,"-slide-down-enter").concat(a,"-slide-down-enter-active").concat(t,"-placement-bottomRight,\n &").concat(a,"-slide-down-appear").concat(a,"-slide-down-appear-active").concat(t,"-placement-bottomRight")]:{animationName:S.fJ},["&".concat(a,"-slide-up-enter").concat(a,"-slide-up-enter-active").concat(t,"-placement-topLeft,\n &").concat(a,"-slide-up-appear").concat(a,"-slide-up-appear-active").concat(t,"-placement-topLeft,\n &").concat(a,"-slide-up-enter").concat(a,"-slide-up-enter-active").concat(t,"-placement-top,\n &").concat(a,"-slide-up-appear").concat(a,"-slide-up-appear-active").concat(t,"-placement-top,\n &").concat(a,"-slide-up-enter").concat(a,"-slide-up-enter-active").concat(t,"-placement-topRight,\n &").concat(a,"-slide-up-appear").concat(a,"-slide-up-appear-active").concat(t,"-placement-topRight")]:{animationName:S.Qt},["&".concat(a,"-slide-down-leave").concat(a,"-slide-down-leave-active").concat(t,"-placement-bottomLeft,\n &").concat(a,"-slide-down-leave").concat(a,"-slide-down-leave-active").concat(t,"-placement-bottom,\n &").concat(a,"-slide-down-leave").concat(a,"-slide-down-leave-active").concat(t,"-placement-bottomRight")]:{animationName:S.Uw},["&".concat(a,"-slide-up-leave").concat(a,"-slide-up-leave-active").concat(t,"-placement-topLeft,\n &").concat(a,"-slide-up-leave").concat(a,"-slide-up-leave-active").concat(t,"-placement-top,\n &").concat(a,"-slide-up-leave").concat(a,"-slide-up-leave-active").concat(t,"-placement-topRight")]:{animationName:S.ly}})},(0,C.ZP)(e,m,{arrowPlacement:{top:!0,bottom:!0}}),{["".concat(t," ").concat(n)]:{position:"relative",margin:0},["".concat(n,"-submenu-popup")]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},["".concat(t,", ").concat(t,"-menu-submenu")]:{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,w.Qy)(e)),{["".concat(n,"-item-group-title")]:{padding:"".concat((0,M.bf)(s)," ").concat((0,M.bf)(h)),color:e.colorTextDescription,transition:"all ".concat(c)},["".concat(n,"-item")]:{position:"relative",display:"flex",alignItems:"center"},["".concat(n,"-item-icon")]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},["".concat(n,"-title-content")]:{flex:"auto","> a":{color:"inherit",transition:"all ".concat(c),"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:Object.assign(Object.assign({clear:"both",margin:0,padding:"".concat((0,M.bf)(s)," ").concat((0,M.bf)(h)),color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(c),borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,w.Qy)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:"".concat((0,M.bf)(e.marginXXS)," 0"),overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},["".concat(t,"-menu-submenu-expand-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,["".concat(t,"-menu-submenu-arrow-icon")]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),["".concat(n,"-item-group-list")]:{margin:"0 ".concat((0,M.bf)(e.marginXS)),padding:0,listStyle:"none"},["".concat(n,"-submenu-title")]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},["".concat(n,"-submenu-vertical")]:{position:"relative"},["".concat(n,"-submenu").concat(n,"-submenu-disabled ").concat(t,"-menu-submenu-title")]:{["&, ".concat(t,"-menu-submenu-arrow-icon")]:{color:f,backgroundColor:m,cursor:"not-allowed"}},["".concat(n,"-submenu-selected ").concat(t,"-menu-submenu-title")]:{color:e.colorPrimary}})}},[(0,S.oN)(e,"slide-up"),(0,S.oN)(e,"slide-down"),(0,k.Fm)(e,"move-up"),(0,k.Fm)(e,"move-down"),(0,E._y)(e,"zoom-big")]]};var R=(0,O.I$)("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=(0,j.TS)(e,{menuCls:"".concat(o,"-menu"),dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[I(i),P(i)]},e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},(0,C.wZ)({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),(0,N.w)(e))),T=n(64024);let A=e=>{let t;let{menu:n,arrow:i,prefixCls:p,children:w,trigger:S,disabled:k,dropdownRender:E,getPopupContainer:C,overlayClassName:O,rootClassName:j,overlayStyle:P,open:N,onOpenChange:M,visible:I,onVisibleChange:A,mouseEnterDelay:_=.15,mouseLeaveDelay:D=.1,autoAdjustOverflow:Z=!0,placement:L="",overlay:z,transitionName:B}=e,{getPopupContainer:F,getPrefixCls:H,direction:q,dropdown:W}=r.useContext(v.E_);(0,m.ln)("Dropdown");let K=r.useMemo(()=>{let e=H();return void 0!==B?B:L.includes("top")?"".concat(e,"-slide-down"):"".concat(e,"-slide-up")},[H,L,B]),V=r.useMemo(()=>L?L.includes("Center")?L.slice(0,L.indexOf("Center")):L:"rtl"===q?"bottomRight":"bottomLeft",[L,q]),U=H("dropdown",p),G=(0,T.Z)(U),[X,$,Y]=R(U,G),[,Q]=(0,x.ZP)(),J=r.Children.only(w),ee=(0,h.Tm)(J,{className:a()("".concat(U,"-trigger"),{["".concat(U,"-rtl")]:"rtl"===q},J.props.className),disabled:k}),et=k?[]:S;et&&et.includes("contextMenu")&&(t=!0);let[en,er]=(0,s.Z)(!1,{value:null!=N?N:I}),eo=(0,c.zX)(e=>{null==M||M(e,{source:"trigger"}),null==A||A(e),er(e)}),ei=a()(O,j,$,Y,G,null==W?void 0:W.className,{["".concat(U,"-rtl")]:"rtl"===q}),ea=(0,f.Z)({arrowPointAtCenter:"object"==typeof i&&i.pointAtCenter,autoAdjustOverflow:Z,offset:Q.marginXXS,arrowWidth:i?Q.sizePopupArrow:0,borderRadius:Q.borderRadius}),el=r.useCallback(()=>{null!=n&&n.selectable&&null!=n&&n.multiple||(null==M||M(!1,{source:"menu"}),er(!1))},[null==n?void 0:n.selectable,null==n?void 0:n.multiple]),[ec,es]=(0,d.Cn)("Dropdown",null==P?void 0:P.zIndex),eu=r.createElement(l.Z,Object.assign({alignPoint:t},(0,u.Z)(e,["rootClassName"]),{mouseEnterDelay:_,mouseLeaveDelay:D,visible:en,builtinPlacements:ea,arrow:!!i,overlayClassName:ei,prefixCls:U,getPopupContainer:C||F,transitionName:K,trigger:et,overlay:()=>{let e;return e=(null==n?void 0:n.items)?r.createElement(y.Z,Object.assign({},n)):"function"==typeof z?z():z,E&&(e=E(e)),e=r.Children.only("string"==typeof e?r.createElement("span",null,e):e),r.createElement(b.J,{prefixCls:"".concat(U,"-menu"),rootClassName:a()(Y,G),expandIcon:r.createElement("span",{className:"".concat(U,"-menu-submenu-arrow")},r.createElement(o.Z,{className:"".concat(U,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:el,validator:e=>{let{mode:t}=e}},e)},placement:V,onVisibleChange:eo,overlayStyle:Object.assign(Object.assign(Object.assign({},null==W?void 0:W.style),P),{zIndex:ec})}),ee);return ec&&(eu=r.createElement(g.Z.Provider,{value:es},eu)),X(eu)},_=(0,p.Z)(A,"dropdown",e=>e,function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})});A._InternalPanelDoNotUseOrYouWillBeFired=e=>r.createElement(_,Object.assign({},e),r.createElement("span",null));var D=n(39760),Z=n(73002),L=n(93142),z=n(65658),B=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let F=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:o}=r.useContext(v.E_),{prefixCls:i,type:l="default",danger:c,disabled:s,loading:u,onClick:d,htmlType:f,children:p,className:h,menu:m,arrow:g,autoFocus:y,overlay:b,trigger:x,align:w,open:S,onOpenChange:k,placement:E,getPopupContainer:C,href:O,icon:j=r.createElement(D.Z,null),title:P,buttonsRender:N=e=>e,mouseEnterDelay:M,mouseLeaveDelay:I,overlayClassName:R,overlayStyle:T,destroyPopupOnHide:_,dropdownRender:F}=e,H=B(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),q=n("dropdown",i),W={menu:m,arrow:g,autoFocus:y,align:w,disabled:s,trigger:s?[]:x,onOpenChange:k,getPopupContainer:C||t,mouseEnterDelay:M,mouseLeaveDelay:I,overlayClassName:R,overlayStyle:T,destroyPopupOnHide:_,dropdownRender:F},{compactSize:K,compactItemClassnames:V}=(0,z.ri)(q,o),U=a()("".concat(q,"-button"),V,h);"overlay"in e&&(W.overlay=b),"open"in e&&(W.open=S),"placement"in e?W.placement=E:W.placement="rtl"===o?"bottomLeft":"bottomRight";let[G,X]=N([r.createElement(Z.ZP,{type:l,danger:c,disabled:s,loading:u,onClick:d,htmlType:f,href:O,title:P},p),r.createElement(Z.ZP,{type:l,danger:c,icon:j})]);return r.createElement(L.Z.Compact,Object.assign({className:U,size:K,block:!0},H),G,r.createElement(A,Object.assign({},W),X))};F.__ANT_BUTTON=!0,A.Button=F;var H=A},85180:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(36760),o=n.n(r),i=n(2265),a=n(71744),l=n(55274),c=n(36360),s=n(29961),u=n(80669),d=n(3104);let f=e=>{let{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",["".concat(t,"-image")]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},["".concat(t,"-description")]:{color:e.colorText},["".concat(t,"-footer")]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDisabled,["".concat(t,"-description")]:{color:e.colorTextDisabled},["".concat(t,"-image")]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDisabled,["".concat(t,"-image")]:{height:e.emptyImgHeightSM}}}}};var p=(0,u.I$)("Empty",e=>{let{componentCls:t,controlHeightLG:n,calc:r}=e;return[f((0,d.TS)(e,{emptyImgCls:"".concat(t,"-img"),emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()}))]}),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let m=i.createElement(()=>{let[,e]=(0,s.ZP)(),t=new c.C(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return i.createElement("svg",{style:t,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("g",{transform:"translate(24 31.67)"},i.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),i.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),i.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),i.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),i.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),i.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),i.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},i.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),i.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},null),g=i.createElement(()=>{let[,e]=(0,s.ZP)(),{colorFill:t,colorFillTertiary:n,colorFillQuaternary:r,colorBgContainer:o}=e,{borderColor:a,shadowColor:l,contentColor:u}=(0,i.useMemo)(()=>({borderColor:new c.C(t).onBackground(o).toHexShortString(),shadowColor:new c.C(n).onBackground(o).toHexShortString(),contentColor:new c.C(r).onBackground(o).toHexShortString()}),[t,n,r,o]);return i.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},i.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),i.createElement("g",{fillRule:"nonzero",stroke:a},i.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),i.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:u}))))},null),v=e=>{var{className:t,rootClassName:n,prefixCls:r,image:c=m,description:s,children:u,imageStyle:d,style:f}=e,v=h(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);let{getPrefixCls:y,direction:b,empty:x}=i.useContext(a.E_),w=y("empty",r),[S,k,E]=p(w),[C]=(0,l.Z)("Empty"),O=void 0!==s?s:null==C?void 0:C.description,j=null;return j="string"==typeof c?i.createElement("img",{alt:"string"==typeof O?O:"empty",src:c}):c,S(i.createElement("div",Object.assign({className:o()(k,E,w,null==x?void 0:x.className,{["".concat(w,"-normal")]:c===g,["".concat(w,"-rtl")]:"rtl"===b},t,n),style:Object.assign(Object.assign({},null==x?void 0:x.style),f)},v),i.createElement("div",{className:"".concat(w,"-image"),style:d},j),O&&i.createElement("div",{className:"".concat(w,"-description")},O),u&&i.createElement("div",{className:"".concat(w,"-footer")},u)))};v.PRESENTED_IMAGE_DEFAULT=m,v.PRESENTED_IMAGE_SIMPLE=g;var y=v},56250:function(e,t,n){"use strict";var r=n(2265),o=n(39109);let i=["outlined","borderless","filled"];t.Z=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=(0,r.useContext)(o.pg);t=void 0!==e?e:!1===n?"borderless":null!=a?a:"outlined";let l=i.includes(t);return[t,l]}},20577:function(e,t,n){"use strict";n.d(t,{Z:function(){return em}});var r=n(2265),o=n(70464),i=n(1119),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},l=n(55015),c=r.forwardRef(function(e,t){return r.createElement(l.Z,(0,i.Z)({},e,{ref:t,icon:a}))}),s=n(36760),u=n.n(s),d=n(11993),f=n(41154),p=n(26365),h=n(6989),m=n(76405),g=n(25049);function v(){return"function"==typeof BigInt}function y(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function b(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";"0"===i&&"0"===a&&(n=!1);var l=n?"-":"";return{negative:n,negativeStr:l,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(l).concat(r)}}function x(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function w(e){var t=String(e);if(x(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return null!=r&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&k(t)?t.length-t.indexOf(".")-1:0}function S(e){var t=String(e);if(x(e)){if(e>Number.MAX_SAFE_INTEGER)return String(v()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(v()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(w(t))}return b(t).fullStr}function k(e){return"number"==typeof e?!Number.isNaN(e):!!e&&(/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e))}var E=function(){function e(t){if((0,m.Z)(this,e),(0,d.Z)(this,"origin",""),(0,d.Z)(this,"negative",void 0),(0,d.Z)(this,"integer",void 0),(0,d.Z)(this,"decimal",void 0),(0,d.Z)(this,"decimalLen",void 0),(0,d.Z)(this,"empty",void 0),(0,d.Z)(this,"nan",void 0),y(t)){this.empty=!0;return}if(this.origin=String(t),"-"===t||Number.isNaN(t)){this.nan=!0;return}var n=t;if(x(n)&&(n=Number(n)),k(n="string"==typeof n?n:S(n))){var r=b(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}return(0,g.Z)(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(e){return BigInt("".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(e,"0")))}},{key:"negate",value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:"cal",value:function(t,n,r){var o=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),i=n(this.alignDecimal(o),t.alignDecimal(o)).toString(),a=r(o),l=b(i),c=l.negativeStr,s=l.trimStr,u="".concat(c).concat(s.padStart(a+1,"0"));return new e("".concat(u.slice(0,-a),".").concat(u.slice(-a)))}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:"multi",value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return 2*e})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toString()===(null==e?void 0:e.toString())}},{key:"lessEquals",value:function(e){return 0>=this.add(e.negate().toString()).toNumber()}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return e?this.isInvalidate()?"":b("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}(),C=function(){function e(t){if((0,m.Z)(this,e),(0,d.Z)(this,"origin",""),(0,d.Z)(this,"number",void 0),(0,d.Z)(this,"empty",void 0),y(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return(0,g.Z)(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(w(this.number),w(n));return new e(r.toFixed(o))}},{key:"multi",value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(w(this.number),w(n));return new e(r.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toNumber()===(null==e?void 0:e.toNumber())}},{key:"lessEquals",value:function(e){return 0>=this.add(e.negate().toString()).toNumber()}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return e?this.isInvalidate()?"":S(this.number):this.origin}}]),e}();function O(e){return v()?new E(e):new C(e)}function j(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var o=b(e),i=o.negativeStr,a=o.integerStr,l=o.decimalStr,c="".concat(t).concat(l),s="".concat(i).concat(a);if(n>=0){var u=Number(l[n]);return u>=5&&!r?j(O(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u)).toString(),t,n,r):0===n?s:"".concat(s).concat(t).concat(l.padEnd(n,"0").slice(0,n))}return".0"===c?s:"".concat(s).concat(c)}var P=n(2027),N=n(27380),M=n(28791),I=n(32559),R=n(79267),T=function(){var e=(0,r.useState)(!1),t=(0,p.Z)(e,2),n=t[0],o=t[1];return(0,N.Z)(function(){o((0,R.Z)())},[]),n},A=n(53346);function _(e){var t=e.prefixCls,n=e.upNode,o=e.downNode,a=e.upDisabled,l=e.downDisabled,c=e.onStep,s=r.useRef(),f=r.useRef([]),p=r.useRef();p.current=c;var h=function(){clearTimeout(s.current)},m=function(e,t){e.preventDefault(),h(),p.current(t),s.current=setTimeout(function e(){p.current(t),s.current=setTimeout(e,200)},600)};if(r.useEffect(function(){return function(){h(),f.current.forEach(function(e){return A.Z.cancel(e)})}},[]),T())return null;var g="".concat(t,"-handler"),v=u()(g,"".concat(g,"-up"),(0,d.Z)({},"".concat(g,"-up-disabled"),a)),y=u()(g,"".concat(g,"-down"),(0,d.Z)({},"".concat(g,"-down-disabled"),l)),b=function(){return f.current.push((0,A.Z)(h))},x={unselectable:"on",role:"button",onMouseUp:b,onMouseLeave:b};return r.createElement("div",{className:"".concat(g,"-wrap")},r.createElement("span",(0,i.Z)({},x,{onMouseDown:function(e){m(e,!0)},"aria-label":"Increase Value","aria-disabled":a,className:v}),n||r.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),r.createElement("span",(0,i.Z)({},x,{onMouseDown:function(e){m(e,!1)},"aria-label":"Decrease Value","aria-disabled":l,className:y}),o||r.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function D(e){var t="number"==typeof e?S(e):b(e).fullStr;return t.includes(".")?b(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var Z=n(55041),L=function(){var e=(0,r.useRef)(0),t=function(){A.Z.cancel(e.current)};return(0,r.useEffect)(function(){return t},[]),function(n){t(),e.current=(0,A.Z)(function(){n()})}},z=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","wheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur"],B=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],F=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},H=function(e){var t=O(e);return t.isInvalidate()?null:t},q=r.forwardRef(function(e,t){var n,o,a,l=e.prefixCls,c=void 0===l?"rc-input-number":l,s=e.className,m=e.style,g=e.min,v=e.max,y=e.step,b=void 0===y?1:y,x=e.defaultValue,E=e.value,C=e.disabled,P=e.readOnly,R=e.upHandler,T=e.downHandler,A=e.keyboard,Z=e.wheel,B=e.controls,q=(e.classNames,e.stringMode),W=e.parser,K=e.formatter,V=e.precision,U=e.decimalSeparator,G=e.onChange,X=e.onInput,$=e.onPressEnter,Y=e.onStep,Q=e.changeOnBlur,J=void 0===Q||Q,ee=(0,h.Z)(e,z),et="".concat(c,"-input"),en=r.useRef(null),er=r.useState(!1),eo=(0,p.Z)(er,2),ei=eo[0],ea=eo[1],el=r.useRef(!1),ec=r.useRef(!1),es=r.useRef(!1),eu=r.useState(function(){return O(null!=E?E:x)}),ed=(0,p.Z)(eu,2),ef=ed[0],ep=ed[1],eh=r.useCallback(function(e,t){return t?void 0:V>=0?V:Math.max(w(e),w(b))},[V,b]),em=r.useCallback(function(e){var t=String(e);if(W)return W(t);var n=t;return U&&(n=n.replace(U,".")),n.replace(/[^\w.-]+/g,"")},[W,U]),eg=r.useRef(""),ev=r.useCallback(function(e,t){if(K)return K(e,{userTyping:t,input:String(eg.current)});var n="number"==typeof e?S(e):e;if(!t){var r=eh(n,t);k(n)&&(U||r>=0)&&(n=j(n,U||".",r))}return n},[K,eh,U]),ey=r.useState(function(){var e=null!=x?x:E;return ef.isInvalidate()&&["string","number"].includes((0,f.Z)(e))?Number.isNaN(e)?"":e:ev(ef.toString(),!1)}),eb=(0,p.Z)(ey,2),ex=eb[0],ew=eb[1];function eS(e,t){ew(ev(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}eg.current=ex;var ek=r.useMemo(function(){return H(v)},[v,V]),eE=r.useMemo(function(){return H(g)},[g,V]),eC=r.useMemo(function(){return!(!ek||!ef||ef.isInvalidate())&&ek.lessEquals(ef)},[ek,ef]),eO=r.useMemo(function(){return!(!eE||!ef||ef.isInvalidate())&&ef.lessEquals(eE)},[eE,ef]),ej=(n=en.current,o=(0,r.useRef)(null),[function(){try{var e=n.selectionStart,t=n.selectionEnd,r=n.value,i=r.substring(0,e),a=r.substring(t);o.current={start:e,end:t,value:r,beforeTxt:i,afterTxt:a}}catch(e){}},function(){if(n&&o.current&&ei)try{var e=n.value,t=o.current,r=t.beforeTxt,i=t.afterTxt,a=t.start,l=e.length;if(e.endsWith(i))l=e.length-o.current.afterTxt.length;else if(e.startsWith(r))l=r.length;else{var c=r[a-1],s=e.indexOf(c,a-1);-1!==s&&(l=s+1)}n.setSelectionRange(l,l)}catch(e){(0,I.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(e.message))}}]),eP=(0,p.Z)(ej,2),eN=eP[0],eM=eP[1],eI=function(e){return ek&&!e.lessEquals(ek)?ek:eE&&!eE.lessEquals(e)?eE:null},eR=function(e){return!eI(e)},eT=function(e,t){var n=e,r=eR(n)||n.isEmpty();if(n.isEmpty()||t||(n=eI(n)||n,r=!0),!P&&!C&&r){var o,i=n.toString(),a=eh(i,t);return a>=0&&!eR(n=O(j(i,".",a)))&&(n=O(j(i,".",a,!0))),n.equals(ef)||(o=n,void 0===E&&ep(o),null==G||G(n.isEmpty()?null:F(q,n)),void 0===E&&eS(n,t)),n}return ef},eA=L(),e_=function e(t){if(eN(),eg.current=t,ew(t),!ec.current){var n=O(em(t));n.isNaN()||eT(n,!0)}null==X||X(t),eA(function(){var n=t;W||(n=t.replace(/。/g,".")),n!==t&&e(n)})},eD=function(e){if((!e||!eC)&&(e||!eO)){el.current=!1;var t,n=O(es.current?D(b):b);e||(n=n.negate());var r=eT((ef||O(0)).add(n.toString()),!1);null==Y||Y(F(q,r),{offset:es.current?D(b):b,type:e?"up":"down"}),null===(t=en.current)||void 0===t||t.focus()}},eZ=function(e){var t=O(em(ex)),n=t;n=t.isNaN()?eT(ef,e):eT(t,e),void 0!==E?eS(ef,!1):n.isNaN()||eS(n,!1)};return r.useEffect(function(){var e=function(e){!1!==Z&&(eD(e.deltaY<0),e.preventDefault())},t=en.current;if(t)return t.addEventListener("wheel",e),function(){return t.removeEventListener("wheel",e)}},[eD]),(0,N.o)(function(){ef.isInvalidate()||eS(ef,!1)},[V,K]),(0,N.o)(function(){var e=O(E);ep(e);var t=O(em(ex));e.equals(t)&&el.current&&!K||eS(e,el.current)},[E]),(0,N.o)(function(){K&&eM()},[ex]),r.createElement("div",{className:u()(c,s,(a={},(0,d.Z)(a,"".concat(c,"-focused"),ei),(0,d.Z)(a,"".concat(c,"-disabled"),C),(0,d.Z)(a,"".concat(c,"-readonly"),P),(0,d.Z)(a,"".concat(c,"-not-a-number"),ef.isNaN()),(0,d.Z)(a,"".concat(c,"-out-of-range"),!ef.isInvalidate()&&!eR(ef)),a)),style:m,onFocus:function(){ea(!0)},onBlur:function(){J&&eZ(!1),ea(!1),el.current=!1},onKeyDown:function(e){var t=e.key,n=e.shiftKey;el.current=!0,es.current=n,"Enter"===t&&(ec.current||(el.current=!1),eZ(!1),null==$||$(e)),!1!==A&&!ec.current&&["Up","ArrowUp","Down","ArrowDown"].includes(t)&&(eD("Up"===t||"ArrowUp"===t),e.preventDefault())},onKeyUp:function(){el.current=!1,es.current=!1},onCompositionStart:function(){ec.current=!0},onCompositionEnd:function(){ec.current=!1,e_(en.current.value)},onBeforeInput:function(){el.current=!0}},(void 0===B||B)&&r.createElement(_,{prefixCls:c,upNode:R,downNode:T,upDisabled:eC,downDisabled:eO,onStep:eD}),r.createElement("div",{className:"".concat(et,"-wrap")},r.createElement("input",(0,i.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":g,"aria-valuemax":v,"aria-valuenow":ef.isInvalidate()?null:ef.toString(),step:b},ee,{ref:(0,M.sQ)(en,t),className:et,value:ex,onChange:function(e){e_(e.target.value)},disabled:C,readOnly:P}))))}),W=r.forwardRef(function(e,t){var n=e.disabled,o=e.style,a=e.prefixCls,l=e.value,c=e.prefix,s=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,p=e.classNames,m=(0,h.Z)(e,B),g=r.useRef(null);return r.createElement(P.Q,{className:f,triggerFocus:function(e){g.current&&(0,Z.nH)(g.current,e)},prefixCls:a,value:l,disabled:n,style:o,prefix:c,suffix:s,addonAfter:d,addonBefore:u,classNames:p,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}},r.createElement(q,(0,i.Z)({prefixCls:a,disabled:n,ref:(0,M.sQ)(g,t),className:null==p?void 0:p.input},m)))});W.displayName="InputNumber";var K=n(12757),V=n(71744),U=n(13959),G=n(86586),X=n(64024),$=n(33759),Y=n(39109),Q=n(56250),J=n(65658),ee=n(352),et=n(31282),en=n(37433),er=n(65265),eo=n(12918),ei=n(17691),ea=n(80669),el=n(3104),ec=n(36360);let es=(e,t)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=e,i="lg"===t?o:r;return{["&-".concat(t)]:{["".concat(n,"-handler-wrap")]:{borderStartEndRadius:i,borderEndEndRadius:i},["".concat(n,"-handler-up")]:{borderStartEndRadius:i},["".concat(n,"-handler-down")]:{borderEndEndRadius:i}}}},eu=e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,fontSizeLG:i,controlHeightLG:a,controlHeightSM:l,colorError:c,paddingInlineSM:s,paddingBlockSM:u,paddingBlockLG:d,paddingInlineLG:f,colorTextDescription:p,motionDurationMid:h,handleHoverColor:m,paddingInline:g,paddingBlock:v,handleBg:y,handleActiveBg:b,colorTextDisabled:x,borderRadiusSM:w,borderRadiusLG:S,controlWidth:k,handleOpacity:E,handleBorderColor:C,filledHandleBg:O,lineHeightLG:j,calc:P}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,eo.Wf)(e)),(0,et.ik)(e)),{display:"inline-block",width:k,margin:0,padding:0,borderRadius:o}),(0,er.qG)(e,{["".concat(t,"-handler-wrap")]:{background:y,["".concat(t,"-handler-down")]:{borderBlockStart:"".concat((0,ee.bf)(n)," ").concat(r," ").concat(C)}}})),(0,er.H8)(e,{["".concat(t,"-handler-wrap")]:{background:O,["".concat(t,"-handler-down")]:{borderBlockStart:"".concat((0,ee.bf)(n)," ").concat(r," ").concat(C)}},"&:focus-within":{["".concat(t,"-handler-wrap")]:{background:y}}})),(0,er.Mu)(e)),{"&-rtl":{direction:"rtl",["".concat(t,"-input")]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:i,lineHeight:j,borderRadius:S,["input".concat(t,"-input")]:{height:P(a).sub(P(n).mul(2)).equal(),padding:"".concat((0,ee.bf)(d)," ").concat((0,ee.bf)(f))}},"&-sm":{padding:0,borderRadius:w,["input".concat(t,"-input")]:{height:P(l).sub(P(n).mul(2)).equal(),padding:"".concat((0,ee.bf)(u)," ").concat((0,ee.bf)(s))}},"&-out-of-range":{["".concat(t,"-input-wrap")]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,eo.Wf)(e)),(0,et.s7)(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",["".concat(t,"-affix-wrapper")]:{width:"100%"},"&-lg":{["".concat(t,"-group-addon")]:{borderRadius:S,fontSize:e.fontSizeLG}},"&-sm":{["".concat(t,"-group-addon")]:{borderRadius:w}}},(0,er.ir)(e)),(0,er.S5)(e)),{["&:not(".concat(t,"-compact-first-item):not(").concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-first-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&:not(".concat(t,"-compact-first-item)").concat(t,"-compact-last-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),["&-disabled ".concat(t,"-input")]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,eo.Wf)(e)),{width:"100%",padding:"".concat((0,ee.bf)(v)," ").concat((0,ee.bf)(g)),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:"all ".concat(h," linear"),appearance:"textfield",fontSize:"inherit"}),(0,et.nz)(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:Object.assign(Object.assign(Object.assign({["&:hover ".concat(t,"-handler-wrap, &-focused ").concat(t,"-handler-wrap")]:{opacity:1},["".concat(t,"-handler-wrap")]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,opacity:E,display:"flex",flexDirection:"column",alignItems:"stretch",transition:"opacity ".concat(h," linear ").concat(h),["".concat(t,"-handler")]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",["\n ".concat(t,"-handler-up-inner,\n ").concat(t,"-handler-down-inner\n ")]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},["".concat(t,"-handler")]:{height:"50%",overflow:"hidden",color:p,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:"".concat((0,ee.bf)(n)," ").concat(r," ").concat(C),transition:"all ".concat(h," linear"),"&:active":{background:b},"&:hover":{height:"60%",["\n ".concat(t,"-handler-up-inner,\n ").concat(t,"-handler-down-inner\n ")]:{color:m}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,eo.Ro)()),{color:p,transition:"all ".concat(h," linear"),userSelect:"none"})},["".concat(t,"-handler-up")]:{borderStartEndRadius:o},["".concat(t,"-handler-down")]:{borderEndEndRadius:o}},es(e,"lg")),es(e,"sm")),{"&-disabled, &-readonly":{["".concat(t,"-handler-wrap")]:{display:"none"},["".concat(t,"-input")]:{color:"inherit"}},["\n ".concat(t,"-handler-up-disabled,\n ").concat(t,"-handler-down-disabled\n ")]:{cursor:"not-allowed"},["\n ".concat(t,"-handler-up-disabled:hover &-handler-up-inner,\n ").concat(t,"-handler-down-disabled:hover &-handler-down-inner\n ")]:{color:x}})}]},ed=e=>{let{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:l,paddingInlineLG:c,paddingInlineSM:s,paddingBlockLG:u,paddingBlockSM:d}=e;return{["".concat(t,"-affix-wrapper")]:Object.assign(Object.assign({["input".concat(t,"-input")]:{padding:"".concat((0,ee.bf)(n)," 0")}},(0,et.ik)(e)),{position:"relative",display:"inline-flex",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:c,["input".concat(t,"-input")]:{padding:"".concat((0,ee.bf)(u)," 0")}},"&-sm":{borderRadius:l,paddingInlineStart:s,["input".concat(t,"-input")]:{padding:"".concat((0,ee.bf)(d)," 0")}},["&:not(".concat(t,"-disabled):hover")]:{zIndex:1},"&-focused, &:focus":{zIndex:1},["&-disabled > ".concat(t,"-disabled")]:{background:"transparent"},["> div".concat(t)]:{width:"100%",border:"none",outline:"none",["&".concat(t,"-focused")]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},["".concat(t,"-handler-wrap")]:{zIndex:2},[t]:{color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:r,marginInlineStart:o}}})}};var ef=(0,ea.I$)("InputNumber",e=>{let t=(0,el.TS)(e,(0,en.e)(e));return[eu(t),ed(t),(0,ei.c)(t)]},e=>{var t;let n=null!==(t=e.handleVisible)&&void 0!==t?t:"auto";return Object.assign(Object.assign({},(0,en.T)(e)),{controlWidth:90,handleWidth:e.controlHeightSM-2*e.lineWidth,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new ec.C(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:!0===n?1:0})},{unitless:{handleOpacity:!0}}),ep=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eh=r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:i}=r.useContext(V.E_),a=r.useRef(null);r.useImperativeHandle(t,()=>a.current);let{className:l,rootClassName:s,size:d,disabled:f,prefixCls:p,addonBefore:h,addonAfter:m,prefix:g,bordered:v,readOnly:y,status:b,controls:x,variant:w}=e,S=ep(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls","variant"]),k=n("input-number",p),E=(0,X.Z)(k),[C,O,j]=ef(k,E),{compactSize:P,compactItemClassnames:N}=(0,J.ri)(k,i),M=r.createElement(c,{className:"".concat(k,"-handler-up-inner")}),I=r.createElement(o.Z,{className:"".concat(k,"-handler-down-inner")});"object"==typeof x&&(M=void 0===x.upIcon?M:r.createElement("span",{className:"".concat(k,"-handler-up-inner")},x.upIcon),I=void 0===x.downIcon?I:r.createElement("span",{className:"".concat(k,"-handler-down-inner")},x.downIcon));let{hasFeedback:R,status:T,isFormItemInput:A,feedbackIcon:_}=r.useContext(Y.aM),D=(0,K.F)(T,b),Z=(0,$.Z)(e=>{var t;return null!==(t=null!=d?d:P)&&void 0!==t?t:e}),L=r.useContext(G.Z),[z,B]=(0,Q.Z)(w,v),F=R&&r.createElement(r.Fragment,null,_),H=u()({["".concat(k,"-lg")]:"large"===Z,["".concat(k,"-sm")]:"small"===Z,["".concat(k,"-rtl")]:"rtl"===i,["".concat(k,"-in-form-item")]:A},O),q="".concat(k,"-group");return C(r.createElement(W,Object.assign({ref:a,disabled:null!=f?f:L,className:u()(j,E,l,s,N),upHandler:M,downHandler:I,prefixCls:k,readOnly:y,controls:"boolean"==typeof x?x:void 0,prefix:g,suffix:F,addonAfter:m&&r.createElement(J.BR,null,r.createElement(Y.Ux,{override:!0,status:!0},m)),addonBefore:h&&r.createElement(J.BR,null,r.createElement(Y.Ux,{override:!0,status:!0},h)),classNames:{input:H,variant:u()({["".concat(k,"-").concat(z)]:B},(0,K.Z)(k,D,R)),affixWrapper:u()({["".concat(k,"-affix-wrapper-sm")]:"small"===Z,["".concat(k,"-affix-wrapper-lg")]:"large"===Z,["".concat(k,"-affix-wrapper-rtl")]:"rtl"===i},O),wrapper:u()({["".concat(q,"-rtl")]:"rtl"===i},O),groupWrapper:u()({["".concat(k,"-group-wrapper-sm")]:"small"===Z,["".concat(k,"-group-wrapper-lg")]:"large"===Z,["".concat(k,"-group-wrapper-rtl")]:"rtl"===i,["".concat(k,"-group-wrapper-").concat(z)]:B},(0,K.Z)("".concat(k,"-group-wrapper"),D,R),O)}},S)))});eh._InternalPanelDoNotUseOrYouWillBeFired=e=>r.createElement(U.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},r.createElement(eh,Object.assign({},e)));var em=eh},65863:function(e,t,n){"use strict";n.d(t,{Z:function(){return S},n:function(){return w}});var r=n(2265),o=n(36760),i=n.n(o),a=n(2027),l=n(28791),c=n(12757),s=n(71744),u=n(86586),d=n(33759),f=n(39109),p=n(65658),h=n(39164),m=n(31282),g=n(64024),v=n(56250),y=n(39725),b=e=>{let t;return"object"==typeof e&&(null==e?void 0:e.clearIcon)?t=e:e&&(t={clearIcon:r.createElement(y.Z,null)}),t},x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function w(e,t){if(!e)return;e.focus(t);let{cursor:n}=t||{};if(n){let t=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(t,t);break;default:e.setSelectionRange(0,t)}}}var S=(0,r.forwardRef)((e,t)=>{var n;let{prefixCls:o,bordered:y=!0,status:w,size:S,disabled:k,onBlur:E,onFocus:C,suffix:O,allowClear:j,addonAfter:P,addonBefore:N,className:M,style:I,styles:R,rootClassName:T,onChange:A,classNames:_,variant:D}=e,Z=x(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:L,direction:z,input:B}=r.useContext(s.E_),F=L("input",o),H=(0,r.useRef)(null),q=(0,g.Z)(F),[W,K,V]=(0,m.ZP)(F,q),{compactSize:U,compactItemClassnames:G}=(0,p.ri)(F,z),X=(0,d.Z)(e=>{var t;return null!==(t=null!=S?S:U)&&void 0!==t?t:e}),$=r.useContext(u.Z),{status:Y,hasFeedback:Q,feedbackIcon:J}=(0,r.useContext)(f.aM),ee=(0,c.F)(Y,w),et=!!(e.prefix||e.suffix||e.allowClear||e.showCount)||!!Q;(0,r.useRef)(et);let en=(0,h.Z)(H,!0),er=(Q||O)&&r.createElement(r.Fragment,null,O,Q&&J),eo=b(j),[ei,ea]=(0,v.Z)(D,y);return W(r.createElement(a.Z,Object.assign({ref:(0,l.sQ)(t,H),prefixCls:F,autoComplete:null==B?void 0:B.autoComplete},Z,{disabled:null!=k?k:$,onBlur:e=>{en(),null==E||E(e)},onFocus:e=>{en(),null==C||C(e)},style:Object.assign(Object.assign({},null==B?void 0:B.style),I),styles:Object.assign(Object.assign({},null==B?void 0:B.styles),R),suffix:er,allowClear:eo,className:i()(M,T,V,q,G,null==B?void 0:B.className),onChange:e=>{en(),null==A||A(e)},addonAfter:P&&r.createElement(p.BR,null,r.createElement(f.Ux,{override:!0,status:!0},P)),addonBefore:N&&r.createElement(p.BR,null,r.createElement(f.Ux,{override:!0,status:!0},N)),classNames:Object.assign(Object.assign(Object.assign({},_),null==B?void 0:B.classNames),{input:i()({["".concat(F,"-sm")]:"small"===X,["".concat(F,"-lg")]:"large"===X,["".concat(F,"-rtl")]:"rtl"===z},null==_?void 0:_.input,null===(n=null==B?void 0:B.classNames)||void 0===n?void 0:n.input,K),variant:i()({["".concat(F,"-").concat(ei)]:ea},(0,c.Z)(F,ee)),affixWrapper:i()({["".concat(F,"-affix-wrapper-sm")]:"small"===X,["".concat(F,"-affix-wrapper-lg")]:"large"===X,["".concat(F,"-affix-wrapper-rtl")]:"rtl"===z},K),wrapper:i()({["".concat(F,"-group-rtl")]:"rtl"===z},K),groupWrapper:i()({["".concat(F,"-group-wrapper-sm")]:"small"===X,["".concat(F,"-group-wrapper-lg")]:"large"===X,["".concat(F,"-group-wrapper-rtl")]:"rtl"===z,["".concat(F,"-group-wrapper-").concat(ei)]:ea},(0,c.Z)("".concat(F,"-group-wrapper"),ee,Q),K)})})))})},90464:function(e,t,n){"use strict";n.d(t,{Z:function(){return L}});var r,o=n(2265),i=n(39725),a=n(36760),l=n.n(a),c=n(1119),s=n(11993),u=n(31686),d=n(83145),f=n(26365),p=n(6989),h=n(2027),m=n(96032),g=n(55041),v=n(50506),y=n(41154),b=n(31474),x=n(27380),w=n(53346),S=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],k={},E=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],C=o.forwardRef(function(e,t){var n=e.prefixCls,i=(e.onPressEnter,e.defaultValue),a=e.value,d=e.autoSize,h=e.onResize,m=e.className,g=e.style,C=e.disabled,O=e.onChange,j=(e.onInternalAutoSize,(0,p.Z)(e,E)),P=(0,v.Z)(i,{value:a,postState:function(e){return null!=e?e:""}}),N=(0,f.Z)(P,2),M=N[0],I=N[1],R=o.useRef();o.useImperativeHandle(t,function(){return{textArea:R.current}});var T=o.useMemo(function(){return d&&"object"===(0,y.Z)(d)?[d.minRows,d.maxRows]:[]},[d]),A=(0,f.Z)(T,2),_=A[0],D=A[1],Z=!!d,L=function(){try{if(document.activeElement===R.current){var e=R.current,t=e.selectionStart,n=e.selectionEnd,r=e.scrollTop;R.current.setSelectionRange(t,n),R.current.scrollTop=r}}catch(e){}},z=o.useState(2),B=(0,f.Z)(z,2),F=B[0],H=B[1],q=o.useState(),W=(0,f.Z)(q,2),K=W[0],V=W[1],U=function(){H(0)};(0,x.Z)(function(){Z&&U()},[a,_,D,Z]),(0,x.Z)(function(){if(0===F)H(1);else if(1===F){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r||((r=document.createElement("textarea")).setAttribute("tab-index","-1"),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),e.getAttribute("wrap")?r.setAttribute("wrap",e.getAttribute("wrap")):r.removeAttribute("wrap");var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&k[n])return k[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:S.map(function(e){return"".concat(e,":").concat(r.getPropertyValue(e))}).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(k[n]=l),l}(e,n),l=a.paddingSize,c=a.borderSize,s=a.boxSizing,u=a.sizingStyle;r.setAttribute("style","".concat(u,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n")),r.value=e.value||e.placeholder||"";var d=void 0,f=void 0,p=r.scrollHeight;if("border-box"===s?p+=c:"content-box"===s&&(p-=l),null!==o||null!==i){r.value=" ";var h=r.scrollHeight-l;null!==o&&(d=h*o,"border-box"===s&&(d=d+l+c),p=Math.max(d,p)),null!==i&&(f=h*i,"border-box"===s&&(f=f+l+c),t=p>f?"":"hidden",p=Math.min(f,p))}var m={height:p,overflowY:t,resize:"none"};return d&&(m.minHeight=d),f&&(m.maxHeight=f),m}(R.current,!1,_,D);H(2),V(e)}else L()},[F]);var G=o.useRef(),X=function(){w.Z.cancel(G.current)};o.useEffect(function(){return X},[]);var $=(0,u.Z)((0,u.Z)({},g),Z?K:null);return(0===F||1===F)&&($.overflowY="hidden",$.overflowX="hidden"),o.createElement(b.Z,{onResize:function(e){2===F&&(null==h||h(e),d&&(X(),G.current=(0,w.Z)(function(){U()})))},disabled:!(d||h)},o.createElement("textarea",(0,c.Z)({},j,{ref:R,style:$,className:l()(n,m,(0,s.Z)({},"".concat(n,"-disabled"),C)),disabled:C,value:M,onChange:function(e){I(e.target.value),null==O||O(e)}})))}),O=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize"],j=o.forwardRef(function(e,t){var n,r,i,a=e.defaultValue,y=e.value,b=e.onFocus,x=e.onBlur,w=e.onChange,S=e.allowClear,k=e.maxLength,E=e.onCompositionStart,j=e.onCompositionEnd,P=e.suffix,N=e.prefixCls,M=void 0===N?"rc-textarea":N,I=e.showCount,R=e.count,T=e.className,A=e.style,_=e.disabled,D=e.hidden,Z=e.classNames,L=e.styles,z=e.onResize,B=(0,p.Z)(e,O),F=(0,v.Z)(a,{value:y,defaultValue:a}),H=(0,f.Z)(F,2),q=H[0],W=H[1],K=null==q?"":String(q),V=o.useState(!1),U=(0,f.Z)(V,2),G=U[0],X=U[1],$=o.useRef(!1),Y=o.useState(null),Q=(0,f.Z)(Y,2),J=Q[0],ee=Q[1],et=(0,o.useRef)(null),en=function(){var e;return null===(e=et.current)||void 0===e?void 0:e.textArea},er=function(){en().focus()};(0,o.useImperativeHandle)(t,function(){return{resizableTextArea:et.current,focus:er,blur:function(){en().blur()}}}),(0,o.useEffect)(function(){X(function(e){return!_&&e})},[_]);var eo=o.useState(null),ei=(0,f.Z)(eo,2),ea=ei[0],el=ei[1];o.useEffect(function(){if(ea){var e;(e=en()).setSelectionRange.apply(e,(0,d.Z)(ea))}},[ea]);var ec=(0,m.Z)(R,I),es=null!==(n=ec.max)&&void 0!==n?n:k,eu=Number(es)>0,ed=ec.strategy(K),ef=!!es&&ed>es,ep=function(e,t){var n=t;!$.current&&ec.exceedFormatter&&ec.max&&ec.strategy(t)>ec.max&&(n=ec.exceedFormatter(t,{max:ec.max}),t!==n&&el([en().selectionStart||0,en().selectionEnd||0])),W(n),(0,g.rJ)(e.currentTarget,e,w,n)},eh=P;ec.show&&(i=ec.showFormatter?ec.showFormatter({value:K,count:ed,maxLength:es}):"".concat(ed).concat(eu?" / ".concat(es):""),eh=o.createElement(o.Fragment,null,eh,o.createElement("span",{className:l()("".concat(M,"-data-count"),null==Z?void 0:Z.count),style:null==L?void 0:L.count},i)));var em=!B.autoSize&&!I&&!S;return o.createElement(h.Q,{value:K,allowClear:S,handleReset:function(e){W(""),er(),(0,g.rJ)(en(),e,w)},suffix:eh,prefixCls:M,classNames:(0,u.Z)((0,u.Z)({},Z),{},{affixWrapper:l()(null==Z?void 0:Z.affixWrapper,(r={},(0,s.Z)(r,"".concat(M,"-show-count"),I),(0,s.Z)(r,"".concat(M,"-textarea-allow-clear"),S),r))}),disabled:_,focused:G,className:l()(T,ef&&"".concat(M,"-out-of-range")),style:(0,u.Z)((0,u.Z)({},A),J&&!em?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof i?i:void 0}},hidden:D},o.createElement(C,(0,c.Z)({},B,{maxLength:k,onKeyDown:function(e){var t=B.onPressEnter,n=B.onKeyDown;"Enter"===e.key&&t&&t(e),null==n||n(e)},onChange:function(e){ep(e,e.target.value)},onFocus:function(e){X(!0),null==b||b(e)},onBlur:function(e){X(!1),null==x||x(e)},onCompositionStart:function(e){$.current=!0,null==E||E(e)},onCompositionEnd:function(e){$.current=!1,ep(e,e.currentTarget.value),null==j||j(e)},className:l()(null==Z?void 0:Z.textarea),style:(0,u.Z)((0,u.Z)({},null==L?void 0:L.textarea),{},{resize:null==A?void 0:A.resize}),disabled:_,prefixCls:M,onResize:function(e){var t;null==z||z(e),null!==(t=en())&&void 0!==t&&t.style.height&&ee(!0)},ref:et})))}),P=n(12757),N=n(71744),M=n(86586),I=n(33759),R=n(39109),T=n(65863),A=n(31282),_=n(64024),D=n(56250),Z=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},L=(0,o.forwardRef)((e,t)=>{var n;let r;let{prefixCls:a,bordered:c=!0,size:s,disabled:u,status:d,allowClear:f,classNames:p,rootClassName:h,className:m,variant:g}=e,v=Z(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","variant"]),{getPrefixCls:y,direction:b}=o.useContext(N.E_),x=(0,I.Z)(s),w=o.useContext(M.Z),{status:S,hasFeedback:k,feedbackIcon:E}=o.useContext(R.aM),C=(0,P.F)(S,d),O=o.useRef(null);o.useImperativeHandle(t,()=>{var e;return{resizableTextArea:null===(e=O.current)||void 0===e?void 0:e.resizableTextArea,focus:e=>{var t,n;(0,T.n)(null===(n=null===(t=O.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:()=>{var e;return null===(e=O.current)||void 0===e?void 0:e.blur()}}});let L=y("input",a);"object"==typeof f&&(null==f?void 0:f.clearIcon)?r=f:f&&(r={clearIcon:o.createElement(i.Z,null)});let z=(0,_.Z)(L),[B,F,H]=(0,A.ZP)(L,z),[q,W]=(0,D.Z)(g,c);return B(o.createElement(j,Object.assign({},v,{disabled:null!=u?u:w,allowClear:r,className:l()(H,z,m,h),classNames:Object.assign(Object.assign({},p),{textarea:l()({["".concat(L,"-sm")]:"small"===x,["".concat(L,"-lg")]:"large"===x},F,null==p?void 0:p.textarea),variant:l()({["".concat(L,"-").concat(q)]:W},(0,P.Z)(L,C)),affixWrapper:l()("".concat(L,"-textarea-affix-wrapper"),{["".concat(L,"-affix-wrapper-rtl")]:"rtl"===b,["".concat(L,"-affix-wrapper-sm")]:"small"===x,["".concat(L,"-affix-wrapper-lg")]:"large"===x,["".concat(L,"-textarea-show-count")]:e.showCount||(null===(n=e.count)||void 0===n?void 0:n.show)},F)}),prefixCls:L,suffix:k&&o.createElement("span",{className:"".concat(L,"-textarea-suffix")},E),ref:O})))})},39164:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2265);function o(e,t){let n=(0,r.useRef)([]),o=()=>{n.current.push(setTimeout(()=>{var t,n,r,o;(null===(t=e.current)||void 0===t?void 0:t.input)&&(null===(n=e.current)||void 0===n?void 0:n.input.getAttribute("type"))==="password"&&(null===(r=e.current)||void 0===r?void 0:r.input.hasAttribute("value"))&&(null===(o=e.current)||void 0===o||o.input.removeAttribute("value"))}))};return(0,r.useEffect)(()=>(t&&o(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[]),o}},56632:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(2265),o=n(36760),i=n.n(o),a=n(71744),l=n(39109),c=n(31282),s=n(65863),u=n(1119),d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=n(55015),p=r.forwardRef(function(e,t){return r.createElement(f.Z,(0,u.Z)({},e,{ref:t,icon:d}))}),h=n(6520),m=n(18694),g=n(28791),v=n(39164),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let b=e=>e?r.createElement(h.Z,null):r.createElement(p,null),x={click:"onClick",hover:"onMouseOver"},w=r.forwardRef((e,t)=>{let{visibilityToggle:n=!0}=e,o="object"==typeof n&&void 0!==n.visible,[l,c]=(0,r.useState)(()=>!!o&&n.visible),u=(0,r.useRef)(null);r.useEffect(()=>{o&&c(n.visible)},[o,n]);let d=(0,v.Z)(u),f=()=>{let{disabled:t}=e;t||(l&&d(),c(e=>{var t;let r=!e;return"object"==typeof n&&(null===(t=n.onVisibleChange)||void 0===t||t.call(n,r)),r}))},{className:p,prefixCls:h,inputPrefixCls:w,size:S}=e,k=y(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:E}=r.useContext(a.E_),C=E("input",w),O=E("input-password",h),j=n&&(t=>{let{action:n="click",iconRender:o=b}=e,i=x[n]||"",a=o(l);return r.cloneElement(r.isValidElement(a)?a:r.createElement("span",null,a),{[i]:f,className:"".concat(t,"-icon"),key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}})})(O),P=i()(O,p,{["".concat(O,"-").concat(S)]:!!S}),N=Object.assign(Object.assign({},(0,m.Z)(k,["suffix","iconRender","visibilityToggle"])),{type:l?"text":"password",className:P,prefixCls:C,suffix:j});return S&&(N.size=S),r.createElement(s.Z,Object.assign({ref:(0,g.sQ)(t,u)},N))});var S=n(29436),k=n(19722),E=n(73002),C=n(33759),O=n(65658),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let P=r.forwardRef((e,t)=>{let n;let{prefixCls:o,inputPrefixCls:l,className:c,size:u,suffix:d,enterButton:f=!1,addonAfter:p,loading:h,disabled:m,onSearch:v,onChange:y,onCompositionStart:b,onCompositionEnd:x}=e,w=j(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:P,direction:N}=r.useContext(a.E_),M=r.useRef(!1),I=P("input-search",o),R=P("input",l),{compactSize:T}=(0,O.ri)(I,N),A=(0,C.Z)(e=>{var t;return null!==(t=null!=u?u:T)&&void 0!==t?t:e}),_=r.useRef(null),D=e=>{var t;document.activeElement===(null===(t=_.current)||void 0===t?void 0:t.input)&&e.preventDefault()},Z=e=>{var t,n;v&&v(null===(n=null===(t=_.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},L="boolean"==typeof f?r.createElement(S.Z,null):null,z="".concat(I,"-button"),B=f||{},F=B.type&&!0===B.type.__ANT_BUTTON;n=F||"button"===B.type?(0,k.Tm)(B,Object.assign({onMouseDown:D,onClick:e=>{var t,n;null===(n=null===(t=null==B?void 0:B.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),Z(e)},key:"enterButton"},F?{className:z,size:A}:{})):r.createElement(E.ZP,{className:z,type:f?"primary":void 0,size:A,disabled:m,key:"enterButton",onMouseDown:D,onClick:Z,loading:h,icon:L},f),p&&(n=[n,(0,k.Tm)(p,{key:"addonAfter"})]);let H=i()(I,{["".concat(I,"-rtl")]:"rtl"===N,["".concat(I,"-").concat(A)]:!!A,["".concat(I,"-with-button")]:!!f},c);return r.createElement(s.Z,Object.assign({ref:(0,g.sQ)(_,t),onPressEnter:e=>{M.current||h||Z(e)}},w,{size:A,onCompositionStart:e=>{M.current=!0,null==b||b(e)},onCompositionEnd:e=>{M.current=!1,null==x||x(e)},prefixCls:R,addonAfter:n,suffix:d,onChange:e=>{e&&e.target&&"click"===e.type&&v&&v(e.target.value,e,{source:"clear"}),y&&y(e)},className:H,disabled:m}))});var N=n(90464);let M=s.Z;M.Group=e=>{let{getPrefixCls:t,direction:n}=(0,r.useContext)(a.E_),{prefixCls:o,className:s}=e,u=t("input-group",o),d=t("input"),[f,p]=(0,c.ZP)(d),h=i()(u,{["".concat(u,"-lg")]:"large"===e.size,["".concat(u,"-sm")]:"small"===e.size,["".concat(u,"-compact")]:e.compact,["".concat(u,"-rtl")]:"rtl"===n},p,s),m=(0,r.useContext)(l.aM),g=(0,r.useMemo)(()=>Object.assign(Object.assign({},m),{isFormItemInput:!1}),[m]);return f(r.createElement("span",{className:h,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},r.createElement(l.aM.Provider,{value:g},e.children)))},M.Search=P,M.TextArea=N.Z,M.Password=w;var I=M},31282:function(e,t,n){"use strict";n.d(t,{ik:function(){return p},nz:function(){return u},s7:function(){return h},x0:function(){return f}});var r=n(352),o=n(12918),i=n(17691),a=n(80669),l=n(3104),c=n(37433),s=n(65265);let u=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),d=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:o,paddingInlineLG:i}=e;return{padding:"".concat((0,r.bf)(t)," ").concat((0,r.bf)(i)),fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:o}},f=e=>({padding:"".concat((0,r.bf)(e.paddingBlockSM)," ").concat((0,r.bf)(e.paddingInlineSM)),fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),p=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:"".concat((0,r.bf)(e.paddingBlock)," ").concat((0,r.bf)(e.paddingInline)),color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:"all ".concat(e.motionDurationMid)},u(e.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:"all ".concat(e.motionDurationSlow,", height 0s"),resize:"vertical"},"&-lg":Object.assign({},d(e)),"&-sm":Object.assign({},f(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),h=e=>{let{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},["&-lg ".concat(t,", &-lg > ").concat(t,"-group-addon")]:Object.assign({},d(e)),["&-sm ".concat(t,", &-sm > ").concat(t,"-group-addon")]:Object.assign({},f(e)),["&-lg ".concat(n,"-select-single ").concat(n,"-select-selector")]:{height:e.controlHeightLG},["&-sm ".concat(n,"-select-single ").concat(n,"-select-selector")]:{height:e.controlHeightSM},["> ".concat(t)]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},["".concat(t,"-group")]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:"0 ".concat((0,r.bf)(e.paddingInline)),color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:"all ".concat(e.motionDurationSlow),lineHeight:1,["".concat(n,"-select")]:{margin:"".concat((0,r.bf)(e.calc(e.paddingBlock).add(1).mul(-1).equal())," ").concat((0,r.bf)(e.calc(e.paddingInline).mul(-1).equal())),["&".concat(n,"-select-single:not(").concat(n,"-select-customize-input):not(").concat(n,"-pagination-size-changer)")]:{["".concat(n,"-select-selector")]:{backgroundColor:"inherit",border:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),boxShadow:"none"}},"&-open, &-focused":{["".concat(n,"-select-selector")]:{color:e.colorPrimary}}},["".concat(n,"-cascader-picker")]:{margin:"-9px ".concat((0,r.bf)(e.calc(e.paddingInline).mul(-1).equal())),backgroundColor:"transparent",["".concat(n,"-cascader-input")]:{textAlign:"start",border:0,boxShadow:"none"}}}},["".concat(t)]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,["".concat(t,"-search-with-button &")]:{zIndex:0}}},["> ".concat(t,":first-child, ").concat(t,"-group-addon:first-child")]:{borderStartEndRadius:0,borderEndEndRadius:0,["".concat(n,"-select ").concat(n,"-select-selector")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["> ".concat(t,"-affix-wrapper")]:{["&:not(:first-child) ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0},["&:not(:last-child) ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["> ".concat(t,":last-child, ").concat(t,"-group-addon:last-child")]:{borderStartStartRadius:0,borderEndStartRadius:0,["".concat(n,"-select ").concat(n,"-select-selector")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["".concat(t,"-affix-wrapper")]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,["".concat(t,"-search &")]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},["&:not(:first-child), ".concat(t,"-search &:not(:first-child)")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["&".concat(t,"-group-compact")]:Object.assign(Object.assign({display:"block"},(0,o.dF)()),{["".concat(t,"-group-addon, ").concat(t,"-group-wrap, > ").concat(t)]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},["\n & > ".concat(t,"-affix-wrapper,\n & > ").concat(t,"-number-affix-wrapper,\n & > ").concat(n,"-picker-range\n ")]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},["".concat(t)]:{float:"none"},["& > ".concat(n,"-select > ").concat(n,"-select-selector,\n & > ").concat(n,"-select-auto-complete ").concat(t,",\n & > ").concat(n,"-cascader-picker ").concat(t,",\n & > ").concat(t,"-group-wrapper ").concat(t)]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},["& > ".concat(n,"-select-focused")]:{zIndex:1},["& > ".concat(n,"-select > ").concat(n,"-select-arrow")]:{zIndex:1},["& > *:first-child,\n & > ".concat(n,"-select:first-child > ").concat(n,"-select-selector,\n & > ").concat(n,"-select-auto-complete:first-child ").concat(t,",\n & > ").concat(n,"-cascader-picker:first-child ").concat(t)]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},["& > *:last-child,\n & > ".concat(n,"-select:last-child > ").concat(n,"-select-selector,\n & > ").concat(n,"-cascader-picker:last-child ").concat(t,",\n & > ").concat(n,"-cascader-picker-focused:last-child ").concat(t)]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},["& > ".concat(n,"-select-auto-complete ").concat(t)]:{verticalAlign:"top"},["".concat(t,"-group-wrapper + ").concat(t,"-group-wrapper")]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),["".concat(t,"-affix-wrapper")]:{borderRadius:0}},["".concat(t,"-group-wrapper:not(:last-child)")]:{["&".concat(t,"-search > ").concat(t,"-group")]:{["& > ".concat(t,"-group-addon > ").concat(t,"-search-button")]:{borderRadius:0},["& > ".concat(t)]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},m=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,o.Wf)(e)),p(e)),(0,s.qG)(e)),(0,s.H8)(e)),(0,s.Mu)(e)),{'&[type="color"]':{height:e.controlHeight,["&".concat(t,"-lg")]:{height:e.controlHeightLG},["&".concat(t,"-sm")]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},g=e=>{let{componentCls:t}=e;return{["".concat(t,"-clear-icon")]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:"0 ".concat((0,r.bf)(e.inputAffixPadding))}}}},v=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:l}=e;return{["".concat(t,"-affix-wrapper")]:Object.assign(Object.assign(Object.assign(Object.assign({},p(e)),{display:"inline-flex",["&:not(".concat(t,"-disabled):hover")]:{zIndex:1,["".concat(t,"-search-with-button &")]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},["> input".concat(t)]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},["".concat(t)]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),g(e)),{["".concat(l).concat(t,"-password-icon")]:{color:i,cursor:"pointer",transition:"all ".concat(o),"&:hover":{color:a}}})}},y=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{["".concat(t,"-group")]:Object.assign(Object.assign(Object.assign({},(0,o.Wf)(e)),h(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{["".concat(t,"-group-addon")]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{["".concat(t,"-group-addon")]:{borderRadius:r}}},(0,s.ir)(e)),(0,s.S5)(e)),{["&:not(".concat(t,"-compact-first-item):not(").concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-first-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&:not(".concat(t,"-compact-first-item)").concat(t,"-compact-last-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},b=e=>{let{componentCls:t,antCls:n}=e,r="".concat(t,"-search");return{[r]:{["".concat(t)]:{"&:hover, &:focus":{borderColor:e.colorPrimaryHover,["+ ".concat(t,"-group-addon ").concat(r,"-button:not(").concat(n,"-btn-primary)")]:{borderInlineStartColor:e.colorPrimaryHover}}},["".concat(t,"-affix-wrapper")]:{borderRadius:0},["".concat(t,"-lg")]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal({unit:!1})},["> ".concat(t,"-group")]:{["> ".concat(t,"-group-addon:last-child")]:{insetInlineStart:-1,padding:0,border:0,["".concat(r,"-button")]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0,boxShadow:"none"},["".concat(r,"-button:not(").concat(n,"-btn-primary)")]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},["&".concat(n,"-btn-loading::before")]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},["".concat(r,"-button")]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},["&-large ".concat(r,"-button")]:{height:e.controlHeightLG},["&-small ".concat(r,"-button")]:{height:e.controlHeightSM},"&-rtl":{direction:"rtl"},["&".concat(t,"-compact-item")]:{["&:not(".concat(t,"-compact-last-item)")]:{["".concat(t,"-group-addon")]:{["".concat(t,"-search-button")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},["&:not(".concat(t,"-compact-first-item)")]:{["".concat(t,",").concat(t,"-affix-wrapper")]:{borderRadius:0}},["> ".concat(t,"-group-addon ").concat(t,"-search-button,\n > ").concat(t,",\n ").concat(t,"-affix-wrapper")]:{"&:hover,&:focus,&:active":{zIndex:2}},["> ".concat(t,"-affix-wrapper-focused")]:{zIndex:2}}}}},x=e=>{let{componentCls:t,paddingLG:n}=e,r="".concat(t,"-textarea");return{[r]:{position:"relative","&-show-count":{["> ".concat(t)]:{height:"100%"},["".concat(t,"-data-count")]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{["> ".concat(t)]:{paddingInlineEnd:n}},["&-affix-wrapper".concat(r,"-has-feedback")]:{["".concat(t)]:{paddingInlineEnd:n}},["&-affix-wrapper".concat(t,"-affix-wrapper")]:{padding:0,["> textarea".concat(t)]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent","&:focus":{boxShadow:"none !important"}},["".concat(t,"-suffix")]:{margin:0,"> *:not(:last-child)":{marginInline:0},["".concat(t,"-clear-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,insetBlockStart:e.paddingXS},["".concat(r,"-suffix")]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}},w=e=>{let{componentCls:t}=e;return{["".concat(t,"-out-of-range")]:{["&, & input, & textarea, ".concat(t,"-show-count-suffix, ").concat(t,"-data-count")]:{color:e.colorError}}}};t.ZP=(0,a.I$)("Input",e=>{let t=(0,l.TS)(e,(0,c.e)(e));return[m(t),x(t),v(t),y(t),b(t),w(t),(0,i.c)(t)]},c.T)},37433:function(e,t,n){"use strict";n.d(t,{T:function(){return i},e:function(){return o}});var r=n(3104);function o(e){return(0,r.TS)(e,{inputAffixPadding:e.paddingXXS})}let i=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:l,lineHeightLG:c,paddingSM:s,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:h,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:v,colorWarningOutline:y,colorBgContainer:b}=e;return{paddingBlock:Math.max(Math.round((t-n*r)/2*10)/10-o,0),paddingBlockSM:Math.max(Math.round((i-n*r)/2*10)/10-o,0),paddingBlockLG:Math.ceil((a-l*c)/2*10)/10-o,paddingInline:s-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:h,hoverBorderColor:p,activeShadow:"0 0 0 ".concat(m,"px ").concat(g),errorActiveShadow:"0 0 0 ".concat(m,"px ").concat(v),warningActiveShadow:"0 0 0 ".concat(m,"px ").concat(y),hoverBg:b,activeBg:b,inputFontSize:n,inputFontSizeLG:l,inputFontSizeSM:n}}},65265:function(e,t,n){"use strict";n.d(t,{$U:function(){return l},H8:function(){return m},Mu:function(){return f},S5:function(){return v},Xy:function(){return a},ir:function(){return d},qG:function(){return s}});var r=n(352),o=n(3104);let i=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),a=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover:not([disabled])":Object.assign({},i((0,o.TS)(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),l=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),c=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status,":not(").concat(e.componentCls,"-disabled)")]:Object.assign(Object.assign({},l(e,t)),{["".concat(e.componentCls,"-prefix, ").concat(e.componentCls,"-suffix")]:{color:t.affixColor}})}),s=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{["&".concat(e.componentCls,"-disabled, &[disabled]")]:Object.assign({},a(e))}),c(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),c(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),u=(e,t)=>({["&".concat(e.componentCls,"-group-wrapper-status-").concat(t.status)]:{["".concat(e.componentCls,"-group-addon")]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),d=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.addonBg,border:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},u(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),u(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{["&".concat(e.componentCls,"-group-wrapper-disabled")]:{["".concat(e.componentCls,"-group-addon")]:Object.assign({},a(e))}})}),f=(e,t)=>({"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},["&".concat(e.componentCls,"-disabled, &[disabled]")]:{color:e.colorTextDisabled}},t)}),p=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:null==t?void 0:t.inputColor},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),h=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status,":not(").concat(e.componentCls,"-disabled)")]:Object.assign(Object.assign({},p(e,t)),{["".concat(e.componentCls,"-prefix, ").concat(e.componentCls,"-suffix")]:{color:t.affixColor}})}),m=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary})),{["&".concat(e.componentCls,"-disabled, &[disabled]")]:Object.assign({},a(e))}),h(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),h(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),g=(e,t)=>({["&".concat(e.componentCls,"-group-wrapper-status-").concat(t.status)]:{["".concat(e.componentCls,"-group-addon")]:{background:t.addonBg,color:t.addonColor}}}),v=e=>({"&-filled":Object.assign(Object.assign(Object.assign({["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.colorFillTertiary},["".concat(e.componentCls,"-filled:not(:focus):not(:focus-within)")]:{"&:not(:first-child)":{borderInlineStart:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},"&:not(:last-child)":{borderInlineEnd:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}}}},g(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),g(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{["&".concat(e.componentCls,"-group-wrapper-disabled")]:{["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderTop:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderBottom:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},"&-addon:last-child":{borderInlineEnd:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderTop:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderBottom:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)}}}})})},92239:function(e,t,n){"use strict";let r;n.d(t,{D:function(){return b},Z:function(){return w}});var o=n(2265),i=n(1119),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},l=n(55015),c=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,i.Z)({},e,{ref:t,icon:a}))}),s=n(15327),u=n(77565),d=n(36760),f=n.n(d),p=n(18694),h=e=>!isNaN(parseFloat(e))&&isFinite(e),m=n(71744),g=n(80856),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let y={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},b=o.createContext({}),x=(r=0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r+=1,"".concat(e).concat(r)});var w=o.forwardRef((e,t)=>{let{prefixCls:n,className:r,trigger:i,children:a,defaultCollapsed:l=!1,theme:d="dark",style:w={},collapsible:S=!1,reverseArrow:k=!1,width:E=200,collapsedWidth:C=80,zeroWidthTriggerStyle:O,breakpoint:j,onCollapse:P,onBreakpoint:N}=e,M=v(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:I}=(0,o.useContext)(g.V),[R,T]=(0,o.useState)("collapsed"in e?e.collapsed:l),[A,_]=(0,o.useState)(!1);(0,o.useEffect)(()=>{"collapsed"in e&&T(e.collapsed)},[e.collapsed]);let D=(t,n)=>{"collapsed"in e||T(t),null==P||P(t,n)},Z=(0,o.useRef)();Z.current=e=>{_(e.matches),null==N||N(e.matches),R!==e.matches&&D(e.matches,"responsive")},(0,o.useEffect)(()=>{let e;function t(e){return Z.current(e)}if("undefined"!=typeof window){let{matchMedia:n}=window;if(n&&j&&j in y){e=n("screen and (max-width: ".concat(y[j],")"));try{e.addEventListener("change",t)}catch(n){e.addListener(t)}t(e)}}return()=>{try{null==e||e.removeEventListener("change",t)}catch(n){null==e||e.removeListener(t)}}},[j]),(0,o.useEffect)(()=>{let e=x("ant-sider-");return I.addSider(e),()=>I.removeSider(e)},[]);let L=()=>{D(!R,"clickTrigger")},{getPrefixCls:z}=(0,o.useContext)(m.E_),B=o.useMemo(()=>({siderCollapsed:R}),[R]);return o.createElement(b.Provider,{value:B},(()=>{let e=z("layout-sider",n),l=(0,p.Z)(M,["collapsed"]),m=R?C:E,g=h(m)?"".concat(m,"px"):String(m),v=0===parseFloat(String(C||0))?o.createElement("span",{onClick:L,className:f()("".concat(e,"-zero-width-trigger"),"".concat(e,"-zero-width-trigger-").concat(k?"right":"left")),style:O},i||o.createElement(c,null)):null,y={expanded:k?o.createElement(u.Z,null):o.createElement(s.Z,null),collapsed:k?o.createElement(s.Z,null):o.createElement(u.Z,null)}[R?"collapsed":"expanded"],b=null!==i?v||o.createElement("div",{className:"".concat(e,"-trigger"),onClick:L,style:{width:g}},i||y):null,x=Object.assign(Object.assign({},w),{flex:"0 0 ".concat(g),maxWidth:g,minWidth:g,width:g}),j=f()(e,"".concat(e,"-").concat(d),{["".concat(e,"-collapsed")]:!!R,["".concat(e,"-has-trigger")]:S&&null!==i&&!v,["".concat(e,"-below")]:!!A,["".concat(e,"-zero-width")]:0===parseFloat(g)},r);return o.createElement("aside",Object.assign({className:j},l,{style:x,ref:t}),o.createElement("div",{className:"".concat(e,"-children")},a),S||A&&v?b:null)})())})},80856:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});let r=n(2265).createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},19226:function(e,t,n){"use strict";n.d(t,{default:function(){return C}});var r=n(83145),o=n(2265),i=n(36760),a=n.n(i),l=n(18694),c=n(71744),s=n(80856),u=n(45287),d=n(92239),f=n(352),p=n(80669),h=e=>{let{componentCls:t,bodyBg:n,lightSiderBg:r,lightTriggerBg:o,lightTriggerColor:i}=e;return{["".concat(t,"-sider-light")]:{background:r,["".concat(t,"-sider-trigger")]:{color:i,background:o},["".concat(t,"-sider-zero-width-trigger")]:{color:i,background:o,border:"1px solid ".concat(n),borderInlineStart:0}}}};let m=e=>{let{antCls:t,componentCls:n,colorText:r,triggerColor:o,footerBg:i,triggerBg:a,headerHeight:l,headerPadding:c,headerColor:s,footerPadding:u,triggerHeight:d,zeroTriggerHeight:p,zeroTriggerWidth:m,motionDurationMid:g,motionDurationSlow:v,fontSize:y,borderRadius:b,bodyBg:x,headerBg:w,siderBg:S}=e;return{[n]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:x,"&, *":{boxSizing:"border-box"},["&".concat(n,"-has-sider")]:{flexDirection:"row",["> ".concat(n,", > ").concat(n,"-content")]:{width:0}},["".concat(n,"-header, &").concat(n,"-footer")]:{flex:"0 0 auto"},["".concat(n,"-sider")]:{position:"relative",minWidth:0,background:S,transition:"all ".concat(g,", background 0s"),"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,["".concat(t,"-menu").concat(t,"-menu-inline-collapsed")]:{width:"auto"}},"&-has-trigger":{paddingBottom:d},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:d,color:o,lineHeight:(0,f.bf)(d),textAlign:"center",background:a,cursor:"pointer",transition:"all ".concat(g)},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:e.calc(m).mul(-1).equal(),zIndex:1,width:m,height:p,color:o,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:S,borderStartStartRadius:0,borderStartEndRadius:b,borderEndEndRadius:b,borderEndStartRadius:0,cursor:"pointer",transition:"background ".concat(v," ease"),"&::after":{position:"absolute",inset:0,background:"transparent",transition:"all ".concat(v),content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(m).mul(-1).equal(),borderStartStartRadius:b,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:b}}}}},h(e)),{"&-rtl":{direction:"rtl"}}),["".concat(n,"-header")]:{height:l,padding:c,color:s,lineHeight:(0,f.bf)(l),background:w,["".concat(t,"-menu")]:{lineHeight:"inherit"}},["".concat(n,"-footer")]:{padding:u,color:r,fontSize:y,background:i},["".concat(n,"-content")]:{flex:"auto",minHeight:0}}};var g=(0,p.I$)("Layout",e=>[m(e)],e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:l,colorBgContainer:c}=e,s=1.25*r;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:2*n,headerPadding:"0 ".concat(s,"px"),headerColor:o,footerPadding:"".concat(i,"px ").concat(s,"px"),footerBg:t,siderBg:"#001529",triggerHeight:r+2*a,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:o}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function y(e){let{suffixCls:t,tagName:n,displayName:r}=e;return e=>o.forwardRef((r,i)=>o.createElement(e,Object.assign({ref:i,suffixCls:t,tagName:n},r)))}let b=o.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:i,tagName:l}=e,s=v(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:u}=o.useContext(c.E_),d=u("layout",n),[f,p,h]=g(d),m=r?"".concat(d,"-").concat(r):d;return f(o.createElement(l,Object.assign({className:a()(n||m,i,p,h),ref:t},s)))}),x=o.forwardRef((e,t)=>{let{direction:n}=o.useContext(c.E_),[i,f]=o.useState([]),{prefixCls:p,className:h,rootClassName:m,children:y,hasSider:b,tagName:x,style:w}=e,S=v(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),k=(0,l.Z)(S,["suffixCls"]),{getPrefixCls:E,layout:C}=o.useContext(c.E_),O=E("layout",p),j="boolean"==typeof b?b:!!i.length||(0,u.Z)(y).some(e=>e.type===d.Z),[P,N,M]=g(O),I=a()(O,{["".concat(O,"-has-sider")]:j,["".concat(O,"-rtl")]:"rtl"===n},null==C?void 0:C.className,h,m,N,M),R=o.useMemo(()=>({siderHook:{addSider:e=>{f(t=>[].concat((0,r.Z)(t),[e]))},removeSider:e=>{f(t=>t.filter(t=>t!==e))}}}),[]);return P(o.createElement(s.V.Provider,{value:R},o.createElement(x,Object.assign({ref:t,className:I,style:Object.assign(Object.assign({},null==C?void 0:C.style),w)},k),y)))}),w=y({tagName:"div",displayName:"Layout"})(x),S=y({suffixCls:"header",tagName:"header",displayName:"Header"})(b),k=y({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(b),E=y({suffixCls:"content",tagName:"main",displayName:"Content"})(b);w.Header=S,w.Footer=k,w.Content=E,w.Sider=d.Z,w._InternalSiderContext=d.D;var C=w},88208:function(e,t,n){"use strict";n.d(t,{J:function(){return c}});var r=n(2265),o=n(74126),i=n(65658),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let l=r.createContext(null),c=r.forwardRef((e,t)=>{let{children:n}=e,c=a(e,["children"]),s=r.useContext(l),u=r.useMemo(()=>Object.assign(Object.assign({},s),c),[s,c.prefixCls,c.mode,c.selectable,c.rootClassName]),d=(0,o.t4)(n),f=(0,o.x1)(t,d?n.ref:null);return r.createElement(l.Provider,{value:u},r.createElement(i.BR,null,d?r.cloneElement(n,{ref:f}):n))});t.Z=l},45937:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(2265),o=n(33082),i=n(92239),a=n(39760),l=n(36760),c=n.n(l),s=n(74126),u=n(18694),d=n(68710),f=n(19722),p=n(71744),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},m=e=>{let{prefixCls:t,className:n,dashed:i}=e,a=h(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=r.useContext(p.E_),s=l("menu",t),u=c()({["".concat(s,"-item-divider-dashed")]:!!i},n);return r.createElement(o.iz,Object.assign({className:u},a))},g=n(45287),v=n(75957);let y=(0,r.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var b=e=>{var t;let{className:n,children:a,icon:l,title:s,danger:d}=e,{prefixCls:p,firstLevel:h,direction:m,disableMenuItemTitleTooltip:b,inlineCollapsed:x}=r.useContext(y),{siderCollapsed:w}=r.useContext(i.D),S=s;void 0===s?S=h?a:"":!1===s&&(S="");let k={title:S};w||x||(k.title=null,k.open=!1);let E=(0,g.Z)(a).length,C=r.createElement(o.ck,Object.assign({},(0,u.Z)(e,["title","icon","danger"]),{className:c()({["".concat(p,"-item-danger")]:d,["".concat(p,"-item-only-child")]:(l?E+1:E)===1},n),title:"string"==typeof s?s:void 0}),(0,f.Tm)(l,{className:c()((0,f.l$)(l)?null===(t=l.props)||void 0===t?void 0:t.className:"","".concat(p,"-item-icon"))}),(e=>{let t=r.createElement("span",{className:"".concat(p,"-title-content")},a);return(!l||(0,f.l$)(a)&&"span"===a.type)&&a&&e&&h&&"string"==typeof a?r.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},a.charAt(0)):t})(x));return b||(C=r.createElement(v.Z,Object.assign({},k,{placement:"rtl"===m?"left":"right",overlayClassName:"".concat(p,"-inline-collapsed-tooltip")}),C)),C},x=n(62236),w=e=>{var t;let n;let{popupClassName:i,icon:a,title:l,theme:s}=e,d=r.useContext(y),{prefixCls:p,inlineCollapsed:h,theme:m}=d,g=(0,o.Xl)();if(a){let e=(0,f.l$)(l)&&"span"===l.type;n=r.createElement(r.Fragment,null,(0,f.Tm)(a,{className:c()((0,f.l$)(a)?null===(t=a.props)||void 0===t?void 0:t.className:"","".concat(p,"-item-icon"))}),e?l:r.createElement("span",{className:"".concat(p,"-title-content")},l))}else n=h&&!g.length&&l&&"string"==typeof l?r.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},l.charAt(0)):r.createElement("span",{className:"".concat(p,"-title-content")},l);let v=r.useMemo(()=>Object.assign(Object.assign({},d),{firstLevel:!1}),[d]),[b]=(0,x.Cn)("Menu");return r.createElement(y.Provider,{value:v},r.createElement(o.Wd,Object.assign({},(0,u.Z)(e,["icon"]),{title:n,popupClassName:c()(p,i,"".concat(p,"-").concat(s||m)),popupStyle:{zIndex:b}})))},S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},k=n(88208),E=n(352),C=n(36360),O=n(12918),j=n(63074),P=n(18544),N=n(691),M=n(80669),I=n(3104),R=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:l}=e;return{["".concat(t,"-horizontal")]:{lineHeight:r,border:0,borderBottom:"".concat((0,E.bf)(i)," ").concat(a," ").concat(o),boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},["".concat(t,"-item, ").concat(t,"-submenu")]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},["> ".concat(t,"-item:hover,\n > ").concat(t,"-item-active,\n > ").concat(t,"-submenu ").concat(t,"-submenu-title:hover")]:{backgroundColor:"transparent"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{transition:["border-color ".concat(n),"background ".concat(n)].join(",")},["".concat(t,"-submenu-arrow")]:{display:"none"}}}},T=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-submenu-rtl")]:{transformOrigin:"100% 0"},["".concat(t,"-rtl").concat(t,"-vertical,\n ").concat(t,"-submenu-rtl ").concat(t,"-vertical")]:{["".concat(t,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateY(".concat((0,E.bf)(r(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat((0,E.bf)(n),")")}}}}};let A=e=>Object.assign({},(0,O.oN)(e));var _=(e,t)=>{let{componentCls:n,itemColor:r,itemSelectedColor:o,groupTitleColor:i,itemBg:a,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:s,activeBarWidth:u,activeBarBorderWidth:d,motionDurationSlow:f,motionEaseInOut:p,motionEaseOut:h,itemPaddingInline:m,motionDurationMid:g,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:w,dangerItemHoverColor:S,dangerItemSelectedColor:k,dangerItemActiveBg:C,dangerItemSelectedBg:O,popupBg:j,itemHoverBg:P,itemActiveBg:N,menuSubMenuBg:M,horizontalItemSelectedColor:I,horizontalItemSelectedBg:R,horizontalItemBorderRadius:T,horizontalItemHoverBg:_}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:r,background:a,["&".concat(n,"-root:focus-visible")]:Object.assign({},A(e)),["".concat(n,"-item-group-title")]:{color:i},["".concat(n,"-submenu-selected")]:{["> ".concat(n,"-submenu-title")]:{color:o}},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(x," !important")},["".concat(n,"-item:not(").concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{["&:hover, > ".concat(n,"-submenu-title:hover")]:{color:v}},["&:not(".concat(n,"-horizontal)")]:{["".concat(n,"-item:not(").concat(n,"-item-selected)")]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:N}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:N}}},["".concat(n,"-item-danger")]:{color:w,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:S}},["&".concat(n,"-item:active")]:{background:C}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:o,["&".concat(n,"-item-danger")]:{color:k},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:c,["&".concat(n,"-item-danger")]:{backgroundColor:O}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},A(e))},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:M},["&".concat(n,"-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-submenu-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-horizontal")]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{["> ".concat(n,"-item, > ").concat(n,"-submenu")]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:T,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:"".concat((0,E.bf)(s)," solid transparent"),transition:"border-color ".concat(f," ").concat(p),content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:s,borderBottomColor:I}},"&-selected":{color:I,backgroundColor:R,"&:hover":{backgroundColor:R},"&::after":{borderBottomWidth:s,borderBottomColor:I}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat((0,E.bf)(d)," ").concat(y," ").concat(b)}},["&".concat(n,"-inline")]:{["".concat(n,"-sub").concat(n,"-inline")]:{background:l},["".concat(n,"-item")]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:"".concat((0,E.bf)(u)," solid ").concat(o),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(g," ").concat(h),"opacity ".concat(g," ").concat(h)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:k}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(g," ").concat(p),"opacity ".concat(g," ").concat(p)].join(",")}}}}}};let D=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:l,itemWidth:c}=e,s=e.calc(i).add(o).add(a).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,E.bf)(n),paddingInline:o,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:l,width:c},["> ".concat(t,"-item,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,E.bf)(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n ").concat(t,"-submenu-title")]:{paddingInlineEnd:s}}};var Z=e=>{let{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionDurationMid:l,motionEaseOut:c,paddingXL:s,itemMarginInline:u,fontSizeLG:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:h,collapsedWidth:m,collapsedIconSize:g}=e,v={height:r,lineHeight:(0,E.bf)(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},D(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},D(e)),{boxShadow:h})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:i,maxHeight:"calc(100vh - ".concat((0,E.bf)(e.calc(a).mul(2.5).equal()),")"),padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{["".concat(t,"-inline")]:{width:"100%",["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{display:"flex",alignItems:"center",transition:["border-color ".concat(f),"background ".concat(f),"padding ".concat(l," ").concat(c)].join(","),["> ".concat(t,"-title-content")]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},["".concat(t,"-sub").concat(t,"-inline")]:{padding:0,border:0,borderRadius:0,boxShadow:"none",["& > ".concat(t,"-submenu > ").concat(t,"-submenu-title")]:v,["& ".concat(t,"-item-group-title")]:{paddingInlineStart:s}},["".concat(t,"-item")]:v}},{["".concat(t,"-inline-collapsed")]:{width:m,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:d,textAlign:"center"}}},["> ".concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-submenu > ").concat(t,"-submenu-title,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{insetInlineStart:0,paddingInline:"calc(50% - ".concat((0,E.bf)(e.calc(d).div(2).equal())," - ").concat((0,E.bf)(u),")"),textOverflow:"clip",["\n ".concat(t,"-submenu-arrow,\n ").concat(t,"-submenu-expand-icon\n ")]:{opacity:0},["".concat(t,"-item-icon, ").concat(n)]:{margin:0,fontSize:g,lineHeight:(0,E.bf)(r),"+ span":{display:"inline-block",opacity:0}}},["".concat(t,"-item-icon, ").concat(n)]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",["".concat(t,"-item-icon, ").concat(n)]:{display:"none"},"a, a:hover":{color:o}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},O.vS),{paddingInline:p})}}]};let L=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:l,iconMarginInlineEnd:c}=e;return{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:["border-color ".concat(n),"background ".concat(n),"padding ".concat(n," ").concat(o)].join(","),["".concat(t,"-item-icon, ").concat(a)]:{minWidth:l,fontSize:l,transition:["font-size ".concat(r," ").concat(i),"margin ".concat(n," ").concat(o),"color ".concat(n)].join(","),"+ span":{marginInlineStart:c,opacity:1,transition:["opacity ".concat(n," ").concat(o),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},(0,O.Ro)()),["&".concat(t,"-item-only-child")]:{["> ".concat(a,", > ").concat(t,"-item-icon")]:{marginInlineEnd:0}}},["".concat(t,"-item-disabled, ").concat(t,"-submenu-disabled")]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},["> ".concat(t,"-submenu-title")]:{color:"inherit !important",cursor:"not-allowed"}}}},z=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(r,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background ".concat(n," ").concat(r),"transform ".concat(n," ").concat(r),"top ".concat(n," ").concat(r),"color ".concat(n," ").concat(r)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat((0,E.bf)(e.calc(a).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat((0,E.bf)(a),")")}}}}},B=e=>{let{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:l,padding:c,colorSplit:s,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:h,menuArrowOffset:m,lineType:g,menuPanelMaskInset:v,groupTitleLineHeight:y,groupTitleFontSize:b}=e;return[{"":{["".concat(n)]:Object.assign(Object.assign({},(0,O.dF)()),{"&-hidden":{display:"none"}})},["".concat(n,"-submenu-hidden")]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,O.Wf)(e)),(0,O.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(o," cubic-bezier(0.2, 0, 0, 1) 0s"),"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",["".concat(n,"-item")]:{flex:"none"}},["".concat(n,"-item, ").concat(n,"-submenu, ").concat(n,"-submenu-title")]:{borderRadius:e.itemBorderRadius},["".concat(n,"-item-group-title")]:{padding:"".concat((0,E.bf)(l)," ").concat((0,E.bf)(c)),fontSize:b,lineHeight:y,transition:"all ".concat(o)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(o," ").concat(a),"background ".concat(o," ").concat(a)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(o," ").concat(a),"background ".concat(o," ").concat(a),"padding ".concat(i," ").concat(a)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(o," ").concat(a),"padding ".concat(o," ").concat(a)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(o),["> ".concat(t,"-typography-ellipsis-single-line")]:{display:"inline",verticalAlign:"unset"}},["".concat(n,"-item a")]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},["".concat(n,"-item-divider")]:{overflow:"hidden",lineHeight:0,borderColor:s,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),L(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat((0,E.bf)(e.calc(r).mul(2).equal())," ").concat((0,E.bf)(c))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:"".concat((0,E.bf)(v)," 0 0"),zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:v},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS},["> ".concat(n)]:Object.assign(Object.assign(Object.assign({borderRadius:f},L(e)),z(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:p},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(o," ").concat(a)}})}}),z(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat((0,E.bf)(m),")")},"&::after":{transform:"rotate(45deg) translateX(".concat((0,E.bf)(e.calc(m).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat((0,E.bf)(e.calc(h).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat((0,E.bf)(e.calc(m).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat((0,E.bf)(m),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},F=e=>{var t,n,r;let{colorPrimary:o,colorError:i,colorTextDisabled:a,colorErrorBg:l,colorText:c,colorTextDescription:s,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:p,lineWidthBold:h,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:v,lineHeight:y,colorBgElevated:b,marginXXS:x,padding:w,fontSize:S,controlHeightSM:k,fontSizeLG:E,colorTextLightSolid:O,colorErrorHover:j}=e,P=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,N=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,M=null!==(r=e.itemMarginInline)&&void 0!==r?r:e.marginXXS,I=new C.C(O).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:c,itemColor:c,colorItemTextHover:c,itemHoverColor:c,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:o,itemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:P,colorActiveBarHeight:h,activeBarHeight:h,colorActiveBarBorderSize:p,activeBarBorderWidth:N,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:i,dangerItemColor:i,colorDangerItemTextHover:i,dangerItemHoverColor:i,colorDangerItemTextSelected:i,dangerItemSelectedColor:i,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:M,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:y,collapsedWidth:2*v,popupBg:b,itemMarginBlock:x,itemPaddingInline:w,horizontalLineHeight:"".concat(1.15*v,"px"),iconSize:S,iconMarginInlineEnd:k-S,collapsedIconSize:E,groupTitleFontSize:S,darkItemDisabledColor:new C.C(O).setAlpha(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:O,darkItemSelectedBg:o,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:O,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:i,itemWidth:P?"calc(100% + ".concat(N,"px)"):"calc(100% - ".concat(2*M,"px)")}};var H=n(64024),q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let W=(0,r.forwardRef)((e,t)=>{var n,i;let l;let h=r.useContext(k.Z),g=h||{},{getPrefixCls:v,getPopupContainer:x,direction:E,menu:C}=r.useContext(p.E_),O=v(),{prefixCls:A,className:D,style:L,theme:z="light",expandIcon:W,_internalDisableMenuItemTitleTooltip:K,inlineCollapsed:V,siderCollapsed:U,items:G,children:X,rootClassName:$,mode:Y,selectable:Q,onClick:J,overflowedIndicatorPopupClassName:ee}=e,et=q(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),en=(0,u.Z)(et,["collapsedWidth"]),er=r.useMemo(()=>G?function e(t){return(t||[]).map((t,n)=>{if(t&&"object"==typeof t){let{label:i,children:a,key:l,type:c}=t,s=S(t,["label","children","key","type"]),u=null!=l?l:"tmp-".concat(n);return a||"group"===c?"group"===c?r.createElement(o.BW,Object.assign({key:u},s,{title:i}),e(a)):r.createElement(w,Object.assign({key:u},s,{title:i}),e(a)):"divider"===c?r.createElement(m,Object.assign({key:u},s)):r.createElement(b,Object.assign({key:u},s),i)}return null}).filter(e=>e)}(G):G,[G])||X;null===(n=g.validator)||void 0===n||n.call(g,{mode:Y});let eo=(0,s.zX)(function(){var e;null==J||J.apply(void 0,arguments),null===(e=g.onClick)||void 0===e||e.call(g)}),ei=g.mode||Y,ea=null!=Q?Q:g.selectable,el=r.useMemo(()=>void 0!==U?U:V,[V,U]),ec={horizontal:{motionName:"".concat(O,"-slide-up")},inline:(0,d.Z)(O),other:{motionName:"".concat(O,"-zoom-big")}},es=v("menu",A||g.prefixCls),eu=(0,H.Z)(es),[ed,ef,ep]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(0,M.I$)("Menu",e=>{let{colorBgElevated:t,colorPrimary:n,colorTextLightSolid:r,controlHeightLG:o,fontSize:i,darkItemColor:a,darkDangerItemColor:l,darkItemBg:c,darkSubMenuItemBg:s,darkItemSelectedColor:u,darkItemSelectedBg:d,darkDangerItemSelectedBg:f,darkItemHoverBg:p,darkGroupTitleColor:h,darkItemHoverColor:m,darkItemDisabledColor:g,darkDangerItemHoverColor:v,darkDangerItemSelectedColor:y,darkDangerItemActiveBg:b,popupBg:x,darkPopupBg:w}=e,S=e.calc(i).div(7).mul(5).equal(),k=(0,I.TS)(e,{menuArrowSize:S,menuHorizontalHeight:e.calc(o).mul(1.15).equal(),menuArrowOffset:e.calc(S).mul(.25).equal(),menuPanelMaskInset:-7,menuSubMenuBg:t,calc:e.calc,popupBg:x}),E=(0,I.TS)(k,{itemColor:a,itemHoverColor:m,groupTitleColor:h,itemSelectedColor:u,itemBg:c,popupBg:w,subMenuItemBg:s,itemActiveBg:"transparent",itemSelectedBg:d,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:g,dangerItemColor:l,dangerItemHoverColor:v,dangerItemSelectedColor:y,dangerItemActiveBg:b,dangerItemSelectedBg:f,menuSubMenuBg:s,horizontalItemSelectedColor:r,horizontalItemSelectedBg:n});return[B(k),R(k),Z(k),_(k,"light"),_(E,"dark"),T(k),(0,j.Z)(k),(0,P.oN)(k,"slide-up"),(0,P.oN)(k,"slide-down"),(0,N._y)(k,"zoom-big")]},F,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t)}(es,eu,!h),eh=c()("".concat(es,"-").concat(z),null==C?void 0:C.className,D);if("function"==typeof W)l=W;else if(null===W||!1===W)l=null;else if(null===g.expandIcon||!1===g.expandIcon)l=null;else{let e=null!=W?W:g.expandIcon;l=(0,f.Tm)(e,{className:c()("".concat(es,"-submenu-expand-icon"),(0,f.l$)(e)?null===(i=e.props)||void 0===i?void 0:i.className:"")})}let em=r.useMemo(()=>({prefixCls:es,inlineCollapsed:el||!1,direction:E,firstLevel:!0,theme:z,mode:ei,disableMenuItemTitleTooltip:K}),[es,el,E,K,z]);return ed(r.createElement(k.Z.Provider,{value:null},r.createElement(y.Provider,{value:em},r.createElement(o.ZP,Object.assign({getPopupContainer:x,overflowedIndicator:r.createElement(a.Z,null),overflowedIndicatorPopupClassName:c()(es,"".concat(es,"-").concat(z),ee),mode:ei,selectable:ea,onClick:eo},en,{inlineCollapsed:el,style:Object.assign(Object.assign({},null==C?void 0:C.style),L),className:eh,prefixCls:es,direction:E,defaultMotions:ec,expandIcon:l,ref:t,rootClassName:c()($,ef,g.rootClassName,ep,eu)}),er))))}),K=(0,r.forwardRef)((e,t)=>{let n=(0,r.useRef)(null),o=r.useContext(i.D);return(0,r.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}})),r.createElement(W,Object.assign({ref:n},e,o))});K.Item=b,K.SubMenu=w,K.Divider=m,K.ItemGroup=o.BW;var V=K},14301:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(2265),o=n(36760),i=n.n(o);let a=e=>e?"function"==typeof e?e():e:null;var l=n(68710),c=n(71744),s=n(75957),u=n(5769),d=n(12918),f=n(691),p=n(88260),h=n(53454),m=n(80669),g=n(3104),v=n(34442);let y=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:l,borderRadiusLG:c,zIndexPopup:s,titleMarginBottom:u,colorBgElevated:f,popoverBg:h,titleBorderBottom:m,innerContentPadding:g,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:s,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},["".concat(t,"-content")]:{position:"relative"},["".concat(t,"-inner")]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:c,boxShadow:a,padding:i},["".concat(t,"-title")]:{minWidth:r,marginBottom:u,color:l,fontWeight:o,borderBottom:m,padding:v},["".concat(t,"-inner-content")]:{color:n,padding:g}})},(0,p.ZP)(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",["".concat(t,"-content")]:{display:"inline-block"}}}]},b=e=>{let{componentCls:t}=e;return{[t]:h.i.map(n=>{let r=e["".concat(n,"6")];return{["&".concat(t,"-").concat(n)]:{"--antd-arrow-background-color":r,["".concat(t,"-inner")]:{backgroundColor:r},["".concat(t,"-arrow")]:{background:"transparent"}}}})}};var x=(0,m.I$)("Popover",e=>{let{colorBgElevated:t,colorText:n}=e,r=(0,g.TS)(e,{popoverBg:t,popoverColor:n});return[y(r),b(r),(0,f._y)(r,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:l,marginXS:c,lineType:s,colorSplit:u,paddingSM:d}=e,f=n-r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},(0,v.w)(e)),(0,p.wZ)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:c,titlePadding:i?"".concat(f/2,"px ").concat(o,"px ").concat(f/2-t,"px"):0,titleBorderBottom:i?"".concat(t,"px ").concat(s," ").concat(u):"none",innerContentPadding:i?"".concat(d,"px ").concat(o,"px"):0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let S=(e,t,n)=>t||n?r.createElement(r.Fragment,null,t&&r.createElement("div",{className:"".concat(e,"-title")},a(t)),r.createElement("div",{className:"".concat(e,"-inner-content")},a(n))):null,k=e=>{let{hashId:t,prefixCls:n,className:o,style:a,placement:l="top",title:c,content:s,children:d}=e;return r.createElement("div",{className:i()(t,n,"".concat(n,"-pure"),"".concat(n,"-placement-").concat(l),o),style:a},r.createElement("div",{className:"".concat(n,"-arrow")}),r.createElement(u.G,Object.assign({},e,{className:t,prefixCls:n}),d||S(n,c,s)))};var E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let C=e=>{let{title:t,content:n,prefixCls:o}=e;return r.createElement(r.Fragment,null,t&&r.createElement("div",{className:"".concat(o,"-title")},a(t)),r.createElement("div",{className:"".concat(o,"-inner-content")},a(n)))},O=r.forwardRef((e,t)=>{let{prefixCls:n,title:o,content:a,overlayClassName:u,placement:d="top",trigger:f="hover",mouseEnterDelay:p=.1,mouseLeaveDelay:h=.1,overlayStyle:m={}}=e,g=E(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:v}=r.useContext(c.E_),y=v("popover",n),[b,w,S]=x(y),k=v(),O=i()(u,w,S);return b(r.createElement(s.Z,Object.assign({placement:d,trigger:f,mouseEnterDelay:p,mouseLeaveDelay:h,overlayStyle:m},g,{prefixCls:y,overlayClassName:O,ref:t,overlay:o||a?r.createElement(C,{prefixCls:y,title:o,content:a}):null,transitionName:(0,l.m)(k,"zoom-big",g.transitionName),"data-popover-inject":!0})))});O._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,className:n}=e,o=w(e,["prefixCls","className"]),{getPrefixCls:a}=r.useContext(c.E_),l=a("popover",t),[s,u,d]=x(l);return s(r.createElement(k,Object.assign({},o,{prefixCls:l,hashId:u,className:i()(n,d)})))};var j=O},29967:function(e,t,n){"use strict";n.d(t,{ZP:function(){return _}});var r=n(2265),o=n(36760),i=n.n(o),a=n(50506),l=n(18242),c=n(71744),s=n(33759);let u=r.createContext(null),d=u.Provider,f=r.createContext(null),p=f.Provider;var h=n(20873),m=n(28791),g=n(6694),v=n(34709),y=n(86586),b=n(39109),x=n(352),w=n(12918),S=n(80669),k=n(3104);let E=e=>{let{componentCls:t,antCls:n}=e,r="".concat(t,"-group");return{[r]:Object.assign(Object.assign({},(0,w.Wf)(e)),{display:"inline-block",fontSize:0,["&".concat(r,"-rtl")]:{direction:"rtl"},["".concat(n,"-badge ").concat(n,"-badge-count")]:{zIndex:1},["> ".concat(n,"-badge:not(:first-child) > ").concat(n,"-button-wrapper")]:{borderInlineStart:"none"}})}},C=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:l,colorBgContainer:c,colorBorder:s,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:f,paddingXS:p,dotColorDisabled:h,lineType:m,radioColor:g,radioBgColor:v,calc:y}=e,b="".concat(t,"-inner"),S=y(o).sub(y(4).mul(2)),k=y(1).mul(o).equal();return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},(0,w.Wf)(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",["&".concat(t,"-wrapper-rtl")]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},["".concat(t,"-checked::after")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:"".concat((0,x.bf)(u)," ").concat(m," ").concat(r),borderRadius:"50%",visibility:"hidden",content:'""'},[t]:Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),["".concat(t,"-wrapper:hover &,\n &:hover ").concat(b)]:{borderColor:r},["".concat(t,"-input:focus-visible + ").concat(b)]:Object.assign({},(0,w.oN)(e)),["".concat(t,":hover::after, ").concat(t,"-wrapper:hover &::after")]:{visibility:"visible"},["".concat(t,"-inner")]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:k,height:k,marginBlockStart:y(1).mul(o).div(-2).equal(),marginInlineStart:y(1).mul(o).div(-2).equal(),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:k,transform:"scale(0)",opacity:0,transition:"all ".concat(i," ").concat(l),content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:k,height:k,backgroundColor:c,borderColor:s,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:"all ".concat(a)},["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},["".concat(t,"-checked")]:{[b]:{borderColor:r,backgroundColor:v,"&::after":{transform:"scale(".concat(e.calc(e.dotSize).div(o).equal(),")"),opacity:1,transition:"all ".concat(i," ").concat(l)}}},["".concat(t,"-disabled")]:{cursor:"not-allowed",[b]:{backgroundColor:d,borderColor:s,cursor:"not-allowed","&::after":{backgroundColor:h}},["".concat(t,"-input")]:{cursor:"not-allowed"},["".concat(t,"-disabled + span")]:{color:f,cursor:"not-allowed"},["&".concat(t,"-checked")]:{[b]:{"&::after":{transform:"scale(".concat(y(S).div(o).equal({unit:!1}),")")}}}},["span".concat(t," + *")]:{paddingInlineStart:p,paddingInlineEnd:p}})}},O=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationSlow:l,motionDurationMid:c,buttonPaddingInline:s,fontSize:u,buttonBg:d,fontSizeLG:f,controlHeightLG:p,controlHeightSM:h,paddingXS:m,borderRadius:g,borderRadiusSM:v,borderRadiusLG:y,buttonCheckedBg:b,buttonSolidCheckedColor:S,colorTextDisabled:k,colorBgContainerDisabled:E,buttonCheckedBgDisabled:C,buttonCheckedColorDisabled:O,colorPrimary:j,colorPrimaryHover:P,colorPrimaryActive:N,buttonSolidCheckedBg:M,buttonSolidCheckedHoverBg:I,buttonSolidCheckedActiveBg:R,calc:T}=e;return{["".concat(r,"-button-wrapper")]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:s,paddingBlock:0,color:t,fontSize:u,lineHeight:(0,x.bf)(T(n).sub(T(o).mul(2)).equal()),background:d,border:"".concat((0,x.bf)(o)," ").concat(i," ").concat(a),borderBlockStartWidth:T(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:["color ".concat(c),"background ".concat(c),"box-shadow ".concat(c)].join(","),a:{color:t},["> ".concat(r,"-button")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:T(o).mul(-1).equal(),insetInlineStart:T(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:a,transition:"background-color ".concat(l),content:'""'}},"&:first-child":{borderInlineStart:"".concat((0,x.bf)(o)," ").concat(i," ").concat(a),borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},["".concat(r,"-group-large &")]:{height:p,fontSize:f,lineHeight:(0,x.bf)(T(p).sub(T(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},["".concat(r,"-group-small &")]:{height:h,paddingInline:T(m).sub(o).equal(),paddingBlock:0,lineHeight:(0,x.bf)(T(h).sub(T(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:j},"&:has(:focus-visible)":Object.assign({},(0,w.oN)(e)),["".concat(r,"-inner, input[type='checkbox'], input[type='radio']")]:{width:0,height:0,opacity:0,pointerEvents:"none"},["&-checked:not(".concat(r,"-button-wrapper-disabled)")]:{zIndex:1,color:j,background:b,borderColor:j,"&::before":{backgroundColor:j},"&:first-child":{borderColor:j},"&:hover":{color:P,borderColor:P,"&::before":{backgroundColor:P}},"&:active":{color:N,borderColor:N,"&::before":{backgroundColor:N}}},["".concat(r,"-group-solid &-checked:not(").concat(r,"-button-wrapper-disabled)")]:{color:S,background:M,borderColor:M,"&:hover":{color:S,background:I,borderColor:I},"&:active":{color:S,background:R,borderColor:R}},"&-disabled":{color:k,backgroundColor:E,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:k,backgroundColor:E,borderColor:a}},["&-disabled".concat(r,"-button-wrapper-checked")]:{color:O,backgroundColor:C,borderColor:a,boxShadow:"none"}}}};var j=(0,S.I$)("Radio",e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r="0 0 0 ".concat((0,x.bf)(n)," ").concat(t),o=(0,k.TS)(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[E(o),C(o),O(o)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:l,colorTextDisabled:c,controlItemBgActiveDisabled:s,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:h}=e;return{radioSize:i,dotSize:t?i-8:i-(4+o)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:l,buttonCheckedBg:l,buttonColor:a,buttonCheckedBgDisabled:s,buttonCheckedColorDisabled:c,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?d:h,radioBgColor:t?l:d}},{unitless:{radioSize:!0,dotSize:!0}}),P=n(64024),N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let M=r.forwardRef((e,t)=>{var n,o;let a=r.useContext(u),l=r.useContext(f),{getPrefixCls:s,direction:d,radio:p}=r.useContext(c.E_),x=r.useRef(null),w=(0,m.sQ)(t,x),{isFormItemInput:S}=r.useContext(b.aM),{prefixCls:k,className:E,rootClassName:C,children:O,style:M,title:I}=e,R=N(e,["prefixCls","className","rootClassName","children","style","title"]),T=s("radio",k),A="button"===((null==a?void 0:a.optionType)||l),_=A?"".concat(T,"-button"):T,D=(0,P.Z)(T),[Z,L,z]=j(T,D),B=Object.assign({},R),F=r.useContext(y.Z);a&&(B.name=a.name,B.onChange=t=>{var n,r;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(r=null==a?void 0:a.onChange)||void 0===r||r.call(a,t)},B.checked=e.value===a.value,B.disabled=null!==(n=B.disabled)&&void 0!==n?n:a.disabled),B.disabled=null!==(o=B.disabled)&&void 0!==o?o:F;let H=i()("".concat(_,"-wrapper"),{["".concat(_,"-wrapper-checked")]:B.checked,["".concat(_,"-wrapper-disabled")]:B.disabled,["".concat(_,"-wrapper-rtl")]:"rtl"===d,["".concat(_,"-wrapper-in-form-item")]:S},null==p?void 0:p.className,E,C,L,z,D);return Z(r.createElement(g.Z,{component:"Radio",disabled:B.disabled},r.createElement("label",{className:H,style:Object.assign(Object.assign({},null==p?void 0:p.style),M),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:I},r.createElement(h.Z,Object.assign({},B,{className:i()(B.className,!A&&v.A),type:"radio",prefixCls:_,ref:w})),void 0!==O?r.createElement("span",null,O):null)))}),I=r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:o}=r.useContext(c.E_),[u,f]=(0,a.Z)(e.defaultValue,{value:e.value}),{prefixCls:p,className:h,rootClassName:m,options:g,buttonStyle:v="outline",disabled:y,children:b,size:x,style:w,id:S,onMouseEnter:k,onMouseLeave:E,onFocus:C,onBlur:O}=e,N=n("radio",p),I="".concat(N,"-group"),R=(0,P.Z)(N),[T,A,_]=j(N,R),D=b;g&&g.length>0&&(D=g.map(e=>"string"==typeof e||"number"==typeof e?r.createElement(M,{key:e.toString(),prefixCls:N,disabled:y,value:e,checked:u===e},e):r.createElement(M,{key:"radio-group-value-options-".concat(e.value),prefixCls:N,disabled:e.disabled||y,value:e.value,checked:u===e.value,title:e.title,style:e.style,id:e.id,required:e.required},e.label)));let Z=(0,s.Z)(x),L=i()(I,"".concat(I,"-").concat(v),{["".concat(I,"-").concat(Z)]:Z,["".concat(I,"-rtl")]:"rtl"===o},h,m,A,_,R);return T(r.createElement("div",Object.assign({},(0,l.Z)(e,{aria:!0,data:!0}),{className:L,style:w,onMouseEnter:k,onMouseLeave:E,onFocus:C,onBlur:O,id:S,ref:t}),r.createElement(d,{value:{onChange:t=>{let n=t.target.value;"value"in e||f(n);let{onChange:r}=e;r&&n!==u&&r(t)},value:u,disabled:e.disabled,name:e.name,optionType:e.optionType}},D)))});var R=r.memo(I),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},A=r.forwardRef((e,t)=>{let{getPrefixCls:n}=r.useContext(c.E_),{prefixCls:o}=e,i=T(e,["prefixCls"]),a=n("radio",o);return r.createElement(p,{value:"button"},r.createElement(M,Object.assign({prefixCls:a},i,{type:"radio",ref:t})))});M.Button=A,M.Group=R,M.__ANT_RADIO=!0;var _=M},47451:function(e,t,n){"use strict";var r=n(10295);t.Z=r.Z},52787:function(e,t,n){"use strict";n.d(t,{default:function(){return tt}});var r=n(2265),o=n(36760),i=n.n(o),a=n(1119),l=n(83145),c=n(11993),s=n(31686),u=n(26365),d=n(6989),f=n(41154),p=n(50506),h=n(32559),m=n(27380),g=n(79267),v=n(95814),y=n(28791),b=function(e){var t=e.className,n=e.customizeIcon,o=e.customizeIconProps,a=e.children,l=e.onMouseDown,c=e.onClick,s="function"==typeof n?n(o):n;return r.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null==l||l(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},void 0!==s?s:r.createElement("span",{className:i()(t.split(/\s+/).map(function(e){return"".concat(e,"-icon")}))},a))},x=function(e,t,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0,s=r.useMemo(function(){return"object"===(0,f.Z)(o)?o.clearIcon:i||void 0},[o,i]);return{allowClear:r.useMemo(function(){return!a&&!!o&&(!!n.length||!!l)&&!("combobox"===c&&""===l)},[o,a,n.length,l,c]),clearIcon:r.createElement(b,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:s},"\xd7")}},w=r.createContext(null);function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=r.useRef(null),n=r.useRef(null);return r.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]),[function(){return t.current},function(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}]}var k=n(18242),E=n(1699),C=r.forwardRef(function(e,t){var n,o=e.prefixCls,a=e.id,l=e.inputElement,c=e.disabled,u=e.tabIndex,d=e.autoFocus,f=e.autoComplete,p=e.editable,m=e.activeDescendantId,g=e.value,v=e.maxLength,b=e.onKeyDown,x=e.onMouseDown,w=e.onChange,S=e.onPaste,k=e.onCompositionStart,E=e.onCompositionEnd,C=e.open,O=e.attrs,j=l||r.createElement("input",null),P=j,N=P.ref,M=P.props,I=M.onKeyDown,R=M.onChange,T=M.onMouseDown,A=M.onCompositionStart,_=M.onCompositionEnd,D=M.style;return(0,h.Kp)(!("maxLength"in j.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),j=r.cloneElement(j,(0,s.Z)((0,s.Z)((0,s.Z)({type:"search"},M),{},{id:a,ref:(0,y.sQ)(t,N),disabled:c,tabIndex:u,autoComplete:f||"off",autoFocus:d,className:i()("".concat(o,"-selection-search-input"),null===(n=j)||void 0===n||null===(n=n.props)||void 0===n?void 0:n.className),role:"combobox","aria-expanded":C||!1,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":C?m:void 0},O),{},{value:p?g:"",maxLength:v,readOnly:!p,unselectable:p?null:"on",style:(0,s.Z)((0,s.Z)({},D),{},{opacity:p?null:0}),onKeyDown:function(e){b(e),I&&I(e)},onMouseDown:function(e){x(e),T&&T(e)},onChange:function(e){w(e),R&&R(e)},onCompositionStart:function(e){k(e),A&&A(e)},onCompositionEnd:function(e){E(e),_&&_(e)},onPaste:S}))});function O(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var j="undefined"!=typeof window&&window.document&&window.document.documentElement;function P(e){return["string","number"].includes((0,f.Z)(e))}function N(e){var t=void 0;return e&&(P(e.title)?t=e.title.toString():P(e.label)&&(t=e.label.toString())),t}function M(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var I=function(e){e.preventDefault(),e.stopPropagation()},R=function(e){var t,n,o=e.id,a=e.prefixCls,l=e.values,s=e.open,d=e.searchValue,f=e.autoClearSearchValue,p=e.inputRef,h=e.placeholder,m=e.disabled,g=e.mode,v=e.showSearch,y=e.autoFocus,x=e.autoComplete,w=e.activeDescendantId,S=e.tabIndex,O=e.removeIcon,P=e.maxTagCount,R=e.maxTagTextLength,T=e.maxTagPlaceholder,A=void 0===T?function(e){return"+ ".concat(e.length," ...")}:T,_=e.tagRender,D=e.onToggleOpen,Z=e.onRemove,L=e.onInputChange,z=e.onInputPaste,B=e.onInputKeyDown,F=e.onInputMouseDown,H=e.onInputCompositionStart,q=e.onInputCompositionEnd,W=r.useRef(null),K=(0,r.useState)(0),V=(0,u.Z)(K,2),U=V[0],G=V[1],X=(0,r.useState)(!1),$=(0,u.Z)(X,2),Y=$[0],Q=$[1],J="".concat(a,"-selection"),ee=s||"multiple"===g&&!1===f||"tags"===g?d:"",et="tags"===g||"multiple"===g&&!1===f||v&&(s||Y);t=function(){G(W.current.scrollWidth)},n=[ee],j?r.useLayoutEffect(t,n):r.useEffect(t,n);var en=function(e,t,n,o,a){return r.createElement("span",{title:N(e),className:i()("".concat(J,"-item"),(0,c.Z)({},"".concat(J,"-item-disabled"),n))},r.createElement("span",{className:"".concat(J,"-item-content")},t),o&&r.createElement(b,{className:"".concat(J,"-item-remove"),onMouseDown:I,onClick:a,customizeIcon:O},"\xd7"))},er=r.createElement("div",{className:"".concat(J,"-search"),style:{width:U},onFocus:function(){Q(!0)},onBlur:function(){Q(!1)}},r.createElement(C,{ref:p,open:s,prefixCls:a,id:o,inputElement:null,disabled:m,autoFocus:y,autoComplete:x,editable:et,activeDescendantId:w,value:ee,onKeyDown:B,onMouseDown:F,onChange:L,onPaste:z,onCompositionStart:H,onCompositionEnd:q,tabIndex:S,attrs:(0,k.Z)(e,!0)}),r.createElement("span",{ref:W,className:"".concat(J,"-search-mirror"),"aria-hidden":!0},ee,"\xa0")),eo=r.createElement(E.Z,{prefixCls:"".concat(J,"-overflow"),data:l,renderItem:function(e){var t,n=e.disabled,o=e.label,i=e.value,a=!m&&!n,l=o;if("number"==typeof R&&("string"==typeof o||"number"==typeof o)){var c=String(l);c.length>R&&(l="".concat(c.slice(0,R),"..."))}var u=function(t){t&&t.stopPropagation(),Z(e)};return"function"==typeof _?(t=l,r.createElement("span",{onMouseDown:function(e){I(e),D(!s)}},_({label:t,value:i,disabled:n,closable:a,onClose:u}))):en(e,l,n,a,u)},renderRest:function(e){var t="function"==typeof A?A(e):A;return en({title:t},t,!1)},suffix:er,itemKey:M,maxCount:P});return r.createElement(r.Fragment,null,eo,!l.length&&!ee&&r.createElement("span",{className:"".concat(J,"-placeholder")},h))},T=function(e){var t=e.inputElement,n=e.prefixCls,o=e.id,i=e.inputRef,a=e.disabled,l=e.autoFocus,c=e.autoComplete,s=e.activeDescendantId,d=e.mode,f=e.open,p=e.values,h=e.placeholder,m=e.tabIndex,g=e.showSearch,v=e.searchValue,y=e.activeValue,b=e.maxLength,x=e.onInputKeyDown,w=e.onInputMouseDown,S=e.onInputChange,E=e.onInputPaste,O=e.onInputCompositionStart,j=e.onInputCompositionEnd,P=e.title,M=r.useState(!1),I=(0,u.Z)(M,2),R=I[0],T=I[1],A="combobox"===d,_=A||g,D=p[0],Z=v||"";A&&y&&!R&&(Z=y),r.useEffect(function(){A&&T(!1)},[A,y]);var L=("combobox"===d||!!f||!!g)&&!!Z,z=void 0===P?N(D):P,B=r.useMemo(function(){return D?null:r.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:L?{visibility:"hidden"}:void 0},h)},[D,L,h,n]);return r.createElement(r.Fragment,null,r.createElement("span",{className:"".concat(n,"-selection-search")},r.createElement(C,{ref:i,prefixCls:n,id:o,open:f,inputElement:t,disabled:a,autoFocus:l,autoComplete:c,editable:_,activeDescendantId:s,value:Z,onKeyDown:x,onMouseDown:w,onChange:function(e){T(!0),S(e)},onPaste:E,onCompositionStart:O,onCompositionEnd:j,tabIndex:m,attrs:(0,k.Z)(e,!0),maxLength:A?b:void 0})),!A&&D?r.createElement("span",{className:"".concat(n,"-selection-item"),title:z,style:L?{visibility:"hidden"}:void 0},D.label):null,B)},A=r.forwardRef(function(e,t){var n=(0,r.useRef)(null),o=(0,r.useRef)(!1),i=e.prefixCls,l=e.open,c=e.mode,s=e.showSearch,d=e.tokenWithEnter,f=e.autoClearSearchValue,p=e.onSearch,h=e.onSearchSubmit,m=e.onToggleOpen,g=e.onInputKeyDown,y=e.domRef;r.useImperativeHandle(t,function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}});var b=S(0),x=(0,u.Z)(b,2),w=x[0],k=x[1],E=(0,r.useRef)(null),C=function(e){!1!==p(e,!0,o.current)&&m(!0)},O={inputRef:n,onInputKeyDown:function(e){var t=e.which;(t===v.Z.UP||t===v.Z.DOWN)&&e.preventDefault(),g&&g(e),t!==v.Z.ENTER||"tags"!==c||o.current||l||null==h||h(e.target.value),[v.Z.ESC,v.Z.SHIFT,v.Z.BACKSPACE,v.Z.TAB,v.Z.WIN_KEY,v.Z.ALT,v.Z.META,v.Z.WIN_KEY_RIGHT,v.Z.CTRL,v.Z.SEMICOLON,v.Z.EQUALS,v.Z.CAPS_LOCK,v.Z.CONTEXT_MENU,v.Z.F1,v.Z.F2,v.Z.F3,v.Z.F4,v.Z.F5,v.Z.F6,v.Z.F7,v.Z.F8,v.Z.F9,v.Z.F10,v.Z.F11,v.Z.F12].includes(t)||m(!0)},onInputMouseDown:function(){k(!0)},onInputChange:function(e){var t=e.target.value;if(d&&E.current&&/[\r\n]/.test(E.current)){var n=E.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,E.current)}E.current=null,C(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");E.current=n||""},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==c&&C(e.target.value)}},j="multiple"===c||"tags"===c?r.createElement(R,(0,a.Z)({},e,O)):r.createElement(T,(0,a.Z)({},e,O));return r.createElement("div",{ref:y,className:"".concat(i,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout(function(){n.current.focus()}):n.current.focus())},onMouseDown:function(e){var t=w();e.target===n.current||t||"combobox"===c||e.preventDefault(),("combobox"===c||s&&t)&&l||(l&&!1!==f&&p("",!0,!1),m())}},j)}),_=n(97821),D=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Z=function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},L=r.forwardRef(function(e,t){var n=e.prefixCls,o=(e.disabled,e.visible),l=e.children,u=e.popupElement,f=e.animation,p=e.transitionName,h=e.dropdownStyle,m=e.dropdownClassName,g=e.direction,v=e.placement,y=e.builtinPlacements,b=e.dropdownMatchSelectWidth,x=e.dropdownRender,w=e.dropdownAlign,S=e.getPopupContainer,k=e.empty,E=e.getTriggerDOMNode,C=e.onPopupVisibleChange,O=e.onPopupMouseEnter,j=(0,d.Z)(e,D),P="".concat(n,"-dropdown"),N=u;x&&(N=x(u));var M=r.useMemo(function(){return y||Z(b)},[y,b]),I=f?"".concat(P,"-").concat(f):p,R="number"==typeof b,T=r.useMemo(function(){return R?null:!1===b?"minWidth":"width"},[b,R]),A=h;R&&(A=(0,s.Z)((0,s.Z)({},A),{},{width:b}));var L=r.useRef(null);return r.useImperativeHandle(t,function(){return{getPopupElement:function(){return L.current}}}),r.createElement(_.Z,(0,a.Z)({},j,{showAction:C?["click"]:[],hideAction:C?["click"]:[],popupPlacement:v||("rtl"===(void 0===g?"ltr":g)?"bottomRight":"bottomLeft"),builtinPlacements:M,prefixCls:P,popupTransitionName:I,popup:r.createElement("div",{ref:L,onMouseEnter:O},N),stretch:T,popupAlign:w,popupVisible:o,getPopupContainer:S,popupClassName:i()(m,(0,c.Z)({},"".concat(P,"-empty"),k)),popupStyle:A,getTriggerDOMNode:E,onPopupVisibleChange:C}),l)}),z=n(87099);function B(e,t){var n,r=e.key;return("value"in e&&(n=e.value),null!=r)?r:void 0!==n?n:"rc-index-key-".concat(t)}function F(e,t){var n=e||{},r=n.label,o=n.value,i=n.options,a=n.groupLabel,l=r||(t?"children":"label");return{label:l,value:o||"value",options:i||"options",groupLabel:a||l}}function H(e){var t=(0,s.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,h.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var q=function(e,t,n){if(!t||!t.length)return null;var r=!1,o=function e(t,n){var o=(0,z.Z)(n),i=o[0],a=o.slice(1);if(!i)return[t];var c=t.split(i);return r=r||c.length>1,c.reduce(function(t,n){return[].concat((0,l.Z)(t),(0,l.Z)(e(n,a)))},[]).filter(Boolean)}(e,t);return r?void 0!==n?o.slice(0,n):o:null},W=r.createContext(null),K=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],V=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],U=function(e){return"tags"===e||"multiple"===e},G=r.forwardRef(function(e,t){var n,o,h,k,E,C,O,j,P=e.id,N=e.prefixCls,M=e.className,I=e.showSearch,R=e.tagRender,T=e.direction,_=e.omitDomProps,D=e.displayValues,Z=e.onDisplayValuesChange,z=e.emptyOptions,B=e.notFoundContent,F=void 0===B?"Not Found":B,H=e.onClear,G=e.mode,X=e.disabled,$=e.loading,Y=e.getInputElement,Q=e.getRawInputElement,J=e.open,ee=e.defaultOpen,et=e.onDropdownVisibleChange,en=e.activeValue,er=e.onActiveValueChange,eo=e.activeDescendantId,ei=e.searchValue,ea=e.autoClearSearchValue,el=e.onSearch,ec=e.onSearchSplit,es=e.tokenSeparators,eu=e.allowClear,ed=e.suffixIcon,ef=e.clearIcon,ep=e.OptionList,eh=e.animation,em=e.transitionName,eg=e.dropdownStyle,ev=e.dropdownClassName,ey=e.dropdownMatchSelectWidth,eb=e.dropdownRender,ex=e.dropdownAlign,ew=e.placement,eS=e.builtinPlacements,ek=e.getPopupContainer,eE=e.showAction,eC=void 0===eE?[]:eE,eO=e.onFocus,ej=e.onBlur,eP=e.onKeyUp,eN=e.onKeyDown,eM=e.onMouseDown,eI=(0,d.Z)(e,K),eR=U(G),eT=(void 0!==I?I:eR)||"combobox"===G,eA=(0,s.Z)({},eI);V.forEach(function(e){delete eA[e]}),null==_||_.forEach(function(e){delete eA[e]});var e_=r.useState(!1),eD=(0,u.Z)(e_,2),eZ=eD[0],eL=eD[1];r.useEffect(function(){eL((0,g.Z)())},[]);var ez=r.useRef(null),eB=r.useRef(null),eF=r.useRef(null),eH=r.useRef(null),eq=r.useRef(null),eW=r.useRef(!1),eK=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=r.useState(!1),n=(0,u.Z)(t,2),o=n[0],i=n[1],a=r.useRef(null),l=function(){window.clearTimeout(a.current)};return r.useEffect(function(){return l},[]),[o,function(t,n){l(),a.current=window.setTimeout(function(){i(t),n&&n()},e)},l]}(),eV=(0,u.Z)(eK,3),eU=eV[0],eG=eV[1],eX=eV[2];r.useImperativeHandle(t,function(){var e,t;return{focus:null===(e=eH.current)||void 0===e?void 0:e.focus,blur:null===(t=eH.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=eq.current)||void 0===t?void 0:t.scrollTo(e)}}});var e$=r.useMemo(function(){if("combobox"!==G)return ei;var e,t=null===(e=D[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""},[ei,G,D]),eY="combobox"===G&&"function"==typeof Y&&Y()||null,eQ="function"==typeof Q&&Q(),eJ=(0,y.x1)(eB,null==eQ||null===(k=eQ.props)||void 0===k?void 0:k.ref),e0=r.useState(!1),e1=(0,u.Z)(e0,2),e2=e1[0],e6=e1[1];(0,m.Z)(function(){e6(!0)},[]);var e4=(0,p.Z)(!1,{defaultValue:ee,value:J}),e3=(0,u.Z)(e4,2),e5=e3[0],e8=e3[1],e7=!!e2&&e5,e9=!F&&z;(X||e9&&e7&&"combobox"===G)&&(e7=!1);var te=!e9&&e7,tt=r.useCallback(function(e){var t=void 0!==e?e:!e7;X||(e8(t),e7!==t&&(null==et||et(t)))},[X,e7,e8,et]),tn=r.useMemo(function(){return(es||[]).some(function(e){return["\n","\r\n"].includes(e)})},[es]),tr=r.useContext(W)||{},to=tr.maxCount,ti=tr.rawValues,ta=function(e,t,n){if(!((null==ti?void 0:ti.size)>=to)){var r=!0,o=e;null==er||er(null);var i=q(e,es,to&&to-ti.size),a=n?null:i;return"combobox"!==G&&a&&(o="",null==ec||ec(a),tt(!1),r=!1),el&&e$!==o&&el(o,{source:t?"typing":"effect"}),r}};r.useEffect(function(){e7||eR||"combobox"===G||ta("",!1,!1)},[e7]),r.useEffect(function(){e5&&X&&e8(!1),X&&!eW.current&&eG(!1)},[X]);var tl=S(),tc=(0,u.Z)(tl,2),ts=tc[0],tu=tc[1],td=r.useRef(!1),tf=[];r.useEffect(function(){return function(){tf.forEach(function(e){return clearTimeout(e)}),tf.splice(0,tf.length)}},[]);var tp=r.useState({}),th=(0,u.Z)(tp,2)[1];eQ&&(C=function(e){tt(e)}),n=function(){var e;return[ez.current,null===(e=eF.current)||void 0===e?void 0:e.getPopupElement()]},o=!!eQ,(h=r.useRef(null)).current={open:te,triggerOpen:tt,customizedTrigger:o},r.useEffect(function(){function e(e){if(null===(t=h.current)||void 0===t||!t.customizedTrigger){var t,r=e.target;r.shadowRoot&&e.composed&&(r=e.composedPath()[0]||r),h.current.open&&n().filter(function(e){return e}).every(function(e){return!e.contains(r)&&e!==r})&&h.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}},[]);var tm=r.useMemo(function(){return(0,s.Z)((0,s.Z)({},e),{},{notFoundContent:F,open:e7,triggerOpen:te,id:P,showSearch:eT,multiple:eR,toggleOpen:tt})},[e,F,te,e7,P,eT,eR,tt]),tg=!!ed||$;tg&&(O=r.createElement(b,{className:i()("".concat(N,"-arrow"),(0,c.Z)({},"".concat(N,"-arrow-loading"),$)),customizeIcon:ed,customizeIconProps:{loading:$,searchValue:e$,open:e7,focused:eU,showSearch:eT}}));var tv=x(N,function(){var e;null==H||H(),null===(e=eH.current)||void 0===e||e.focus(),Z([],{type:"clear",values:D}),ta("",!1,!1)},D,eu,ef,X,e$,G),ty=tv.allowClear,tb=tv.clearIcon,tx=r.createElement(ep,{ref:eq}),tw=i()(N,M,(E={},(0,c.Z)(E,"".concat(N,"-focused"),eU),(0,c.Z)(E,"".concat(N,"-multiple"),eR),(0,c.Z)(E,"".concat(N,"-single"),!eR),(0,c.Z)(E,"".concat(N,"-allow-clear"),eu),(0,c.Z)(E,"".concat(N,"-show-arrow"),tg),(0,c.Z)(E,"".concat(N,"-disabled"),X),(0,c.Z)(E,"".concat(N,"-loading"),$),(0,c.Z)(E,"".concat(N,"-open"),e7),(0,c.Z)(E,"".concat(N,"-customize-input"),eY),(0,c.Z)(E,"".concat(N,"-show-search"),eT),E)),tS=r.createElement(L,{ref:eF,disabled:X,prefixCls:N,visible:te,popupElement:tx,animation:eh,transitionName:em,dropdownStyle:eg,dropdownClassName:ev,direction:T,dropdownMatchSelectWidth:ey,dropdownRender:eb,dropdownAlign:ex,placement:ew,builtinPlacements:eS,getPopupContainer:ek,empty:z,getTriggerDOMNode:function(){return eB.current},onPopupVisibleChange:C,onPopupMouseEnter:function(){th({})}},eQ?r.cloneElement(eQ,{ref:eJ}):r.createElement(A,(0,a.Z)({},e,{domRef:eB,prefixCls:N,inputElement:eY,ref:eH,id:P,showSearch:eT,autoClearSearchValue:ea,mode:G,activeDescendantId:eo,tagRender:R,values:D,open:e7,onToggleOpen:tt,activeValue:en,searchValue:e$,onSearch:ta,onSearchSubmit:function(e){e&&e.trim()&&el(e,{source:"submit"})},onRemove:function(e){Z(D.filter(function(t){return t!==e}),{type:"remove",values:[e]})},tokenWithEnter:tn})));return j=eQ?tS:r.createElement("div",(0,a.Z)({className:tw},eA,{ref:ez,onMouseDown:function(e){var t,n=e.target,r=null===(t=eF.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var o=setTimeout(function(){var e,t=tf.indexOf(o);-1!==t&&tf.splice(t,1),eX(),eZ||r.contains(document.activeElement)||null===(e=eH.current)||void 0===e||e.focus()});tf.push(o)}for(var i=arguments.length,a=Array(i>1?i-1:0),l=1;l<i;l++)a[l-1]=arguments[l];null==eM||eM.apply(void 0,[e].concat(a))},onKeyDown:function(e){var t,n=ts(),r=e.which;if(r!==v.Z.ENTER||("combobox"!==G&&e.preventDefault(),e7||tt(!0)),tu(!!e$),r===v.Z.BACKSPACE&&!n&&eR&&!e$&&D.length){for(var o=(0,l.Z)(D),i=null,a=o.length-1;a>=0;a-=1){var c=o[a];if(!c.disabled){o.splice(a,1),i=c;break}}i&&Z(o,{type:"remove",values:[i]})}for(var s=arguments.length,u=Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];e7&&(null===(t=eq.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(u))),null==eN||eN.apply(void 0,[e].concat(u))},onKeyUp:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e7&&(null===(t=eq.current)||void 0===t||t.onKeyUp.apply(t,[e].concat(r))),null==eP||eP.apply(void 0,[e].concat(r))},onFocus:function(){eG(!0),!X&&(eO&&!td.current&&eO.apply(void 0,arguments),eC.includes("focus")&&tt(!0)),td.current=!0},onBlur:function(){eW.current=!0,eG(!1,function(){td.current=!1,eW.current=!1,tt(!1)}),!X&&(e$&&("tags"===G?el(e$,{source:"submit"}):"multiple"===G&&el("",{source:"blur"})),ej&&ej.apply(void 0,arguments))}}),eU&&!e7&&r.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(D.map(function(e){var t=e.label,n=e.value;return["number","string"].includes((0,f.Z)(t))?t:n}).join(", "))),tS,O,ty&&tb),r.createElement(w.Provider,{value:tm},j)}),X=function(){return null};X.isSelectOptGroup=!0;var $=function(){return null};$.isSelectOption=!0;var Y=n(6397),Q=n(18694),J=n(48625),ee=["disabled","title","children","style","className"];function et(e){return"string"==typeof e||"number"==typeof e}var en=r.forwardRef(function(e,t){var n=r.useContext(w),o=n.prefixCls,s=n.id,f=n.open,p=n.multiple,h=n.mode,m=n.searchValue,g=n.toggleOpen,y=n.notFoundContent,x=n.onPopupScroll,S=r.useContext(W),E=S.maxCount,C=S.flattenOptions,O=S.onActiveValue,j=S.defaultActiveFirstOption,P=S.onSelect,N=S.menuItemSelectedIcon,M=S.rawValues,I=S.fieldNames,R=S.virtual,T=S.direction,A=S.listHeight,_=S.listItemHeight,D=S.optionRender,Z="".concat(o,"-item"),L=(0,Y.Z)(function(){return C},[f,C],function(e,t){return t[0]&&e[1]!==t[1]}),z=r.useRef(null),B=r.useMemo(function(){return p&&void 0!==E&&(null==M?void 0:M.size)>=E},[p,E,null==M?void 0:M.size]),F=function(e){e.preventDefault()},H=function(e){var t;null===(t=z.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},q=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=L.length,r=0;r<n;r+=1){var o=(e+r*t+n)%n,i=L[o]||{},a=i.group,l=i.data;if(!a&&!(null!=l&&l.disabled)&&!B)return o}return -1},K=r.useState(function(){return q(0)}),V=(0,u.Z)(K,2),U=V[0],G=V[1],X=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];G(e);var n={source:t?"keyboard":"mouse"},r=L[e];if(!r){O(null,-1,n);return}O(r.value,e,n)};(0,r.useEffect)(function(){X(!1!==j?q(0):-1)},[L.length,m]);var $=r.useCallback(function(e){return M.has(e)&&"combobox"!==h},[h,(0,l.Z)(M).toString(),M.size]);(0,r.useEffect)(function(){var e,t=setTimeout(function(){if(!p&&f&&1===M.size){var e=Array.from(M)[0],t=L.findIndex(function(t){return t.data.value===e});-1!==t&&(X(t),H(t))}});return f&&(null===(e=z.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}},[f,m]);var en=function(e){void 0!==e&&P(e,{selected:!M.has(e)}),p||g(!1)};if(r.useImperativeHandle(t,function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case v.Z.N:case v.Z.P:case v.Z.UP:case v.Z.DOWN:var r=0;if(t===v.Z.UP?r=-1:t===v.Z.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===v.Z.N?r=1:t===v.Z.P&&(r=-1)),0!==r){var o=q(U+r,r);H(o),X(o,!0)}break;case v.Z.ENTER:var i,a=L[U];!a||null!=a&&null!==(i=a.data)&&void 0!==i&&i.disabled||B?en(void 0):en(a.value),f&&e.preventDefault();break;case v.Z.ESC:g(!1),f&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){H(e)}}}),0===L.length)return r.createElement("div",{role:"listbox",id:"".concat(s,"_list"),className:"".concat(Z,"-empty"),onMouseDown:F},y);var er=Object.keys(I).map(function(e){return I[e]}),eo=function(e){return e.label};function ei(e,t){return{role:e.group?"presentation":"option",id:"".concat(s,"_list_").concat(t)}}var ea=function(e){var t=L[e];if(!t)return null;var n=t.data||{},o=n.value,i=t.group,l=(0,k.Z)(n,!0),c=eo(t);return t?r.createElement("div",(0,a.Z)({"aria-label":"string"!=typeof c||i?null:c},l,{key:e},ei(t,e),{"aria-selected":$(o)}),o):null},el={role:"listbox",id:"".concat(s,"_list")};return r.createElement(r.Fragment,null,R&&r.createElement("div",(0,a.Z)({},el,{style:{height:0,width:0,overflow:"hidden"}}),ea(U-1),ea(U),ea(U+1)),r.createElement(J.Z,{itemKey:"key",ref:z,data:L,height:A,itemHeight:_,fullHeight:!1,onMouseDown:F,onScroll:x,virtual:R,direction:T,innerProps:R?null:el},function(e,t){var n=e.group,o=e.groupOption,l=e.data,s=e.label,u=e.value,f=l.key;if(n){var p,h,m=null!==(h=l.title)&&void 0!==h?h:et(s)?s.toString():void 0;return r.createElement("div",{className:i()(Z,"".concat(Z,"-group")),title:m},void 0!==s?s:f)}var g=l.disabled,v=l.title,y=(l.children,l.style),x=l.className,w=(0,d.Z)(l,ee),S=(0,Q.Z)(w,er),E=$(u),C=g||!E&&B,O="".concat(Z,"-option"),j=i()(Z,O,x,(p={},(0,c.Z)(p,"".concat(O,"-grouped"),o),(0,c.Z)(p,"".concat(O,"-active"),U===t&&!C),(0,c.Z)(p,"".concat(O,"-disabled"),C),(0,c.Z)(p,"".concat(O,"-selected"),E),p)),P=eo(e),M=!N||"function"==typeof N||E,I="number"==typeof P?P:P||u,T=et(I)?I.toString():void 0;return void 0!==v&&(T=v),r.createElement("div",(0,a.Z)({},(0,k.Z)(S),R?{}:ei(e,t),{"aria-selected":E,className:j,title:T,onMouseMove:function(){U===t||C||X(t)},onClick:function(){C||en(u)},style:y}),r.createElement("div",{className:"".concat(O,"-content")},"function"==typeof D?D(e,{index:t}):I),r.isValidElement(N)||E,M&&r.createElement(b,{className:"".concat(Z,"-option-state"),customizeIcon:N,customizeIconProps:{value:u,disabled:C,isSelected:E}},E?"✓":null))}))}),er=function(e,t){var n=r.useRef({values:new Map,options:new Map});return[r.useMemo(function(){var r=n.current,o=r.values,i=r.options,a=e.map(function(e){if(void 0===e.label){var t;return(0,s.Z)((0,s.Z)({},e),{},{label:null===(t=o.get(e.value))||void 0===t?void 0:t.label})}return e}),l=new Map,c=new Map;return a.forEach(function(e){l.set(e.value,e),c.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=l,n.current.options=c,a},[e,t]),r.useCallback(function(e){return t.get(e)||n.current.options.get(e)},[t])]};function eo(e,t){return O(e).join("").toUpperCase().includes(t)}var ei=n(94981),ea=0,el=(0,ei.Z)(),ec=n(45287),es=["children","value"],eu=["children"];function ed(e){var t=r.useRef();return t.current=e,r.useCallback(function(){return t.current.apply(t,arguments)},[])}var ef=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange","maxCount"],ep=["inputValue"],eh=r.forwardRef(function(e,t){var n,o,i,h,m,g=e.id,v=e.mode,y=e.prefixCls,b=e.backfill,x=e.fieldNames,w=e.inputValue,S=e.searchValue,k=e.onSearch,E=e.autoClearSearchValue,C=void 0===E||E,j=e.onSelect,P=e.onDeselect,N=e.dropdownMatchSelectWidth,M=void 0===N||N,I=e.filterOption,R=e.filterSort,T=e.optionFilterProp,A=e.optionLabelProp,_=e.options,D=e.optionRender,Z=e.children,L=e.defaultActiveFirstOption,z=e.menuItemSelectedIcon,q=e.virtual,K=e.direction,V=e.listHeight,X=void 0===V?200:V,$=e.listItemHeight,Y=void 0===$?20:$,Q=e.value,J=e.defaultValue,ee=e.labelInValue,et=e.onChange,ei=e.maxCount,eh=(0,d.Z)(e,ef),em=(n=r.useState(),i=(o=(0,u.Z)(n,2))[0],h=o[1],r.useEffect(function(){var e;h("rc_select_".concat((el?(e=ea,ea+=1):e="TEST_OR_SSR",e)))},[]),g||i),eg=U(v),ev=!!(!_&&Z),ey=r.useMemo(function(){return(void 0!==I||"combobox"!==v)&&I},[I,v]),eb=r.useMemo(function(){return F(x,ev)},[JSON.stringify(x),ev]),ex=(0,p.Z)("",{value:void 0!==S?S:w,postState:function(e){return e||""}}),ew=(0,u.Z)(ex,2),eS=ew[0],ek=ew[1],eE=r.useMemo(function(){var e=_;_||(e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,ec.Z)(t).map(function(t,o){if(!r.isValidElement(t)||!t.type)return null;var i,a,l,c,u,f=t.type.isSelectOptGroup,p=t.key,h=t.props,m=h.children,g=(0,d.Z)(h,eu);return n||!f?(i=t.key,l=(a=t.props).children,c=a.value,u=(0,d.Z)(a,es),(0,s.Z)({key:i,value:void 0!==c?c:i,children:l},u)):(0,s.Z)((0,s.Z)({key:"__RC_SELECT_GRP__".concat(null===p?o:p,"__"),label:p},g),{},{options:e(m)})}).filter(function(e){return e})}(Z));var t=new Map,n=new Map,o=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(r){for(var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=0;a<r.length;a+=1){var l=r[a];!l[eb.options]||i?(t.set(l[eb.value],l),o(n,l,eb.label),o(n,l,T),o(n,l,A)):e(l[eb.options],!0)}}(e),{options:e,valueOptions:t,labelOptions:n}},[_,Z,eb,T,A]),eC=eE.valueOptions,eO=eE.labelOptions,ej=eE.options,eP=r.useCallback(function(e){return O(e).map(function(e){e&&"object"===(0,f.Z)(e)?(r=e.key,n=e.label,t=null!==(a=e.value)&&void 0!==a?a:r):t=e;var t,n,r,o,i,a,l,c=eC.get(t);return c&&(void 0===n&&(n=null==c?void 0:c[A||eb.label]),void 0===r&&(r=null!==(l=null==c?void 0:c.key)&&void 0!==l?l:t),o=null==c?void 0:c.disabled,i=null==c?void 0:c.title),{label:n,value:t,key:r,disabled:o,title:i}})},[eb,A,eC]),eN=(0,p.Z)(J,{value:Q}),eM=(0,u.Z)(eN,2),eI=eM[0],eR=eM[1],eT=er(r.useMemo(function(){var e,t,n=eP(eg&&null===eI?[]:eI);return"combobox"!==v||(t=null===(e=n[0])||void 0===e?void 0:e.value)||0===t?n:[]},[eI,eP,v,eg]),eC),eA=(0,u.Z)(eT,2),e_=eA[0],eD=eA[1],eZ=r.useMemo(function(){if(!v&&1===e_.length){var e=e_[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return e_.map(function(e){var t;return(0,s.Z)((0,s.Z)({},e),{},{label:null!==(t=e.label)&&void 0!==t?t:e.value})})},[v,e_]),eL=r.useMemo(function(){return new Set(e_.map(function(e){return e.value}))},[e_]);r.useEffect(function(){if("combobox"===v){var e,t=null===(e=e_[0])||void 0===e?void 0:e.value;ek(null!=t?String(t):"")}},[e_]);var ez=ed(function(e,t){var n,r=null!=t?t:e;return n={},(0,c.Z)(n,eb.value,e),(0,c.Z)(n,eb.label,r),n}),eB=(m=r.useMemo(function(){if("tags"!==v)return ej;var e=(0,l.Z)(ej);return(0,l.Z)(e_).sort(function(e,t){return e.value<t.value?-1:1}).forEach(function(t){var n=t.value;eC.has(n)||e.push(ez(n,t.label))}),e},[ez,ej,eC,e_,v]),r.useMemo(function(){if(!eS||!1===ey)return m;var e=eb.options,t=eb.label,n=eb.value,r=[],o="function"==typeof ey,i=eS.toUpperCase(),a=o?ey:function(r,o){return T?eo(o[T],i):o[e]?eo(o["children"!==t?t:"label"],i):eo(o[n],i)},l=o?function(e){return H(e)}:function(e){return e};return m.forEach(function(t){if(t[e]){if(a(eS,l(t)))r.push(t);else{var n=t[e].filter(function(e){return a(eS,l(e))});n.length&&r.push((0,s.Z)((0,s.Z)({},t),{},(0,c.Z)({},e,n)))}return}a(eS,l(t))&&r.push(t)}),r},[m,ey,T,eS,eb])),eF=r.useMemo(function(){return"tags"!==v||!eS||eB.some(function(e){return e[T||"value"]===eS})||eB.some(function(e){return e[eb.value]===eS})?eB:[ez(eS)].concat((0,l.Z)(eB))},[ez,T,v,eB,eS,eb]),eH=r.useMemo(function(){return R?(0,l.Z)(eF).sort(function(e,t){return R(e,t)}):eF},[eF,R]),eq=r.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],i=F(n,!1),a=i.label,l=i.value,c=i.options,s=i.groupLabel;return!function e(t,n){Array.isArray(t)&&t.forEach(function(t){if(!n&&c in t){var i=t[s];void 0===i&&r&&(i=t.label),o.push({key:B(t,o.length),group:!0,data:t,label:i}),e(t[c],!0)}else{var u=t[l];o.push({key:B(t,o.length),groupOption:n,data:t,label:t[a],value:u})}})}(e,!1),o}(eH,{fieldNames:eb,childrenAsData:ev})},[eH,eb,ev]),eW=function(e){var t=eP(e);if(eR(t),et&&(t.length!==e_.length||t.some(function(e,t){var n;return(null===(n=e_[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)}))){var n=ee?t:t.map(function(e){return e.value}),r=t.map(function(e){return H(eD(e.value))});et(eg?n:n[0],eg?r:r[0])}},eK=r.useState(null),eV=(0,u.Z)(eK,2),eU=eV[0],eG=eV[1],eX=r.useState(0),e$=(0,u.Z)(eX,2),eY=e$[0],eQ=e$[1],eJ=void 0!==L?L:"combobox"!==v,e0=r.useCallback(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source;eQ(t),b&&"combobox"===v&&null!==e&&"keyboard"===(void 0===r?"keyboard":r)&&eG(String(e))},[b,v]),e1=function(e,t,n){var r=function(){var t,n=eD(e);return[ee?{label:null==n?void 0:n[eb.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,H(n)]};if(t&&j){var o=r(),i=(0,u.Z)(o,2);j(i[0],i[1])}else if(!t&&P&&"clear"!==n){var a=r(),l=(0,u.Z)(a,2);P(l[0],l[1])}},e2=ed(function(e,t){var n=!eg||t.selected;eW(n?eg?[].concat((0,l.Z)(e_),[e]):[e]:e_.filter(function(t){return t.value!==e})),e1(e,n),"combobox"===v?eG(""):(!U||C)&&(ek(""),eG(""))}),e6=r.useMemo(function(){var e=!1!==q&&!1!==M;return(0,s.Z)((0,s.Z)({},eE),{},{flattenOptions:eq,onActiveValue:e0,defaultActiveFirstOption:eJ,onSelect:e2,menuItemSelectedIcon:z,rawValues:eL,fieldNames:eb,virtual:e,direction:K,listHeight:X,listItemHeight:Y,childrenAsData:ev,maxCount:ei,optionRender:D})},[ei,eE,eq,e0,eJ,e2,z,eL,eb,q,M,K,X,Y,ev,D]);return r.createElement(W.Provider,{value:e6},r.createElement(G,(0,a.Z)({},eh,{id:em,prefixCls:void 0===y?"rc-select":y,ref:t,omitDomProps:ep,mode:v,displayValues:eZ,onDisplayValuesChange:function(e,t){eW(e);var n=t.type,r=t.values;("remove"===n||"clear"===n)&&r.forEach(function(e){e1(e.value,!1,n)})},direction:K,searchValue:eS,onSearch:function(e,t){if(ek(e),eG(null),"submit"===t.source){var n=(e||"").trim();n&&(eW(Array.from(new Set([].concat((0,l.Z)(eL),[n])))),e1(n,!0),ek(""));return}"blur"!==t.source&&("combobox"===v&&eW(e),null==k||k(e))},autoClearSearchValue:C,onSearchSplit:function(e){var t=e;"tags"!==v&&(t=e.map(function(e){var t=eO.get(e);return null==t?void 0:t.value}).filter(function(e){return void 0!==e}));var n=Array.from(new Set([].concat((0,l.Z)(eL),(0,l.Z)(t))));eW(n),n.forEach(function(e){e1(e,!0)})},dropdownMatchSelectWidth:M,OptionList:en,emptyOptions:!eq.length,activeValue:eU,activeDescendantId:"".concat(em,"_list_").concat(eY)})))});eh.Option=$,eh.OptGroup=X;var em=n(62236),eg=n(68710),ev=n(93942),ey=n(12757),eb=n(71744),ex=n(91086),ew=n(86586),eS=n(64024),ek=n(33759),eE=n(39109),eC=n(56250),eO=n(65658),ej=n(29961);let eP=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}};var eN=n(12918),eM=n(17691),eI=n(80669),eR=n(3104),eT=n(18544),eA=n(29382);let e_=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}};var eD=e=>{let{antCls:t,componentCls:n}=e,r="".concat(n,"-item"),o="&".concat(t,"-slide-up-enter").concat(t,"-slide-up-enter-active"),i="&".concat(t,"-slide-up-appear").concat(t,"-slide-up-appear-active"),a="&".concat(t,"-slide-up-leave").concat(t,"-slide-up-leave-active"),l="".concat(n,"-dropdown-placement-");return[{["".concat(n,"-dropdown")]:Object.assign(Object.assign({},(0,eN.Wf)(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,["\n ".concat(o).concat(l,"bottomLeft,\n ").concat(i).concat(l,"bottomLeft\n ")]:{animationName:eT.fJ},["\n ".concat(o).concat(l,"topLeft,\n ").concat(i).concat(l,"topLeft,\n ").concat(o).concat(l,"topRight,\n ").concat(i).concat(l,"topRight\n ")]:{animationName:eT.Qt},["".concat(a).concat(l,"bottomLeft")]:{animationName:eT.Uw},["\n ".concat(a).concat(l,"topLeft,\n ").concat(a).concat(l,"topRight\n ")]:{animationName:eT.ly},"&-hidden":{display:"none"},["".concat(r)]:Object.assign(Object.assign({},e_(e)),{cursor:"pointer",transition:"background ".concat(e.motionDurationSlow," ease"),borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},eN.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},["&-active:not(".concat(r,"-option-disabled)")]:{backgroundColor:e.optionActiveBg},["&-selected:not(".concat(r,"-option-disabled)")]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,["".concat(r,"-option-state")]:{color:e.colorPrimary},["&:has(+ ".concat(r,"-option-selected:not(").concat(r,"-option-disabled))")]:{borderEndStartRadius:0,borderEndEndRadius:0,["& + ".concat(r,"-option-selected:not(").concat(r,"-option-disabled)")]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{["&".concat(r,"-option-selected")]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}}}),"&-rtl":{direction:"rtl"}})},(0,eT.oN)(e,"slide-up"),(0,eT.oN)(e,"slide-down"),(0,eA.Fm)(e,"move-up"),(0,eA.Fm)(e,"move-down")]},eZ=n(352);let eL=e=>{let{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()};function ez(e,t){let{componentCls:n,iconCls:r}=e,o="".concat(n,"-selection-overflow"),i=e.multipleSelectItemHeight,a=eL(e),l=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-multiple").concat(l)]:{fontSize:e.fontSize,[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},["".concat(n,"-selector")]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",paddingInline:e.calc(2).mul(2).equal(),paddingBlock:e.calc(a).sub(2).equal(),borderRadius:e.borderRadius,["".concat(n,"-show-search&")]:{cursor:"text"},["".concat(n,"-disabled&")]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:"".concat((0,eZ.bf)(2)," 0"),lineHeight:(0,eZ.bf)(i),visibility:"hidden",content:'"\\a0"'}},["\n &".concat(n,"-show-arrow ").concat(n,"-selector,\n &").concat(n,"-allow-clear ").concat(n,"-selector\n ")]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()},["".concat(n,"-selection-item")]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:2,marginBottom:2,lineHeight:(0,eZ.bf)(e.calc(i).sub(e.calc(e.lineWidth).mul(2)).equal()),borderRadius:e.borderRadiusSM,cursor:"default",transition:"font-size ".concat(e.motionDurationSlow,", line-height ").concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),marginInlineEnd:e.calc(2).mul(2).equal(),paddingInlineStart:e.paddingXS,paddingInlineEnd:e.calc(e.paddingXS).div(2).equal(),["".concat(n,"-disabled&")]:{color:e.multipleItemColorDisabled,borderColor:e.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(e.paddingXS).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,eN.Ro)()),{display:"inline-flex",alignItems:"center",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",["> ".concat(r)]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},["".concat(o,"-item + ").concat(o,"-item")]:{["".concat(n,"-selection-search")]:{marginInlineStart:0}},["".concat(o,"-item-suffix")]:{height:"100%"},["".concat(n,"-selection-search")]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:(0,eZ.bf)(i),transition:"all ".concat(e.motionDurationSlow)},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},["".concat(n,"-selection-placeholder")]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:"all ".concat(e.motionDurationSlow)}}}}var eB=e=>{let{componentCls:t}=e,n=(0,eR.TS)(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=(0,eR.TS)(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[ez(e),ez(n,"sm"),{["".concat(t,"-multiple").concat(t,"-sm")]:{["".concat(t,"-selection-placeholder")]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},["".concat(t,"-selection-search")]:{marginInlineStart:2}}},ez(r,"lg")]};function eF(e,t){let{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-single").concat(a)]:{fontSize:e.fontSize,height:e.controlHeight,["".concat(n,"-selector")]:Object.assign(Object.assign({},(0,eN.Wf)(e,!0)),{display:"flex",borderRadius:o,["".concat(n,"-selection-search")]:{position:"absolute",top:0,insetInlineStart:r,insetInlineEnd:r,bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},["\n ".concat(n,"-selection-item,\n ").concat(n,"-selection-placeholder\n ")]:{padding:0,lineHeight:(0,eZ.bf)(i),transition:"all ".concat(e.motionDurationSlow,", visibility 0s"),alignSelf:"center"},["".concat(n,"-selection-placeholder")]:{transition:"none",pointerEvents:"none"},[["&:after","".concat(n,"-selection-item:empty:after"),"".concat(n,"-selection-placeholder:empty:after")].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),["\n &".concat(n,"-show-arrow ").concat(n,"-selection-item,\n &").concat(n,"-show-arrow ").concat(n,"-selection-placeholder\n ")]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},["&".concat(n,"-open ").concat(n,"-selection-item")]:{color:e.colorTextPlaceholder},["&:not(".concat(n,"-customize-input)")]:{["".concat(n,"-selector")]:{width:"100%",height:"100%",padding:"0 ".concat((0,eZ.bf)(r)),["".concat(n,"-selection-search-input")]:{height:i},"&:after":{lineHeight:(0,eZ.bf)(i)}}},["&".concat(n,"-customize-input")]:{["".concat(n,"-selector")]:{"&:after":{display:"none"},["".concat(n,"-selection-search")]:{position:"static",width:"100%"},["".concat(n,"-selection-placeholder")]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:"0 ".concat((0,eZ.bf)(r)),"&:after":{display:"none"}}}}}}}let eH=(e,t)=>{let{componentCls:n,antCls:r,controlOutlineWidth:o}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{border:"".concat((0,eZ.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(t.borderColor),background:e.selectorBg},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{borderColor:t.hoverBorderHover},["".concat(n,"-focused& ").concat(n,"-selector")]:{borderColor:t.activeBorderColor,boxShadow:"0 0 0 ".concat((0,eZ.bf)(o)," ").concat(t.activeShadowColor),outline:0}}}},eq=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},eH(e,t))}),eW=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},eH(e,{borderColor:e.colorBorder,hoverBorderHover:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadowColor:e.controlOutline})),eq(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeShadowColor:e.colorErrorOutline})),eq(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeShadowColor:e.colorWarningOutline})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat((0,eZ.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}})}),eK=(e,t)=>{let{componentCls:n,antCls:r}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{background:t.bg,border:"".concat((0,eZ.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),color:t.color},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{background:t.hoverBg},["".concat(n,"-focused& ").concat(n,"-selector")]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},eV=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},eK(e,t))}),eU=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},eK(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary,color:e.colorText})),eV(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),eV(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.colorBgContainer,border:"".concat((0,eZ.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}})}),eG=e=>({"&-borderless":{["".concat(e.componentCls,"-selector")]:{background:"transparent",borderColor:"transparent"},["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat((0,eZ.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}}});var eX=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign({},eW(e)),eU(e)),eG(e))});let e$=e=>{let{componentCls:t}=e;return{position:"relative",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),input:{cursor:"pointer"},["".concat(t,"-show-search&")]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},["".concat(t,"-disabled&")]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},eY=e=>{let{componentCls:t}=e;return{["".concat(t,"-selection-search-input")]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},eQ=e=>{let{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},(0,eN.Wf)(e)),{position:"relative",display:"inline-block",cursor:"pointer",["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:Object.assign(Object.assign({},e$(e)),eY(e)),["".concat(n,"-selection-item")]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},eN.vS),{["> ".concat(t,"-typography")]:{display:"inline"}}),["".concat(n,"-selection-placeholder")]:Object.assign(Object.assign({},eN.vS),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),["".concat(n,"-arrow")]:Object.assign(Object.assign({},(0,eN.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:"opacity ".concat(e.motionDurationSlow," ease"),[o]:{verticalAlign:"top",transition:"transform ".concat(e.motionDurationSlow),"> svg":{verticalAlign:"top"},["&:not(".concat(n,"-suffix)")]:{pointerEvents:"auto"}},["".concat(n,"-disabled &")]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),["".concat(n,"-clear")]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:"color ".concat(e.motionDurationMid," ease, opacity ").concat(e.motionDurationSlow," ease"),textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{["".concat(n,"-clear")]:{opacity:1},["".concat(n,"-arrow:not(:last-child)")]:{opacity:0}}}),["".concat(n,"-has-feedback")]:{["".concat(n,"-clear")]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}},eJ=e=>{let{componentCls:t}=e;return[{[t]:{["&".concat(t,"-in-form-item")]:{width:"100%"}}},eQ(e),function(e){let{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[eF(e),eF((0,eR.TS)(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{["".concat(t,"-single").concat(t,"-sm")]:{["&:not(".concat(t,"-customize-input)")]:{["".concat(t,"-selection-search")]:{insetInlineStart:n,insetInlineEnd:n},["".concat(t,"-selector")]:{padding:"0 ".concat((0,eZ.bf)(n))},["&".concat(t,"-show-arrow ").concat(t,"-selection-search")]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},["\n &".concat(t,"-show-arrow ").concat(t,"-selection-item,\n &").concat(t,"-show-arrow ").concat(t,"-selection-placeholder\n ")]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},eF((0,eR.TS)(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}(e),eB(e),eD(e),{["".concat(t,"-rtl")]:{direction:"rtl"}},(0,eM.c)(e,{borderElCls:"".concat(t,"-selector"),focusElCls:"".concat(t,"-focused")})]};var e0=(0,eI.I$)("Select",(e,t)=>{let{rootPrefixCls:n}=t,r=(0,eR.TS)(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[eJ(r),eX(r)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,controlPaddingHorizontal:o,zIndexPopupBase:i,colorText:a,fontWeightStrong:l,controlItemBgActive:c,controlItemBgHover:s,colorBgContainer:u,colorFillSecondary:d,controlHeightLG:f,controlHeightSM:p,colorBgContainerDisabled:h,colorTextDisabled:m}=e;return{zIndexPopup:i+50,optionSelectedColor:a,optionSelectedFontWeight:l,optionSelectedBg:c,optionActiveBg:s,optionPadding:"".concat((r-t*n)/2,"px ").concat(o,"px"),optionFontSize:t,optionLineHeight:n,optionHeight:r,selectorBg:u,clearBg:u,singleItemHeightLG:f,multipleItemBg:d,multipleItemBorderColor:"transparent",multipleItemHeight:p,multipleItemHeightLG:r,multipleSelectorBgDisabled:h,multipleItemColorDisabled:m,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize)}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),e1=n(9738),e2=n(39725),e6=n(49638),e4=n(70464),e3=n(61935),e5=n(29436),e8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let e7="SECRET_COMBOBOX_MODE_DO_NOT_USE",e9=r.forwardRef((e,t)=>{var n,o,a;let l;let{prefixCls:c,bordered:s,className:u,rootClassName:d,getPopupContainer:f,popupClassName:p,dropdownClassName:h,listHeight:m=256,placement:g,listItemHeight:v,size:y,disabled:b,notFoundContent:x,status:w,builtinPlacements:S,dropdownMatchSelectWidth:k,popupMatchSelectWidth:E,direction:C,style:O,allowClear:j,variant:P,dropdownStyle:N,transitionName:M,tagRender:I,maxCount:R}=e,T=e8(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount"]),{getPopupContainer:A,getPrefixCls:_,renderEmpty:D,direction:Z,virtual:L,popupMatchSelectWidth:z,popupOverflow:B,select:F}=r.useContext(eb.E_),[,H]=(0,ej.ZP)(),q=null!=v?v:null==H?void 0:H.controlHeight,W=_("select",c),K=_(),V=null!=C?C:Z,{compactSize:U,compactItemClassnames:G}=(0,eO.ri)(W,V),[X,$]=(0,eC.Z)(P,s),Y=(0,eS.Z)(W),[J,ee,et]=e0(W,Y),en=r.useMemo(()=>{let{mode:t}=e;return"combobox"===t?void 0:t===e7?"combobox":t},[e.mode]),er="multiple"===en||"tags"===en,eo=(o=e.suffixIcon,void 0!==(a=e.showArrow)?a:null!==o),ei=null!==(n=null!=E?E:k)&&void 0!==n?n:z,{status:ea,hasFeedback:el,isFormItemInput:ec,feedbackIcon:es}=r.useContext(eE.aM),eu=(0,ey.F)(ea,w);l=void 0!==x?x:"combobox"===en?null:(null==D?void 0:D("Select"))||r.createElement(ex.Z,{componentName:"Select"});let{suffixIcon:ed,itemIcon:ef,removeIcon:ep,clearIcon:ev}=function(e){let{suffixIcon:t,clearIcon:n,menuItemSelectedIcon:o,removeIcon:i,loading:a,multiple:l,hasFeedback:c,prefixCls:s,showSuffixIcon:u,feedbackIcon:d,showArrow:f,componentName:p}=e,h=null!=n?n:r.createElement(e2.Z,null),m=e=>null!==t||c||f?r.createElement(r.Fragment,null,!1!==u&&e,c&&d):null,g=null;if(void 0!==t)g=m(t);else if(a)g=m(r.createElement(e3.Z,{spin:!0}));else{let e="".concat(s,"-suffix");g=t=>{let{open:n,showSearch:o}=t;return n&&o?m(r.createElement(e5.Z,{className:e})):m(r.createElement(e4.Z,{className:e}))}}let v=null;return v=void 0!==o?o:l?r.createElement(e1.Z,null):null,{clearIcon:h,suffixIcon:g,itemIcon:v,removeIcon:void 0!==i?i:r.createElement(e6.Z,null)}}(Object.assign(Object.assign({},T),{multiple:er,hasFeedback:el,feedbackIcon:es,showSuffixIcon:eo,prefixCls:W,componentName:"Select"})),eN=(0,Q.Z)(T,["suffixIcon","itemIcon"]),eM=i()(p||h,{["".concat(W,"-dropdown-").concat(V)]:"rtl"===V},d,et,Y,ee),eI=(0,ek.Z)(e=>{var t;return null!==(t=null!=y?y:U)&&void 0!==t?t:e}),eR=r.useContext(ew.Z),eT=i()({["".concat(W,"-lg")]:"large"===eI,["".concat(W,"-sm")]:"small"===eI,["".concat(W,"-rtl")]:"rtl"===V,["".concat(W,"-").concat(X)]:$,["".concat(W,"-in-form-item")]:ec},(0,ey.Z)(W,eu,el),G,null==F?void 0:F.className,u,d,et,Y,ee),eA=r.useMemo(()=>void 0!==g?g:"rtl"===V?"bottomRight":"bottomLeft",[g,V]),[e_]=(0,em.Cn)("SelectLike",null==N?void 0:N.zIndex);return J(r.createElement(eh,Object.assign({ref:t,virtual:L,showSearch:null==F?void 0:F.showSearch},eN,{style:Object.assign(Object.assign({},null==F?void 0:F.style),O),dropdownMatchSelectWidth:ei,transitionName:(0,eg.m)(K,"slide-up",M),builtinPlacements:S||eP(B),listHeight:m,listItemHeight:q,mode:en,prefixCls:W,placement:eA,direction:V,suffixIcon:ed,menuItemSelectedIcon:ef,removeIcon:ep,allowClear:!0===j?{clearIcon:ev}:j,notFoundContent:l,className:eT,getPopupContainer:f||A,dropdownClassName:eM,disabled:null!=b?b:eR,dropdownStyle:Object.assign(Object.assign({},N),{zIndex:e_}),maxCount:er?R:void 0,tagRender:er?I:void 0})))}),te=(0,ev.Z)(e9);e9.SECRET_COMBOBOX_MODE_DO_NOT_USE=e7,e9.Option=$,e9.OptGroup=X,e9._InternalPanelDoNotUseOrYouWillBeFired=te;var tt=e9},93142:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(2265),o=n(36760),i=n.n(o),a=n(45287);function l(e){return["small","middle","large"].includes(e)}function c(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}var s=n(71744),u=n(65658);let d=r.createContext({latestIndex:0}),f=d.Provider;var p=e=>{let{className:t,index:n,children:o,split:i,style:a}=e,{latestIndex:l}=r.useContext(d);return null==o?null:r.createElement(r.Fragment,null,r.createElement("div",{className:t,style:a},o),n<l&&i&&r.createElement("span",{className:"".concat(t,"-split")},i))},h=n(4924),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let g=r.forwardRef((e,t)=>{var n,o;let{getPrefixCls:u,space:d,direction:g}=r.useContext(s.E_),{size:v=(null==d?void 0:d.size)||"small",align:y,className:b,rootClassName:x,children:w,direction:S="horizontal",prefixCls:k,split:E,style:C,wrap:O=!1,classNames:j,styles:P}=e,N=m(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[M,I]=Array.isArray(v)?v:[v,v],R=l(I),T=l(M),A=c(I),_=c(M),D=(0,a.Z)(w,{keepEmpty:!0}),Z=void 0===y&&"horizontal"===S?"center":y,L=u("space",k),[z,B,F]=(0,h.Z)(L),H=i()(L,null==d?void 0:d.className,B,"".concat(L,"-").concat(S),{["".concat(L,"-rtl")]:"rtl"===g,["".concat(L,"-align-").concat(Z)]:Z,["".concat(L,"-gap-row-").concat(I)]:R,["".concat(L,"-gap-col-").concat(M)]:T},b,x,F),q=i()("".concat(L,"-item"),null!==(n=null==j?void 0:j.item)&&void 0!==n?n:null===(o=null==d?void 0:d.classNames)||void 0===o?void 0:o.item),W=0,K=D.map((e,t)=>{var n,o;null!=e&&(W=t);let i=e&&e.key||"".concat(q,"-").concat(t);return r.createElement(p,{className:q,key:i,index:t,split:E,style:null!==(n=null==P?void 0:P.item)&&void 0!==n?n:null===(o=null==d?void 0:d.styles)||void 0===o?void 0:o.item},e)}),V=r.useMemo(()=>({latestIndex:W}),[W]);if(0===D.length)return null;let U={};return O&&(U.flexWrap="wrap"),!T&&_&&(U.columnGap=M),!R&&A&&(U.rowGap=I),z(r.createElement("div",Object.assign({ref:t,className:H,style:Object.assign(Object.assign(Object.assign({},U),null==d?void 0:d.style),C)},N),r.createElement(f,{value:V},K)))});g.Compact=u.ZP;var v=g},87908:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(2265),o=n(36760),i=n.n(o),a=n(18694),l=n(19722),c=n(71744),s=n(352),u=n(12918),d=n(80669),f=n(3104);let p=new s.E4("antSpinMove",{to:{opacity:1}}),h=new s.E4("antRotate",{to:{transform:"rotate(405deg)"}}),m=e=>{let{componentCls:t,calc:n}=e;return{["".concat(t)]:Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:"transform ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc),"&-spinning":{position:"static",display:"inline-block",opacity:1},["".concat(t,"-text")]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:"all ".concat(e.motionDurationMid),"&-show":{opacity:1,visibility:"visible"},["".concat(t,"-dot ").concat(t,"-dot-item")]:{backgroundColor:e.colorWhite},["".concat(t,"-text")]:{color:e.colorTextLightSolid}},"&-nested-loading":{position:"relative",["> div > ".concat(t)]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,["".concat(t,"-dot")]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},["".concat(t,"-text")]:{position:"absolute",top:"50%",width:"100%",textShadow:"0 1px 2px ".concat(e.colorBgContainer)},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{["".concat(t,"-dot")]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{["".concat(t,"-dot")]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},["".concat(t,"-container")]:{position:"relative",transition:"opacity ".concat(e.motionDurationSlow),"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'""',pointerEvents:"none"}},["".concat(t,"-blur")]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},["".concat(t,"-dot")]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:p,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:h,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&-sm ".concat(t,"-dot")]:{fontSize:e.dotSizeSM,i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},["&-lg ".concat(t,"-dot")]:{fontSize:e.dotSizeLG,i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},["&".concat(t,"-show-text ").concat(t,"-text")]:{display:"block"}})}};var g=(0,d.I$)("Spin",e=>[m((0,f.TS)(e,{spinDotDefault:e.colorTextDescription}))],e=>{let{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}}),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let y=null,b=e=>{let{prefixCls:t,spinning:n=!0,delay:o=0,className:s,rootClassName:u,size:d="default",tip:f,wrapperClassName:p,style:h,children:m,fullscreen:b}=e,x=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen"]),{getPrefixCls:w}=r.useContext(c.E_),S=w("spin",t),[k,E,C]=g(S),[O,j]=r.useState(()=>n&&(!n||!o||!!isNaN(Number(o))));r.useEffect(()=>{if(n){var e;let t=function(e,t,n){var r,o=n||{},i=o.noTrailing,a=void 0!==i&&i,l=o.noLeading,c=void 0!==l&&l,s=o.debounceMode,u=void 0===s?void 0:s,d=!1,f=0;function p(){r&&clearTimeout(r)}function h(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var l=this,s=Date.now()-f;function h(){f=Date.now(),t.apply(l,o)}function m(){r=void 0}!d&&(c||!u||r||h(),p(),void 0===u&&s>e?c?(f=Date.now(),a||(r=setTimeout(u?m:h,e))):h():!0!==a&&(r=setTimeout(u?m:h,void 0===u?e-s:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly;p(),d=!(void 0!==t&&t)},h}(o,()=>{j(!0)},{debounceMode:!1!==(void 0!==(e=({}).atBegin)&&e)});return t(),()=>{var e;null===(e=null==t?void 0:t.cancel)||void 0===e||e.call(t)}}j(!1)},[o,n]);let P=r.useMemo(()=>void 0!==m&&!b,[m,b]),{direction:N,spin:M}=r.useContext(c.E_),I=i()(S,null==M?void 0:M.className,{["".concat(S,"-sm")]:"small"===d,["".concat(S,"-lg")]:"large"===d,["".concat(S,"-spinning")]:O,["".concat(S,"-show-text")]:!!f,["".concat(S,"-fullscreen")]:b,["".concat(S,"-fullscreen-show")]:b&&O,["".concat(S,"-rtl")]:"rtl"===N},s,u,E,C),R=i()("".concat(S,"-container"),{["".concat(S,"-blur")]:O}),T=(0,a.Z)(x,["indicator"]),A=Object.assign(Object.assign({},null==M?void 0:M.style),h),_=r.createElement("div",Object.assign({},T,{style:A,className:I,"aria-live":"polite","aria-busy":O}),function(e,t){let{indicator:n}=t,o="".concat(e,"-dot");return null===n?null:(0,l.l$)(n)?(0,l.Tm)(n,{className:i()(n.props.className,o)}):(0,l.l$)(y)?(0,l.Tm)(y,{className:i()(y.props.className,o)}):r.createElement("span",{className:i()(o,"".concat(e,"-dot-spin"))},r.createElement("i",{className:"".concat(e,"-dot-item"),key:1}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:2}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:3}),r.createElement("i",{className:"".concat(e,"-dot-item"),key:4}))}(S,e),f&&(P||b)?r.createElement("div",{className:"".concat(S,"-text")},f):null);return k(P?r.createElement("div",Object.assign({},T,{className:i()("".concat(S,"-nested-loading"),p,E,C)}),O&&r.createElement("div",{key:"loading"},_),r.createElement("div",{className:R,key:"container"},m)):_)};b.setDefaultIndicator=e=>{y=e};var x=b},29382:function(e,t,n){"use strict";n.d(t,{Fm:function(){return f}});var r=n(352),o=n(37133);let i=new r.E4("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),a=new r.E4("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),l=new r.E4("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),c=new r.E4("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),s=new r.E4("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),u=new r.E4("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),d={"move-up":{inKeyframes:new r.E4("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new r.E4("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:i,outKeyframes:a},"move-left":{inKeyframes:l,outKeyframes:c},"move-right":{inKeyframes:s,outKeyframes:u}},f=(e,t)=>{let{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:i,outKeyframes:a}=d[t];return[(0,o.R)(r,i,a,e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]}},18544:function(e,t,n){"use strict";n.d(t,{Qt:function(){return l},Uw:function(){return a},fJ:function(){return i},ly:function(){return c},oN:function(){return d}});var r=n(352),o=n(37133);let i=new r.E4("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),a=new r.E4("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),l=new r.E4("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),c=new r.E4("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),s=new r.E4("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),u={"slide-up":{inKeyframes:i,outKeyframes:a},"slide-down":{inKeyframes:l,outKeyframes:c},"slide-left":{inKeyframes:s,outKeyframes:new r.E4("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}})},"slide-right":{inKeyframes:new r.E4("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),outKeyframes:new r.E4("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}})}},d=(e,t)=>{let{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:i,outKeyframes:a}=u[t];return[(0,o.R)(r,i,a,e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInQuint}}]}},76122:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}})},63709:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(2265),o=n(61935),i=n(36760),a=n.n(i),l=n(1119),c=n(11993),s=n(26365),u=n(6989),d=n(50506),f=n(95814),p=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],h=r.forwardRef(function(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-switch":o,h=e.className,m=e.checked,g=e.defaultChecked,v=e.disabled,y=e.loadingIcon,b=e.checkedChildren,x=e.unCheckedChildren,w=e.onClick,S=e.onChange,k=e.onKeyDown,E=(0,u.Z)(e,p),C=(0,d.Z)(!1,{value:m,defaultValue:g}),O=(0,s.Z)(C,2),j=O[0],P=O[1];function N(e,t){var n=j;return v||(P(n=e),null==S||S(n,t)),n}var M=a()(i,h,(n={},(0,c.Z)(n,"".concat(i,"-checked"),j),(0,c.Z)(n,"".concat(i,"-disabled"),v),n));return r.createElement("button",(0,l.Z)({},E,{type:"button",role:"switch","aria-checked":j,disabled:v,className:M,ref:t,onKeyDown:function(e){e.which===f.Z.LEFT?N(!1,e):e.which===f.Z.RIGHT&&N(!0,e),null==k||k(e)},onClick:function(e){var t=N(!j,e);null==w||w(t,e)}}),y,r.createElement("span",{className:"".concat(i,"-inner")},r.createElement("span",{className:"".concat(i,"-inner-checked")},b),r.createElement("span",{className:"".concat(i,"-inner-unchecked")},x)))});h.displayName="Switch";var m=n(6694),g=n(71744),v=n(86586),y=n(33759),b=n(352),x=n(36360),w=n(12918),S=n(80669),k=n(3104);let E=e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:i,innerMaxMarginSM:a,handleSizeSM:l,calc:c}=e,s="".concat(t,"-inner"),u=(0,b.bf)(c(l).add(c(r).mul(2)).equal()),d=(0,b.bf)(c(a).mul(2).equal());return{[t]:{["&".concat(t,"-small")]:{minWidth:o,height:n,lineHeight:(0,b.bf)(n),["".concat(t,"-inner")]:{paddingInlineStart:a,paddingInlineEnd:i,["".concat(s,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(u," - ").concat(d,")"),marginInlineEnd:"calc(100% - ".concat(u," + ").concat(d,")")},["".concat(s,"-unchecked")]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["".concat(t,"-handle")]:{width:l,height:l},["".concat(t,"-loading-icon")]:{top:c(c(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},["&".concat(t,"-checked")]:{["".concat(t,"-inner")]:{paddingInlineStart:i,paddingInlineEnd:a,["".concat(s,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(s,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(u," + ").concat(d,")"),marginInlineEnd:"calc(-100% + ".concat(u," - ").concat(d,")")}},["".concat(t,"-handle")]:{insetInlineStart:"calc(100% - ".concat((0,b.bf)(c(l).add(r).equal()),")")}},["&:not(".concat(t,"-disabled):active")]:{["&:not(".concat(t,"-checked) ").concat(s)]:{["".concat(s,"-unchecked")]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},["&".concat(t,"-checked ").concat(s)]:{["".concat(s,"-checked")]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},C=e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{["".concat(t,"-loading-icon").concat(e.iconCls)]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},["&".concat(t,"-checked ").concat(t,"-loading-icon")]:{color:e.switchColor}}}},O=e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:i,calc:a}=e,l="".concat(t,"-handle");return{[t]:{[l]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:"all ".concat(e.switchDuration," ease-in-out"),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(i).div(2).equal(),boxShadow:o,transition:"all ".concat(e.switchDuration," ease-in-out"),content:'""'}},["&".concat(t,"-checked ").concat(l)]:{insetInlineStart:"calc(100% - ".concat((0,b.bf)(a(i).add(n).equal()),")")},["&:not(".concat(t,"-disabled):active")]:{["".concat(l,"::before")]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},["&".concat(t,"-checked ").concat(l,"::before")]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},j=e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:i,handleSize:a,calc:l}=e,c="".concat(t,"-inner"),s=(0,b.bf)(l(a).add(l(r).mul(2)).equal()),u=(0,b.bf)(l(i).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:o,transition:"padding-inline-start ".concat(e.switchDuration," ease-in-out, padding-inline-end ").concat(e.switchDuration," ease-in-out"),["".concat(c,"-checked, ").concat(c,"-unchecked")]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:"margin-inline-start ".concat(e.switchDuration," ease-in-out, margin-inline-end ").concat(e.switchDuration," ease-in-out"),pointerEvents:"none"},["".concat(c,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(s," - ").concat(u,")"),marginInlineEnd:"calc(100% - ".concat(s," + ").concat(u,")")},["".concat(c,"-unchecked")]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["&".concat(t,"-checked ").concat(c)]:{paddingInlineStart:o,paddingInlineEnd:i,["".concat(c,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(c,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(s," + ").concat(u,")"),marginInlineEnd:"calc(-100% + ".concat(s," - ").concat(u,")")}},["&:not(".concat(t,"-disabled):active")]:{["&:not(".concat(t,"-checked) ").concat(c)]:{["".concat(c,"-unchecked")]:{marginInlineStart:l(r).mul(2).equal(),marginInlineEnd:l(r).mul(-1).mul(2).equal()}},["&".concat(t,"-checked ").concat(c)]:{["".concat(c,"-checked")]:{marginInlineStart:l(r).mul(-1).mul(2).equal(),marginInlineEnd:l(r).mul(2).equal()}}}}}},P=e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:"".concat((0,b.bf)(n)),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),userSelect:"none",["&:hover:not(".concat(t,"-disabled)")]:{background:e.colorTextTertiary}}),(0,w.Qy)(e)),{["&".concat(t,"-checked")]:{background:e.switchColor,["&:hover:not(".concat(t,"-disabled)")]:{background:e.colorPrimaryHover}},["&".concat(t,"-loading, &").concat(t,"-disabled")]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},["&".concat(t,"-rtl")]:{direction:"rtl"}})}};var N=(0,S.I$)("Switch",e=>{let t=(0,k.TS)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:"rgba(0, 0, 0, ".concat(e.opacityLoading,")"),switchHandleActiveInset:"-30%"});return[P(t),j(t),O(t),C(t),E(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,i=t*n,a=r/2,l=i-4,c=a-4;return{trackHeight:i,trackHeightSM:a,trackMinWidth:2*l+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:"0 2px 4px 0 ".concat(new x.C("#00230b").setAlpha(.2).toRgbString()),innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let I=r.forwardRef((e,t)=>{let{prefixCls:n,size:i,disabled:l,loading:c,className:s,rootClassName:u,style:f,checked:p,value:b,defaultChecked:x,defaultValue:w,onChange:S}=e,k=M(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[E,C]=(0,d.Z)(!1,{value:null!=p?p:b,defaultValue:null!=x?x:w}),{getPrefixCls:O,direction:j,switch:P}=r.useContext(g.E_),I=r.useContext(v.Z),R=(null!=l?l:I)||c,T=O("switch",n),A=r.createElement("div",{className:"".concat(T,"-handle")},c&&r.createElement(o.Z,{className:"".concat(T,"-loading-icon")})),[_,D,Z]=N(T),L=(0,y.Z)(i),z=a()(null==P?void 0:P.className,{["".concat(T,"-small")]:"small"===L,["".concat(T,"-loading")]:c,["".concat(T,"-rtl")]:"rtl"===j},s,u,D,Z),B=Object.assign(Object.assign({},null==P?void 0:P.style),f);return _(r.createElement(m.Z,{component:"Switch"},r.createElement(h,Object.assign({},k,{checked:E,onChange:function(){C(arguments.length<=0?void 0:arguments[0]),null==S||S.apply(void 0,arguments)},prefixCls:T,className:z,style:B,disabled:R,ref:t,loadingIcon:A}))))});I.__ANT_SWITCH=!0;var R=I},28181:function(e,t,n){"use strict";n.d(t,{Z:function(){return of}});var r,o,i=n(2265),a={},l="rc-table-internal-hook",c=n(26365),s=n(58525),u=n(27380),d=n(16671),f=n(54887);function p(e){var t=i.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,r=e.children,o=i.useRef(n);o.current=n;var a=i.useState(function(){return{getValue:function(){return o.current},listeners:new Set}}),l=(0,c.Z)(a,1)[0];return(0,u.Z)(function(){(0,f.unstable_batchedUpdates)(function(){l.listeners.forEach(function(e){e(n)})})},[n]),i.createElement(t.Provider,{value:l},r)},defaultValue:e}}function h(e,t){var n=(0,s.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach(function(t){n[t]=e[t]}),n}),r=i.useContext(null==e?void 0:e.Context),o=r||{},a=o.listeners,l=o.getValue,f=i.useRef();f.current=n(r?l():null==e?void 0:e.defaultValue);var p=i.useState({}),h=(0,c.Z)(p,2)[1];return(0,u.Z)(function(){if(r)return a.add(e),function(){a.delete(e)};function e(e){var t=n(e);(0,d.Z)(f.current,t,!0)||h({})}},[r]),f.current}var m=n(1119),g=n(28791);function v(){var e=i.createContext(null);function t(){return i.useContext(e)}return{makeImmutable:function(n,r){var o=(0,g.Yr)(n),a=function(a,l){var c=o?{ref:l}:{},s=i.useRef(0),u=i.useRef(a);return null!==t()?i.createElement(n,(0,m.Z)({},a,c)):((!r||r(u.current,a))&&(s.current+=1),u.current=a,i.createElement(e.Provider,{value:s.current},i.createElement(n,(0,m.Z)({},a,c))))};return o?i.forwardRef(a):a},responseImmutable:function(e,n){var r=(0,g.Yr)(e),o=function(n,o){return t(),i.createElement(e,(0,m.Z)({},n,r?{ref:o}:{}))};return r?i.memo(i.forwardRef(o),n):i.memo(o,n)},useImmutableMark:t}}var y=v();y.makeImmutable,y.responseImmutable,y.useImmutableMark;var b=v(),x=b.makeImmutable,w=b.responseImmutable,S=b.useImmutableMark,k=p();i.memo(function(){var e,t,n,r,o,a=(t=i.useRef(0),t.current+=1,n=i.useRef(void 0),r=[],Object.keys(e||{}).map(function(t){var o;(null==e?void 0:e[t])!==(null===(o=n.current)||void 0===o?void 0:o[t])&&r.push(t)}),n.current=e,o=i.useRef([]),r.length&&(o.current=r),i.useDebugValue(t.current),i.useDebugValue(o.current.join(", ")),t.current);return i.createElement("h1",null,"Render Times: ",a)}).displayName="RenderBlock";var E=n(41154),C=n(31686),O=n(11993),j=n(36760),P=n.n(j),N=n(6397),M=n(16847),I=n(32559),R=i.createContext({renderWithProps:!1});function T(e){var t=[],n={};return e.forEach(function(e){for(var r=e||{},o=r.key,i=r.dataIndex,a=o||(null==i?[]:Array.isArray(i)?i:[i]).join("-")||"RC_TABLE_KEY";n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)}),t}var A=n(74126),_=function(e){var t,n=e.ellipsis,r=e.rowType,o=e.children,a=!0===n?{showTitle:!0}:n;return a&&(a.showTitle||"header"===r)&&("string"==typeof o||"number"==typeof o?t=o.toString():i.isValidElement(o)&&"string"==typeof o.props.children&&(t=o.props.children)),t},D=i.memo(function(e){var t,n,r,o,a,l,s,u,f,p,g=e.component,v=e.children,y=e.ellipsis,b=e.scope,x=e.prefixCls,w=e.className,j=e.align,I=e.record,T=e.render,D=e.dataIndex,Z=e.renderIndex,L=e.shouldCellUpdate,z=e.index,B=e.rowType,F=e.colSpan,H=e.rowSpan,q=e.fixLeft,W=e.fixRight,K=e.firstFixLeft,V=e.lastFixLeft,U=e.firstFixRight,G=e.lastFixRight,X=e.appendNode,$=e.additionalProps,Y=void 0===$?{}:$,Q=e.isSticky,J="".concat(x,"-cell"),ee=h(k,["supportSticky","allColumnsFixedLeft"]),et=ee.supportSticky,en=ee.allColumnsFixedLeft,er=(t=i.useContext(R),n=S(),(0,N.Z)(function(){if(null!=v)return[v];var e=null==D||""===D?[]:Array.isArray(D)?D:[D],n=(0,M.Z)(I,e),r=n,o=void 0;if(T){var a=T(n,I,Z);!a||"object"!==(0,E.Z)(a)||Array.isArray(a)||i.isValidElement(a)?r=a:(r=a.children,o=a.props,t.renderWithProps=!0)}return[r,o]},[n,I,v,D,T,Z],function(e,n){if(L){var r=(0,c.Z)(e,2)[1];return L((0,c.Z)(n,2)[1],r)}return!!t.renderWithProps||!(0,d.Z)(e,n,!0)})),eo=(0,c.Z)(er,2),ei=eo[0],ea=eo[1],el={},ec="number"==typeof q&&et,es="number"==typeof W&&et;ec&&(el.position="sticky",el.left=q),es&&(el.position="sticky",el.right=W);var eu=null!==(r=null!==(o=null!==(a=null==ea?void 0:ea.colSpan)&&void 0!==a?a:Y.colSpan)&&void 0!==o?o:F)&&void 0!==r?r:1,ed=null!==(l=null!==(s=null!==(u=null==ea?void 0:ea.rowSpan)&&void 0!==u?u:Y.rowSpan)&&void 0!==s?s:H)&&void 0!==l?l:1,ef=h(k,function(e){var t,n;return[(t=ed||1,n=e.hoverStartRow,z<=e.hoverEndRow&&z+t-1>=n),e.onHover]}),ep=(0,c.Z)(ef,2),eh=ep[0],em=ep[1],eg=(0,A.zX)(function(e){var t;I&&em(z,z+ed-1),null==Y||null===(t=Y.onMouseEnter)||void 0===t||t.call(Y,e)}),ev=(0,A.zX)(function(e){var t;I&&em(-1,-1),null==Y||null===(t=Y.onMouseLeave)||void 0===t||t.call(Y,e)});if(0===eu||0===ed)return null;var ey=null!==(f=Y.title)&&void 0!==f?f:_({rowType:B,ellipsis:y,children:ei}),eb=P()(J,w,(p={},(0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)(p,"".concat(J,"-fix-left"),ec&&et),"".concat(J,"-fix-left-first"),K&&et),"".concat(J,"-fix-left-last"),V&&et),"".concat(J,"-fix-left-all"),V&&en&&et),"".concat(J,"-fix-right"),es&&et),"".concat(J,"-fix-right-first"),U&&et),"".concat(J,"-fix-right-last"),G&&et),"".concat(J,"-ellipsis"),y),"".concat(J,"-with-append"),X),"".concat(J,"-fix-sticky"),(ec||es)&&Q&&et),(0,O.Z)(p,"".concat(J,"-row-hover"),!ea&&eh)),Y.className,null==ea?void 0:ea.className),ex={};j&&(ex.textAlign=j);var ew=(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},el),Y.style),ex),null==ea?void 0:ea.style),eS=ei;return"object"!==(0,E.Z)(eS)||Array.isArray(eS)||i.isValidElement(eS)||(eS=null),y&&(V||U)&&(eS=i.createElement("span",{className:"".concat(J,"-content")},eS)),i.createElement(g,(0,m.Z)({},ea,Y,{className:eb,style:ew,title:ey,scope:b,onMouseEnter:eg,onMouseLeave:ev,colSpan:1!==eu?eu:null,rowSpan:1!==ed?ed:null}),X,eS)});function Z(e,t,n,r,o,i){var a,l,c=n[e]||{},s=n[t]||{};"left"===c.fixed?a=r.left["rtl"===o?t:e]:"right"===s.fixed&&(l=r.right["rtl"===o?e:t]);var u=!1,d=!1,f=!1,p=!1,h=n[t+1],m=n[e-1],g=!(null!=i&&i.children);return"rtl"===o?void 0!==a?p=!(m&&"left"===m.fixed)&&g:void 0!==l&&(f=!(h&&"right"===h.fixed)&&g):void 0!==a?u=!(h&&"left"===h.fixed)&&g:void 0!==l&&(d=!(m&&"right"===m.fixed)&&g),{fixLeft:a,fixRight:l,lastFixLeft:u,firstFixRight:d,lastFixRight:f,firstFixLeft:p,isSticky:r.isSticky}}var L=i.createContext({}),z=n(6989),B=["children"];function F(e){return e.children}F.Row=function(e){var t=e.children,n=(0,z.Z)(e,B);return i.createElement("tr",n,t)},F.Cell=function(e){var t=e.className,n=e.index,r=e.children,o=e.colSpan,a=void 0===o?1:o,l=e.rowSpan,c=e.align,s=h(k,["prefixCls","direction"]),u=s.prefixCls,d=s.direction,f=i.useContext(L),p=f.scrollColumnIndex,g=f.stickyOffsets,v=f.flattenColumns,y=f.columns,b=n+a-1+1===p?a+1:a,x=Z(n,n+b-1,v,g,d,null==y?void 0:y[n]);return i.createElement(D,(0,m.Z)({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,align:c,colSpan:b,rowSpan:l,render:function(){return r}},x))};var H=w(function(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,o=e.columns,a=h(k,"prefixCls"),l=r.length-1,c=r[l],s=i.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:null!=c&&c.scrollbar?l:null,columns:o}},[c,r,l,n,o]);return i.createElement(L.Provider,{value:s},i.createElement("tfoot",{className:"".concat(a,"-summary")},t))}),q=n(31474),W=n(2857),K=n(10281),V=n(3208),U=n(18242);function G(e,t,n,r){return i.useMemo(function(){if(null!=n&&n.size){for(var o=[],i=0;i<(null==e?void 0:e.length);i+=1)!function e(t,n,r,o,i,a,l){t.push({record:n,indent:r,index:l});var c=a(n),s=null==i?void 0:i.has(c);if(n&&Array.isArray(n[o])&&s)for(var u=0;u<n[o].length;u+=1)e(t,n[o][u],r+1,o,i,a,u)}(o,e[i],0,t,n,r,i);return o}return null==e?void 0:e.map(function(e,t){return{record:e,indent:0,index:t}})},[e,t,n,r])}function X(e,t,n,r){var o,i=h(k,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=i.flattenColumns,l=i.expandableType,c=i.expandedKeys,s=i.childrenColumnName,u=i.onTriggerExpand,d=i.rowExpandable,f=i.onRow,p=i.expandRowByClick,m=i.rowClassName,g="nest"===l,v="row"===l&&(!d||d(e)),y=v||g,b=c&&c.has(t),x=s&&e&&e[s],w=(0,A.zX)(u),S=null==f?void 0:f(e,n),E=null==S?void 0:S.onClick;"string"==typeof m?o=m:"function"==typeof m&&(o=m(e,n,r));var O=T(a);return(0,C.Z)((0,C.Z)({},i),{},{columnsKey:O,nestExpandable:g,expanded:b,hasNestChildren:x,record:e,onTriggerExpand:w,rowSupportExpand:v,expandable:y,rowProps:(0,C.Z)((0,C.Z)({},S),{},{className:P()(o,null==S?void 0:S.className),onClick:function(t){p&&y&&u(e,t);for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null==E||E.apply(void 0,[t].concat(r))}})})}var $=function(e){var t=e.prefixCls,n=e.children,r=e.component,o=e.cellComponent,a=e.className,l=e.expanded,c=e.colSpan,s=e.isEmpty,u=h(k,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),d=u.scrollbarSize,f=u.fixHeader,p=u.fixColumn,m=u.componentWidth,g=u.horizonScroll,v=n;return(s?g&&m:p)&&(v=i.createElement("div",{style:{width:m-(f?d:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},v)),i.createElement(r,{className:a,style:{display:l?null:"none"}},i.createElement(D,{component:o,prefixCls:t,colSpan:c},v))};function Y(e,t,n,r,o){var a,l,c=e.record,s=e.prefixCls,u=e.columnsKey,d=e.fixedInfoList,f=e.expandIconColumnIndex,p=e.nestExpandable,h=e.indentSize,m=e.expandIcon,g=e.expanded,v=e.hasNestChildren,y=e.onTriggerExpand,b=u[n],x=d[n];return n===(f||0)&&p&&(a=i.createElement(i.Fragment,null,i.createElement("span",{style:{paddingLeft:"".concat(h*r,"px")},className:"".concat(s,"-row-indent indent-level-").concat(r)}),m({prefixCls:s,expanded:g,expandable:v,record:c,onExpand:y}))),t.onCell&&(l=t.onCell(c,o)),{key:b,fixedInfo:x,appendCellNode:a,additionalCellProps:l||{}}}function Q(e){var t,n=e.className,r=e.style,o=e.record,a=e.index,l=e.renderIndex,c=e.rowKey,s=e.indent,u=void 0===s?0:s,d=e.rowComponent,f=e.cellComponent,p=e.scopeCellComponent,h=X(o,c,a,u),g=h.prefixCls,v=h.flattenColumns,y=h.expandedRowClassName,b=h.expandedRowRender,x=h.rowProps,w=h.expanded,S=h.rowSupportExpand,k=i.useRef(!1);k.current||(k.current=w);var E=i.createElement(d,(0,m.Z)({},x,{"data-row-key":c,className:P()(n,"".concat(g,"-row"),"".concat(g,"-row-level-").concat(u),null==x?void 0:x.className),style:(0,C.Z)((0,C.Z)({},r),null==x?void 0:x.style)}),v.map(function(e,t){var n=e.render,r=e.dataIndex,c=e.className,s=Y(h,e,t,u,a),d=s.key,v=s.fixedInfo,y=s.appendCellNode,b=s.additionalCellProps;return i.createElement(D,(0,m.Z)({className:c,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:g,key:d,record:o,index:a,renderIndex:l,dataIndex:r,render:n,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:y,additionalProps:b}))}));if(S&&(k.current||w)){var O=b(o,a,u+1,w),j=y&&y(o,a,u);t=i.createElement($,{expanded:w,className:P()("".concat(g,"-expanded-row"),"".concat(g,"-expanded-row-level-").concat(u+1),j),prefixCls:g,component:d,cellComponent:f,colSpan:v.length,isEmpty:!1},O)}return i.createElement(i.Fragment,null,E,t)}Q.displayName="BodyRow";var J=w(Q);function ee(e){var t=e.columnKey,n=e.onColumnResize,r=i.useRef();return i.useEffect(function(){r.current&&n(t,r.current.offsetWidth)},[]),i.createElement(q.Z,{data:t},i.createElement("td",{ref:r,style:{padding:0,border:0,height:0}},i.createElement("div",{style:{height:0,overflow:"hidden"}},"\xa0")))}function et(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize;return i.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0}},i.createElement(q.Z.Collection,{onBatchResize:function(e){e.forEach(function(e){r(e.data,e.size.offsetWidth)})}},n.map(function(e){return i.createElement(ee,{key:e,columnKey:e,onColumnResize:r})})))}function en(e){var t,n=e.data,r=e.measureColumnWidth,o=h(k,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),a=o.prefixCls,l=o.getComponent,c=o.onColumnResize,s=o.flattenColumns,u=o.getRowKey,d=o.expandedKeys,f=o.childrenColumnName,p=o.emptyNode,m=G(n,f,d,u),g=i.useRef({renderWithProps:!1}),v=l(["body","wrapper"],"tbody"),y=l(["body","row"],"tr"),b=l(["body","cell"],"td"),x=l(["body","cell"],"th");t=n.length?m.map(function(e,t){var n=e.record,r=e.indent,o=e.index,a=u(n,t);return i.createElement(J,{key:a,rowKey:a,record:n,index:t,renderIndex:o,rowComponent:y,cellComponent:b,scopeCellComponent:x,getRowKey:u,indent:r})}):i.createElement($,{expanded:!0,className:"".concat(a,"-placeholder"),prefixCls:a,component:y,cellComponent:b,colSpan:s.length,isEmpty:!0},p);var w=T(s);return i.createElement(R.Provider,{value:g.current},i.createElement(v,{className:"".concat(a,"-tbody")},r&&i.createElement(et,{prefixCls:a,columnsKey:w,onColumnResize:c}),t))}en.displayName="Body";var er=w(en),eo=["expandable"],ei="RC_TABLE_INTERNAL_COL_DEFINE",ea=["columnType"],el=function(e){for(var t=e.colWidths,n=e.columns,r=e.columCount,o=[],a=r||n.length,l=!1,c=a-1;c>=0;c-=1){var s=t[c],u=n&&n[c],d=u&&u[ei];if(s||d||l){var f=d||{},p=(f.columnType,(0,z.Z)(f,ea));o.unshift(i.createElement("col",(0,m.Z)({key:c,style:{width:s}},p))),l=!0}}return i.createElement("colgroup",null,o)},ec=n(83145),es=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"],eu=i.forwardRef(function(e,t){var n=e.className,r=e.noData,o=e.columns,a=e.flattenColumns,l=e.colWidths,c=e.columCount,s=e.stickyOffsets,u=e.direction,d=e.fixHeader,f=e.stickyTopOffset,p=e.stickyBottomOffset,m=e.stickyClassName,v=e.onScroll,y=e.maxContentScroll,b=e.children,x=(0,z.Z)(e,es),w=h(k,["prefixCls","scrollbarSize","isSticky"]),S=w.prefixCls,E=w.scrollbarSize,j=w.isSticky,N=j&&!d?0:E,M=i.useRef(null),I=i.useCallback(function(e){(0,g.mH)(t,e),(0,g.mH)(M,e)},[]);i.useEffect(function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=M.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=M.current)||void 0===e||e.removeEventListener("wheel",t)}},[]);var R=i.useMemo(function(){return a.every(function(e){return e.width})},[a]),T=a[a.length-1],A={fixed:T?T.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(S,"-cell-scrollbar")}}},_=(0,i.useMemo)(function(){return N?[].concat((0,ec.Z)(o),[A]):o},[N,o]),D=(0,i.useMemo)(function(){return N?[].concat((0,ec.Z)(a),[A]):a},[N,a]),Z=(0,i.useMemo)(function(){var e=s.right,t=s.left;return(0,C.Z)((0,C.Z)({},s),{},{left:"rtl"===u?[].concat((0,ec.Z)(t.map(function(e){return e+N})),[0]):t,right:"rtl"===u?e:[].concat((0,ec.Z)(e.map(function(e){return e+N})),[0]),isSticky:j})},[N,s,j]),L=(0,i.useMemo)(function(){for(var e=[],t=0;t<c;t+=1){var n=l[t];if(void 0===n)return null;e[t]=n}return e},[l.join("_"),c]);return i.createElement("div",{style:(0,C.Z)({overflow:"hidden"},j?{top:f,bottom:p}:{}),ref:I,className:P()(n,(0,O.Z)({},m,!!m))},i.createElement("table",{style:{tableLayout:"fixed",visibility:r||L?null:"hidden"}},(!r||!y||R)&&i.createElement(el,{colWidths:L?[].concat((0,ec.Z)(L),[N]):[],columCount:c+1,columns:D}),b((0,C.Z)((0,C.Z)({},x),{},{stickyOffsets:Z,columns:_,flattenColumns:D}))))});eu.displayName="FixedHolder";var ed=i.memo(eu);function ef(e){var t,n=e.cells,r=e.stickyOffsets,o=e.flattenColumns,a=e.rowComponent,l=e.cellComponent,c=e.tdCellComponent,s=e.onHeaderRow,u=e.index,d=h(k,["prefixCls","direction"]),f=d.prefixCls,p=d.direction;s&&(t=s(n.map(function(e){return e.column}),u));var g=T(n.map(function(e){return e.column}));return i.createElement(a,t,n.map(function(e,t){var n,a=e.column,s=Z(e.colStart,e.colEnd,o,r,p,a);return a&&a.onHeaderCell&&(n=e.column.onHeaderCell(a)),i.createElement(D,(0,m.Z)({},e,{scope:a.title?e.colSpan>1?"colgroup":"col":null,ellipsis:a.ellipsis,align:a.align,component:a.title?l:c,prefixCls:f,key:g[t]},s,{additionalProps:n,rowType:"header"}))}))}ef.displayName="HeaderRow";var ep=w(function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,o=e.onHeaderRow,a=h(k,["prefixCls","getComponent"]),l=a.prefixCls,c=a.getComponent,s=i.useMemo(function(){return function(e){var t=[];!function e(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[o]=t[o]||[];var i=r;return n.filter(Boolean).map(function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:i},a=1,l=n.children;return l&&l.length>0&&(a=e(l,i,o+1).reduce(function(e,t){return e+t},0),r.hasSubColumns=!0),"colSpan"in n&&(a=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=a,r.colEnd=r.colStart+a-1,t[o].push(r),i+=a,a})}(e,0);for(var n=t.length,r=function(e){t[e].forEach(function(t){("rowSpan"in t)||t.hasSubColumns||(t.rowSpan=n-e)})},o=0;o<n;o+=1)r(o);return t}(n)},[n]),u=c(["header","wrapper"],"thead"),d=c(["header","row"],"tr"),f=c(["header","cell"],"th"),p=c(["header","cell"],"td");return i.createElement(u,{className:"".concat(l,"-thead")},s.map(function(e,n){return i.createElement(ef,{key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:d,cellComponent:f,tdCellComponent:p,onHeaderRow:o,index:n})}))}),eh=n(45287);function em(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var eg=["children"],ev=["fixed"];function ey(e){return(0,eh.Z)(e).filter(function(e){return i.isValidElement(e)}).map(function(e){var t=e.key,n=e.props,r=n.children,o=(0,z.Z)(n,eg),i=(0,C.Z)({key:t},o);return r&&(i.children=ey(r)),i})}function eb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter(function(e){return e&&"object"===(0,E.Z)(e)}).reduce(function(e,n,r){var o=n.fixed,i=!0===o?"left":o,a="".concat(t,"-").concat(r),l=n.children;return l&&l.length>0?[].concat((0,ec.Z)(e),(0,ec.Z)(eb(l,a).map(function(e){return(0,C.Z)({fixed:i},e)}))):[].concat((0,ec.Z)(e),[(0,C.Z)((0,C.Z)({key:a},n),{},{fixed:i})])},[])}var ex=function(e,t){var n=e.prefixCls,r=e.columns,o=e.children,l=e.expandable,s=e.expandedKeys,u=e.columnTitle,d=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,h=e.rowExpandable,m=e.expandIconColumnIndex,g=e.direction,v=e.expandRowByClick,y=e.columnWidth,b=e.fixed,x=e.scrollWidth,w=e.clientWidth,S=i.useMemo(function(){return function e(t){return t.filter(function(e){return e&&"object"===(0,E.Z)(e)&&!e.hidden}).map(function(t){var n=t.children;return n&&n.length>0?(0,C.Z)((0,C.Z)({},t),{},{children:e(n)}):t})}((r||ey(o)||[]).slice())},[r,o]),k=i.useMemo(function(){if(l){var e,t=S.slice();if(!t.includes(a)){var r=m||0;r>=0&&t.splice(r,0,a)}var o=t.indexOf(a);t=t.filter(function(e,t){return e!==a||t===o});var c=S[o];e=("left"===b||b)&&!m?"left":("right"===b||b)&&m===S.length?"right":c?c.fixed:null;var g=(0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)({},ei,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",e),"className","".concat(n,"-row-expand-icon-cell")),"width",y),"render",function(e,t,r){var o=d(t,r),a=p({prefixCls:n,expanded:s.has(o),expandable:!h||h(t),record:t,onExpand:f});return v?i.createElement("span",{onClick:function(e){return e.stopPropagation()}},a):a});return t.map(function(e){return e===a?g:e})}return S.filter(function(e){return e!==a})},[l,S,d,s,p,g]),j=i.useMemo(function(){var e=k;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e},[t,k,g]),P=i.useMemo(function(){return"rtl"===g?eb(j).map(function(e){var t=e.fixed,n=(0,z.Z)(e,ev),r=t;return"left"===t?r="right":"right"===t&&(r="left"),(0,C.Z)({fixed:r},n)}):eb(j)},[j,g,x]),N=i.useMemo(function(){if(x&&x>0){var e=0,t=0;P.forEach(function(n){var r=em(x,n.width);r?e+=r:t+=1});var n=Math.max(x,w),r=Math.max(n-e,t),o=t,i=r/t,a=0,l=P.map(function(e){var t=(0,C.Z)({},e),n=em(x,t.width);if(n)t.width=n;else{var l=Math.floor(i);t.width=1===o?r:l,r-=l,o-=1}return a+=t.width,t});if(a<n){var c=n/a;r=n,l.forEach(function(e,t){var n=Math.floor(e.width*c);e.width=t===l.length-1?r:n,r-=n})}return[l,Math.max(a,n)]}return[P,x]},[P,x,w]),M=(0,c.Z)(N,2);return[j,M[0],M[1]]};function ew(e){var t=e.prefixCls,n=e.record,r=e.onExpand,o=e.expanded,a=e.expandable,l="".concat(t,"-row-expand-icon");return a?i.createElement("span",{className:P()(l,(0,O.Z)((0,O.Z)({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:function(e){r(n,e),e.stopPropagation()}}):i.createElement("span",{className:P()(l,"".concat(t,"-row-spaced"))})}function eS(e){var t=(0,i.useRef)(e),n=(0,i.useState)({}),r=(0,c.Z)(n,2)[1],o=(0,i.useRef)(null),a=(0,i.useRef)([]);return(0,i.useEffect)(function(){return function(){o.current=null}},[]),[t.current,function(e){a.current.push(e);var n=Promise.resolve();o.current=n,n.then(function(){if(o.current===n){var e=a.current,i=t.current;a.current=[],e.forEach(function(e){t.current=e(t.current)}),o.current=null,i!==t.current&&r({})}})}]}var ek=(0,n(94981).Z)()?window:null,eE=function(e){var t=e.className,n=e.children;return i.createElement("div",{className:t},n)};function eC(e,t,n,r){var o=f.unstable_batchedUpdates?function(e){f.unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,o,r),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,o,r)}}}function eO(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var ej=i.forwardRef(function(e,t){var n,r,o=e.scrollBodyRef,a=e.onScroll,l=e.offsetScroll,s=e.container,u=h(k,"prefixCls"),d=(null===(n=o.current)||void 0===n?void 0:n.scrollWidth)||0,f=(null===(r=o.current)||void 0===r?void 0:r.clientWidth)||0,p=d&&f/d*f,m=i.useRef(),g=eS({scrollLeft:0,isHiddenScrollBar:!1}),v=(0,c.Z)(g,2),y=v[0],b=v[1],x=i.useRef({delta:0,x:0}),w=i.useState(!1),S=(0,c.Z)(w,2),E=S[0],j=S[1],N=function(){j(!1)},M=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(!E||0===n){E&&j(!1);return}var r=x.current.x+e.pageX-x.current.x-x.current.delta;r<=0&&(r=0),r+p>=f&&(r=f-p),a({scrollLeft:r/f*(d+2)}),x.current.x=e.pageX},I=function(){if(o.current){var e=eO(o.current).top,t=e+o.current.offsetHeight,n=s===window?document.documentElement.scrollTop+window.innerHeight:eO(s).top+s.clientHeight;t-(0,V.Z)()<=n||e>=n-l?b(function(e){return(0,C.Z)((0,C.Z)({},e),{},{isHiddenScrollBar:!0})}):b(function(e){return(0,C.Z)((0,C.Z)({},e),{},{isHiddenScrollBar:!1})})}},R=function(e){b(function(t){return(0,C.Z)((0,C.Z)({},t),{},{scrollLeft:e/d*f||0})})};return(i.useImperativeHandle(t,function(){return{setScrollLeft:R}}),i.useEffect(function(){var e=eC(document.body,"mouseup",N,!1),t=eC(document.body,"mousemove",M,!1);return I(),function(){e.remove(),t.remove()}},[p,E]),i.useEffect(function(){var e=eC(s,"scroll",I,!1),t=eC(window,"resize",I,!1);return function(){e.remove(),t.remove()}},[s]),i.useEffect(function(){y.isHiddenScrollBar||b(function(e){var t=o.current;return t?(0,C.Z)((0,C.Z)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e})},[y.isHiddenScrollBar]),d<=f||!p||y.isHiddenScrollBar)?null:i.createElement("div",{style:{height:(0,V.Z)(),width:f,bottom:l},className:"".concat(u,"-sticky-scroll")},i.createElement("div",{onMouseDown:function(e){e.persist(),x.current.delta=e.pageX-y.scrollLeft,x.current.x=0,j(!0),e.preventDefault()},ref:m,className:P()("".concat(u,"-sticky-scroll-bar"),(0,O.Z)({},"".concat(u,"-sticky-scroll-bar-active"),E)),style:{width:"".concat(p,"px"),transform:"translate3d(".concat(y.scrollLeft,"px, 0, 0)")}}))}),eP="rc-table",eN=[],eM={};function eI(){return"No Data"}var eR=i.forwardRef(function(e,t){var n,r=(0,C.Z)({rowKey:"key",prefixCls:eP,emptyText:eI},e),o=r.prefixCls,a=r.className,u=r.rowClassName,f=r.style,p=r.data,h=r.rowKey,g=r.scroll,v=r.tableLayout,y=r.direction,b=r.title,x=r.footer,w=r.summary,S=r.caption,j=r.id,I=r.showHeader,R=r.components,A=r.emptyText,_=r.onRow,D=r.onHeaderRow,L=r.internalHooks,B=r.transformColumns,G=r.internalRefs,X=r.tailor,$=r.getContainerWidth,Y=r.sticky,Q=p||eN,J=!!Q.length,ee=L===l,et=i.useCallback(function(e,t){return(0,M.Z)(R,e)||t},[R]),en=i.useMemo(function(){return"function"==typeof h?h:function(e){return e&&e[h]}},[h]),ei=et(["body"]),ea=(tH=i.useState(-1),tW=(tq=(0,c.Z)(tH,2))[0],tK=tq[1],tV=i.useState(-1),tG=(tU=(0,c.Z)(tV,2))[0],tX=tU[1],[tW,tG,i.useCallback(function(e,t){tK(e),tX(t)},[])]),es=(0,c.Z)(ea,3),eu=es[0],ef=es[1],eh=es[2],em=(tJ=(tY=r.expandable,tQ=(0,z.Z)(r,eo),!1===(t$="expandable"in r?(0,C.Z)((0,C.Z)({},tQ),tY):tQ).showExpandColumn&&(t$.expandIconColumnIndex=-1),t$).expandIcon,t0=t$.expandedRowKeys,t1=t$.defaultExpandedRowKeys,t2=t$.defaultExpandAllRows,t6=t$.expandedRowRender,t4=t$.onExpand,t3=t$.onExpandedRowsChange,t5=t$.childrenColumnName||"children",t8=i.useMemo(function(){return t6?"row":!!(r.expandable&&r.internalHooks===l&&r.expandable.__PARENT_RENDER_ICON__||Q.some(function(e){return e&&"object"===(0,E.Z)(e)&&e[t5]}))&&"nest"},[!!t6,Q]),t7=i.useState(function(){if(t1)return t1;if(t2){var e;return e=[],function t(n){(n||[]).forEach(function(n,r){e.push(en(n,r)),t(n[t5])})}(Q),e}return[]}),ne=(t9=(0,c.Z)(t7,2))[0],nt=t9[1],nn=i.useMemo(function(){return new Set(t0||ne||[])},[t0,ne]),nr=i.useCallback(function(e){var t,n=en(e,Q.indexOf(e)),r=nn.has(n);r?(nn.delete(n),t=(0,ec.Z)(nn)):t=[].concat((0,ec.Z)(nn),[n]),nt(t),t4&&t4(!r,e),t3&&t3(t)},[en,nn,Q,t4,t3]),[t$,t8,nn,tJ||ew,t5,nr]),eg=(0,c.Z)(em,6),ev=eg[0],ey=eg[1],eb=eg[2],eC=eg[3],eO=eg[4],eR=eg[5],eT=null==g?void 0:g.x,eA=i.useState(0),e_=(0,c.Z)(eA,2),eD=e_[0],eZ=e_[1],eL=ex((0,C.Z)((0,C.Z)((0,C.Z)({},r),ev),{},{expandable:!!ev.expandedRowRender,columnTitle:ev.columnTitle,expandedKeys:eb,getRowKey:en,onTriggerExpand:eR,expandIcon:eC,expandIconColumnIndex:ev.expandIconColumnIndex,direction:y,scrollWidth:ee&&X&&"number"==typeof eT?eT:null,clientWidth:eD}),ee?B:null),ez=(0,c.Z)(eL,3),eB=ez[0],eF=ez[1],eH=ez[2],eq=null!=eH?eH:eT,eW=i.useMemo(function(){return{columns:eB,flattenColumns:eF}},[eB,eF]),eK=i.useRef(),eV=i.useRef(),eU=i.useRef(),eG=i.useRef();i.useImperativeHandle(t,function(){return{nativeElement:eK.current,scrollTo:function(e){var t;if(eU.current instanceof HTMLElement){var n=e.index,r=e.top,o=e.key;if(r)null===(i=eU.current)||void 0===i||i.scrollTo({top:r});else{var i,a,l=null!=o?o:en(Q[n]);null===(a=eU.current.querySelector('[data-row-key="'.concat(l,'"]')))||void 0===a||a.scrollIntoView()}}else null!==(t=eU.current)&&void 0!==t&&t.scrollTo&&eU.current.scrollTo(e)}}});var eX=i.useRef(),e$=i.useState(!1),eY=(0,c.Z)(e$,2),eQ=eY[0],eJ=eY[1],e0=i.useState(!1),e1=(0,c.Z)(e0,2),e2=e1[0],e6=e1[1],e4=eS(new Map),e3=(0,c.Z)(e4,2),e5=e3[0],e8=e3[1],e7=T(eF).map(function(e){return e5.get(e)}),e9=i.useMemo(function(){return e7},[e7.join("_")]),te=(no=eF.length,(0,i.useMemo)(function(){for(var e=[],t=[],n=0,r=0,o=0;o<no;o+=1)if("rtl"===y){t[o]=r,r+=e9[o]||0;var i=no-o-1;e[i]=n,n+=e9[i]||0}else{e[o]=n,n+=e9[o]||0;var a=no-o-1;t[a]=r,r+=e9[a]||0}return{left:e,right:t}},[e9,no,y])),tt=g&&null!=g.y,tn=g&&null!=eq||!!ev.fixed,tr=tn&&eF.some(function(e){return e.fixed}),to=i.useRef(),ti=(nl=void 0===(na=(ni="object"===(0,E.Z)(Y)?Y:{}).offsetHeader)?0:na,ns=void 0===(nc=ni.offsetSummary)?0:nc,nd=void 0===(nu=ni.offsetScroll)?0:nu,np=(void 0===(nf=ni.getContainer)?function(){return ek}:nf)()||ek,i.useMemo(function(){var e=!!Y;return{isSticky:e,stickyClassName:e?"".concat(o,"-sticky-holder"):"",offsetHeader:nl,offsetSummary:ns,offsetScroll:nd,container:np}},[nd,nl,ns,o,np])),ta=ti.isSticky,tl=ti.offsetHeader,tc=ti.offsetSummary,ts=ti.offsetScroll,tu=ti.stickyClassName,td=ti.container,tf=i.useMemo(function(){return null==w?void 0:w(Q)},[w,Q]),tp=(tt||ta)&&i.isValidElement(tf)&&tf.type===F&&tf.props.fixed;tt&&(nm={overflowY:"scroll",maxHeight:g.y}),tn&&(nh={overflowX:"auto"},tt||(nm={overflowY:"hidden"}),ng={width:!0===eq?"auto":eq,minWidth:"100%"});var th=i.useCallback(function(e,t){(0,W.Z)(eK.current)&&e8(function(n){if(n.get(e)!==t){var r=new Map(n);return r.set(e,t),r}return n})},[]),tm=function(e){var t=(0,i.useRef)(null),n=(0,i.useRef)();function r(){window.clearTimeout(n.current)}return(0,i.useEffect)(function(){return r},[]),[function(e){t.current=e,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)},function(){return t.current}]}(0),tg=(0,c.Z)(tm,2),tv=tg[0],ty=tg[1];function tb(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(function(){t.scrollLeft=e},0)))}var tx=(0,s.Z)(function(e){var t,n=e.currentTarget,r=e.scrollLeft,o="rtl"===y,i="number"==typeof r?r:n.scrollLeft,a=n||eM;ty()&&ty()!==a||(tv(a),tb(i,eV.current),tb(i,eU.current),tb(i,eX.current),tb(i,null===(t=to.current)||void 0===t?void 0:t.setScrollLeft));var l=n||eV.current;if(l){var c=l.scrollWidth,s=l.clientWidth;if(c===s){eJ(!1),e6(!1);return}o?(eJ(-i<c-s),e6(-i>0)):(eJ(i>0),e6(i<c-s))}}),tw=function(){tn&&eU.current?tx({currentTarget:eU.current}):(eJ(!1),e6(!1))},tS=i.useRef(!1);i.useEffect(function(){tS.current&&tw()},[tn,p,eB.length]),i.useEffect(function(){tS.current=!0},[]);var tk=i.useState(0),tE=(0,c.Z)(tk,2),tC=tE[0],tO=tE[1],tj=i.useState(!0),tP=(0,c.Z)(tj,2),tN=tP[0],tM=tP[1];i.useEffect(function(){X&&ee||(eU.current instanceof Element?tO((0,V.o)(eU.current).width):tO((0,V.o)(eG.current).width)),tM((0,K.G)("position","sticky"))},[]),i.useEffect(function(){ee&&G&&(G.body.current=eU.current)});var tI=i.useCallback(function(e){return i.createElement(i.Fragment,null,i.createElement(ep,e),"top"===tp&&i.createElement(H,e,tf))},[tp,tf]),tR=i.useCallback(function(e){return i.createElement(H,e,tf)},[tf]),tT=et(["table"],"table"),tA=i.useMemo(function(){return v||(tr?"max-content"===eq?"auto":"fixed":tt||ta||eF.some(function(e){return e.ellipsis})?"fixed":"auto")},[tt,tr,eF,v,ta]),t_={colWidths:e9,columCount:eF.length,stickyOffsets:te,onHeaderRow:D,fixHeader:tt,scroll:g},tD=i.useMemo(function(){return J?null:"function"==typeof A?A():A},[J,A]),tZ=i.createElement(er,{data:Q,measureColumnWidth:tt||tn||ta}),tL=i.createElement(el,{colWidths:eF.map(function(e){return e.width}),columns:eF}),tz=null!=S?i.createElement("caption",{className:"".concat(o,"-caption")},S):void 0,tB=(0,U.Z)(r,{data:!0}),tF=(0,U.Z)(r,{aria:!0});if(tt||ta){"function"==typeof ei?(ny=ei(Q,{scrollbarSize:tC,ref:eU,onScroll:tx}),t_.colWidths=eF.map(function(e,t){var n=e.width,r=t===eF.length-1?n-tC:n;return"number"!=typeof r||Number.isNaN(r)?0:r})):ny=i.createElement("div",{style:(0,C.Z)((0,C.Z)({},nh),nm),onScroll:tx,ref:eU,className:P()("".concat(o,"-body"))},i.createElement(tT,(0,m.Z)({style:(0,C.Z)((0,C.Z)({},ng),{},{tableLayout:tA})},tF),tz,tL,tZ,!tp&&tf&&i.createElement(H,{stickyOffsets:te,flattenColumns:eF,columns:eB},tf)));var tH,tq,tW,tK,tV,tU,tG,tX,t$,tY,tQ,tJ,t0,t1,t2,t6,t4,t3,t5,t8,t7,t9,ne,nt,nn,nr,no,ni,na,nl,nc,ns,nu,nd,nf,np,nh,nm,ng,nv,ny,nb=(0,C.Z)((0,C.Z)((0,C.Z)({noData:!Q.length,maxContentScroll:tn&&"max-content"===eq},t_),eW),{},{direction:y,stickyClassName:tu,onScroll:tx});nv=i.createElement(i.Fragment,null,!1!==I&&i.createElement(ed,(0,m.Z)({},nb,{stickyTopOffset:tl,className:"".concat(o,"-header"),ref:eV}),tI),ny,tp&&"top"!==tp&&i.createElement(ed,(0,m.Z)({},nb,{stickyBottomOffset:tc,className:"".concat(o,"-summary"),ref:eX}),tR),ta&&eU.current&&eU.current instanceof Element&&i.createElement(ej,{ref:to,offsetScroll:ts,scrollBodyRef:eU,onScroll:tx,container:td}))}else nv=i.createElement("div",{style:(0,C.Z)((0,C.Z)({},nh),nm),className:P()("".concat(o,"-content")),onScroll:tx,ref:eU},i.createElement(tT,(0,m.Z)({style:(0,C.Z)((0,C.Z)({},ng),{},{tableLayout:tA})},tF),tz,tL,!1!==I&&i.createElement(ep,(0,m.Z)({},t_,eW)),tZ,tf&&i.createElement(H,{stickyOffsets:te,flattenColumns:eF,columns:eB},tf)));var nx=i.createElement("div",(0,m.Z)({className:P()(o,a,(0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)((0,O.Z)({},"".concat(o,"-rtl"),"rtl"===y),"".concat(o,"-ping-left"),eQ),"".concat(o,"-ping-right"),e2),"".concat(o,"-layout-fixed"),"fixed"===v),"".concat(o,"-fixed-header"),tt),"".concat(o,"-fixed-column"),tr),"".concat(o,"-scroll-horizontal"),tn),"".concat(o,"-has-fix-left"),eF[0]&&eF[0].fixed),"".concat(o,"-has-fix-right"),eF[eF.length-1]&&"right"===eF[eF.length-1].fixed)),style:f,id:j,ref:eK},tB),b&&i.createElement(eE,{className:"".concat(o,"-title")},b(Q)),i.createElement("div",{ref:eG,className:"".concat(o,"-container")},nv),x&&i.createElement(eE,{className:"".concat(o,"-footer")},x(Q)));tn&&(nx=i.createElement(q.Z,{onResize:function(e){var t=e.width,n=eK.current?eK.current.offsetWidth:t;ee&&$&&eK.current&&(n=$(eK.current,n)||n),n!==eD&&(tw(),eZ(n))}},nx));var nw=(n=eF.map(function(e,t){return Z(t,t,eF,te,y,null==eB?void 0:eB[t])}),(0,N.Z)(function(){return n},[n],function(e,t){return!(0,d.Z)(e,t)})),nS=i.useMemo(function(){return{scrollX:eq,prefixCls:o,getComponent:et,scrollbarSize:tC,direction:y,fixedInfoList:nw,isSticky:ta,supportSticky:tN,componentWidth:eD,fixHeader:tt,fixColumn:tr,horizonScroll:tn,tableLayout:tA,rowClassName:u,expandedRowClassName:ev.expandedRowClassName,expandIcon:eC,expandableType:ey,expandRowByClick:ev.expandRowByClick,expandedRowRender:ev.expandedRowRender,onTriggerExpand:eR,expandIconColumnIndex:ev.expandIconColumnIndex,indentSize:ev.indentSize,allColumnsFixedLeft:eF.every(function(e){return"left"===e.fixed}),emptyNode:tD,columns:eB,flattenColumns:eF,onColumnResize:th,hoverStartRow:eu,hoverEndRow:ef,onHover:eh,rowExpandable:ev.rowExpandable,onRow:_,getRowKey:en,expandedKeys:eb,childrenColumnName:eO}},[eq,o,et,tC,y,nw,ta,tN,eD,tt,tr,tn,tA,u,ev.expandedRowClassName,eC,ey,ev.expandRowByClick,ev.expandedRowRender,eR,ev.expandIconColumnIndex,ev.indentSize,tD,eB,eF,th,eu,ef,eh,ev.rowExpandable,_,en,eb,eO]);return i.createElement(k.Provider,{value:nS},nx)}),eT=x(eR,void 0);eT.EXPAND_COLUMN=a,eT.INTERNAL_HOOKS=l,eT.Column=function(e){return null},eT.ColumnGroup=function(e){return null},eT.Summary=F;var eA=n(48625),e_=p(null),eD=p(null),eZ=function(e){var t,n=e.rowInfo,r=e.column,o=e.colIndex,a=e.indent,l=e.index,c=e.renderIndex,s=e.record,u=e.style,d=e.className,f=e.inverse,p=e.getHeight,g=r.render,v=r.dataIndex,y=r.className,b=r.width,x=h(eD,["columnsOffset"]).columnsOffset,w=Y(n,r,o,a,l),S=w.key,k=w.fixedInfo,E=w.appendCellNode,O=w.additionalCellProps,j=O.style,N=O.colSpan,M=void 0===N?1:N,I=O.rowSpan,R=void 0===I?1:I,T=x[(t=o-1)+(M||1)]-(x[t]||0),A=(0,C.Z)((0,C.Z)((0,C.Z)({},j),u),{},{flex:"0 0 ".concat(T,"px"),width:"".concat(T,"px"),marginRight:M>1?b-T:0,pointerEvents:"auto"}),_=i.useMemo(function(){return f?R<=1:0===M||0===R||R>1},[R,M,f]);_?A.visibility="hidden":f&&(A.height=null==p?void 0:p(R));var Z={};return(0===R||0===M)&&(Z.rowSpan=1,Z.colSpan=1),i.createElement(D,(0,m.Z)({className:P()(y,d),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:"div",prefixCls:n.prefixCls,key:S,record:s,index:l,renderIndex:c,dataIndex:v,render:_?function(){return null}:g,shouldCellUpdate:r.shouldCellUpdate},k,{appendNode:E,additionalProps:(0,C.Z)((0,C.Z)({},O),{},{style:A},Z)}))},eL=["data","index","className","rowKey","style","extra","getHeight"],ez=w(i.forwardRef(function(e,t){var n,r=e.data,o=e.index,a=e.className,l=e.rowKey,c=e.style,s=e.extra,u=e.getHeight,d=(0,z.Z)(e,eL),f=r.record,p=r.indent,g=r.index,v=h(k,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),y=v.scrollX,b=v.flattenColumns,x=v.prefixCls,w=v.fixColumn,S=v.componentWidth,E=X(f,l,o,p),j=E.rowSupportExpand,N=E.expanded,M=E.rowProps,I=E.expandedRowRender,R=E.expandedRowClassName;if(j&&N){var T=I(f,o,p+1,N),A=null==R?void 0:R(f,o,p),_={};w&&(_={style:(0,O.Z)({},"--virtual-width","".concat(S,"px"))});var Z="".concat(x,"-expanded-row-cell");n=i.createElement("div",{className:P()("".concat(x,"-expanded-row"),"".concat(x,"-expanded-row-level-").concat(p+1),A)},i.createElement(D,{component:"div",prefixCls:x,className:P()(Z,(0,O.Z)({},"".concat(Z,"-fixed"),w)),additionalProps:_},T))}var L=(0,C.Z)((0,C.Z)({},c),{},{width:y});s&&(L.position="absolute",L.pointerEvents="none");var B=i.createElement("div",(0,m.Z)({},M,d,{ref:j?null:t,className:P()(a,"".concat(x,"-row"),null==M?void 0:M.className,(0,O.Z)({},"".concat(x,"-row-extra"),s)),style:(0,C.Z)((0,C.Z)({},L),null==M?void 0:M.style)}),b.map(function(e,t){return i.createElement(eZ,{key:t,rowInfo:E,column:e,colIndex:t,indent:p,index:o,renderIndex:g,record:f,inverse:s,getHeight:u})}));return j?i.createElement("div",{ref:t},B,n):B})),eB=w(i.forwardRef(function(e,t){var n,r=e.data,o=e.onScroll,a=h(k,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),l=a.flattenColumns,s=a.onColumnResize,u=a.getRowKey,d=a.expandedKeys,f=a.prefixCls,p=a.childrenColumnName,g=a.emptyNode,v=a.scrollX,y=h(e_),b=y.sticky,x=y.scrollY,w=y.listItemHeight,S=i.useRef(),C=G(r,p,d,u),O=i.useMemo(function(){var e=0;return l.map(function(t){var n=t.width,r=t.key;return e+=n,[r,n,e]})},[l]),j=i.useMemo(function(){return O.map(function(e){return e[2]})},[O]);i.useEffect(function(){O.forEach(function(e){var t=(0,c.Z)(e,2);s(t[0],t[1])})},[O]),i.useImperativeHandle(t,function(){var e={scrollTo:function(e){var t;null===(t=S.current)||void 0===t||t.scrollTo(e)}};return Object.defineProperty(e,"scrollLeft",{get:function(){var e;return(null===(e=S.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=S.current)||void 0===t||t.scrollTo({left:e})}}),e});var N=function(e,t){var n=null===(o=C[t])||void 0===o?void 0:o.record,r=e.onCell;if(r){var o,i,a=r(n,t);return null!==(i=null==a?void 0:a.rowSpan)&&void 0!==i?i:1}return 1},M=i.useMemo(function(){return{columnsOffset:j}},[j]),I="".concat(f,"-tbody");if(C.length){var R={};b&&(R.position="sticky",R.bottom=0,"object"===(0,E.Z)(b)&&b.offsetScroll&&(R.bottom=b.offsetScroll)),n=i.createElement(eA.Z,{fullHeight:!1,ref:S,styles:{horizontalScrollBar:R},className:P()(I,"".concat(I,"-virtual")),height:x,itemHeight:w||24,data:C,itemKey:function(e){return u(e.record)},scrollWidth:v,onVirtualScroll:function(e){o({scrollLeft:e.x})},extraRender:function(e){var t=e.start,n=e.end,r=e.getSize,o=e.offsetY;if(n<0)return null;for(var a=l.filter(function(e){return 0===N(e,t)}),c=t,s=function(e){if(!(a=a.filter(function(t){return 0===N(t,e)})).length)return c=e,1},d=t;d>=0&&!s(d);d-=1);for(var f=l.filter(function(e){return 1!==N(e,n)}),p=n,h=function(e){if(!(f=f.filter(function(t){return 1!==N(t,e)})).length)return p=Math.max(e-1,n),1},m=n;m<C.length&&!h(m);m+=1);for(var g=[],v=function(e){if(!C[e])return 1;l.some(function(t){return N(t,e)>1})&&g.push(e)},y=c;y<=p;y+=1)if(v(y))continue;return g.map(function(e){var t=C[e],n=u(t.record,e),a=r(n);return i.createElement(ez,{key:e,data:t,rowKey:n,index:e,style:{top:-o+a.top},extra:!0,getHeight:function(t){var o=e+t-1,i=r(n,u(C[o].record,o));return i.bottom-i.top}})})}},function(e,t,n){var r=u(e.record,t);return i.createElement(ez,(0,m.Z)({data:e,rowKey:r,index:t},n))})}else n=i.createElement("div",{className:P()("".concat(f,"-placeholder"))},i.createElement(D,{component:"div",prefixCls:f},g));return i.createElement(eD.Provider,{value:M},n)})),eF=function(e,t){var n=t.ref,r=t.onScroll;return i.createElement(eB,{ref:n,data:e,onScroll:r})},eH=i.forwardRef(function(e,t){var n=e.columns,r=e.scroll,o=e.sticky,a=e.prefixCls,c=void 0===a?eP:a,s=e.className,u=e.listItemHeight,d=e.components,f=r||{},p=f.x,h=f.y;"number"!=typeof p&&(p=1),"number"!=typeof h&&(h=500);var g=i.useMemo(function(){return{sticky:o,scrollY:h,listItemHeight:u}},[o,h,u]);return i.createElement(e_.Provider,{value:g},i.createElement(eT,(0,m.Z)({},e,{className:P()(s,"".concat(c,"-virtual")),scroll:(0,C.Z)((0,C.Z)({},r),{},{x:p}),components:(0,C.Z)((0,C.Z)({},d),{},{body:eF}),columns:n,internalHooks:l,tailor:!0,ref:t})))});x(eH,void 0);var eq=n(70464),eW=n(76405),eK=n(25049),eV=n(63496),eU=n(15354),eG=n(15900),eX=i.createContext(null),e$=i.memo(function(e){for(var t,n=e.prefixCls,r=e.level,o=e.isStart,a=e.isEnd,l="".concat(n,"-indent-unit"),c=[],s=0;s<r;s+=1)c.push(i.createElement("span",{key:s,className:P()(l,(t={},(0,O.Z)(t,"".concat(l,"-start"),o[s]),(0,O.Z)(t,"".concat(l,"-end"),a[s]),t))}));return i.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},c)}),eY=n(18694),eQ=["children"];function eJ(e,t){return"".concat(e,"-").concat(t)}function e0(e,t){return null!=e?e:t}function e1(e){var t=e||{},n=t.title,r=t._title,o=t.key,i=t.children,a=n||"title";return{title:a,_title:r||[a],key:o||"key",children:i||"children"}}function e2(e){return function e(t){return(0,eh.Z)(t).map(function(t){if(!(t&&t.type&&t.type.isTreeNode))return(0,I.ZP)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,i=(0,z.Z)(r,eQ),a=(0,C.Z)({key:n},i),l=e(o);return l.length&&(a.children=l),a}).filter(function(e){return e})}(e)}function e6(e,t,n){var r=e1(n),o=r._title,i=r.key,a=r.children,l=new Set(!0===t?[]:t),c=[];return!function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map(function(s,u){for(var d,f=eJ(r?r.pos:"0",u),p=e0(s[i],f),h=0;h<o.length;h+=1){var m=o[h];if(void 0!==s[m]){d=s[m];break}}var g=(0,C.Z)((0,C.Z)({},(0,eY.Z)(s,[].concat((0,ec.Z)(o),[i,a]))),{},{title:d,key:p,parent:r,pos:f,children:null,data:s,isStart:[].concat((0,ec.Z)(r?r.isStart:[]),[0===u]),isEnd:[].concat((0,ec.Z)(r?r.isEnd:[]),[u===n.length-1])});return c.push(g),!0===t||l.has(p)?g.children=e(s[a]||[],g):g.children=[],g})}(e),c}function e4(e){var t,n,r,o,i,a,l,c,s,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=d.initWrapper,p=d.processEntity,h=d.onProcessFinished,m=d.externalGetKey,g=d.childrenPropName,v=d.fieldNames,y=arguments.length>2?arguments[2]:void 0,b={},x={},w={posEntities:b,keyEntities:x};return f&&(w=f(w)||w),t=function(e){var t=e.node,n=e.index,r=e.pos,o=e.key,i=e.parentPos,a=e.level,l={node:t,nodes:e.nodes,index:n,key:o,pos:r,level:a},c=e0(o,r);b[r]=l,x[c]=l,l.parent=b[i],l.parent&&(l.parent.children=l.parent.children||[],l.parent.children.push(l)),p&&p(l,w)},n={externalGetKey:m||y,childrenPropName:g,fieldNames:v},i=(o=("object"===(0,E.Z)(n)?n:{externalGetKey:n})||{}).childrenPropName,a=o.externalGetKey,c=(l=e1(o.fieldNames)).key,s=l.children,u=i||s,a?"string"==typeof a?r=function(e){return e[a]}:"function"==typeof a&&(r=function(e){return a(e)}):r=function(e,t){return e0(e[c],t)},function n(o,i,a,l){var c=o?o[u]:e,s=o?eJ(a.pos,i):"0",d=o?[].concat((0,ec.Z)(l),[o]):[];if(o){var f=r(o,s);t({node:o,index:i,pos:s,key:f,parentPos:a.node?a.pos:null,level:a.level+1,nodes:d})}c&&c.forEach(function(e,t){n(e,t,{node:o,pos:s,level:a?a.level+1:-1},d)})}(null),h&&h(w),w}function e3(e,t){var n=t.expandedKeys,r=t.selectedKeys,o=t.loadedKeys,i=t.loadingKeys,a=t.checkedKeys,l=t.halfCheckedKeys,c=t.dragOverNodeKey,s=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==o.indexOf(e),loading:-1!==i.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(u?u.pos:""),dragOver:c===e&&0===s,dragOverGapTop:c===e&&-1===s,dragOverGapBottom:c===e&&1===s}}function e5(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,i=e.loaded,a=e.loading,l=e.halfChecked,c=e.dragOver,s=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.pos,f=e.active,p=e.eventKey,h=(0,C.Z)((0,C.Z)({},t),{},{expanded:n,selected:r,checked:o,loaded:i,loading:a,halfChecked:l,dragOver:c,dragOverGapTop:s,dragOverGapBottom:u,pos:d,active:f,key:p});return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,I.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),h}var e8=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],e7="open",e9="close",te=function(e){(0,eU.Z)(n,e);var t=(0,eG.Z)(n);function n(){var e;(0,eW.Z)(this,n);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={dragNodeHighlight:!1},e.selectHandle=void 0,e.cacheIndent=void 0,e.onSelectorClick=function(t){(0,e.props.context.onNodeClick)(t,e5(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)},e.onSelectorDoubleClick=function(t){(0,e.props.context.onNodeDoubleClick)(t,e5(e.props))},e.onSelect=function(t){e.isDisabled()||(0,e.props.context.onNodeSelect)(t,e5(e.props))},e.onCheck=function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,o=n.checked,i=e.props.context.onNodeCheck;e.isCheckable()&&!r&&i(t,e5(e.props),!o)}},e.onMouseEnter=function(t){(0,e.props.context.onNodeMouseEnter)(t,e5(e.props))},e.onMouseLeave=function(t){(0,e.props.context.onNodeMouseLeave)(t,e5(e.props))},e.onContextMenu=function(t){(0,e.props.context.onNodeContextMenu)(t,e5(e.props))},e.onDragStart=function(t){var n=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,(0,eV.Z)(e));try{t.dataTransfer.setData("text/plain","")}catch(e){}},e.onDragEnter=function(t){var n=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,(0,eV.Z)(e))},e.onDragOver=function(t){var n=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,(0,eV.Z)(e))},e.onDragLeave=function(t){var n=e.props.context.onNodeDragLeave;t.stopPropagation(),n(t,(0,eV.Z)(e))},e.onDragEnd=function(t){var n=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,(0,eV.Z)(e))},e.onDrop=function(t){var n=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,(0,eV.Z)(e))},e.onExpand=function(t){var n=e.props,r=n.loading,o=n.context.onNodeExpand;r||o(t,e5(e.props))},e.setSelectHandle=function(t){e.selectHandle=t},e.getNodeState=function(){var t=e.props.expanded;return e.isLeaf()?null:t?e7:e9},e.hasChildren=function(){var t=e.props.eventKey;return!!((e.props.context.keyEntities[t]||{}).children||[]).length},e.isLeaf=function(){var t=e.props,n=t.isLeaf,r=t.loaded,o=e.props.context.loadData,i=e.hasChildren();return!1!==n&&(n||!o&&!i||o&&r&&!i)},e.isDisabled=function(){var t=e.props.disabled;return!!(e.props.context.disabled||t)},e.isCheckable=function(){var t=e.props.checkable,n=e.props.context.checkable;return!!n&&!1!==t&&n},e.syncLoadData=function(t){var n=t.expanded,r=t.loading,o=t.loaded,i=e.props.context,a=i.loadData,l=i.onNodeLoad;!r&&(!a||!n||e.isLeaf()||e.hasChildren()||o||l(e5(e.props)))},e.isDraggable=function(){var t=e.props,n=t.data,r=t.context.draggable;return!!(r&&(!r.nodeDraggable||r.nodeDraggable(n)))},e.renderDragHandler=function(){var t=e.props.context,n=t.draggable,r=t.prefixCls;return(null==n?void 0:n.icon)?i.createElement("span",{className:"".concat(r,"-draggable-icon")},n.icon):null},e.renderSwitcherIconDom=function(t){var n=e.props.switcherIcon,r=e.props.context.switcherIcon,o=n||r;return"function"==typeof o?o((0,C.Z)((0,C.Z)({},e.props),{},{isLeaf:t})):o},e.renderSwitcher=function(){var t=e.props.expanded,n=e.props.context.prefixCls;if(e.isLeaf()){var r=e.renderSwitcherIconDom(!0);return!1!==r?i.createElement("span",{className:P()("".concat(n,"-switcher"),"".concat(n,"-switcher-noop"))},r):null}var o=P()("".concat(n,"-switcher"),"".concat(n,"-switcher_").concat(t?e7:e9)),a=e.renderSwitcherIconDom(!1);return!1!==a?i.createElement("span",{onClick:e.onExpand,className:o},a):null},e.renderCheckbox=function(){var t=e.props,n=t.checked,r=t.halfChecked,o=t.disableCheckbox,a=e.props.context.prefixCls,l=e.isDisabled(),c=e.isCheckable();return c?i.createElement("span",{className:P()("".concat(a,"-checkbox"),n&&"".concat(a,"-checkbox-checked"),!n&&r&&"".concat(a,"-checkbox-indeterminate"),(l||o)&&"".concat(a,"-checkbox-disabled")),onClick:e.onCheck},"boolean"!=typeof c?c:null):null},e.renderIcon=function(){var t=e.props.loading,n=e.props.context.prefixCls;return i.createElement("span",{className:P()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(e.getNodeState()||"docu"),t&&"".concat(n,"-icon_loading"))})},e.renderSelector=function(){var t,n,r=e.state.dragNodeHighlight,o=e.props,a=o.title,l=void 0===a?"---":a,c=o.selected,s=o.icon,u=o.loading,d=o.data,f=e.props.context,p=f.prefixCls,h=f.showIcon,m=f.icon,g=f.loadData,v=f.titleRender,y=e.isDisabled(),b="".concat(p,"-node-content-wrapper");if(h){var x=s||m;t=x?i.createElement("span",{className:P()("".concat(p,"-iconEle"),"".concat(p,"-icon__customize"))},"function"==typeof x?x(e.props):x):e.renderIcon()}else g&&u&&(t=e.renderIcon());n="function"==typeof l?l(d):v?v(d):l;var w=i.createElement("span",{className:"".concat(p,"-title")},n);return i.createElement("span",{ref:e.setSelectHandle,title:"string"==typeof l?l:"",className:P()("".concat(b),"".concat(b,"-").concat(e.getNodeState()||"normal"),!y&&(c||r)&&"".concat(p,"-node-selected")),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick},t,w,e.renderDropIndicator())},e.renderDropIndicator=function(){var t=e.props,n=t.disabled,r=t.eventKey,o=e.props.context,i=o.draggable,a=o.dropLevelOffset,l=o.dropPosition,c=o.prefixCls,s=o.indent,u=o.dropIndicatorRender,d=o.dragOverNodeKey,f=o.direction,p=null!=s?s:e.cacheIndent;return e.cacheIndent=s,!n&&i&&d===r?u({dropPosition:l,dropLevelOffset:a,indent:p,prefixCls:c,direction:f}):null},e}return(0,eK.Z)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"==typeof e?e:t}},{key:"render",value:function(){var e,t=this.props,n=t.eventKey,r=t.className,o=t.style,a=t.dragOver,l=t.dragOverGapTop,c=t.dragOverGapBottom,s=t.isLeaf,u=t.isStart,d=t.isEnd,f=t.expanded,p=t.selected,h=t.checked,g=t.halfChecked,v=t.loading,y=t.domRef,b=t.active,x=(t.data,t.onMouseMove),w=t.selectable,S=(0,z.Z)(t,e8),k=this.props.context,E=k.prefixCls,C=k.filterTreeNode,j=k.keyEntities,N=k.dropContainerKey,M=k.dropTargetKey,I=k.draggingNodeKey,R=this.isDisabled(),T=(0,U.Z)(S,{aria:!0,data:!0}),A=(j[n]||{}).level,_=d[d.length-1],D=this.isDraggable(),Z=!R&&D,L=I===n;return i.createElement("div",(0,m.Z)({ref:y,className:P()(r,"".concat(E,"-treenode"),(e={},(0,O.Z)(e,"".concat(E,"-treenode-disabled"),R),(0,O.Z)(e,"".concat(E,"-treenode-switcher-").concat(f?"open":"close"),!s),(0,O.Z)(e,"".concat(E,"-treenode-checkbox-checked"),h),(0,O.Z)(e,"".concat(E,"-treenode-checkbox-indeterminate"),g),(0,O.Z)(e,"".concat(E,"-treenode-selected"),p),(0,O.Z)(e,"".concat(E,"-treenode-loading"),v),(0,O.Z)(e,"".concat(E,"-treenode-active"),b),(0,O.Z)(e,"".concat(E,"-treenode-leaf-last"),_),(0,O.Z)(e,"".concat(E,"-treenode-draggable"),D),(0,O.Z)(e,"dragging",L),(0,O.Z)(e,"drop-target",M===n),(0,O.Z)(e,"drop-container",N===n),(0,O.Z)(e,"drag-over",!R&&a),(0,O.Z)(e,"drag-over-gap-top",!R&&l),(0,O.Z)(e,"drag-over-gap-bottom",!R&&c),(0,O.Z)(e,"filter-node",C&&C(e5(this.props))),e)),style:o,draggable:Z,"aria-grabbed":L,onDragStart:Z?this.onDragStart:void 0,onDragEnter:D?this.onDragEnter:void 0,onDragOver:D?this.onDragOver:void 0,onDragLeave:D?this.onDragLeave:void 0,onDrop:D?this.onDrop:void 0,onDragEnd:D?this.onDragEnd:void 0,onMouseMove:x},void 0!==w?{"aria-selected":!!w}:void 0,T),i.createElement(e$,{prefixCls:E,level:A,isStart:u,isEnd:d}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(i.Component),tt=function(e){return i.createElement(eX.Consumer,null,function(t){return i.createElement(te,(0,m.Z)({},e,{context:t}))})};function tn(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function tr(e,t){var n=(e||[]).slice();return -1===n.indexOf(t)&&n.push(t),n}function to(e){return e.split("-")}function ti(e,t,n,r,o,i,a,l,c,s){var u,d,f=e.clientX,p=e.clientY,h=e.target.getBoundingClientRect(),m=h.top,g=h.height,v=(("rtl"===s?-1:1)*(((null==o?void 0:o.x)||0)-f)-12)/r,y=l[n.props.eventKey];if(p<m+g/2){var b=a.findIndex(function(e){return e.key===y.key});y=l[a[b<=0?0:b-1].key]}var x=y.key,w=y,S=y.key,k=0,E=0;if(!c.includes(x))for(var C=0;C<v;C+=1)if(function(e){if(e.parent){var t=to(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}(y))y=y.parent,E+=1;else break;var O=t.props.data,j=y.node,P=!0;return 0===Number((u=to(y.pos))[u.length-1])&&0===y.level&&p<m+g/2&&i({dragNode:O,dropNode:j,dropPosition:-1})&&y.key===n.props.eventKey?k=-1:(w.children||[]).length&&c.includes(S)?i({dragNode:O,dropNode:j,dropPosition:0})?k=0:P=!1:0===E?v>-1.5?i({dragNode:O,dropNode:j,dropPosition:1})?k=1:P=!1:i({dragNode:O,dropNode:j,dropPosition:0})?k=0:i({dragNode:O,dropNode:j,dropPosition:1})?k=1:P=!1:i({dragNode:O,dropNode:j,dropPosition:1})?k=1:P=!1,{dropPosition:k,dropLevelOffset:E,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:S,dropContainerKey:0===k?null:(null===(d=y.parent)||void 0===d?void 0:d.key)||null,dropAllowed:P}}function ta(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function tl(e){var t;if(!e)return null;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,E.Z)(e))return(0,I.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function tc(e,t){var n=new Set;return(e||[]).forEach(function(e){!function e(r){if(!n.has(r)){var o=t[r];if(o){n.add(r);var i=o.parent;!o.node.disabled&&i&&e(i.key)}}}(e)}),(0,ec.Z)(n)}function ts(e,t){var n=new Set;return e.forEach(function(e){t.has(e)||n.add(e)}),n}function tu(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,o=t.checkable;return!!(n||r)||!1===o}function td(e,t,n,r){var o,i=[];o=r||tu;var a=new Set(e.filter(function(e){var t=!!n[e];return t||i.push(e),t})),l=new Map,c=0;return Object.keys(n).forEach(function(e){var t=n[e],r=t.level,o=l.get(r);o||(o=new Set,l.set(r,o)),o.add(t),c=Math.max(c,r)}),(0,I.ZP)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(e){return"'".concat(e,"'")}).join(", "))),!0===t?function(e,t,n,r){for(var o=new Set(e),i=new Set,a=0;a<=n;a+=1)(t.get(a)||new Set).forEach(function(e){var t=e.key,n=e.node,i=e.children,a=void 0===i?[]:i;o.has(t)&&!r(n)&&a.filter(function(e){return!r(e.node)}).forEach(function(e){o.add(e.key)})});for(var l=new Set,c=n;c>=0;c-=1)(t.get(c)||new Set).forEach(function(e){var t=e.parent;if(!(r(e.node)||!e.parent||l.has(e.parent.key))){if(r(e.parent.node)){l.add(t.key);return}var n=!0,a=!1;(t.children||[]).filter(function(e){return!r(e.node)}).forEach(function(e){var t=e.key,r=o.has(t);n&&!r&&(n=!1),!a&&(r||i.has(t))&&(a=!0)}),n&&o.add(t.key),a&&i.add(t.key),l.add(t.key)}});return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(ts(i,o))}}(a,l,c,o):function(e,t,n,r,o){for(var i=new Set(e),a=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach(function(e){var t=e.key,n=e.node,r=e.children,l=void 0===r?[]:r;i.has(t)||a.has(t)||o(n)||l.filter(function(e){return!o(e.node)}).forEach(function(e){i.delete(e.key)})});a=new Set;for(var c=new Set,s=r;s>=0;s-=1)(n.get(s)||new Set).forEach(function(e){var t=e.parent;if(!(o(e.node)||!e.parent||c.has(e.parent.key))){if(o(e.parent.node)){c.add(t.key);return}var n=!0,r=!1;(t.children||[]).filter(function(e){return!o(e.node)}).forEach(function(e){var t=e.key,o=i.has(t);n&&!o&&(n=!1),!r&&(o||a.has(t))&&(r=!0)}),n||i.delete(t.key),r&&a.add(t.key),c.add(t.key)}});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(ts(a,i))}}(a,t.halfCheckedKeys,l,c,o)}tt.displayName="TreeNode",tt.isTreeNode=1;var tf=n(50506),tp=n(13613),th=n(20873),tm=n(6694),tg=n(34709),tv=n(71744),ty=n(86586),tb=n(64024),tx=n(39109);let tw=i.createContext(null);var tS=n(352),tk=n(12918),tE=n(3104),tC=n(80669);let tO=e=>{let{checkboxCls:t}=e,n="".concat(t,"-wrapper");return[{["".concat(t,"-group")]:Object.assign(Object.assign({},(0,tk.Wf)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,["> ".concat(e.antCls,"-row")]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,tk.Wf)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},["& + ".concat(n)]:{marginInlineStart:0},["&".concat(n,"-in-form-item")]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,tk.Wf)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,["&:focus-visible + ".concat(t,"-inner")]:Object.assign({},(0,tk.oN)(e))},["".concat(t,"-inner")]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:"".concat((0,tS.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:"all ".concat(e.motionDurationSlow),"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:"".concat((0,tS.bf)(e.lineWidthBold)," solid ").concat(e.colorWhite),borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:"all ".concat(e.motionDurationFast," ").concat(e.motionEaseInBack,", opacity ").concat(e.motionDurationFast)}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{["\n ".concat(n,":not(").concat(n,"-disabled),\n ").concat(t,":not(").concat(t,"-disabled)\n ")]:{["&:hover ".concat(t,"-inner")]:{borderColor:e.colorPrimary}},["".concat(n,":not(").concat(n,"-disabled)")]:{["&:hover ".concat(t,"-checked:not(").concat(t,"-disabled) ").concat(t,"-inner")]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},["&:hover ".concat(t,"-checked:not(").concat(t,"-disabled):after")]:{borderColor:e.colorPrimaryHover}}},{["".concat(t,"-checked")]:{["".concat(t,"-inner")]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack," ").concat(e.motionDurationFast)}}},["\n ".concat(n,"-checked:not(").concat(n,"-disabled),\n ").concat(t,"-checked:not(").concat(t,"-disabled)\n ")]:{["&:hover ".concat(t,"-inner")]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{["".concat(t,"-inner")]:{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{["".concat(n,"-disabled")]:{cursor:"not-allowed"},["".concat(t,"-disabled")]:{["&, ".concat(t,"-input")]:{cursor:"not-allowed",pointerEvents:"none"},["".concat(t,"-inner")]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},["&".concat(t,"-indeterminate ").concat(t,"-inner::after")]:{background:e.colorTextDisabled}}}]};function tj(e,t){return[tO((0,tE.TS)(t,{checkboxCls:".".concat(e),checkboxSize:t.controlInteractiveSize}))]}var tP=(0,tC.I$)("Checkbox",(e,t)=>{let{prefixCls:n}=t;return[tj(n,e)]}),tN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let tM=i.forwardRef((e,t)=>{var n;let{prefixCls:r,className:o,rootClassName:a,children:l,indeterminate:c=!1,style:s,onMouseEnter:u,onMouseLeave:d,skipGroup:f=!1,disabled:p}=e,h=tN(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:m,direction:g,checkbox:v}=i.useContext(tv.E_),y=i.useContext(tw),{isFormItemInput:b}=i.useContext(tx.aM),x=i.useContext(ty.Z),w=null!==(n=(null==y?void 0:y.disabled)||p)&&void 0!==n?n:x,S=i.useRef(h.value);i.useEffect(()=>{null==y||y.registerValue(h.value)},[]),i.useEffect(()=>{if(!f)return h.value!==S.current&&(null==y||y.cancelValue(S.current),null==y||y.registerValue(h.value),S.current=h.value),()=>null==y?void 0:y.cancelValue(h.value)},[h.value]);let k=m("checkbox",r),E=(0,tb.Z)(k),[C,O,j]=tP(k,E),N=Object.assign({},h);y&&!f&&(N.onChange=function(){h.onChange&&h.onChange.apply(h,arguments),y.toggleOption&&y.toggleOption({label:l,value:h.value})},N.name=y.name,N.checked=y.value.includes(h.value));let M=P()("".concat(k,"-wrapper"),{["".concat(k,"-rtl")]:"rtl"===g,["".concat(k,"-wrapper-checked")]:N.checked,["".concat(k,"-wrapper-disabled")]:w,["".concat(k,"-wrapper-in-form-item")]:b},null==v?void 0:v.className,o,a,j,E,O),I=P()({["".concat(k,"-indeterminate")]:c},tg.A,O),R=c?"mixed":void 0;return C(i.createElement(tm.Z,{component:"Checkbox",disabled:w},i.createElement("label",{className:M,style:Object.assign(Object.assign({},null==v?void 0:v.style),s),onMouseEnter:u,onMouseLeave:d},i.createElement(th.Z,Object.assign({"aria-checked":R},N,{prefixCls:k,className:I,disabled:w,ref:t})),void 0!==l&&i.createElement("span",null,l))))});var tI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let tR=i.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:o=[],prefixCls:a,className:l,rootClassName:c,style:s,onChange:u}=e,d=tI(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:p}=i.useContext(tv.E_),[h,m]=i.useState(d.value||n||[]),[g,v]=i.useState([]);i.useEffect(()=>{"value"in d&&m(d.value||[])},[d.value]);let y=i.useMemo(()=>o.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[o]),b=f("checkbox",a),x="".concat(b,"-group"),w=(0,tb.Z)(b),[S,k,E]=tP(b,w),C=(0,eY.Z)(d,["value","disabled"]),O=o.length?y.map(e=>i.createElement(tM,{prefixCls:b,key:e.value.toString(),disabled:"disabled"in e?e.disabled:d.disabled,value:e.value,checked:h.includes(e.value),onChange:e.onChange,className:"".concat(x,"-item"),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,j={toggleOption:e=>{let t=h.indexOf(e.value),n=(0,ec.Z)(h);-1===t?n.push(e.value):n.splice(t,1),"value"in d||m(n),null==u||u(n.filter(e=>g.includes(e)).sort((e,t)=>y.findIndex(t=>t.value===e)-y.findIndex(e=>e.value===t)))},value:h,disabled:d.disabled,name:d.name,registerValue:e=>{v(t=>[].concat((0,ec.Z)(t),[e]))},cancelValue:e=>{v(t=>t.filter(t=>t!==e))}},N=P()(x,{["".concat(x,"-rtl")]:"rtl"===p},l,c,E,w,k);return S(i.createElement("div",Object.assign({className:N,style:s},C,{ref:t}),i.createElement(tw.Provider,{value:j},O)))});tM.Group=tR,tM.__ANT_CHECKBOX=!0;var tT=n(80795),tA=n(29967);let t_={},tD="SELECT_ALL",tZ="SELECT_INVERT",tL="SELECT_NONE",tz=[],tB=(e,t)=>{let n=[];return(t||[]).forEach(t=>{n.push(t),t&&"object"==typeof t&&e in t&&(n=[].concat((0,ec.Z)(n),(0,ec.Z)(tB(e,t[e]))))}),n};var tF=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:o,getCheckboxProps:a,onChange:l,onSelect:c,onSelectAll:s,onSelectInvert:u,onSelectNone:d,onSelectMultiple:f,columnWidth:p,type:h,selections:m,fixed:g,renderCell:v,hideSelectAll:y,checkStrictly:b=!0}=t||{},{prefixCls:x,data:w,pageData:S,getRecordByKey:k,getRowKey:E,expandType:C,childrenColumnName:O,locale:j,getPopupContainer:N}=e,M=(0,tp.ln)("Table"),[I,R]=function(e){let[t,n]=(0,i.useState)(null);return[(0,i.useCallback)((r,o,i)=>{let a=null!=t?t:r,l=Math.max(a||0,r),c=o.slice(Math.min(a||0,r),l+1).map(t=>e(t)),s=c.some(e=>!i.has(e)),u=[];return c.forEach(e=>{s?(i.has(e)||u.push(e),i.add(e)):(i.delete(e),u.push(e))}),n(s?l:null),u},[t]),e=>{n(e)}]}(e=>e),[T,A]=(0,tf.Z)(r||o||tz,{value:r}),_=i.useRef(new Map),D=(0,i.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=k(e);!n&&_.current.has(e)&&(n=_.current.get(e)),t.set(e,n)}),_.current=t}},[k,n]);i.useEffect(()=>{D(T)},[T]);let{keyEntities:Z}=(0,i.useMemo)(()=>{if(b)return{keyEntities:null};let e=w;if(n){let t=new Set(w.map((e,t)=>E(e,t))),n=Array.from(_.current).reduce((e,n)=>{let[r,o]=n;return t.has(r)?e:e.concat(o)},[]);e=[].concat((0,ec.Z)(e),(0,ec.Z)(n))}return e4(e,{externalGetKey:E,childrenPropName:O})},[w,E,b,O,n]),L=(0,i.useMemo)(()=>tB(O,S),[O,S]),z=(0,i.useMemo)(()=>{let e=new Map;return L.forEach((t,n)=>{let r=E(t,n),o=(a?a(t):null)||{};e.set(r,o)}),e},[L,E,a]),B=(0,i.useCallback)(e=>{var t;return!!(null===(t=z.get(E(e)))||void 0===t?void 0:t.disabled)},[z,E]),[F,H]=(0,i.useMemo)(()=>{if(b)return[T||[],[]];let{checkedKeys:e,halfCheckedKeys:t}=td(T,!0,Z,B);return[e||[],t]},[T,b,Z,B]),q=(0,i.useMemo)(()=>new Set("radio"===h?F.slice(0,1):F),[F,h]),W=(0,i.useMemo)(()=>"radio"===h?new Set:new Set(H),[H,h]);i.useEffect(()=>{t||A(tz)},[!!t]);let K=(0,i.useCallback)((e,t)=>{let r,o;D(e),n?(r=e,o=e.map(e=>_.current.get(e))):(r=[],o=[],e.forEach(e=>{let t=k(e);void 0!==t&&(r.push(e),o.push(t))})),A(r),null==l||l(r,o,{type:t})},[A,k,l,n]),V=(0,i.useCallback)((e,t,n,r)=>{if(c){let o=n.map(e=>k(e));c(k(e),t,o,r)}K(n,"single")},[c,k,K]),U=(0,i.useMemo)(()=>!m||y?null:(!0===m?[tD,tZ,tL]:m).map(e=>e===tD?{key:"all",text:j.selectionAll,onSelect(){K(w.map((e,t)=>E(e,t)).filter(e=>{let t=z.get(e);return!(null==t?void 0:t.disabled)||q.has(e)}),"all")}}:e===tZ?{key:"invert",text:j.selectInvert,onSelect(){let e=new Set(q);S.forEach((t,n)=>{let r=E(t,n),o=z.get(r);(null==o?void 0:o.disabled)||(e.has(r)?e.delete(r):e.add(r))});let t=Array.from(e);u&&(M.deprecated(!1,"onSelectInvert","onChange"),u(t)),K(t,"invert")}}:e===tL?{key:"none",text:j.selectNone,onSelect(){null==d||d(),K(Array.from(q).filter(e=>{let t=z.get(e);return null==t?void 0:t.disabled}),"none")}}:e).map(e=>Object.assign(Object.assign({},e),{onSelect:function(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=e.onSelect)||void 0===t||t.call.apply(t,[e].concat(r)),R(null)}})),[m,q,S,E,u,K]);return[(0,i.useCallback)(e=>{var n;let r,o,a;if(!t)return e.filter(e=>e!==t_);let l=(0,ec.Z)(e),c=new Set(q),u=L.map(E).filter(e=>!z.get(e).disabled),d=u.every(e=>c.has(e)),w=u.some(e=>c.has(e));if("radio"!==h){let e;if(U){let t={getPopupContainer:N,items:U.map((e,t)=>{let{key:n,text:r,onSelect:o}=e;return{key:null!=n?n:t,onClick:()=>{null==o||o(u)},label:r}})};e=i.createElement("div",{className:"".concat(x,"-selection-extra")},i.createElement(tT.Z,{menu:t,getPopupContainer:N},i.createElement("span",null,i.createElement(eq.Z,null))))}let t=L.map((e,t)=>{let n=E(e,t),r=z.get(n)||{};return Object.assign({checked:c.has(n)},r)}).filter(e=>{let{disabled:t}=e;return t}),n=!!t.length&&t.length===L.length,a=n&&t.every(e=>{let{checked:t}=e;return t}),l=n&&t.some(e=>{let{checked:t}=e;return t});o=i.createElement(tM,{checked:n?a:!!L.length&&d,indeterminate:n?!a&&l:!d&&w,onChange:()=>{let e=[];d?u.forEach(t=>{c.delete(t),e.push(t)}):u.forEach(t=>{c.has(t)||(c.add(t),e.push(t))});let t=Array.from(c);null==s||s(!d,t.map(e=>k(e)),e.map(e=>k(e))),K(t,"all"),R(null)},disabled:0===L.length||n,"aria-label":e?"Custom selection":"Select all",skipGroup:!0}),r=!y&&i.createElement("div",{className:"".concat(x,"-selection")},o,e)}if(a="radio"===h?(e,t,n)=>{let r=E(t,n),o=c.has(r);return{node:i.createElement(tA.ZP,Object.assign({},z.get(r),{checked:o,onClick:e=>e.stopPropagation(),onChange:e=>{c.has(r)||V(r,!0,[r],e.nativeEvent)}})),checked:o}}:(e,t,n)=>{var r;let o;let a=E(t,n),l=c.has(a),s=W.has(a),d=z.get(a);return o="nest"===C?s:null!==(r=null==d?void 0:d.indeterminate)&&void 0!==r?r:s,{node:i.createElement(tM,Object.assign({},d,{indeterminate:o,checked:l,skipGroup:!0,onClick:e=>e.stopPropagation(),onChange:e=>{let{nativeEvent:t}=e,{shiftKey:n}=t,r=u.findIndex(e=>e===a),o=F.some(e=>u.includes(e));if(n&&b&&o){let e=I(r,u,c),t=Array.from(c);null==f||f(!l,t.map(e=>k(e)),e.map(e=>k(e))),K(t,"multiple")}else if(b){let e=l?tn(F,a):tr(F,a);V(a,!l,e,t)}else{let{checkedKeys:e,halfCheckedKeys:n}=td([].concat((0,ec.Z)(F),[a]),!0,Z,B),r=e;if(l){let t=new Set(e);t.delete(a),r=td(Array.from(t),{checked:!1,halfCheckedKeys:n},Z,B).checkedKeys}V(a,!l,r,t)}l?R(null):R(r)}})),checked:l}},!l.includes(t_)){if(0===l.findIndex(e=>{var t;return(null===(t=e[ei])||void 0===t?void 0:t.columnType)==="EXPAND_COLUMN"})){let[e,...t]=l;l=[e,t_].concat((0,ec.Z)(t))}else l=[t_].concat((0,ec.Z)(l))}let S=l.indexOf(t_),O=(l=l.filter((e,t)=>e!==t_||t===S))[S-1],j=l[S+1],M=g;void 0===M&&((null==j?void 0:j.fixed)!==void 0?M=j.fixed:(null==O?void 0:O.fixed)!==void 0&&(M=O.fixed)),M&&O&&(null===(n=O[ei])||void 0===n?void 0:n.columnType)==="EXPAND_COLUMN"&&void 0===O.fixed&&(O.fixed=M);let T=P()("".concat(x,"-selection-col"),{["".concat(x,"-selection-col-with-dropdown")]:m&&"checkbox"===h}),A={fixed:M,width:p,className:"".concat(x,"-selection-column"),title:(null==t?void 0:t.columnTitle)?"function"==typeof t.columnTitle?t.columnTitle(o):t.columnTitle:r,render:(e,t,n)=>{let{node:r,checked:o}=a(e,t,n);return v?v(o,t,n,r):r},onCell:t.onCell,[ei]:{className:T}};return l.map(e=>e===t_?A:e)},[E,L,t,F,q,W,p,U,C,z,f,V,B]),q]},tH=n(53346);function tq(e){return null!=e&&e===e.window}var tW=n(91086),tK=n(33759),tV=n(51646),tU=n(6543),tG=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,i.useRef)({}),n=(0,tV.Z)(),r=(0,tU.ZP)();return(0,u.Z)(()=>{let o=r.subscribe(r=>{t.current=r,e&&n()});return()=>r.unsubscribe(o)},[]),t.current},tX=n(13823),t$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},tY=n(55015),tQ=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:t$}))}),tJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},t0=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:tJ}))}),t1=n(15327),t2=n(77565),t6=n(95814),t4={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},t3=["10","20","50","100"],t5=function(e){var t=e.pageSizeOptions,n=void 0===t?t3:t,r=e.locale,o=e.changeSize,a=e.pageSize,l=e.goButton,s=e.quickGo,u=e.rootPrefixCls,d=e.selectComponentClass,f=e.selectPrefixCls,p=e.disabled,h=e.buildOptionText,m=i.useState(""),g=(0,c.Z)(m,2),v=g[0],y=g[1],b=function(){return!v||Number.isNaN(v)?void 0:Number(v)},x="function"==typeof h?h:function(e){return"".concat(e," ").concat(r.items_per_page)},w=function(e){""!==v&&(e.keyCode===t6.Z.ENTER||"click"===e.type)&&(y(""),null==s||s(b()))},S="".concat(u,"-options");if(!o&&!s)return null;var k=null,E=null,C=null;if(o&&d){var O=(n.some(function(e){return e.toString()===a.toString()})?n:n.concat([a.toString()]).sort(function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))})).map(function(e,t){return i.createElement(d.Option,{key:t,value:e.toString()},x(e))});k=i.createElement(d,{disabled:p,prefixCls:f,showSearch:!1,className:"".concat(S,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(a||n[0]).toString(),onChange:function(e){null==o||o(Number(e))},getPopupContainer:function(e){return e.parentNode},"aria-label":r.page_size,defaultOpen:!1},O)}return s&&(l&&(C="boolean"==typeof l?i.createElement("button",{type:"button",onClick:w,onKeyUp:w,disabled:p,className:"".concat(S,"-quick-jumper-button")},r.jump_to_confirm):i.createElement("span",{onClick:w,onKeyUp:w},l)),E=i.createElement("div",{className:"".concat(S,"-quick-jumper")},r.jump_to,i.createElement("input",{disabled:p,type:"text",value:v,onChange:function(e){y(e.target.value)},onKeyUp:w,onBlur:function(e){!l&&""!==v&&(y(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(u,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(u,"-item"))>=0)||null==s||s(b()))},"aria-label":r.page}),r.page,C)),i.createElement("li",{className:S},k,E)},t8=function(e){var t,n=e.rootPrefixCls,r=e.page,o=e.active,a=e.className,l=e.showTitle,c=e.onClick,s=e.onKeyPress,u=e.itemRender,d="".concat(n,"-item"),f=P()(d,"".concat(d,"-").concat(r),(t={},(0,O.Z)(t,"".concat(d,"-active"),o),(0,O.Z)(t,"".concat(d,"-disabled"),!r),t),a),p=u(r,"page",i.createElement("a",{rel:"nofollow"},r));return p?i.createElement("li",{title:l?String(r):null,className:f,onClick:function(){c(r)},onKeyDown:function(e){s(e,c,r)},tabIndex:0},p):null},t7=function(e,t,n){return n};function t9(){}function ne(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function nt(e,t,n){return Math.floor((n-1)/(void 0===e?t:e))+1}var nn=function(e){var t,n,r,o,a,l=e.prefixCls,s=void 0===l?"rc-pagination":l,u=e.selectPrefixCls,d=e.className,f=e.selectComponentClass,p=e.current,h=e.defaultCurrent,g=e.total,v=void 0===g?0:g,y=e.pageSize,b=e.defaultPageSize,x=e.onChange,w=void 0===x?t9:x,S=e.hideOnSinglePage,k=e.showPrevNextJumpers,E=e.showQuickJumper,j=e.showLessItems,N=e.showTitle,M=void 0===N||N,I=e.onShowSizeChange,R=void 0===I?t9:I,T=e.locale,A=void 0===T?t4:T,_=e.style,D=e.totalBoundaryShowSizeChanger,Z=e.disabled,L=e.simple,z=e.showTotal,B=e.showSizeChanger,F=e.pageSizeOptions,H=e.itemRender,q=void 0===H?t7:H,W=e.jumpPrevIcon,K=e.jumpNextIcon,V=e.prevIcon,G=e.nextIcon,X=i.useRef(null),$=(0,tf.Z)(10,{value:y,defaultValue:void 0===b?10:b}),Y=(0,c.Z)($,2),Q=Y[0],J=Y[1],ee=(0,tf.Z)(1,{value:p,defaultValue:void 0===h?1:h,postState:function(e){return Math.max(1,Math.min(e,nt(void 0,Q,v)))}}),et=(0,c.Z)(ee,2),en=et[0],er=et[1],eo=i.useState(en),ei=(0,c.Z)(eo,2),ea=ei[0],el=ei[1];(0,i.useEffect)(function(){el(en)},[en]);var ec=Math.max(1,en-(j?3:5)),es=Math.min(nt(void 0,Q,v),en+(j?3:5));function eu(t,n){var r=t||i.createElement("button",{type:"button","aria-label":n,className:"".concat(s,"-item-link")});return"function"==typeof t&&(r=i.createElement(t,(0,C.Z)({},e))),r}function ed(e){var t=e.target.value,n=nt(void 0,Q,v);return""===t?t:Number.isNaN(Number(t))?ea:t>=n?n:Number(t)}var ef=v>Q&&E;function ep(e){var t=ed(e);switch(t!==ea&&el(t),e.keyCode){case t6.Z.ENTER:eh(t);break;case t6.Z.UP:eh(t-1);break;case t6.Z.DOWN:eh(t+1)}}function eh(e){if(ne(e)&&e!==en&&ne(v)&&v>0&&!Z){var t=nt(void 0,Q,v),n=e;return e>t?n=t:e<1&&(n=1),n!==ea&&el(n),er(n),null==w||w(n,Q),n}return en}var em=en>1,eg=en<nt(void 0,Q,v),ev=null!=B?B:v>(void 0===D?50:D);function ey(){em&&eh(en-1)}function eb(){eg&&eh(en+1)}function ex(){eh(ec)}function ew(){eh(es)}function eS(e,t){if("Enter"===e.key||e.charCode===t6.Z.ENTER||e.keyCode===t6.Z.ENTER){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];t.apply(void 0,r)}}function ek(e){("click"===e.type||e.keyCode===t6.Z.ENTER)&&eh(ea)}var eE=null,eC=(0,U.Z)(e,{aria:!0,data:!0}),eO=z&&i.createElement("li",{className:"".concat(s,"-total-text")},z(v,[0===v?0:(en-1)*Q+1,en*Q>v?v:en*Q])),ej=null,eP=nt(void 0,Q,v);if(S&&v<=Q)return null;var eN=[],eM={rootPrefixCls:s,onClick:eh,onKeyPress:eS,showTitle:M,itemRender:q,page:-1},eI=en-1>0?en-1:0,eR=en+1<eP?en+1:eP,eT=E&&E.goButton,eA=eT,e_=null;L&&(eT&&(eA="boolean"==typeof eT?i.createElement("button",{type:"button",onClick:ek,onKeyUp:ek},A.jump_to_confirm):i.createElement("span",{onClick:ek,onKeyUp:ek},eT),eA=i.createElement("li",{title:M?"".concat(A.jump_to).concat(en,"/").concat(eP):null,className:"".concat(s,"-simple-pager")},eA)),e_=i.createElement("li",{title:M?"".concat(en,"/").concat(eP):null,className:"".concat(s,"-simple-pager")},i.createElement("input",{type:"text",value:ea,disabled:Z,onKeyDown:function(e){(e.keyCode===t6.Z.UP||e.keyCode===t6.Z.DOWN)&&e.preventDefault()},onKeyUp:ep,onChange:ep,onBlur:function(e){eh(ed(e))},size:3}),i.createElement("span",{className:"".concat(s,"-slash")},"/"),eP));var eD=j?1:2;if(eP<=3+2*eD){eP||eN.push(i.createElement(t8,(0,m.Z)({},eM,{key:"noPager",page:1,className:"".concat(s,"-item-disabled")})));for(var eZ=1;eZ<=eP;eZ+=1)eN.push(i.createElement(t8,(0,m.Z)({},eM,{key:eZ,page:eZ,active:en===eZ})))}else{var eL=j?A.prev_3:A.prev_5,ez=j?A.next_3:A.next_5,eB=q(ec,"jump-prev",eu(W,"prev page")),eF=q(es,"jump-next",eu(K,"next page"));(void 0===k||k)&&(eE=eB?i.createElement("li",{title:M?eL:null,key:"prev",onClick:ex,tabIndex:0,onKeyDown:function(e){eS(e,ex)},className:P()("".concat(s,"-jump-prev"),(0,O.Z)({},"".concat(s,"-jump-prev-custom-icon"),!!W))},eB):null,ej=eF?i.createElement("li",{title:M?ez:null,key:"next",onClick:ew,tabIndex:0,onKeyDown:function(e){eS(e,ew)},className:P()("".concat(s,"-jump-next"),(0,O.Z)({},"".concat(s,"-jump-next-custom-icon"),!!K))},eF):null);var eH=Math.max(1,en-eD),eq=Math.min(en+eD,eP);en-1<=eD&&(eq=1+2*eD),eP-en<=eD&&(eH=eP-2*eD);for(var eW=eH;eW<=eq;eW+=1)eN.push(i.createElement(t8,(0,m.Z)({},eM,{key:eW,page:eW,active:en===eW})));if(en-1>=2*eD&&3!==en&&(eN[0]=i.cloneElement(eN[0],{className:P()("".concat(s,"-item-after-jump-prev"),eN[0].props.className)}),eN.unshift(eE)),eP-en>=2*eD&&en!==eP-2){var eK=eN[eN.length-1];eN[eN.length-1]=i.cloneElement(eK,{className:P()("".concat(s,"-item-before-jump-next"),eK.props.className)}),eN.push(ej)}1!==eH&&eN.unshift(i.createElement(t8,(0,m.Z)({},eM,{key:1,page:1}))),eq!==eP&&eN.push(i.createElement(t8,(0,m.Z)({},eM,{key:eP,page:eP})))}var eV=(t=q(eI,"prev",eu(V,"prev page")),i.isValidElement(t)?i.cloneElement(t,{disabled:!em}):t);if(eV){var eU=!em||!eP;eV=i.createElement("li",{title:M?A.prev_page:null,onClick:ey,tabIndex:eU?null:0,onKeyDown:function(e){eS(e,ey)},className:P()("".concat(s,"-prev"),(0,O.Z)({},"".concat(s,"-disabled"),eU)),"aria-disabled":eU},eV)}var eG=(n=q(eR,"next",eu(G,"next page")),i.isValidElement(n)?i.cloneElement(n,{disabled:!eg}):n);eG&&(L?(o=!eg,a=em?0:null):a=(o=!eg||!eP)?null:0,eG=i.createElement("li",{title:M?A.next_page:null,onClick:eb,tabIndex:a,onKeyDown:function(e){eS(e,eb)},className:P()("".concat(s,"-next"),(0,O.Z)({},"".concat(s,"-disabled"),o)),"aria-disabled":o},eG));var eX=P()(s,d,(r={},(0,O.Z)(r,"".concat(s,"-simple"),L),(0,O.Z)(r,"".concat(s,"-disabled"),Z),r));return i.createElement("ul",(0,m.Z)({className:eX,style:_,ref:X},eC),eO,eV,L?e_:eN,eG,i.createElement(t5,{locale:A,rootPrefixCls:s,disabled:Z,selectComponentClass:f,selectPrefixCls:void 0===u?"rc-select":u,changeSize:ev?function(e){var t=nt(e,Q,v),n=en>t&&0!==t?t:en;J(e),el(n),null==R||R(en,e),er(n),null==w||w(n,e)}:null,pageSize:Q,pageSizeOptions:F,quickGo:ef?eh:null,goButton:eA}))},nr=n(96257),no=n(55274),ni=n(52787);let na=e=>i.createElement(ni.default,Object.assign({},e,{showSearch:!0,size:"small"})),nl=e=>i.createElement(ni.default,Object.assign({},e,{showSearch:!0,size:"middle"}));na.Option=ni.default.Option,nl.Option=ni.default.Option;var nc=n(31282),ns=n(37433),nu=n(65265);let nd=e=>{let{componentCls:t}=e;return{["".concat(t,"-disabled")]:{"&, &:hover":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},["&".concat(t,"-disabled")]:{cursor:"not-allowed",["".concat(t,"-item")]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},["".concat(t,"-simple&")]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},["".concat(t,"-simple-pager")]:{color:e.colorTextDisabled},["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{["".concat(t,"-item-link-icon")]:{opacity:0},["".concat(t,"-item-ellipsis")]:{opacity:1}}},["&".concat(t,"-simple")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&".concat(t,"-disabled ").concat(t,"-item-link")]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},nf=e=>{let{componentCls:t}=e;return{["&".concat(t,"-mini ").concat(t,"-total-text, &").concat(t,"-mini ").concat(t,"-simple-pager")]:{height:e.itemSizeSM,lineHeight:(0,tS.bf)(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-item")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,tS.bf)(e.calc(e.itemSizeSM).sub(2).equal())},["&".concat(t,"-mini:not(").concat(t,"-disabled) ").concat(t,"-item:not(").concat(t,"-item-active)")]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},["&".concat(t,"-mini ").concat(t,"-prev, &").concat(t,"-mini ").concat(t,"-next")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,tS.bf)(e.itemSizeSM)},["&".concat(t,"-mini:not(").concat(t,"-disabled)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover ").concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["\n &".concat(t,"-mini ").concat(t,"-prev ").concat(t,"-item-link,\n &").concat(t,"-mini ").concat(t,"-next ").concat(t,"-item-link\n ")]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:(0,tS.bf)(e.itemSizeSM)}},["&".concat(t,"-mini ").concat(t,"-jump-prev, &").concat(t,"-mini ").concat(t,"-jump-next")]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:(0,tS.bf)(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-options")]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:(0,tS.bf)(e.itemSizeSM),input:Object.assign(Object.assign({},(0,nc.x0)(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},np=e=>{let{componentCls:t}=e;return{["\n &".concat(t,"-simple ").concat(t,"-prev,\n &").concat(t,"-simple ").concat(t,"-next\n ")]:{height:e.itemSizeSM,lineHeight:(0,tS.bf)(e.itemSizeSM),verticalAlign:"top",["".concat(t,"-item-link")]:{height:e.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSizeSM,lineHeight:(0,tS.bf)(e.itemSizeSM)}}},["&".concat(t,"-simple ").concat(t,"-simple-pager")]:{display:"inline-block",height:e.itemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:e.marginXS,padding:"0 ".concat((0,tS.bf)(e.paginationItemPaddingInline)),textAlign:"center",backgroundColor:e.itemInputBg,border:"".concat((0,tS.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadius,outline:"none",transition:"border-color ".concat(e.motionDurationMid),color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:"".concat((0,tS.bf)(e.inputOutlineOffset)," 0 ").concat((0,tS.bf)(e.controlOutlineWidth)," ").concat(e.controlOutline)},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},nh=e=>{let{componentCls:t}=e;return{["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{outline:0,["".concat(t,"-item-container")]:{position:"relative",["".concat(t,"-item-link-icon")]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:"all ".concat(e.motionDurationMid),"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},["".concat(t,"-item-ellipsis")]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:"all ".concat(e.motionDurationMid)}},"&:hover":{["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}}},["\n ".concat(t,"-prev,\n ").concat(t,"-jump-prev,\n ").concat(t,"-jump-next\n ")]:{marginInlineEnd:e.marginXS},["\n ".concat(t,"-prev,\n ").concat(t,"-next,\n ").concat(t,"-jump-prev,\n ").concat(t,"-jump-next\n ")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:"".concat((0,tS.bf)(e.itemSize)),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:"all ".concat(e.motionDurationMid)},["".concat(t,"-prev, ").concat(t,"-next")]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},["".concat(t,"-item-link")]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:"".concat((0,tS.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:"none",transition:"all ".concat(e.motionDurationMid)},["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover")]:{["".concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["".concat(t,"-slash")]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},["".concat(t,"-options")]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:(0,tS.bf)(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,nc.ik)(e)),(0,nu.$U)(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},(0,nu.Xy)(e)),width:e.calc(e.controlHeightLG).mul(1.25).equal(),height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},nm=e=>{let{componentCls:t}=e;return{["".concat(t,"-item")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:(0,tS.bf)(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:"".concat((0,tS.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:"0 ".concat((0,tS.bf)(e.paginationItemPaddingInline)),color:e.colorText,"&:hover":{textDecoration:"none"}},["&:not(".concat(t,"-item-active)")]:{"&:hover":{transition:"all ".concat(e.motionDurationMid),backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},ng=e=>{let{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,tk.Wf)(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},["".concat(t,"-total-text")]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:(0,tS.bf)(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),nm(e)),nh(e)),np(e)),nf(e)),nd(e)),{["@media only screen and (max-width: ".concat(e.screenLG,"px)")]:{["".concat(t,"-item")]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},["@media only screen and (max-width: ".concat(e.screenSM,"px)")]:{["".concat(t,"-options")]:{display:"none"}}}),["&".concat(e.componentCls,"-rtl")]:{direction:"rtl"}}},nv=e=>{let{componentCls:t}=e;return{["".concat(t,":not(").concat(t,"-disabled)")]:{["".concat(t,"-item")]:Object.assign({},(0,tk.Qy)(e)),["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{"&:focus-visible":Object.assign({["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}},(0,tk.oN)(e))},["".concat(t,"-prev, ").concat(t,"-next")]:{["&:focus-visible ".concat(t,"-item-link")]:Object.assign({},(0,tk.oN)(e))}}}},ny=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},(0,ns.T)(e)),nb=e=>(0,tE.TS)(e,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,ns.e)(e));var nx=(0,tC.I$)("Pagination",e=>{let t=nb(e);return[ng(t),nv(t)]},ny),nw=n(29961);let nS=e=>{let{componentCls:t}=e;return{["".concat(t).concat(t,"-bordered").concat(t,"-disabled:not(").concat(t,"-mini)")]:{"&, &:hover":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},"&:focus-visible":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},["".concat(t,"-item, ").concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,["&:hover:not(".concat(t,"-item-active)")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},["&".concat(t,"-item-active")]:{backgroundColor:e.itemActiveBgDisabled}},["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},["".concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},["".concat(t).concat(t,"-bordered:not(").concat(t,"-mini)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},["".concat(t,"-item-link")]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},["&:hover ".concat(t,"-item-link")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},["&".concat(t,"-disabled")]:{["".concat(t,"-item-link")]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},["".concat(t,"-item")]:{backgroundColor:e.itemBg,border:"".concat((0,tS.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),["&:hover:not(".concat(t,"-item-active)")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}};var nk=(0,tC.bk)(["Pagination","bordered"],e=>[nS(nb(e))],ny),nE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},nC=e=>{let{prefixCls:t,selectPrefixCls:n,className:r,rootClassName:o,style:a,size:l,locale:c,selectComponentClass:s,responsive:u,showSizeChanger:d}=e,f=nE(e,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:p}=tG(u),[,h]=(0,nw.ZP)(),{getPrefixCls:m,direction:g,pagination:v={}}=i.useContext(tv.E_),y=m("pagination",t),[b,x,w]=nx(y),S=null!=d?d:v.showSizeChanger,k=i.useMemo(()=>{let e=i.createElement("span",{className:"".concat(y,"-item-ellipsis")},"•••"),t=i.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},"rtl"===g?i.createElement(t2.Z,null):i.createElement(t1.Z,null));return{prevIcon:t,nextIcon:i.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},"rtl"===g?i.createElement(t1.Z,null):i.createElement(t2.Z,null)),jumpPrevIcon:i.createElement("a",{className:"".concat(y,"-item-link")},i.createElement("div",{className:"".concat(y,"-item-container")},"rtl"===g?i.createElement(t0,{className:"".concat(y,"-item-link-icon")}):i.createElement(tQ,{className:"".concat(y,"-item-link-icon")}),e)),jumpNextIcon:i.createElement("a",{className:"".concat(y,"-item-link")},i.createElement("div",{className:"".concat(y,"-item-container")},"rtl"===g?i.createElement(tQ,{className:"".concat(y,"-item-link-icon")}):i.createElement(t0,{className:"".concat(y,"-item-link-icon")}),e))}},[g,y]),[E]=(0,no.Z)("Pagination",nr.Z),C=Object.assign(Object.assign({},E),c),O=(0,tK.Z)(l),j="small"===O||!!(p&&!O&&u),N=m("select",n),M=P()({["".concat(y,"-mini")]:j,["".concat(y,"-rtl")]:"rtl"===g,["".concat(y,"-bordered")]:h.wireframe},null==v?void 0:v.className,r,o,x,w),I=Object.assign(Object.assign({},null==v?void 0:v.style),a);return b(i.createElement(i.Fragment,null,h.wireframe&&i.createElement(nk,{prefixCls:y}),i.createElement(nn,Object.assign({},k,f,{style:I,prefixCls:y,selectPrefixCls:N,className:M,selectComponentClass:s||(j?na:nl),locale:C,showSizeChanger:S}))))},nO=n(87908);function nj(e,t){return"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t}function nP(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function nN(e,t){return"function"==typeof e?e(t):e}var nM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},nI=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:nM}))}),nR=n(73002),nT=n(85180),nA=n(45937),n_=n(88208);function nD(e){if(null==e)throw TypeError("Cannot destructure "+e)}var nZ=n(47970),nL=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],nz=function(e,t){var n,r,o,a,l,s=e.className,d=e.style,f=e.motion,p=e.motionNodes,h=e.motionType,g=e.onMotionStart,v=e.onMotionEnd,y=e.active,b=e.treeNodeRequiredProps,x=(0,z.Z)(e,nL),w=i.useState(!0),S=(0,c.Z)(w,2),k=S[0],E=S[1],C=i.useContext(eX).prefixCls,O=p&&"hide"!==h;(0,u.Z)(function(){p&&O!==k&&E(O)},[p]);var j=i.useRef(!1),N=function(){p&&!j.current&&(j.current=!0,v())};return(n=function(){p&&g()},r=i.useState(!1),a=(o=(0,c.Z)(r,2))[0],l=o[1],(0,u.Z)(function(){if(a)return n(),function(){N()}},[a]),(0,u.Z)(function(){return l(!0),function(){l(!1)}},[]),p)?i.createElement(nZ.ZP,(0,m.Z)({ref:t,visible:k},f,{motionAppear:"show"===h,onVisibleChanged:function(e){O===e&&N()}}),function(e,t){var n=e.className,r=e.style;return i.createElement("div",{ref:t,className:P()("".concat(C,"-treenode-motion"),n),style:r},p.map(function(e){var t=(0,m.Z)({},(nD(e.data),e.data)),n=e.title,r=e.key,o=e.isStart,a=e.isEnd;delete t.children;var l=e3(r,b);return i.createElement(tt,(0,m.Z)({},t,l,{title:n,active:y,data:e.data,key:r,isStart:o,isEnd:a}))}))}):i.createElement(tt,(0,m.Z)({domRef:t,className:s,style:d},x,{active:y}))};nz.displayName="MotionTreeNode";var nB=i.forwardRef(nz);function nF(e,t,n){var r=e.findIndex(function(e){return e.key===n}),o=e[r+1],i=t.findIndex(function(e){return e.key===n});if(o){var a=t.findIndex(function(e){return e.key===o.key});return t.slice(i+1,a)}return t.slice(i+1)}var nH=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],nq={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},nW=function(){},nK="RC_TREE_MOTION_".concat(Math.random()),nV={key:nK},nU={key:nK,level:0,index:0,pos:"0",node:nV,nodes:[nV]},nG={parent:null,children:[],pos:nU.pos,data:nV,title:null,key:nK,isStart:[],isEnd:[]};function nX(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function n$(e){return e0(e.key,e.pos)}var nY=i.forwardRef(function(e,t){var n=e.prefixCls,r=e.data,o=(e.selectable,e.checkable,e.expandedKeys),a=e.selectedKeys,l=e.checkedKeys,s=e.loadedKeys,d=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,h=e.disabled,g=e.dragging,v=e.dragOverNodeKey,y=e.dropPosition,b=e.motion,x=e.height,w=e.itemHeight,S=e.virtual,k=e.focusable,E=e.activeItem,C=e.focused,O=e.tabIndex,j=e.onKeyDown,P=e.onFocus,N=e.onBlur,M=e.onActiveChange,I=e.onListChangeStart,R=e.onListChangeEnd,T=(0,z.Z)(e,nH),A=i.useRef(null),_=i.useRef(null);i.useImperativeHandle(t,function(){return{scrollTo:function(e){A.current.scrollTo(e)},getIndentWidth:function(){return _.current.offsetWidth}}});var D=i.useState(o),Z=(0,c.Z)(D,2),L=Z[0],B=Z[1],F=i.useState(r),H=(0,c.Z)(F,2),q=H[0],W=H[1],K=i.useState(r),V=(0,c.Z)(K,2),U=V[0],G=V[1],X=i.useState([]),$=(0,c.Z)(X,2),Y=$[0],Q=$[1],J=i.useState(null),ee=(0,c.Z)(J,2),et=ee[0],en=ee[1],er=i.useRef(r);function eo(){var e=er.current;W(e),G(e),Q([]),en(null),R()}er.current=r,(0,u.Z)(function(){B(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function o(e,t){var n=new Map;e.forEach(function(e){n.set(e,!0)});var r=t.filter(function(e){return!n.has(e)});return 1===r.length?r[0]:null}return n<r?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}(L,o);if(null!==e.key){if(e.add){var t=q.findIndex(function(t){return t.key===e.key}),n=nX(nF(q,r,e.key),S,x,w),i=q.slice();i.splice(t+1,0,nG),G(i),Q(n),en("show")}else{var a=r.findIndex(function(t){return t.key===e.key}),l=nX(nF(r,q,e.key),S,x,w),c=r.slice();c.splice(a+1,0,nG),G(c),Q(l),en("hide")}}else q!==r&&(W(r),G(r))},[o,r]),i.useEffect(function(){g||eo()},[g]);var ei=b?U:r,ea={expandedKeys:o,selectedKeys:a,loadedKeys:s,loadingKeys:d,checkedKeys:l,halfCheckedKeys:f,dragOverNodeKey:v,dropPosition:y,keyEntities:p};return i.createElement(i.Fragment,null,C&&E&&i.createElement("span",{style:nq,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(E)),i.createElement("div",null,i.createElement("input",{style:nq,disabled:!1===k||h,tabIndex:!1!==k?O:null,onKeyDown:j,onFocus:P,onBlur:N,value:"",onChange:nW,"aria-label":"for screen reader"})),i.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},i.createElement("div",{className:"".concat(n,"-indent")},i.createElement("div",{ref:_,className:"".concat(n,"-indent-unit")}))),i.createElement(eA.Z,(0,m.Z)({},T,{data:ei,itemKey:n$,height:x,fullHeight:!1,virtual:S,itemHeight:w,prefixCls:"".concat(n,"-list"),ref:A,onVisibleChange:function(e,t){var n=new Set(e);t.filter(function(e){return!n.has(e)}).some(function(e){return n$(e)===nK})&&eo()}}),function(e){var t=e.pos,n=(0,m.Z)({},(nD(e.data),e.data)),r=e.title,o=e.key,a=e.isStart,l=e.isEnd,c=e0(o,t);delete n.key,delete n.children;var s=e3(c,ea);return i.createElement(nB,(0,m.Z)({},n,s,{title:r,active:!!E&&o===E.key,pos:t,data:e.data,isStart:a,isEnd:l,motion:b,motionNodes:o===nK?Y:null,motionType:et,onMotionStart:I,onMotionEnd:eo,treeNodeRequiredProps:ea,onMouseMove:function(){M(null)}}))}))});nY.displayName="NodeList";var nQ=function(e){(0,eU.Z)(n,e);var t=(0,eG.Z)(n);function n(){var e;(0,eW.Z)(this,n);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).destroyed=!1,e.delayedDragEnterLogic=void 0,e.loadingRetryTimes={},e.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:e1()},e.dragStartMousePosition=null,e.dragNode=void 0,e.currentMouseOverDroppableNodeKey=null,e.listRef=i.createRef(),e.onNodeDragStart=function(t,n){var r,o=e.state,i=o.expandedKeys,a=o.keyEntities,l=e.props.onDragStart,c=n.props.eventKey;e.dragNode=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var s=tn(i,c);e.setState({draggingNodeKey:c,dragChildrenKeys:(r=[],function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach(function(t){var n=t.key,o=t.children;r.push(n),e(o)})}(a[c].children),r),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(s),window.addEventListener("dragend",e.onWindowDragEnd),null==l||l({event:t,node:e5(n.props)})},e.onNodeDragEnter=function(t,n){var r=e.state,o=r.expandedKeys,i=r.keyEntities,a=r.dragChildrenKeys,l=r.flattenNodes,c=r.indent,s=e.props,u=s.onDragEnter,d=s.onExpand,f=s.allowDrop,p=s.direction,h=n.props,m=h.pos,g=h.eventKey,v=(0,eV.Z)(e).dragNode;if(e.currentMouseOverDroppableNodeKey!==g&&(e.currentMouseOverDroppableNodeKey=g),!v){e.resetDragState();return}var y=ti(t,v,n,c,e.dragStartMousePosition,f,l,i,o,p),b=y.dropPosition,x=y.dropLevelOffset,w=y.dropTargetKey,S=y.dropContainerKey,k=y.dropTargetPos,E=y.dropAllowed,C=y.dragOverNodeKey;if(-1!==a.indexOf(w)||!E||(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(t){clearTimeout(e.delayedDragEnterLogic[t])}),v.props.eventKey!==n.props.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout(function(){if(null!==e.state.draggingNodeKey){var r=(0,ec.Z)(o),a=i[n.props.eventKey];a&&(a.children||[]).length&&(r=tr(o,n.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(r),null==d||d(r,{node:e5(n.props),expanded:!0,nativeEvent:t.nativeEvent})}},800)),v.props.eventKey===w&&0===x)){e.resetDragState();return}e.setState({dragOverNodeKey:C,dropPosition:b,dropLevelOffset:x,dropTargetKey:w,dropContainerKey:S,dropTargetPos:k,dropAllowed:E}),null==u||u({event:t,node:e5(n.props),expandedKeys:o})},e.onNodeDragOver=function(t,n){var r=e.state,o=r.dragChildrenKeys,i=r.flattenNodes,a=r.keyEntities,l=r.expandedKeys,c=r.indent,s=e.props,u=s.onDragOver,d=s.allowDrop,f=s.direction,p=(0,eV.Z)(e).dragNode;if(p){var h=ti(t,p,n,c,e.dragStartMousePosition,d,i,a,l,f),m=h.dropPosition,g=h.dropLevelOffset,v=h.dropTargetKey,y=h.dropContainerKey,b=h.dropAllowed,x=h.dropTargetPos,w=h.dragOverNodeKey;-1===o.indexOf(v)&&b&&(p.props.eventKey===v&&0===g?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&g===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&y===e.state.dropContainerKey&&x===e.state.dropTargetPos&&b===e.state.dropAllowed&&w===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:g,dropTargetKey:v,dropContainerKey:y,dropTargetPos:x,dropAllowed:b,dragOverNodeKey:w}),null==u||u({event:t,node:e5(n.props)}))}},e.onNodeDragLeave=function(t,n){e.currentMouseOverDroppableNodeKey!==n.props.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var r=e.props.onDragLeave;null==r||r({event:t,node:e5(n.props)})},e.onWindowDragEnd=function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDragEnd=function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==r||r({event:t,node:e5(n.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDrop=function(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.state,a=i.dragChildrenKeys,l=i.dropPosition,c=i.dropTargetKey,s=i.dropTargetPos;if(i.dropAllowed){var u=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==c){var d=(0,C.Z)((0,C.Z)({},e3(c,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===c,data:e.state.keyEntities[c].node}),f=-1!==a.indexOf(c);(0,I.ZP)(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=to(s),h={event:t,node:e5(d),dragNode:e.dragNode?e5(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(a),dropToGap:0!==l,dropPosition:l+Number(p[p.length-1])};o||null==u||u(h),e.dragNode=null}}},e.cleanDragState=function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null},e.triggerExpandActionExpand=function(t,n){var r=e.state,o=r.expandedKeys,i=r.flattenNodes,a=n.expanded,l=n.key;if(!n.isLeaf&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey){var c=i.filter(function(e){return e.key===l})[0],s=e5((0,C.Z)((0,C.Z)({},e3(l,e.getTreeNodeRequiredProps())),{},{data:c.data}));e.setExpandedKeys(a?tn(o,l):tr(o,l)),e.onNodeExpand(t,s)}},e.onNodeClick=function(t,n){var r=e.props,o=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==o||o(t,n)},e.onNodeDoubleClick=function(t,n){var r=e.props,o=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==o||o(t,n)},e.onNodeSelect=function(t,n){var r=e.state.selectedKeys,o=e.state,i=o.keyEntities,a=o.fieldNames,l=e.props,c=l.onSelect,s=l.multiple,u=n.selected,d=n[a.key],f=!u,p=(r=f?s?tr(r,d):[d]:tn(r,d)).map(function(e){var t=i[e];return t?t.node:null}).filter(function(e){return e});e.setUncontrolledState({selectedKeys:r}),null==c||c(r,{event:"select",selected:f,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})},e.onNodeCheck=function(t,n,r){var o,i=e.state,a=i.keyEntities,l=i.checkedKeys,c=i.halfCheckedKeys,s=e.props,u=s.checkStrictly,d=s.onCheck,f=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(u){var h=r?tr(l,f):tn(l,f);o={checked:h,halfChecked:tn(c,f)},p.checkedNodes=h.map(function(e){return a[e]}).filter(function(e){return e}).map(function(e){return e.node}),e.setUncontrolledState({checkedKeys:h})}else{var m=td([].concat((0,ec.Z)(l),[f]),!0,a),g=m.checkedKeys,v=m.halfCheckedKeys;if(!r){var y=new Set(g);y.delete(f);var b=td(Array.from(y),{checked:!1,halfCheckedKeys:v},a);g=b.checkedKeys,v=b.halfCheckedKeys}o=g,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=v,g.forEach(function(e){var t=a[e];if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}}),e.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:v})}null==d||d(o,p)},e.onNodeLoad=function(t){var n=t.key,r=new Promise(function(r,o){e.setState(function(i){var a=i.loadedKeys,l=i.loadingKeys,c=void 0===l?[]:l,s=e.props,u=s.loadData,d=s.onLoad;return u&&-1===(void 0===a?[]:a).indexOf(n)&&-1===c.indexOf(n)?(u(t).then(function(){var o=tr(e.state.loadedKeys,n);null==d||d(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState(function(e){return{loadingKeys:tn(e.loadingKeys,n)}}),r()}).catch(function(t){if(e.setState(function(e){return{loadingKeys:tn(e.loadingKeys,n)}}),e.loadingRetryTimes[n]=(e.loadingRetryTimes[n]||0)+1,e.loadingRetryTimes[n]>=10){var i=e.state.loadedKeys;(0,I.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:tr(i,n)}),r()}o(t)}),{loadingKeys:tr(c,n)}):null})});return r.catch(function(){}),r},e.onNodeMouseEnter=function(t,n){var r=e.props.onMouseEnter;null==r||r({event:t,node:n})},e.onNodeMouseLeave=function(t,n){var r=e.props.onMouseLeave;null==r||r({event:t,node:n})},e.onNodeContextMenu=function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))},e.onFocus=function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t||t.apply(void 0,r)},e.onBlur=function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t||t.apply(void 0,r)},e.getTreeNodeRequiredProps=function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}},e.setExpandedKeys=function(t){var n=e.state,r=e6(n.treeData,t,n.fieldNames);e.setUncontrolledState({expandedKeys:t,flattenNodes:r},!0)},e.onNodeExpand=function(t,n){var r=e.state.expandedKeys,o=e.state,i=o.listChanging,a=o.fieldNames,l=e.props,c=l.onExpand,s=l.loadData,u=n.expanded,d=n[a.key];if(!i){var f=r.indexOf(d),p=!u;if((0,I.ZP)(u&&-1!==f||!u&&-1===f,"Expand state not sync with index check"),r=p?tr(r,d):tn(r,d),e.setExpandedKeys(r),null==c||c(r,{node:n,expanded:p,nativeEvent:t.nativeEvent}),p&&s){var h=e.onNodeLoad(n);h&&h.then(function(){var t=e6(e.state.treeData,r,a);e.setUncontrolledState({flattenNodes:t})}).catch(function(){var t=tn(e.state.expandedKeys,d);e.setExpandedKeys(t)})}}},e.onListChangeStart=function(){e.setUncontrolledState({listChanging:!0})},e.onListChangeEnd=function(){setTimeout(function(){e.setUncontrolledState({listChanging:!1})})},e.onActiveChange=function(t){var n=e.state.activeKey,r=e.props,o=r.onActiveChange,i=r.itemScrollOffset;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:void 0===i?0:i}),null==o||o(t))},e.getActiveItem=function(){var t=e.state,n=t.activeKey,r=t.flattenNodes;return null===n?null:r.find(function(e){return e.key===n})||null},e.offsetActiveKey=function(t){var n=e.state,r=n.flattenNodes,o=n.activeKey,i=r.findIndex(function(e){return e.key===o});-1===i&&t<0&&(i=r.length),i=(i+t+r.length)%r.length;var a=r[i];if(a){var l=a.key;e.onActiveChange(l)}else e.onActiveChange(null)},e.onKeyDown=function(t){var n=e.state,r=n.activeKey,o=n.expandedKeys,i=n.checkedKeys,a=n.fieldNames,l=e.props,c=l.onKeyDown,s=l.checkable,u=l.selectable;switch(t.which){case t6.Z.UP:e.offsetActiveKey(-1),t.preventDefault();break;case t6.Z.DOWN:e.offsetActiveKey(1),t.preventDefault()}var d=e.getActiveItem();if(d&&d.data){var f=e.getTreeNodeRequiredProps(),p=!1===d.data.isLeaf||!!(d.data[a.children]||[]).length,h=e5((0,C.Z)((0,C.Z)({},e3(r,f)),{},{data:d.data,active:!0}));switch(t.which){case t6.Z.LEFT:p&&o.includes(r)?e.onNodeExpand({},h):d.parent&&e.onActiveChange(d.parent.key),t.preventDefault();break;case t6.Z.RIGHT:p&&!o.includes(r)?e.onNodeExpand({},h):d.children&&d.children.length&&e.onActiveChange(d.children[0].key),t.preventDefault();break;case t6.Z.ENTER:case t6.Z.SPACE:!s||h.disabled||!1===h.checkable||h.disableCheckbox?s||!u||h.disabled||!1===h.selectable||e.onNodeSelect({},h):e.onNodeCheck({},h,!i.includes(r))}}null==c||c(t)},e.setUncontrolledState=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var o=!1,i=!0,a={};Object.keys(t).forEach(function(n){if(n in e.props){i=!1;return}o=!0,a[n]=t[n]}),o&&(!n||i)&&e.setState((0,C.Z)((0,C.Z)({},a),r))}},e.scrollTo=function(t){e.listRef.current.scrollTo(t)},e}return(0,eK.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:void 0===n?0:n}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t,n=this.state,r=n.focused,o=n.flattenNodes,a=n.keyEntities,l=n.draggingNodeKey,c=n.activeKey,s=n.dropLevelOffset,u=n.dropContainerKey,d=n.dropTargetKey,f=n.dropPosition,p=n.dragOverNodeKey,h=n.indent,g=this.props,v=g.prefixCls,y=g.className,b=g.style,x=g.showLine,w=g.focusable,S=g.tabIndex,k=g.selectable,C=g.showIcon,j=g.icon,N=g.switcherIcon,M=g.draggable,I=g.checkable,R=g.checkStrictly,T=g.disabled,A=g.motion,_=g.loadData,D=g.filterTreeNode,Z=g.height,L=g.itemHeight,z=g.virtual,B=g.titleRender,F=g.dropIndicatorRender,H=g.onContextMenu,q=g.onScroll,W=g.direction,K=g.rootClassName,V=g.rootStyle,G=(0,U.Z)(this.props,{aria:!0,data:!0});return M&&(t="object"===(0,E.Z)(M)?M:"function"==typeof M?{nodeDraggable:M}:{}),i.createElement(eX.Provider,{value:{prefixCls:v,selectable:k,showIcon:C,icon:j,switcherIcon:N,draggable:t,draggingNodeKey:l,checkable:I,checkStrictly:R,disabled:T,keyEntities:a,dropLevelOffset:s,dropContainerKey:u,dropTargetKey:d,dropPosition:f,dragOverNodeKey:p,indent:h,direction:W,dropIndicatorRender:F,loadData:_,filterTreeNode:D,titleRender:B,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},i.createElement("div",{role:"tree",className:P()(v,y,K,(e={},(0,O.Z)(e,"".concat(v,"-show-line"),x),(0,O.Z)(e,"".concat(v,"-focused"),r),(0,O.Z)(e,"".concat(v,"-active-focused"),null!==c),e)),style:V},i.createElement(nY,(0,m.Z)({ref:this.listRef,prefixCls:v,style:b,data:o,disabled:T,selectable:k,checkable:!!I,motion:A,dragging:null!==l,height:Z,itemHeight:L,virtual:z,focusable:w,focused:r,tabIndex:void 0===S?0:S,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:H,onScroll:q},this.getTreeNodeRequiredProps(),G))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r,o=t.prevProps,i={prevProps:e};function a(t){return!o&&t in e||o&&o[t]!==e[t]}var l=t.fieldNames;if(a("fieldNames")&&(l=e1(e.fieldNames),i.fieldNames=l),a("treeData")?n=e.treeData:a("children")&&((0,I.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=e2(e.children)),n){i.treeData=n;var c=e4(n,{fieldNames:l});i.keyEntities=(0,C.Z)((0,O.Z)({},nK,nU),c.keyEntities)}var s=i.keyEntities||t.keyEntities;if(a("expandedKeys")||o&&a("autoExpandParent"))i.expandedKeys=e.autoExpandParent||!o&&e.defaultExpandParent?tc(e.expandedKeys,s):e.expandedKeys;else if(!o&&e.defaultExpandAll){var u=(0,C.Z)({},s);delete u[nK],i.expandedKeys=Object.keys(u).map(function(e){return u[e].key})}else!o&&e.defaultExpandedKeys&&(i.expandedKeys=e.autoExpandParent||e.defaultExpandParent?tc(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,n||i.expandedKeys){var d=e6(n||t.treeData,i.expandedKeys||t.expandedKeys,l);i.flattenNodes=d}if(e.selectable&&(a("selectedKeys")?i.selectedKeys=ta(e.selectedKeys,e):!o&&e.defaultSelectedKeys&&(i.selectedKeys=ta(e.defaultSelectedKeys,e))),e.checkable&&(a("checkedKeys")?r=tl(e.checkedKeys)||{}:!o&&e.defaultCheckedKeys?r=tl(e.defaultCheckedKeys)||{}:n&&(r=tl(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),r)){var f=r,p=f.checkedKeys,h=void 0===p?[]:p,m=f.halfCheckedKeys,g=void 0===m?[]:m;if(!e.checkStrictly){var v=td(h,!0,s);h=v.checkedKeys,g=v.halfCheckedKeys}i.checkedKeys=h,i.halfCheckedKeys=g}return a("loadedKeys")&&(i.loadedKeys=e.loadedKeys),i}}]),n}(i.Component);nQ.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case -1:o.top=0,o.left=-n*r;break;case 1:o.bottom=0,o.left=-n*r;break;case 0:o.bottom=0,o.left=r}return i.createElement("div",{style:o})},allowDrop:function(){return!0},expandAction:!1},nQ.TreeNode=tt;var nJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},n0=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:nJ}))}),n1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},n2=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:n1}))}),n6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},n4=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:n6}))}),n3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},n5=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:n3}))}),n8=n(68710),n7=n(63074);let n9=new tS.E4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),re=(e,t)=>({[".".concat(e,"-switcher-icon")]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:"transform ".concat(t.motionDurationSlow)}}}),rt=(e,t)=>({[".".concat(e,"-drop-indicator")]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:"".concat((0,tS.bf)(t.lineWidthBold)," solid ").concat(t.colorPrimary),borderRadius:"50%",content:'""'}}}),rn=(e,t)=>{let{treeCls:n,treeNodeCls:r,treeNodePadding:o,titleHeight:i,nodeSelectedBg:a,nodeHoverBg:l}=t,c=t.paddingXS;return{[n]:Object.assign(Object.assign({},(0,tk.Wf)(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:"background-color ".concat(t.motionDurationSlow),["&".concat(n,"-rtl")]:{["".concat(n,"-switcher")]:{"&_close":{["".concat(n,"-switcher-icon")]:{svg:{transform:"rotate(90deg)"}}}}},["&-focused:not(:hover):not(".concat(n,"-active-focused)")]:Object.assign({},(0,tk.oN)(t)),["".concat(n,"-list-holder-inner")]:{alignItems:"flex-start"},["&".concat(n,"-block-node")]:{["".concat(n,"-list-holder-inner")]:{alignItems:"stretch",["".concat(n,"-node-content-wrapper")]:{flex:"auto"},["".concat(r,".dragging")]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:"1px solid ".concat(t.colorPrimary),opacity:0,animationName:n9,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},["".concat(r)]:{display:"flex",alignItems:"flex-start",padding:"0 0 ".concat((0,tS.bf)(o)," 0"),outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{["".concat(n,"-node-content-wrapper")]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},["&-active ".concat(n,"-node-content-wrapper")]:{background:t.controlItemBgHover},["&:not(".concat(r,"-disabled).filter-node ").concat(n,"-title")]:{color:"inherit",fontWeight:500},"&-draggable":{cursor:"grab",["".concat(n,"-draggable-icon")]:{flexShrink:0,width:i,lineHeight:"".concat((0,tS.bf)(i)),textAlign:"center",visibility:"visible",opacity:.2,transition:"opacity ".concat(t.motionDurationSlow),["".concat(r,":hover &")]:{opacity:.45}},["&".concat(r,"-disabled")]:{["".concat(n,"-draggable-icon")]:{visibility:"hidden"}}}},["".concat(n,"-indent")]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},["".concat(n,"-draggable-icon")]:{visibility:"hidden"},["".concat(n,"-switcher")]:Object.assign(Object.assign({},re(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,margin:0,lineHeight:"".concat((0,tS.bf)(i)),textAlign:"center",cursor:"pointer",userSelect:"none",transition:"all ".concat(t.motionDurationSlow),borderRadius:t.borderRadius,"&-noop":{cursor:"unset"},["&:not(".concat(n,"-switcher-noop):hover")]:{backgroundColor:t.colorBgTextHover},"&_close":{["".concat(n,"-switcher-icon")]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:"1px solid ".concat(t.colorBorder),content:'""'}}}),["".concat(n,"-checkbox")]:{top:"initial",marginInlineEnd:c,alignSelf:"flex-start",marginTop:t.marginXXS},["".concat(n,"-node-content-wrapper, ").concat(n,"-checkbox + span")]:{position:"relative",zIndex:"auto",minHeight:i,margin:0,padding:"0 ".concat((0,tS.bf)(t.calc(t.paddingXS).div(2).equal())),color:"inherit",lineHeight:"".concat((0,tS.bf)(i)),background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:"all ".concat(t.motionDurationMid,", border 0s, line-height 0s, box-shadow 0s"),"&:hover":{backgroundColor:l},["&".concat(n,"-node-selected")]:{backgroundColor:a},["".concat(n,"-iconEle")]:{display:"inline-block",width:i,height:i,lineHeight:"".concat((0,tS.bf)(i)),textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},["".concat(n,"-unselectable ").concat(n,"-node-content-wrapper:hover")]:{backgroundColor:"transparent"},["".concat(n,"-node-content-wrapper")]:Object.assign({lineHeight:"".concat((0,tS.bf)(i)),userSelect:"none"},rt(e,t)),["".concat(r,".drop-container")]:{"> [draggable]":{boxShadow:"0 0 0 2px ".concat(t.colorPrimary)}},"&-show-line":{["".concat(n,"-indent")]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&-end":{"&:before":{display:"none"}}}},["".concat(n,"-switcher")]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},["".concat(r,"-leaf-last")]:{["".concat(n,"-switcher")]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:"".concat((0,tS.bf)(t.calc(i).div(2).equal())," !important")}}}}})}},rr=e=>{let{treeCls:t,treeNodeCls:n,treeNodePadding:r,directoryNodeSelectedBg:o,directoryNodeSelectedColor:i}=e;return{["".concat(t).concat(t,"-directory")]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,transition:"background-color ".concat(e.motionDurationMid),content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},["".concat(t,"-switcher")]:{transition:"color ".concat(e.motionDurationMid)},["".concat(t,"-node-content-wrapper")]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},["&".concat(t,"-node-selected")]:{color:i,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:o},["".concat(t,"-switcher")]:{color:i},["".concat(t,"-node-content-wrapper")]:{color:i,background:"transparent"}}}}}},ro=(e,t)=>{let n=".".concat(e),r=t.calc(t.paddingXS).div(2).equal(),o=(0,tE.TS)(t,{treeCls:n,treeNodeCls:"".concat(n,"-treenode"),treeNodePadding:r});return[rn(e,o),rr(o)]},ri=e=>{let{controlHeightSM:t}=e;return{titleHeight:t,nodeHoverBg:e.controlItemBgHover,nodeSelectedBg:e.controlItemBgActive}};var ra=(0,tC.I$)("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:tj("".concat(n,"-checkbox"),e)},ro(n,e),(0,n7.Z)(e)]},e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},ri(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})});function rl(e){let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:o,direction:a="ltr"}=e,l="ltr"===a?"left":"right",c={[l]:-n*o+4,["ltr"===a?"right":"left"]:0};switch(t){case -1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[l]=o+4}return i.createElement("div",{style:c,className:"".concat(r,"-drop-indicator")})}var rc={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},rs=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:rc}))}),ru=n(61935),rd={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},rf=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:rd}))}),rp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},rh=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:rp}))}),rm=n(19722),rg=e=>{let t;let{prefixCls:n,switcherIcon:r,treeNodeProps:o,showLine:a}=e,{isLeaf:l,expanded:c,loading:s}=o;if(s)return i.createElement(ru.Z,{className:"".concat(n,"-switcher-loading-icon")});if(a&&"object"==typeof a&&(t=a.showLeafIcon),l){if(!a)return null;if("boolean"!=typeof t&&t){let e="function"==typeof t?t(o):t;return(0,rm.l$)(e)?(0,rm.Tm)(e,{className:P()(e.props.className||"","".concat(n,"-switcher-line-custom-icon"))}):e}return t?i.createElement(n0,{className:"".concat(n,"-switcher-line-icon")}):i.createElement("span",{className:"".concat(n,"-switcher-leaf-line")})}let u="".concat(n,"-switcher-icon"),d="function"==typeof r?r(o):r;return(0,rm.l$)(d)?(0,rm.Tm)(d,{className:P()(d.props.className||"",u)}):void 0!==d?d:a?c?i.createElement(rf,{className:"".concat(n,"-switcher-line-icon")}):i.createElement(rh,{className:"".concat(n,"-switcher-line-icon")}):i.createElement(rs,{className:u})};let rv=i.forwardRef((e,t)=>{var n;let{getPrefixCls:r,direction:o,virtual:a,tree:l}=i.useContext(tv.E_),{prefixCls:c,className:s,showIcon:u=!1,showLine:d,switcherIcon:f,blockNode:p=!1,children:h,checkable:m=!1,selectable:g=!0,draggable:v,motion:y,style:b}=e,x=r("tree",c),w=r(),S=null!=y?y:Object.assign(Object.assign({},(0,n8.Z)(w)),{motionAppear:!1}),k=Object.assign(Object.assign({},e),{checkable:m,selectable:g,showIcon:u,motion:S,blockNode:p,showLine:!!d,dropIndicatorRender:rl}),[E,C,O]=ra(x),[,j]=(0,nw.ZP)(),N=j.paddingXS/2+((null===(n=j.Tree)||void 0===n?void 0:n.titleHeight)||j.controlHeightSM),M=i.useMemo(()=>{if(!v)return!1;let e={};switch(typeof v){case"function":e.nodeDraggable=v;break;case"object":e=Object.assign({},v)}return!1!==e.icon&&(e.icon=e.icon||i.createElement(n5,null)),e},[v]);return E(i.createElement(nQ,Object.assign({itemHeight:N,ref:t,virtual:a},k,{style:Object.assign(Object.assign({},null==l?void 0:l.style),b),prefixCls:x,className:P()({["".concat(x,"-icon-hide")]:!u,["".concat(x,"-block-node")]:p,["".concat(x,"-unselectable")]:!g,["".concat(x,"-rtl")]:"rtl"===o},null==l?void 0:l.className,s,C,O),direction:o,checkable:m?i.createElement("span",{className:"".concat(x,"-checkbox-inner")}):m,selectable:g,switcherIcon:e=>i.createElement(rg,{prefixCls:x,switcherIcon:f,treeNodeProps:e,showLine:d}),draggable:M}),h))});function ry(e,t,n){let{key:r,children:o}=n;e.forEach(function(e){let i=e[r],a=e[o];!1!==t(i,e)&&ry(a||[],t,n)})}(r=o||(o={}))[r.None=0]="None",r[r.Start=1]="Start",r[r.End=2]="End";var rb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function rx(e){let{isLeaf:t,expanded:n}=e;return t?i.createElement(n0,null):n?i.createElement(n2,null):i.createElement(n4,null)}function rw(e){let{treeData:t,children:n}=e;return t||e2(n)}let rS=i.forwardRef((e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,l=rb(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);let c=i.useRef(),s=i.useRef(),u=()=>{let{keyEntities:e}=e4(rw(l));return n?Object.keys(e):r?tc(l.expandedKeys||a||[],e):l.expandedKeys||a},[d,f]=i.useState(l.selectedKeys||l.defaultSelectedKeys||[]),[p,h]=i.useState(()=>u());i.useEffect(()=>{"selectedKeys"in l&&f(l.selectedKeys)},[l.selectedKeys]),i.useEffect(()=>{"expandedKeys"in l&&h(l.expandedKeys)},[l.expandedKeys]);let{getPrefixCls:m,direction:g}=i.useContext(tv.E_),{prefixCls:v,className:y,showIcon:b=!0,expandAction:x="click"}=l,w=rb(l,["prefixCls","className","showIcon","expandAction"]),S=m("tree",v),k=P()("".concat(S,"-directory"),{["".concat(S,"-directory-rtl")]:"rtl"===g},y);return i.createElement(rv,Object.assign({icon:rx,ref:t,blockNode:!0},w,{showIcon:b,expandAction:x,prefixCls:S,className:k,expandedKeys:p,selectedKeys:d,onSelect:(e,t)=>{var n;let r;let{multiple:i,fieldNames:a}=l,{node:u,nativeEvent:d}=t,{key:h=""}=u,m=rw(l),g=Object.assign(Object.assign({},t),{selected:!0}),v=(null==d?void 0:d.ctrlKey)||(null==d?void 0:d.metaKey),y=null==d?void 0:d.shiftKey;i&&v?(r=e,c.current=h,s.current=r):i&&y?r=Array.from(new Set([].concat((0,ec.Z)(s.current||[]),(0,ec.Z)(function(e){let{treeData:t,expandedKeys:n,startKey:r,endKey:i,fieldNames:a}=e,l=[],c=o.None;return r&&r===i?[r]:r&&i?(ry(t,e=>{if(c===o.End)return!1;if(e===r||e===i){if(l.push(e),c===o.None)c=o.Start;else if(c===o.Start)return c=o.End,!1}else c===o.Start&&l.push(e);return n.includes(e)},e1(a)),l):[]}({treeData:m,expandedKeys:p,startKey:h,endKey:c.current,fieldNames:a}))))):(r=[h],c.current=h,s.current=r),g.selectedNodes=function(e,t,n){let r=(0,ec.Z)(t),o=[];return ry(e,(e,t)=>{let n=r.indexOf(e);return -1!==n&&(o.push(t),r.splice(n,1)),!!r.length},e1(n)),o}(m,r,a),null===(n=l.onSelect)||void 0===n||n.call(l,r,g),"selectedKeys"in l||f(r)},onExpand:(e,t)=>{var n;return"expandedKeys"in l||h(e),null===(n=l.onExpand)||void 0===n?void 0:n.call(l,e,t)}}))});rv.DirectoryTree=rS,rv.TreeNode=tt;var rk=n(29436),rE=n(56632),rC=function(e){let{value:t,onChange:n,filterSearch:r,tablePrefixCls:o,locale:a}=e;return r?i.createElement("div",{className:"".concat(o,"-filter-dropdown-search")},i.createElement(rE.Z,{prefix:i.createElement(rk.Z,null),placeholder:a.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,className:"".concat(o,"-filter-dropdown-search-input")})):null};let rO=e=>{let{keyCode:t}=e;t===t6.Z.ENTER&&e.stopPropagation()},rj=i.forwardRef((e,t)=>i.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:rO,ref:t},e.children));function rP(e){let t=[];return(e||[]).forEach(e=>{let{value:n,children:r}=e;t.push(n),r&&(t=[].concat((0,ec.Z)(t),(0,ec.Z)(rP(r))))}),t}function rN(e,t){return("string"==typeof t||"number"==typeof t)&&(null==t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}var rM=function(e){var t,n;let r,o;let{tablePrefixCls:a,prefixCls:l,column:c,dropdownPrefixCls:s,columnKey:u,filterMultiple:f,filterMode:p="menu",filterSearch:h=!1,filterState:m,triggerFilter:g,locale:v,children:y,getPopupContainer:b,rootClassName:x}=e,{filterDropdownOpen:w,onFilterDropdownOpenChange:S,filterResetToDefaultFilteredValue:k,defaultFilteredValue:E,filterDropdownVisible:C,onFilterDropdownVisibleChange:O}=c,[j,N]=i.useState(!1),M=!!(m&&((null===(t=m.filteredKeys)||void 0===t?void 0:t.length)||m.forceFiltered)),I=e=>{N(e),null==S||S(e),null==O||O(e)},R=null!==(n=null!=w?w:C)&&void 0!==n?n:j,T=null==m?void 0:m.filteredKeys,[A,_]=function(e){let t=i.useRef(e),n=(0,tV.Z)();return[()=>t.current,e=>{t.current=e,n()}]}(T||[]),D=e=>{let{selectedKeys:t}=e;_(t)};i.useEffect(()=>{j&&D({selectedKeys:T||[]})},[T]);let[Z,L]=i.useState([]),[z,B]=i.useState(""),F=e=>{let{value:t}=e.target;B(t)};i.useEffect(()=>{j||B("")},[j]);let H=e=>{let t=e&&e.length?e:null;if(null===t&&(!m||!m.filteredKeys)||(0,d.Z)(t,null==m?void 0:m.filteredKeys,!0))return null;g({column:c,key:u,filteredKeys:t})},q=()=>{I(!1),H(A())},W=function(){let{confirm:e,closeDropdown:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{confirm:!1,closeDropdown:!1};e&&H([]),t&&I(!1),B(""),k?_((E||[]).map(e=>String(e))):_([])},K=P()({["".concat(s,"-menu-without-submenu")]:!(c.filters||[]).some(e=>{let{children:t}=e;return t})}),V=e=>{let{filters:t}=e;return(t||[]).map((e,t)=>{let n=String(e.value),r={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(r.children=V({filters:e.children})),r})},U=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map(e=>U(e)))||[]})};if("function"==typeof c.filterDropdown)r=c.filterDropdown({prefixCls:"".concat(s,"-custom"),setSelectedKeys:e=>D({selectedKeys:e}),selectedKeys:A(),confirm:function(){let{closeDropdown:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{closeDropdown:!0};e&&I(!1),H(A())},clearFilters:W,filters:c.filters,visible:R,close:()=>{I(!1)}});else if(c.filterDropdown)r=c.filterDropdown;else{let e=A()||[];r=i.createElement(i.Fragment,null,0===(c.filters||[]).length?i.createElement(nT.Z,{image:nT.Z.PRESENTED_IMAGE_SIMPLE,description:v.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):"tree"===p?i.createElement(i.Fragment,null,i.createElement(rC,{filterSearch:h,value:z,onChange:F,tablePrefixCls:a,locale:v}),i.createElement("div",{className:"".concat(a,"-filter-dropdown-tree")},f?i.createElement(tM,{checked:e.length===rP(c.filters).length,indeterminate:e.length>0&&e.length<rP(c.filters).length,className:"".concat(a,"-filter-dropdown-checkall"),onChange:e=>{e.target.checked?_(rP(null==c?void 0:c.filters).map(e=>String(e))):_([])}},v.filterCheckall):null,i.createElement(rv,{checkable:!0,selectable:!1,blockNode:!0,multiple:f,checkStrictly:!f,className:"".concat(s,"-menu"),onCheck:(e,t)=>{let{node:n,checked:r}=t;f?D({selectedKeys:e}):D({selectedKeys:r&&n.key?[n.key]:[]})},checkedKeys:e,selectedKeys:e,showIcon:!1,treeData:V({filters:c.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:z.trim()?e=>"function"==typeof h?h(z,U(e)):rN(z,e.title):void 0}))):i.createElement(i.Fragment,null,i.createElement(rC,{filterSearch:h,value:z,onChange:F,tablePrefixCls:a,locale:v}),i.createElement(nA.Z,{selectable:!0,multiple:f,prefixCls:"".concat(s,"-menu"),className:K,onSelect:D,onDeselect:D,selectedKeys:e,getPopupContainer:b,openKeys:Z,onOpenChange:e=>{L(e)},items:function e(t){let{filters:n,prefixCls:r,filteredKeys:o,filterMultiple:a,searchValue:l,filterSearch:c}=t;return n.map((t,n)=>{let s=String(t.value);if(t.children)return{key:s||n,label:t.text,popupClassName:"".concat(r,"-dropdown-submenu"),children:e({filters:t.children,prefixCls:r,filteredKeys:o,filterMultiple:a,searchValue:l,filterSearch:c})};let u=a?tM:tA.ZP,d={key:void 0!==t.value?s:n,label:i.createElement(i.Fragment,null,i.createElement(u,{checked:o.includes(s)}),i.createElement("span",null,t.text))};return l.trim()?"function"==typeof c?c(l,t)?d:null:rN(l,t.text)?d:null:d})}({filters:c.filters||[],filterSearch:h,prefixCls:l,filteredKeys:A(),filterMultiple:f,searchValue:z})})),i.createElement("div",{className:"".concat(l,"-dropdown-btns")},i.createElement(nR.ZP,{type:"link",size:"small",disabled:k?(0,d.Z)((E||[]).map(e=>String(e)),e,!0):0===e.length,onClick:()=>W()},v.filterReset),i.createElement(nR.ZP,{type:"primary",size:"small",onClick:q},v.filterConfirm)))}c.filterDropdown&&(r=i.createElement(n_.J,{selectable:void 0},r)),o="function"==typeof c.filterIcon?c.filterIcon(M):c.filterIcon?c.filterIcon:i.createElement(nI,null);let{direction:G}=i.useContext(tv.E_);return i.createElement("div",{className:"".concat(l,"-column")},i.createElement("span",{className:"".concat(a,"-column-title")},y),i.createElement(tT.Z,{dropdownRender:()=>i.createElement(rj,{className:"".concat(l,"-dropdown")},r),trigger:["click"],open:R,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==T&&_(T||[]),I(e),e||c.filterDropdown||q())},getPopupContainer:b,placement:"rtl"===G?"bottomLeft":"bottomRight",rootClassName:x},i.createElement("span",{role:"button",tabIndex:-1,className:P()("".concat(l,"-trigger"),{active:M}),onClick:e=>{e.stopPropagation()}},o)))};function rI(e,t,n){let r=[];return(e||[]).forEach((e,o)=>{var i;let a=nP(o,n);if(e.filters||"filterDropdown"in e||"onFilter"in e){if("filteredValue"in e){let t=e.filteredValue;"filterDropdown"in e||(t=null!==(i=null==t?void 0:t.map(String))&&void 0!==i?i:t),r.push({column:e,key:nj(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:nj(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered})}"children"in e&&(r=[].concat((0,ec.Z)(r),(0,ec.Z)(rI(e.children,t,a))))}),r}function rR(e){let t={};return e.forEach(e=>{let{key:n,filteredKeys:r,column:o}=e,{filters:i,filterDropdown:a}=o;if(a)t[n]=r||null;else if(Array.isArray(r)){let e=rP(i);t[n]=e.filter(e=>r.includes(String(e)))}else t[n]=null}),t}function rT(e,t){return t.reduce((e,t)=>{let{column:{onFilter:n,filters:r},filteredKeys:o}=t;return n&&o&&o.length?e.filter(e=>o.some(t=>{let o=rP(r),i=o.findIndex(e=>String(e)===String(t));return n(-1!==i?o[i]:t,e)})):e},e)}let rA=e=>e.flatMap(e=>"children"in e?[e].concat((0,ec.Z)(rA(e.children||[]))):[e]);var r_=function(e){let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:o,getPopupContainer:a,locale:l,rootClassName:c}=e;(0,tp.ln)("Table");let s=i.useMemo(()=>rA(r||[]),[r]),[u,d]=i.useState(()=>rI(s,!0)),f=i.useMemo(()=>{let e=rI(s,!1);if(0===e.length)return e;let t=!0;if(e.forEach(e=>{let{filteredKeys:n}=e;void 0!==n&&(t=!1)}),t){let e=(s||[]).map((e,t)=>nj(e,nP(t)));return u.filter(t=>{let{key:n}=t;return e.includes(n)}).map(t=>{let n=s[e.findIndex(e=>e===t.key)];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})})}return e},[s,u]),p=i.useMemo(()=>rR(f),[f]),h=e=>{let t=f.filter(t=>{let{key:n}=t;return n!==e.key});t.push(e),d(t),o(rR(t),t)};return[e=>(function e(t,n,r,o,a,l,c,s,u){return r.map((r,d)=>{let f=nP(d,s),{filterMultiple:p=!0,filterMode:h,filterSearch:m}=r,g=r;if(g.filters||g.filterDropdown){let e=nj(g,f),s=o.find(t=>{let{key:n}=t;return e===n});g=Object.assign(Object.assign({},g),{title:o=>i.createElement(rM,{tablePrefixCls:t,prefixCls:"".concat(t,"-filter"),dropdownPrefixCls:n,column:g,columnKey:e,filterState:s,filterMultiple:p,filterMode:h,filterSearch:m,triggerFilter:l,locale:a,getPopupContainer:c,rootClassName:u},nN(r.title,o))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:e(t,n,g.children,o,a,l,c,f,u)})),g})})(t,n,e,f,l,h,a,void 0,c),f,p]},rD=function(){let e=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t<arguments.length;t++){let n=t<0||arguments.length<=t?void 0:arguments[t];n&&Object.keys(n).forEach(t=>{let r=n[t];void 0!==r&&(e[t]=r)})}return e},rZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},rL=function(e,t,n){let r=n&&"object"==typeof n?n:{},{total:o=0}=r,a=rZ(r,["total"]),[l,c]=(0,i.useState)(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:10})),s=rD(l,a,{total:o>0?o:e}),u=Math.ceil((o||e)/s.pageSize);s.current>u&&(s.current=u||1);let d=(e,t)=>{c({current:null!=e?e:1,pageSize:t||s.pageSize})};return!1===n?[{},()=>{}]:[Object.assign(Object.assign({},s),{onChange:(e,r)=>{var o;n&&(null===(o=n.onChange)||void 0===o||o.call(n,e,r)),d(e,r),t(e,r||(null==s?void 0:s.pageSize))}}),d]},rz={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},rB=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:rz}))}),rF={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},rH=i.forwardRef(function(e,t){return i.createElement(tY.Z,(0,m.Z)({},e,{ref:t,icon:rF}))}),rq=n(75957);let rW="ascend",rK="descend";function rV(e){return"object"==typeof e.sorter&&"number"==typeof e.sorter.multiple&&e.sorter.multiple}function rU(e){return"function"==typeof e?e:!!e&&"object"==typeof e&&!!e.compare&&e.compare}function rG(e,t,n){let r=[];function o(e,t){r.push({column:e,key:nj(e,t),multiplePriority:rV(e),sortOrder:e.sortOrder})}return(e||[]).forEach((e,i)=>{let a=nP(i,n);e.children?("sortOrder"in e&&o(e,a),r=[].concat((0,ec.Z)(r),(0,ec.Z)(rG(e.children,t,a)))):e.sorter&&("sortOrder"in e?o(e,a):t&&e.defaultSortOrder&&r.push({column:e,key:nj(e,a),multiplePriority:rV(e),sortOrder:e.defaultSortOrder}))}),r}function rX(e){let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function r$(e){let t=e.filter(e=>{let{sortOrder:t}=e;return t}).map(rX);return 0===t.length&&e.length?Object.assign(Object.assign({},rX(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function rY(e,t,n){let r=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),o=e.slice(),i=r.filter(e=>{let{column:{sorter:t},sortOrder:n}=e;return rU(t)&&n});return i.length?o.sort((e,t)=>{for(let n=0;n<i.length;n+=1){let{column:{sorter:r},sortOrder:o}=i[n],a=rU(r);if(a&&o){let n=a(e,t,o);if(0!==n)return o===rW?n:-n}}return 0}).map(e=>{let r=e[n];return r?Object.assign(Object.assign({},e),{[n]:rY(r,t,n)}):e}):o}var rQ=x(eR,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),rJ=x(eH,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),r0=n(36360),r1=e=>{let{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:o,tableHeaderBg:i,tablePaddingVertical:a,tablePaddingHorizontal:l,calc:c}=e,s="".concat((0,tS.bf)(n)," ").concat(r," ").concat(o),u=(e,r,o)=>({["&".concat(t,"-").concat(e)]:{["> ".concat(t,"-container")]:{["> ".concat(t,"-content, > ").concat(t,"-body")]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,tS.bf)(c(r).mul(-1).equal()),"\n ").concat((0,tS.bf)(c(c(o).add(n)).mul(-1).equal()))}}}}}});return{["".concat(t,"-wrapper")]:{["".concat(t).concat(t,"-bordered")]:Object.assign(Object.assign(Object.assign({["> ".concat(t,"-title")]:{border:s,borderBottom:0},["> ".concat(t,"-container")]:{borderInlineStart:s,borderTop:s,["\n > ".concat(t,"-content,\n > ").concat(t,"-header,\n > ").concat(t,"-body,\n > ").concat(t,"-summary\n ")]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:s},"> thead":{"> tr:not(:last-child) > th":{borderBottom:s},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{["> ".concat(t,"-cell-fix-right-first::after")]:{borderInlineEnd:s}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,tS.bf)(c(a).mul(-1).equal())," ").concat((0,tS.bf)(c(c(l).add(n)).mul(-1).equal())),"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:s,content:'""'}}}}}},["&".concat(t,"-scroll-horizontal")]:{["> ".concat(t,"-container > ").concat(t,"-body")]:{"> table > tbody":{["\n > tr".concat(t,"-expanded-row,\n > tr").concat(t,"-placeholder\n ")]:{"> th, > td":{borderInlineEnd:0}}}}}},u("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),u("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{["> ".concat(t,"-footer")]:{border:s,borderTop:0}}),["".concat(t,"-cell")]:{["".concat(t,"-container:first-child")]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:"0 ".concat((0,tS.bf)(n)," 0 ").concat((0,tS.bf)(n)," ").concat(i)}},["".concat(t,"-bordered ").concat(t,"-cell-scrollbar")]:{borderInlineEnd:s}}}},r2=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-cell-ellipsis")]:Object.assign(Object.assign({},tk.vS),{wordBreak:"keep-all",["\n &".concat(t,"-cell-fix-left-last,\n &").concat(t,"-cell-fix-right-first\n ")]:{overflow:"visible",["".concat(t,"-cell-content")]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},["".concat(t,"-column-title")]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},r6=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody > tr").concat(t,"-placeholder")]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},r4=n(76122),r3=e=>{let{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:o,paddingXS:i,lineType:a,tableBorderColor:l,tableExpandIconBg:c,tableExpandColumnWidth:s,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:h,expandIconMarginTop:m,expandIconSize:g,expandIconHalfInner:v,expandIconScale:y,calc:b}=e,x="".concat((0,tS.bf)(o)," ").concat(a," ").concat(l),w=b(h).sub(o).equal();return{["".concat(t,"-wrapper")]:{["".concat(t,"-expand-icon-col")]:{width:s},["".concat(t,"-row-expand-icon-cell")]:{textAlign:"center",["".concat(t,"-row-expand-icon")]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},["".concat(t,"-row-indent")]:{height:1,float:"left"},["".concat(t,"-row-expand-icon")]:Object.assign(Object.assign({},(0,r4.N)(e)),{position:"relative",float:"left",boxSizing:"border-box",width:g,height:g,padding:0,color:"inherit",lineHeight:(0,tS.bf)(g),background:c,border:x,borderRadius:u,transform:"scale(".concat(y,")"),transition:"all ".concat(r),userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:"transform ".concat(r," ease-out"),content:'""'},"&::before":{top:v,insetInlineEnd:w,insetInlineStart:w,height:o},"&::after":{top:w,bottom:w,insetInlineStart:v,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),["".concat(t,"-row-indent + ").concat(t,"-row-expand-icon")]:{marginTop:m,marginInlineEnd:i},["tr".concat(t,"-expanded-row")]:{"&, &:hover":{"> th, > td":{background:p}},["".concat(n,"-descriptions-view")]:{display:"flex",table:{flex:"auto",width:"auto"}}},["".concat(t,"-expanded-row-fixed")]:{position:"relative",margin:"".concat((0,tS.bf)(b(d).mul(-1).equal())," ").concat((0,tS.bf)(b(f).mul(-1).equal())),padding:"".concat((0,tS.bf)(d)," ").concat((0,tS.bf)(f))}}}},r5=e=>{let{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:i,paddingXXS:a,paddingXS:l,colorText:c,lineWidth:s,lineType:u,tableBorderColor:d,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:h,borderRadius:m,motionDurationSlow:g,colorTextDescription:v,colorPrimary:y,tableHeaderFilterActiveBg:b,colorTextDisabled:x,tableFilterDropdownBg:w,tableFilterDropdownHeight:S,controlItemBgHover:k,controlItemBgActive:E,boxShadowSecondary:C,filterDropdownMenuBg:O,calc:j}=e,P="".concat(n,"-dropdown"),N="".concat(t,"-filter-dropdown"),M="".concat(n,"-tree"),I="".concat((0,tS.bf)(s)," ").concat(u," ").concat(d);return[{["".concat(t,"-wrapper")]:{["".concat(t,"-filter-column")]:{display:"flex",justifyContent:"space-between"},["".concat(t,"-filter-trigger")]:{position:"relative",display:"flex",alignItems:"center",marginBlock:j(a).mul(-1).equal(),marginInline:"".concat((0,tS.bf)(a)," ").concat((0,tS.bf)(j(h).div(2).mul(-1).equal())),padding:"0 ".concat((0,tS.bf)(a)),color:f,fontSize:p,borderRadius:m,cursor:"pointer",transition:"all ".concat(g),"&:hover":{color:v,background:b},"&.active":{color:y}}}},{["".concat(n,"-dropdown")]:{[N]:Object.assign(Object.assign({},(0,tk.Wf)(e)),{minWidth:o,backgroundColor:w,borderRadius:m,boxShadow:C,overflow:"hidden",["".concat(P,"-menu")]:{maxHeight:S,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:O,"&:empty::after":{display:"block",padding:"".concat((0,tS.bf)(l)," 0"),color:x,fontSize:p,textAlign:"center",content:'"Not Found"'}},["".concat(N,"-tree")]:{paddingBlock:"".concat((0,tS.bf)(l)," 0"),paddingInline:l,[M]:{padding:0},["".concat(M,"-treenode ").concat(M,"-node-content-wrapper:hover")]:{backgroundColor:k},["".concat(M,"-treenode-checkbox-checked ").concat(M,"-node-content-wrapper")]:{"&, &:hover":{backgroundColor:E}}},["".concat(N,"-search")]:{padding:l,borderBottom:I,"&-input":{input:{minWidth:i},[r]:{color:x}}},["".concat(N,"-checkall")]:{width:"100%",marginBottom:a,marginInlineStart:a},["".concat(N,"-btns")]:{display:"flex",justifyContent:"space-between",padding:"".concat((0,tS.bf)(j(l).sub(s).equal())," ").concat((0,tS.bf)(l)),overflow:"hidden",borderTop:I}})}},{["".concat(n,"-dropdown ").concat(N,", ").concat(N,"-submenu")]:{["".concat(n,"-checkbox-wrapper + span")]:{paddingInlineStart:l,color:c},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},r8=e=>{let{componentCls:t,lineWidth:n,colorSplit:r,motionDurationSlow:o,zIndexTableFixed:i,tableBg:a,zIndexTableSticky:l,calc:c}=e;return{["".concat(t,"-wrapper")]:{["\n ".concat(t,"-cell-fix-left,\n ").concat(t,"-cell-fix-right\n ")]:{position:"sticky !important",zIndex:i,background:a},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:c(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},["".concat(t,"-cell-fix-left-all::after")]:{display:"none"},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{position:"absolute",top:0,bottom:c(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},["".concat(t,"-container")]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:c(l).add(1).equal({unit:!1}),width:30,transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},["".concat(t,"-ping-left")]:{["&:not(".concat(t,"-has-fix-left) ").concat(t,"-container::before")]:{boxShadow:"inset 10px 0 8px -8px ".concat(r)},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{boxShadow:"inset 10px 0 8px -8px ".concat(r)},["".concat(t,"-cell-fix-left-last::before")]:{backgroundColor:"transparent !important"}},["".concat(t,"-ping-right")]:{["&:not(".concat(t,"-has-fix-right) ").concat(t,"-container::after")]:{boxShadow:"inset -10px 0 8px -8px ".concat(r)},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{boxShadow:"inset -10px 0 8px -8px ".concat(r)}}}}},r7=e=>{let{componentCls:t,antCls:n,margin:r}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-pagination").concat(n,"-pagination")]:{margin:"".concat((0,tS.bf)(r)," 0")},["".concat(t,"-pagination")]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},r9=e=>{let{componentCls:t,tableRadius:n}=e;return{["".concat(t,"-wrapper")]:{[t]:{["".concat(t,"-title, ").concat(t,"-header")]:{borderRadius:"".concat((0,tS.bf)(n)," ").concat((0,tS.bf)(n)," 0 0")},["".concat(t,"-title + ").concat(t,"-container")]:{borderStartStartRadius:0,borderStartEndRadius:0,["".concat(t,"-header, table")]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:"0 0 ".concat((0,tS.bf)(n)," ").concat((0,tS.bf)(n))}}}}},oe=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper-rtl")]:{direction:"rtl",table:{direction:"rtl"},["".concat(t,"-pagination-left")]:{justifyContent:"flex-end"},["".concat(t,"-pagination-right")]:{justifyContent:"flex-start"},["".concat(t,"-row-expand-icon")]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},["".concat(t,"-container")]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},["".concat(t,"-row-indent")]:{float:"right"}}}}},ot=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:o,padding:i,paddingXS:a,headerIconColor:l,headerIconHoverColor:c,tableSelectionColumnWidth:s,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:h}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-selection-col")]:{width:s,["&".concat(t,"-selection-col-with-dropdown")]:{width:h(s).add(o).add(h(i).div(4)).equal()}},["".concat(t,"-bordered ").concat(t,"-selection-col")]:{width:h(s).add(h(a).mul(2)).equal(),["&".concat(t,"-selection-col-with-dropdown")]:{width:h(s).add(o).add(h(i).div(4)).add(h(a).mul(2)).equal()}},["\n table tr th".concat(t,"-selection-column,\n table tr td").concat(t,"-selection-column,\n ").concat(t,"-selection-column\n ")]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",["".concat(n,"-radio-wrapper")]:{marginInlineEnd:0}},["table tr th".concat(t,"-selection-column").concat(t,"-cell-fix-left")]:{zIndex:e.zIndexTableFixed+1},["table tr th".concat(t,"-selection-column::after")]:{backgroundColor:"transparent !important"},["".concat(t,"-selection")]:{position:"relative",display:"inline-flex",flexDirection:"column"},["".concat(t,"-selection-extra")]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),marginInlineStart:"100%",paddingInlineStart:(0,tS.bf)(h(p).div(4).equal()),[r]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:c}}},["".concat(t,"-tbody")]:{["".concat(t,"-row")]:{["&".concat(t,"-row-selected")]:{["> ".concat(t,"-cell")]:{background:u,"&-row-hover":{background:d}}},["> ".concat(t,"-cell-row-hover")]:{background:f}}}}}},on=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,o=(e,o,i,a)=>({["".concat(t).concat(t,"-").concat(e)]:{fontSize:a,["\n ".concat(t,"-title,\n ").concat(t,"-footer,\n ").concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{padding:"".concat((0,tS.bf)(o)," ").concat((0,tS.bf)(i))},["".concat(t,"-filter-trigger")]:{marginInlineEnd:(0,tS.bf)(r(i).div(2).mul(-1).equal())},["".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,tS.bf)(r(o).mul(-1).equal())," ").concat((0,tS.bf)(r(i).mul(-1).equal()))},["".concat(t,"-tbody")]:{["".concat(t,"-wrapper:only-child ").concat(t)]:{marginBlock:(0,tS.bf)(r(o).mul(-1).equal()),marginInline:"".concat((0,tS.bf)(r(n).sub(i).equal())," ").concat((0,tS.bf)(r(i).mul(-1).equal()))}},["".concat(t,"-selection-extra")]:{paddingInlineStart:(0,tS.bf)(r(i).div(4).equal())}}});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},or=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:o,headerIconHoverColor:i}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-thead th").concat(t,"-column-has-sorters")]:{outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},["\n &".concat(t,"-cell-fix-left:hover,\n &").concat(t,"-cell-fix-right:hover\n ")]:{background:e.tableFixedHeaderSortActiveBg}},["".concat(t,"-thead th").concat(t,"-column-sort")]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},["td".concat(t,"-column-sort")]:{background:e.tableBodySortBg},["".concat(t,"-column-title")]:{position:"relative",zIndex:1,flex:1},["".concat(t,"-column-sorters")]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},["".concat(t,"-column-sorter")]:{marginInlineStart:n,color:o,fontSize:0,transition:"color ".concat(e.motionDurationSlow),"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},["".concat(t,"-column-sorter-up + ").concat(t,"-column-sorter-down")]:{marginTop:"-0.3em"}},["".concat(t,"-column-sorters:hover ").concat(t,"-column-sorter")]:{color:i}}}},oo=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:o,tableScrollThumbSize:i,tableScrollBg:a,zIndexTableSticky:l,stickyScrollBarBorderRadius:c,lineWidth:s,lineType:u,tableBorderColor:d}=e,f="".concat((0,tS.bf)(s)," ").concat(u," ").concat(d);return{["".concat(t,"-wrapper")]:{["".concat(t,"-sticky")]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:"".concat((0,tS.bf)(i)," !important"),zIndex:l,display:"flex",alignItems:"center",background:a,borderTop:f,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:r,borderRadius:c,transition:"all ".concat(e.motionDurationSlow,", transform none"),position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},oi=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:r,calc:o}=e,i="".concat((0,tS.bf)(n)," ").concat(e.lineType," ").concat(r);return{["".concat(t,"-wrapper")]:{["".concat(t,"-summary")]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},["div".concat(t,"-summary")]:{boxShadow:"0 ".concat((0,tS.bf)(o(n).mul(-1).equal())," 0 ").concat(r)}}}},oa=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:o,tableBorderColor:i,calc:a}=e,l="".concat((0,tS.bf)(r)," ").concat(o," ").concat(i),c="".concat(t,"-expanded-row-cell");return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody-virtual")]:{["".concat(t,"-row")]:{display:"flex",boxSizing:"border-box",width:"100%"},["".concat(t,"-cell")]:{borderBottom:l,transition:"background ".concat(n)},["".concat(t,"-expanded-row")]:{["".concat(c).concat(c,"-fixed")]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:"calc(var(--virtual-width) - ".concat((0,tS.bf)(r),")"),borderInlineEnd:"none"}}},["".concat(t,"-bordered")]:{["".concat(t,"-tbody-virtual")]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},["".concat(t,"-cell")]:{borderInlineEnd:l,["&".concat(t,"-cell-fix-right-first:before")]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:a(r).mul(-1).equal(),borderInlineStart:l}}},["&".concat(t,"-virtual")]:{["".concat(t,"-placeholder ").concat(t,"-cell")]:{borderInlineEnd:l,borderBottom:l}}}}}};let ol=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:o,tableExpandColumnWidth:i,lineWidth:a,lineType:l,tableBorderColor:c,tableFontSize:s,tableBg:u,tableRadius:d,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:h,tableHeaderCellSplitColor:m,tableFooterTextColor:g,tableFooterBg:v,calc:y}=e,b="".concat((0,tS.bf)(a)," ").concat(l," ").concat(c);return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,tk.dF)()),{[t]:Object.assign(Object.assign({},(0,tk.Wf)(e)),{fontSize:s,background:u,borderRadius:"".concat((0,tS.bf)(d)," ").concat((0,tS.bf)(d)," 0 0")}),table:{width:"100%",textAlign:"start",borderRadius:"".concat((0,tS.bf)(d)," ").concat((0,tS.bf)(d)," 0 0"),borderCollapse:"separate",borderSpacing:0},["\n ".concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{position:"relative",padding:"".concat((0,tS.bf)(r)," ").concat((0,tS.bf)(o)),overflowWrap:"break-word"},["".concat(t,"-title")]:{padding:"".concat((0,tS.bf)(r)," ").concat((0,tS.bf)(o))},["".concat(t,"-thead")]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:b,transition:"background ".concat(p," ease"),"&[colspan]:not([colspan='1'])":{textAlign:"center"},["&:not(:last-child):not(".concat(t,"-selection-column):not(").concat(t,"-row-expand-icon-cell):not([colspan])::before")]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:"background-color ".concat(p),content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},["".concat(t,"-tbody")]:{"> tr":{"> th, > td":{transition:"background ".concat(p,", border-color ").concat(p),borderBottom:b,["\n > ".concat(t,"-wrapper:only-child,\n > ").concat(t,"-expanded-row-fixed > ").concat(t,"-wrapper:only-child\n ")]:{[t]:{marginBlock:(0,tS.bf)(y(r).mul(-1).equal()),marginInline:"".concat((0,tS.bf)(y(i).sub(o).equal()),"\n ").concat((0,tS.bf)(y(o).mul(-1).equal())),["".concat(t,"-tbody > tr:last-child > td")]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:b,transition:"background ".concat(p," ease")}}},["".concat(t,"-footer")]:{padding:"".concat((0,tS.bf)(r)," ").concat((0,tS.bf)(o)),color:g,background:v}})}};var oc=(0,tC.I$)("Table",e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:o,headerBg:i,headerColor:a,headerSortActiveBg:l,headerSortHoverBg:c,bodySortBg:s,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:h,cellPaddingInline:m,cellPaddingBlockMD:g,cellPaddingInlineMD:v,cellPaddingBlockSM:y,cellPaddingInlineSM:b,borderColor:x,footerBg:w,footerColor:S,headerBorderRadius:k,cellFontSize:E,cellFontSizeMD:C,cellFontSizeSM:O,headerSplitColor:j,fixedHeaderSortActiveBg:P,headerFilterHoverBg:N,filterDropdownBg:M,expandIconBg:I,selectionColumnWidth:R,stickyScrollBarBg:T,calc:A}=e,_=(0,tE.TS)(e,{tableFontSize:E,tableBg:r,tableRadius:k,tablePaddingVertical:h,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:v,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:b,tableBorderColor:x,tableHeaderTextColor:a,tableHeaderBg:i,tableFooterTextColor:S,tableFooterBg:w,tableHeaderCellSplitColor:j,tableHeaderSortBg:l,tableHeaderSortHoverBg:c,tableBodySortBg:s,tableFixedHeaderSortActiveBg:P,tableHeaderFilterActiveBg:N,tableFilterDropdownBg:M,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,zIndexTableFixed:2,zIndexTableSticky:3,tableFontSizeMiddle:C,tableFontSizeSmall:O,tableSelectionColumnWidth:R,tableExpandIconBg:I,tableExpandColumnWidth:A(o).add(A(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:T,tableScrollThumbBgHover:t,tableScrollBg:n});return[ol(_),r7(_),oi(_),or(_),r5(_),r1(_),r9(_),r3(_),oi(_),r6(_),ot(_),r8(_),oo(_),r2(_),on(_),oe(_),oa(_)]},e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:o,colorFillContent:i,controlItemBgActive:a,controlItemBgActiveHover:l,padding:c,paddingSM:s,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:h,fontSize:m,fontSizeSM:g,lineHeight:v,lineWidth:y,colorIcon:b,colorIconHover:x,opacityLoading:w,controlInteractiveSize:S}=e,k=new r0.C(o).onBackground(n).toHexShortString(),E=new r0.C(i).onBackground(n).toHexShortString(),C=new r0.C(t).onBackground(n).toHexShortString(),O=new r0.C(b),j=new r0.C(x),P=S/2-y,N=2*P+3*y;return{headerBg:C,headerColor:r,headerSortActiveBg:k,headerSortHoverBg:E,bodySortBg:C,rowHoverBg:C,rowSelectedBg:a,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:s,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:f,footerBg:C,footerColor:r,cellFontSize:m,cellFontSizeMD:m,cellFontSizeSM:m,headerSplitColor:d,fixedHeaderSortActiveBg:k,headerFilterHoverBg:i,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:h,stickyScrollBarBorderRadius:100,expandIconMarginTop:(m*v-3*y)/2-Math.ceil((1.4*g-3*y)/2),headerIconColor:O.clone().setAlpha(O.getAlpha()*w).toRgbString(),headerIconHoverColor:j.clone().setAlpha(j.getAlpha()*w).toRgbString(),expandIconHalfInner:P,expandIconSize:N,expandIconScale:S/N}},{unitless:{expandIconScale:!0}});let os=[];var ou=i.forwardRef((e,t)=>{var n,r;let o,a,c;let{prefixCls:s,className:u,rootClassName:d,style:f,size:p,bordered:h,dropdownPrefixCls:m,dataSource:g,pagination:v,rowSelection:y,rowKey:b="key",rowClassName:x,columns:w,children:S,childrenColumnName:k,onChange:E,getPopupContainer:C,loading:O,expandIcon:j,expandable:N,expandedRowRender:M,expandIconColumnIndex:I,indentSize:R,scroll:T,sortDirections:A,locale:_,showSorterTooltip:D=!0,virtual:Z}=e;(0,tp.ln)("Table");let L=i.useMemo(()=>w||ey(S),[w,S]),z=tG(i.useMemo(()=>L.some(e=>e.responsive),[L])),B=i.useMemo(()=>{let e=new Set(Object.keys(z).filter(e=>z[e]));return L.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[L,z]),F=(0,eY.Z)(e,["className","style","columns"]),{locale:H=tX.Z,direction:q,table:W,renderEmpty:K,getPrefixCls:V,getPopupContainer:U}=i.useContext(tv.E_),G=(0,tK.Z)(p),X=Object.assign(Object.assign({},H.Table),_),$=g||os,Y=V("table",s),Q=V("dropdown",m),[,J]=(0,nw.ZP)(),ee=(0,tb.Z)(Y),[et,en,er]=oc(Y,ee),eo=Object.assign({childrenColumnName:k,expandIconColumnIndex:I},N),{childrenColumnName:ei="children"}=eo,ea=i.useMemo(()=>$.some(e=>null==e?void 0:e[ei])?"nest":M||N&&N.expandedRowRender?"row":null,[$]),el={body:i.useRef()},es=i.useRef(null),eu=i.useRef(null);n=()=>Object.assign(Object.assign({},eu.current),{nativeElement:es.current}),(0,i.useImperativeHandle)(t,()=>{let e=n(),{nativeElement:t}=e;return"undefined"!=typeof Proxy?new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(t._antProxy=t._antProxy||{},Object.keys(e).forEach(n=>{if(!(n in t._antProxy)){let r=t[n];t._antProxy[n]=r,t[n]=e[n]}}),t)});let ed=i.useMemo(()=>"function"==typeof b?b:e=>null==e?void 0:e[b],[b]),[ef]=function(e,t,n){let r=i.useRef({});return[function(o){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let o=new Map;!function e(r){r.forEach((r,i)=>{let a=n(r,i);o.set(a,r),r&&"object"==typeof r&&t in r&&e(r[t]||[])})}(e),r.current={data:e,childrenColumnName:t,kvMap:o,getRowKey:n}}return r.current.kvMap.get(o)}]}($,ei,ed),ep={},eh=function(e,t){var n,r,o;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=Object.assign(Object.assign({},ep),e);i&&(null===(n=ep.resetPagination)||void 0===n||n.call(ep),(null===(r=a.pagination)||void 0===r?void 0:r.current)&&(a.pagination.current=1),v&&v.onChange&&v.onChange(1,null===(o=a.pagination)||void 0===o?void 0:o.pageSize)),T&&!1!==T.scrollToFirstRowOnChange&&el.body.current&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),a=function(e,t){var n,r;if("undefined"==typeof window)return 0;let o=t?"scrollTop":"scrollLeft",i=0;return tq(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[o]:e instanceof HTMLElement?i=e[o]:e&&(i=e[o]),e&&!tq(e)&&"number"!=typeof i&&(i=null===(r=(null!==(n=e.ownerDocument)&&void 0!==n?n:e).documentElement)||void 0===r?void 0:r[o]),i}(i,!0),l=Date.now(),c=()=>{let t=Date.now()-l,n=function(e,t,n,r){let o=n-t;return(e/=r/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}(t>o?o:t,a,e,o);tq(i)?i.scrollTo(window.pageXOffset,n):i instanceof Document||"HTMLDocument"===i.constructor.name?i.documentElement.scrollTop=n:i.scrollTop=n,t<o?(0,tH.Z)(c):"function"==typeof r&&r()};(0,tH.Z)(c)}(0,{getContainer:()=>el.body.current}),null==E||E(a.pagination,a.filters,a.sorter,{currentDataSource:rT(rY($,a.sorterStates,ei),a.filterStates),action:t})},[em,eg,ev,eb]=function(e){let{prefixCls:t,mergedColumns:n,onSorterChange:r,sortDirections:o,tableLocale:a,showSorterTooltip:l}=e,[c,s]=i.useState(rG(n,!0)),u=i.useMemo(()=>{let e=!0,t=rG(n,!1);if(!t.length)return c;let r=[];function o(t){e?r.push(t):r.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let i=null;return t.forEach(t=>{null===i?(o(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:i=!0)):(i&&!1!==t.multiplePriority||(e=!1),o(t))}),r},[n,c]),d=i.useMemo(()=>{let e=u.map(e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n}});return{sortColumns:e,sortColumn:e[0]&&e[0].column,sortOrder:e[0]&&e[0].order}},[u]);function f(e){let t;s(t=!1!==e.multiplePriority&&u.length&&!1!==u[0].multiplePriority?[].concat((0,ec.Z)(u.filter(t=>{let{key:n}=t;return n!==e.key})),[e]):[e]),r(r$(t),t)}return[e=>(function e(t,n,r,o,a,l,c,s){return(n||[]).map((n,u)=>{let d=nP(u,s),f=n;if(f.sorter){let e;let s=f.sortDirections||a,u=void 0===f.showSorterTooltip?c:f.showSorterTooltip,p=nj(f,d),h=r.find(e=>{let{key:t}=e;return t===p}),m=h?h.sortOrder:null,g=m?s[s.indexOf(m)+1]:s[0];if(n.sortIcon)e=n.sortIcon({sortOrder:m});else{let n=s.includes(rW)&&i.createElement(rH,{className:P()("".concat(t,"-column-sorter-up"),{active:m===rW})}),r=s.includes(rK)&&i.createElement(rB,{className:P()("".concat(t,"-column-sorter-down"),{active:m===rK})});e=i.createElement("span",{className:P()("".concat(t,"-column-sorter"),{["".concat(t,"-column-sorter-full")]:!!(n&&r)})},i.createElement("span",{className:"".concat(t,"-column-sorter-inner"),"aria-hidden":"true"},n,r))}let{cancelSort:v,triggerAsc:y,triggerDesc:b}=l||{},x=v;g===rK?x=b:g===rW&&(x=y);let w="object"==typeof u?Object.assign({title:x},u):{title:x};f=Object.assign(Object.assign({},f),{className:P()(f.className,{["".concat(t,"-column-sort")]:m}),title:r=>{let o=i.createElement("div",{className:"".concat(t,"-column-sorters")},i.createElement("span",{className:"".concat(t,"-column-title")},nN(n.title,r)),e);return u?i.createElement(rq.Z,Object.assign({},w),o):o},onHeaderCell:e=>{let r=n.onHeaderCell&&n.onHeaderCell(e)||{},i=r.onClick,a=r.onKeyDown;r.onClick=e=>{o({column:n,key:p,sortOrder:g,multiplePriority:rV(n)}),null==i||i(e)},r.onKeyDown=e=>{e.keyCode===t6.Z.ENTER&&(o({column:n,key:p,sortOrder:g,multiplePriority:rV(n)}),null==a||a(e))};let l=function(e,t){let n=nN(e,t);return"[object Object]"===Object.prototype.toString.call(n)?"":n}(n.title,{}),c=null==l?void 0:l.toString();return m?r["aria-sort"]="ascend"===m?"ascending":"descending":r["aria-label"]=c||"",r.className=P()(r.className,"".concat(t,"-column-has-sorters")),r.tabIndex=0,n.ellipsis&&(r.title=(null!=l?l:"").toString()),r}})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:e(t,f.children,r,o,a,l,c,d)})),f})})(t,e,u,f,o,a,l),u,d,()=>r$(u)]}({prefixCls:Y,mergedColumns:B,onSorterChange:(e,t)=>{eh({sorter:e,sorterStates:t},"sort",!1)},sortDirections:A||["ascend","descend"],tableLocale:X,showSorterTooltip:D}),ex=i.useMemo(()=>rY($,eg,ei),[$,eg]);ep.sorter=eb(),ep.sorterStates=eg;let[ew,eS,ek]=r_({prefixCls:Y,locale:X,dropdownPrefixCls:Q,mergedColumns:B,onFilterChange:(e,t)=>{eh({filters:e,filterStates:t},"filter",!0)},getPopupContainer:C||U,rootClassName:P()(d,ee)}),eE=rT(ex,eS);ep.filters=ek,ep.filterStates=eS;let[eC]=(r=i.useMemo(()=>{let e={};return Object.keys(ek).forEach(t=>{null!==ek[t]&&(e[t]=ek[t])}),Object.assign(Object.assign({},ev),{filters:e})},[ev,ek]),[i.useCallback(e=>(function e(t,n){return t.map(t=>{let r=Object.assign({},t);return r.title=nN(t.title,n),"children"in r&&(r.children=e(r.children,n)),r})})(e,r),[r])]),[eO,ej]=rL(eE.length,(e,t)=>{eh({pagination:Object.assign(Object.assign({},ep.pagination),{current:e,pageSize:t})},"paginate")},v);ep.pagination=!1===v?{}:function(e,t){let n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&"object"==typeof t?t:{}).forEach(t=>{let r=e[t];"function"!=typeof r&&(n[t]=r)}),n}(eO,v),ep.resetPagination=ej;let eP=i.useMemo(()=>{if(!1===v||!eO.pageSize)return eE;let{current:e=1,total:t,pageSize:n=10}=eO;return eE.length<t?eE.length>n?eE.slice((e-1)*n,e*n):eE:eE.slice((e-1)*n,e*n)},[!!v,eE,eO&&eO.current,eO&&eO.pageSize,eO&&eO.total]),[eN,eM]=tF({prefixCls:Y,data:eE,pageData:eP,getRowKey:ed,getRecordByKey:ef,expandType:ea,childrenColumnName:ei,locale:X,getPopupContainer:C||U},y);eo.__PARENT_RENDER_ICON__=eo.expandIcon,eo.expandIcon=eo.expandIcon||j||function(e){let{prefixCls:t,onExpand:n,record:r,expanded:o,expandable:a}=e,l="".concat(t,"-row-expand-icon");return i.createElement("button",{type:"button",onClick:e=>{n(r,e),e.stopPropagation()},className:P()(l,{["".concat(l,"-spaced")]:!a,["".concat(l,"-expanded")]:a&&o,["".concat(l,"-collapsed")]:a&&!o}),"aria-label":o?X.collapse:X.expand,"aria-expanded":o})},"nest"===ea&&void 0===eo.expandIconColumnIndex?eo.expandIconColumnIndex=y?1:0:eo.expandIconColumnIndex>0&&y&&(eo.expandIconColumnIndex-=1),"number"!=typeof eo.indentSize&&(eo.indentSize="number"==typeof R?R:15);let eI=i.useCallback(e=>eC(eN(ew(em(e)))),[em,ew,eN]);if(!1!==v&&(null==eO?void 0:eO.total)){let e;e=eO.size?eO.size:"small"===G||"middle"===G?"small":void 0;let t=t=>i.createElement(nC,Object.assign({},eO,{className:P()("".concat(Y,"-pagination ").concat(Y,"-pagination-").concat(t),eO.className),size:e})),n="rtl"===q?"left":"right",{position:r}=eO;if(null!==r&&Array.isArray(r)){let e=r.find(e=>e.includes("top")),i=r.find(e=>e.includes("bottom")),l=r.every(e=>"none"==="".concat(e));e||i||l||(a=t(n)),e&&(o=t(e.toLowerCase().replace("top",""))),i&&(a=t(i.toLowerCase().replace("bottom","")))}else a=t(n)}"boolean"==typeof O?c={spinning:O}:"object"==typeof O&&(c=Object.assign({spinning:!0},O));let eR=P()(er,ee,"".concat(Y,"-wrapper"),null==W?void 0:W.className,{["".concat(Y,"-wrapper-rtl")]:"rtl"===q},u,d,en),eT=Object.assign(Object.assign({},null==W?void 0:W.style),f),eA=_&&_.emptyText||(null==K?void 0:K("Table"))||i.createElement(tW.Z,{componentName:"Table"}),e_={},eD=i.useMemo(()=>{let{fontSize:e,lineHeight:t,padding:n,paddingXS:r,paddingSM:o}=J,i=Math.floor(e*t);switch(G){case"large":return 2*n+i;case"small":return 2*r+i;default:return 2*o+i}},[J,G]);return Z&&(e_.listItemHeight=eD),et(i.createElement("div",{ref:es,className:eR,style:eT},i.createElement(nO.Z,Object.assign({spinning:!1},c),o,i.createElement(Z?rJ:rQ,Object.assign({},e_,F,{ref:eu,columns:B,direction:q,expandable:eo,prefixCls:Y,className:P()({["".concat(Y,"-middle")]:"middle"===G,["".concat(Y,"-small")]:"small"===G,["".concat(Y,"-bordered")]:h,["".concat(Y,"-empty")]:0===$.length},er,ee,en),data:eP,rowKey:ed,rowClassName:(e,t,n)=>{let r;return r="function"==typeof x?P()(x(e,t,n)):P()(x),P()({["".concat(Y,"-row-selected")]:eM.has(ed(e,t))},r)},emptyText:eA,internalHooks:l,internalRefs:el,transformColumns:eI,getContainerWidth:(e,t)=>{let n=e.querySelector(".".concat(Y,"-container")),r=t;if(n){let e=getComputedStyle(n);r=t-parseInt(e.borderLeftWidth,10)-parseInt(e.borderRightWidth,10)}return r}})),a)))});let od=i.forwardRef((e,t)=>{let n=i.useRef(0);return n.current+=1,i.createElement(ou,Object.assign({},e,{ref:t,_renderTimes:n.current}))});od.SELECTION_COLUMN=t_,od.EXPAND_COLUMN=a,od.SELECTION_ALL=tD,od.SELECTION_INVERT=tZ,od.SELECTION_NONE=tL,od.Column=function(e){return null},od.ColumnGroup=function(e){return null},od.Summary=F;var of=od},93192:function(e,t,n){"use strict";n.d(t,{default:function(){return ef}});var r=n(2265),o=n(9738),i=n(23639),a=n(1119),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},c=n(55015),s=r.forwardRef(function(e,t){return r.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:l}))}),u=n(36760),d=n.n(u),f=n(49211),p=n.n(f),h=n(31474),m=n(45287),g=n(27380),v=n(50506),y=n(18694),b=n(28791),x=n(10281),w=n(95814),S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let k={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},E=r.forwardRef((e,t)=>{let{style:n,noStyle:o,disabled:i}=e,a=S(e,["style","noStyle","disabled"]),l={};return o||(l=Object.assign({},k)),i&&(l.pointerEvents="none"),l=Object.assign(Object.assign({},l),n),r.createElement("div",Object.assign({role:"button",tabIndex:0,ref:t},a,{onKeyDown:e=>{let{keyCode:t}=e;t===w.Z.ENTER&&e.preventDefault()},onKeyUp:t=>{let{keyCode:n}=t,{onClick:r}=e;n===w.Z.ENTER&&r&&r()},style:l}))});var C=n(71744),O=n(55274),j=n(75957),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},N=r.forwardRef(function(e,t){return r.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:P}))}),M=n(19722),I=n(90464),R=n(76122),T=n(80669),A=n(31373),_=n(352);let D=(e,t,n,r)=>{let{titleMarginBottom:o,fontWeightStrong:i}=r;return{marginBottom:o,color:n,fontWeight:i,fontSize:e,lineHeight:t}},Z=e=>{let t={};return[1,2,3,4,5].forEach(n=>{t["\n h".concat(n,"&,\n div&-h").concat(n,",\n div&-h").concat(n," > textarea,\n h").concat(n,"\n ")]=D(e["fontSizeHeading".concat(n)],e["lineHeightHeading".concat(n)],e.colorTextHeading,e)}),t},L=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},(0,R.N)(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},["&[disabled], &".concat(t,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},z=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:A.EV[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),B=e=>{let{componentCls:t,paddingSM:n}=e;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),marginTop:e.calc(n).mul(-1).equal(),marginBottom:"calc(1em - ".concat((0,_.bf)(n),")")},["".concat(t,"-edit-content-confirm")]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},F=e=>({["".concat(e.componentCls,"-copy-success")]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},["".concat(e.componentCls,"-copy-icon-only")]:{marginInlineStart:0}}),H=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),q=e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,["&".concat(t,"-secondary")]:{color:e.colorTextDescription},["&".concat(t,"-success")]:{color:e.colorSuccess},["&".concat(t,"-warning")]:{color:e.colorWarning},["&".concat(t,"-danger")]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},["&".concat(t,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},Z(e)),{["\n & + h1".concat(t,",\n & + h2").concat(t,",\n & + h3").concat(t,",\n & + h4").concat(t,",\n & + h5").concat(t,"\n ")]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),z(e)),L(e)),{["\n ".concat(t,"-expand,\n ").concat(t,"-edit,\n ").concat(t,"-copy\n ")]:Object.assign(Object.assign({},(0,R.N)(e)),{marginInlineStart:e.marginXXS})}),B(e)),F(e)),H()),{"&-rtl":{direction:"rtl"}})}};var W=(0,T.I$)("Typography",e=>[q(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),K=e=>{let{prefixCls:t,"aria-label":n,className:o,style:i,direction:a,maxLength:l,autoSize:c=!0,value:s,onSave:u,onCancel:f,onEnd:p,component:h,enterIcon:m=r.createElement(N,null)}=e,g=r.useRef(null),v=r.useRef(!1),y=r.useRef(),[b,x]=r.useState(s);r.useEffect(()=>{x(s)},[s]),r.useEffect(()=>{if(g.current&&g.current.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let S=()=>{u(b.trim())},k=h?"".concat(t,"-").concat(h):"",[E,C,O]=W(t),j=d()(t,"".concat(t,"-edit-content"),{["".concat(t,"-rtl")]:"rtl"===a},o,k,C,O);return E(r.createElement("div",{className:j,style:i},r.createElement(I.Z,{ref:g,maxLength:l,value:b,onChange:e=>{let{target:t}=e;x(t.value.replace(/[\n\r]/g,""))},onKeyDown:e=>{let{keyCode:t}=e;v.current||(y.current=t)},onKeyUp:e=>{let{keyCode:t,ctrlKey:n,altKey:r,metaKey:o,shiftKey:i}=e;y.current!==t||v.current||n||r||o||i||(t===w.Z.ENTER?(S(),null==p||p()):t===w.Z.ESC&&f())},onCompositionStart:()=>{v.current=!0},onCompositionEnd:()=>{v.current=!1},onBlur:()=>{S()},"aria-label":n,rows:1,autoSize:c}),null!==m?(0,M.Tm)(m,{className:"".concat(t,"-edit-content-confirm")}):null))};function V(e,t){return r.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&"object"==typeof e?e:null)]},[e])}var U=(e,t)=>{let n=r.useRef(!1);r.useEffect(()=>{n.current?e():n.current=!0},t)},G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let X=r.forwardRef((e,t)=>{let{prefixCls:n,component:o="article",className:i,rootClassName:a,setContentRef:l,children:c,direction:s,style:u}=e,f=G(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:p,direction:h,typography:m}=r.useContext(C.E_),g=t;l&&(g=(0,b.sQ)(t,l));let v=p("typography",n),[y,x,w]=W(v),S=d()(v,null==m?void 0:m.className,{["".concat(v,"-rtl")]:"rtl"===(null!=s?s:h)},i,a,x,w),k=Object.assign(Object.assign({},null==m?void 0:m.style),u);return y(r.createElement(o,Object.assign({className:S,style:k,ref:g},f),c))});function $(e){let t=typeof e;return"string"===t||"number"===t}function Y(e,t){let n=0,r=[];for(let o=0;o<e.length;o+=1){if(n===t)return r;let i=e[o],a=n+($(i)?String(i).length:1);if(a>t){let e=t-n;return r.push(String(i).slice(0,e)),r}r.push(i),n=a}return e}var Q=e=>{let{enabledMeasure:t,children:n,text:o,width:i,fontSize:a,rows:l,onEllipsis:c}=e,[[s,u,d],f]=r.useState([0,0,0]),[p,h]=r.useState(0),[v,y]=r.useState(0),[b,x]=r.useState(0),w=r.useRef(null),S=r.useRef(null),k=r.useMemo(()=>(0,m.Z)(o),[o]),E=r.useMemo(()=>{let e;return e=0,k.forEach(t=>{$(t)?e+=String(t).length:e+=1}),e},[k]),C=r.useMemo(()=>t&&3===v?n(Y(k,u),u<E):p&&4!==v&&t?n(Y(k,p),p<E):n(k,!1),[t,v,n,k,u,E]);(0,g.Z)(()=>{t&&i&&a&&E&&(y(1),f([0,Math.ceil(E/2),E]))},[t,i,a,o,E,l]),(0,g.Z)(()=>{var e;1===v&&x((null===(e=w.current)||void 0===e?void 0:e.offsetHeight)||0)},[v]),(0,g.Z)(()=>{var e,t;if(b){if(1===v)((null===(e=S.current)||void 0===e?void 0:e.offsetHeight)||0)<=l*b?(y(4),c(!1)):y(2);else if(2===v){if(s!==d){let e=(null===(t=S.current)||void 0===t?void 0:t.offsetHeight)||0,n=l*b,r=s,o=d;s===d-1?o=s:e<=n?r=u:o=u;let i=Math.ceil((r+o)/2);f([r,i,o])}else y(3),h(u),c(!0)}}},[v,s,d,l,b]);let O=(e,t,n)=>r.createElement("span",{"aria-hidden":!0,ref:t,style:Object.assign({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:2*Math.ceil(a/2)},n)},e);return r.createElement(r.Fragment,null,C,t&&3!==v&&4!==v&&r.createElement(r.Fragment,null,O("lg",w,{wordBreak:"keep-all",whiteSpace:"nowrap"}),O(1===v?n(k,!1):n(Y(k,u),!0),S,{width:i,whiteSpace:"normal",margin:0,padding:0})))},J=e=>{let{enabledEllipsis:t,isEllipsis:n,children:o,tooltipProps:i}=e;return(null==i?void 0:i.title)&&t?r.createElement(j.Z,Object.assign({open:!!n&&void 0},i),o):o},ee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function et(e,t,n){return!0===e||void 0===e?t:e||n&&t}function en(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}let er=r.forwardRef((e,t)=>{var n,a,l;let{prefixCls:c,className:u,style:f,type:w,disabled:S,children:k,ellipsis:P,editable:N,copyable:M,component:I,title:R}=e,T=ee(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:A,direction:_}=r.useContext(C.E_),[D]=(0,O.Z)("Text"),Z=r.useRef(null),L=r.useRef(null),z=A("typography",c),B=(0,y.Z)(T,["mark","code","delete","underline","strong","keyboard","italic"]),[F,H]=V(N),[q,W]=(0,v.Z)(!1,{value:H.editing}),{triggerType:G=["icon"]}=H,$=e=>{var t;e&&(null===(t=H.onStart)||void 0===t||t.call(H)),W(e)};U(()=>{var e;q||null===(e=L.current)||void 0===e||e.focus()},[q]);let Y=e=>{null==e||e.preventDefault(),$(!0)},[er,eo]=V(M),[ei,ea]=r.useState(!1),el=r.useRef(null),ec={};eo.format&&(ec.format=eo.format);let es=()=>{el.current&&clearTimeout(el.current)},eu=e=>{var t;null==e||e.preventDefault(),null==e||e.stopPropagation(),p()(eo.text||String(k)||"",ec),ea(!0),es(),el.current=setTimeout(()=>{ea(!1)},3e3),null===(t=eo.onCopy)||void 0===t||t.call(eo,e)};r.useEffect(()=>es,[]);let[ed,ef]=r.useState(!1),[ep,eh]=r.useState(!1),[em,eg]=r.useState(!1),[ev,ey]=r.useState(!1),[eb,ex]=r.useState(!1),[ew,eS]=r.useState(!0),[ek,eE]=V(P,{expandable:!1}),eC=ek&&!em,{rows:eO=1}=eE,ej=r.useMemo(()=>!eC||void 0!==eE.suffix||eE.onEllipsis||eE.expandable||F||er,[eC,eE,F,er]);(0,g.Z)(()=>{ek&&!ej&&(ef((0,x.G)("webkitLineClamp")),eh((0,x.G)("textOverflow")))},[ej,ek]);let eP=r.useMemo(()=>!ej&&(1===eO?ep:ed),[ej,ep,ed]),eN=eC&&(eP?eb:ev),eM=eC&&1===eO&&eP,eI=eC&&eO>1&&eP,eR=e=>{var t;eg(!0),null===(t=eE.onExpand)||void 0===t||t.call(eE,e)},[eT,eA]=r.useState(0),[e_,eD]=r.useState(0),eZ=e=>{var t;ey(e),ev!==e&&(null===(t=eE.onEllipsis)||void 0===t||t.call(eE,e))};r.useEffect(()=>{let e=Z.current;if(ek&&eP&&e){let t=eI?e.offsetHeight<e.scrollHeight:e.offsetWidth<e.scrollWidth;eb!==t&&ex(t)}},[ek,eP,k,eI,ew,eT]),r.useEffect(()=>{let e=Z.current;if("undefined"==typeof IntersectionObserver||!e||!eP||!eC)return;let t=new IntersectionObserver(()=>{eS(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eP,eC]);let eL={};eL=!0===eE.tooltip?{title:null!==(n=H.text)&&void 0!==n?n:k}:r.isValidElement(eE.tooltip)?{title:eE.tooltip}:"object"==typeof eE.tooltip?Object.assign({title:null!==(a=H.text)&&void 0!==a?a:k},eE.tooltip):{title:eE.tooltip};let ez=r.useMemo(()=>{let e=e=>["string","number"].includes(typeof e);return!ek||eP?void 0:e(H.text)?H.text:e(k)?k:e(R)?R:e(eL.title)?eL.title:void 0},[ek,eP,R,eL.title,eN]);if(q)return r.createElement(K,{value:null!==(l=H.text)&&void 0!==l?l:"string"==typeof k?k:"",onSave:e=>{var t;null===(t=H.onChange)||void 0===t||t.call(H,e),$(!1)},onCancel:()=>{var e;null===(e=H.onCancel)||void 0===e||e.call(H),$(!1)},onEnd:H.onEnd,prefixCls:z,className:u,style:f,direction:_,component:I,maxLength:H.maxLength,autoSize:H.autoSize,enterIcon:H.enterIcon});let eB=()=>{let e;let{expandable:t,symbol:n}=eE;return t?(e=n||(null==D?void 0:D.expand),r.createElement("a",{key:"expand",className:"".concat(z,"-expand"),onClick:eR,"aria-label":null==D?void 0:D.expand},e)):null},eF=()=>{if(!F)return;let{icon:e,tooltip:t}=H,n=(0,m.Z)(t)[0]||(null==D?void 0:D.edit),o="string"==typeof n?n:"";return G.includes("icon")?r.createElement(j.Z,{key:"edit",title:!1===t?"":n},r.createElement(E,{ref:L,className:"".concat(z,"-edit"),onClick:Y,"aria-label":o},e||r.createElement(s,{role:"button"}))):null},eH=()=>{if(!er)return null;let{tooltips:e,icon:t}=eo,n=en(e),a=en(t),l=ei?et(n[1],null==D?void 0:D.copied):et(n[0],null==D?void 0:D.copy),c=ei?null==D?void 0:D.copied:null==D?void 0:D.copy,s="string"==typeof l?l:c;return r.createElement(j.Z,{key:"copy",title:l},r.createElement(E,{className:d()("".concat(z,"-copy"),{["".concat(z,"-copy-success")]:ei,["".concat(z,"-copy-icon-only")]:null==k}),onClick:eu,"aria-label":s},ei?et(a[1],r.createElement(o.Z,null),!0):et(a[0],r.createElement(i.Z,null),!0)))},eq=e=>[e&&eB(),eF(),eH()],eW=e=>[e&&r.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),eE.suffix,eq(e)];return r.createElement(h.Z,{onResize:(e,t)=>{var n;let{offsetWidth:r}=e;eA(r),eD(parseInt(null===(n=window.getComputedStyle)||void 0===n?void 0:n.call(window,t).fontSize,10)||0)},disabled:!eC},n=>r.createElement(J,{tooltipProps:eL,enabledEllipsis:eC,isEllipsis:eN},r.createElement(X,Object.assign({className:d()({["".concat(z,"-").concat(w)]:w,["".concat(z,"-disabled")]:S,["".concat(z,"-ellipsis")]:ek,["".concat(z,"-single-line")]:eC&&1===eO,["".concat(z,"-ellipsis-single-line")]:eM,["".concat(z,"-ellipsis-multiple-line")]:eI},u),prefixCls:c,style:Object.assign(Object.assign({},f),{WebkitLineClamp:eI?eO:void 0}),component:I,ref:(0,b.sQ)(n,Z,t),direction:_,onClick:G.includes("text")?Y:void 0,"aria-label":null==ez?void 0:ez.toString(),title:R},B),r.createElement(Q,{enabledMeasure:eC&&!eP,text:k,rows:eO,width:eT,fontSize:e_,onEllipsis:eZ},(t,n)=>{let o=t;return t.length&&n&&ez&&(o=r.createElement("span",{key:"show-content","aria-hidden":!0},o)),function(e,t){let{mark:n,code:o,underline:i,delete:a,strong:l,keyboard:c,italic:s}=e,u=t;function d(e,t){t&&(u=r.createElement(e,{},u))}return d("strong",l),d("u",i),d("del",a),d("code",o),d("mark",n),d("kbd",c),d("i",s),u}(e,r.createElement(r.Fragment,null,o,eW(n)))}))))});var eo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ei=r.forwardRef((e,t)=>{var{ellipsis:n,rel:o}=e,i=eo(e,["ellipsis","rel"]);let a=Object.assign(Object.assign({},i),{rel:void 0===o&&"_blank"===i.target?"noopener noreferrer":o});return delete a.navigate,r.createElement(er,Object.assign({},a,{ref:t,ellipsis:!!n,component:"a"}))}),ea=r.forwardRef((e,t)=>r.createElement(er,Object.assign({ref:t},e,{component:"div"})));var el=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},ec=r.forwardRef((e,t)=>{var{ellipsis:n}=e,o=el(e,["ellipsis"]);let i=r.useMemo(()=>n&&"object"==typeof n?(0,y.Z)(n,["expandable","rows"]):n,[n]);return r.createElement(er,Object.assign({ref:t},o,{ellipsis:i,component:"span"}))}),es=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eu=[1,2,3,4,5],ed=r.forwardRef((e,t)=>{let n;let{level:o=1}=e,i=es(e,["level"]);return n=eu.includes(o)?"h".concat(o):"h1",r.createElement(er,Object.assign({ref:t},i,{component:n}))});X.Text=ec,X.Link=ei,X.Title=ed,X.Paragraph=ea;var ef=X},30967:function(e,t,n){"use strict";n.d(t,{Z:function(){return ts}});var r=n(2265),o=n(83145),i=n(54887),a=n(36760),l=n.n(a),c=n(1119),s=n(76405),u=n(25049),d=n(63496),f=n(15354),p=n(15900),h=n(11993),m=n(31686),g=n(6989),v=n(73129),y=n(41154),b=n(54580),x=n(18242),w=n(32559),S=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",i=o.replace(/\/.*$/,"");return n.some(function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var n=r.toLowerCase(),a=t.toLowerCase(),l=[a];return(".jpg"===a||".jpeg"===a)&&(l=[".jpg",".jpeg"]),l.some(function(e){return n.endsWith(e)})}return/\/\*$/.test(t)?i===t.replace(/\/.*$/,""):o===t||!!/^\w+$/.test(t)&&((0,w.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)})}return!0};function k(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}var E=function(e,t,n){var r=function e(r,o){if(r){if(r.path=o||"",r.isFile)r.file(function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))});else if(r.isDirectory){var i,a,l;i=function(t){t.forEach(function(t){e(t,"".concat(o).concat(r.name,"/"))})},a=r.createReader(),l=[],function e(){a.readEntries(function(t){var n=Array.prototype.slice.apply(t);l=l.concat(n),n.length?e():i(l)})}()}}};e.forEach(function(e){r(e.webkitGetAsEntry())})},C=+new Date,O=0;function j(){return"rc-upload-".concat(C,"-").concat(++O)}var P=["component","prefixCls","className","classNames","disabled","id","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],N=function(e){(0,f.Z)(n,e);var t=(0,p.Z)(n);function n(){(0,s.Z)(this,n);for(var e,r,i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return e=t.call.apply(t,[this].concat(a)),(0,h.Z)((0,d.Z)(e),"state",{uid:j()}),(0,h.Z)((0,d.Z)(e),"reqs",{}),(0,h.Z)((0,d.Z)(e),"fileInput",void 0),(0,h.Z)((0,d.Z)(e),"_isMounted",void 0),(0,h.Z)((0,d.Z)(e),"onChange",function(t){var n=e.props,r=n.accept,i=n.directory,a=t.target.files,l=(0,o.Z)(a).filter(function(e){return!i||S(e,r)});e.uploadFiles(l),e.reset()}),(0,h.Z)((0,d.Z)(e),"onClick",function(t){var n=e.fileInput;if(n){var r=t.target,o=e.props.onClick;r&&"BUTTON"===r.tagName&&(n.parentNode.focus(),r.blur()),n.click(),o&&o(t)}}),(0,h.Z)((0,d.Z)(e),"onKeyDown",function(t){"Enter"===t.key&&e.onClick(t)}),(0,h.Z)((0,d.Z)(e),"onFileDrop",function(t){var n=e.props.multiple;if(t.preventDefault(),"dragover"!==t.type){if(e.props.directory)E(Array.prototype.slice.call(t.dataTransfer.items),e.uploadFiles,function(t){return S(t,e.props.accept)});else{var r=(0,o.Z)(t.dataTransfer.files).filter(function(t){return S(t,e.props.accept)});!1===n&&(r=r.slice(0,1)),e.uploadFiles(r)}}}),(0,h.Z)((0,d.Z)(e),"uploadFiles",function(t){var n=(0,o.Z)(t);Promise.all(n.map(function(t){return t.uid=j(),e.processFile(t,n)})).then(function(t){var n=e.props.onBatchStart;null==n||n(t.map(function(e){return{file:e.origin,parsedFile:e.parsedFile}})),t.filter(function(e){return null!==e.parsedFile}).forEach(function(t){e.post(t)})})}),(0,h.Z)((0,d.Z)(e),"processFile",(r=(0,b.Z)((0,v.Z)().mark(function t(n,r){var o,i,a,l,c,s,u,d,f;return(0,v.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.props.beforeUpload,i=n,!o){t.next=14;break}return t.prev=3,t.next=6,o(n,r);case 6:i=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),i=!1;case 12:if(!1!==i){t.next=14;break}return t.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});case 14:if("function"!=typeof(a=e.props.action)){t.next=21;break}return t.next=18,a(n);case 18:l=t.sent,t.next=22;break;case 21:l=a;case 22:if("function"!=typeof(c=e.props.data)){t.next=29;break}return t.next=26,c(n);case 26:s=t.sent,t.next=30;break;case 29:s=c;case 30:return(u=("object"===(0,y.Z)(i)||"string"==typeof i)&&i?i:n)instanceof File?d=u:d=new File([u],n.name,{type:n.type}),(f=d).uid=n.uid,t.abrupt("return",{origin:n,data:s,parsedFile:f,action:l});case 35:case"end":return t.stop()}},t,null,[[3,9]])})),function(e,t){return r.apply(this,arguments)})),(0,h.Z)((0,d.Z)(e),"saveFileInput",function(t){e.fileInput=t}),e}return(0,u.Z)(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(e){var t=this,n=e.data,r=e.origin,o=e.action,i=e.parsedFile;if(this._isMounted){var a=this.props,l=a.onStart,c=a.customRequest,s=a.name,u=a.headers,d=a.withCredentials,f=a.method,p=r.uid;l(r),this.reqs[p]=(c||function(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(t){var r=e.data[t];if(Array.isArray(r)){r.forEach(function(e){n.append("".concat(t,"[]"),e)});return}n.append(t,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){if(t.status<200||t.status>=300){var n;return e.onError(((n=Error("cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"))).status=t.status,n.method=e.method,n.url=e.action,n),k(t))}return e.onSuccess(k(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(e){null!==r[e]&&t.setRequestHeader(e,r[e])}),t.send(n),{abort:function(){t.abort()}}})({action:o,filename:s,data:n,file:i,headers:u,withCredentials:d,method:f||"post",onProgress:function(e){var n=t.props.onProgress;null==n||n(e,i)},onSuccess:function(e,n){var r=t.props.onSuccess;null==r||r(e,i,n),delete t.reqs[p]},onError:function(e,n){var r=t.props.onError;null==r||r(e,n,i),delete t.reqs[p]}})}}},{key:"reset",value:function(){this.setState({uid:j()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}},{key:"render",value:function(){var e,t=this.props,n=t.component,o=t.prefixCls,i=t.className,a=t.classNames,s=t.disabled,u=t.id,d=t.style,f=t.styles,p=t.multiple,v=t.accept,y=t.capture,b=t.children,w=t.directory,S=t.openFileDialogOnClick,k=t.onMouseEnter,E=t.onMouseLeave,C=t.hasControlInside,O=(0,g.Z)(t,P),j=l()((e={},(0,h.Z)(e,o,!0),(0,h.Z)(e,"".concat(o,"-disabled"),s),(0,h.Z)(e,i,i),e)),N=s?{}:{onClick:S?this.onClick:function(){},onKeyDown:S?this.onKeyDown:function(){},onMouseEnter:k,onMouseLeave:E,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:C?void 0:"0"};return r.createElement(n,(0,c.Z)({},N,{className:j,role:C?void 0:"button",style:d}),r.createElement("input",(0,c.Z)({},(0,x.Z)(O,{aria:!0,data:!0}),{id:u,disabled:s,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:(0,m.Z)({display:"none"},(void 0===f?{}:f).input),className:(void 0===a?{}:a).input,accept:v},w?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},{multiple:p,onChange:this.onChange},null!=y?{capture:y}:{})),b)}}]),n}(r.Component);function M(){}var I=function(e){(0,f.Z)(n,e);var t=(0,p.Z)(n);function n(){var e;(0,s.Z)(this,n);for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,h.Z)((0,d.Z)(e),"uploader",void 0),(0,h.Z)((0,d.Z)(e),"saveUploader",function(t){e.uploader=t}),e}return(0,u.Z)(n,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return r.createElement(N,(0,c.Z)({},this.props,{ref:this.saveUploader}))}}]),n}(r.Component);(0,h.Z)(I,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var R=n(50506),T=n(71744),A=n(86586),_=n(55274),D=n(13823),Z=n(12918),L=n(63074),z=n(80669),B=n(3104),F=n(352),H=e=>{let{componentCls:t,iconCls:n}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-drag")]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:"".concat((0,F.bf)(e.lineWidth)," dashed ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),[t]:{padding:e.padding},["".concat(t,"-btn")]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:"".concat((0,F.bf)(e.lineWidthFocus)," solid ").concat(e.colorPrimaryBorder)}},["".concat(t,"-drag-container")]:{display:"table-cell",verticalAlign:"middle"},["\n &:not(".concat(t,"-disabled):hover,\n &-hover:not(").concat(t,"-disabled)\n ")]:{borderColor:e.colorPrimaryHover},["p".concat(t,"-drag-icon")]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},["p".concat(t,"-text")]:{margin:"0 0 ".concat((0,F.bf)(e.marginXXS)),color:e.colorTextHeading,fontSize:e.fontSizeLG},["p".concat(t,"-hint")]:{color:e.colorTextDescription,fontSize:e.fontSize},["&".concat(t,"-disabled")]:{["p".concat(t,"-drag-icon ").concat(n,",\n p").concat(t,"-text,\n p").concat(t,"-hint\n ")]:{color:e.colorTextDisabled}}}}}},q=e=>{let{componentCls:t,antCls:n,iconCls:r,fontSize:o,lineHeight:i,calc:a}=e,l="".concat(t,"-list-item"),c="".concat(l,"-actions"),s="".concat(l,"-action"),u=e.fontHeightSM;return{["".concat(t,"-wrapper")]:{["".concat(t,"-list")]:Object.assign(Object.assign({},(0,Z.dF)()),{lineHeight:e.lineHeight,[l]:{position:"relative",height:a(e.lineHeight).mul(o).equal(),marginTop:e.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:"background-color ".concat(e.motionDurationSlow),"&:hover":{backgroundColor:e.controlItemBgHover},["".concat(l,"-name")]:Object.assign(Object.assign({},Z.vS),{padding:"0 ".concat((0,F.bf)(e.paddingXS)),lineHeight:i,flex:"auto",transition:"all ".concat(e.motionDurationSlow)}),[c]:{[s]:{opacity:0},[r]:{color:e.actionsColor,transition:"all ".concat(e.motionDurationSlow)},["\n ".concat(s,":focus-visible,\n &.picture ").concat(s,"\n ")]:{opacity:1},["".concat(s).concat(n,"-btn")]:{height:u,border:0,lineHeight:1}},["".concat(t,"-icon ").concat(r)]:{color:e.colorTextDescription,fontSize:o},["".concat(l,"-progress")]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:a(o).add(e.paddingXS).equal(),fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},["".concat(l,":hover ").concat(s)]:{opacity:1},["".concat(l,"-error")]:{color:e.colorError,["".concat(l,"-name, ").concat(t,"-icon ").concat(r)]:{color:e.colorError},[c]:{["".concat(r,", ").concat(r,":hover")]:{color:e.colorError},[s]:{opacity:1}}},["".concat(t,"-list-item-container")]:{transition:"opacity ".concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},W=n(11699);let K=new F.E4("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),V=new F.E4("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var U=e=>{let{componentCls:t}=e,n="".concat(t,"-animate-inline");return[{["".concat(t,"-wrapper")]:{["".concat(n,"-appear, ").concat(n,"-enter, ").concat(n,"-leave")]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},["".concat(n,"-appear, ").concat(n,"-enter")]:{animationName:K},["".concat(n,"-leave")]:{animationName:V}}},{["".concat(t,"-wrapper")]:(0,W.J$)(e)},K,V]},G=n(31373);let X=e=>{let{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:o,calc:i}=e,a="".concat(t,"-list"),l="".concat(a,"-item");return{["".concat(t,"-wrapper")]:{["\n ".concat(a).concat(a,"-picture,\n ").concat(a).concat(a,"-picture-card,\n ").concat(a).concat(a,"-picture-circle\n ")]:{[l]:{position:"relative",height:i(r).add(i(e.lineWidth).mul(2)).add(i(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:"".concat((0,F.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},["".concat(l,"-thumbnail")]:Object.assign(Object.assign({},Z.vS),{width:r,height:r,lineHeight:(0,F.bf)(i(r).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),["".concat(l,"-progress")]:{bottom:o,width:"calc(100% - ".concat((0,F.bf)(i(e.paddingSM).mul(2).equal()),")"),marginTop:0,paddingInlineStart:i(r).add(e.paddingXS).equal()}},["".concat(l,"-error")]:{borderColor:e.colorError,["".concat(l,"-thumbnail ").concat(n)]:{["svg path[fill='".concat(G.iN[0],"']")]:{fill:e.colorErrorBg},["svg path[fill='".concat(G.iN.primary,"']")]:{fill:e.colorError}}},["".concat(l,"-uploading")]:{borderStyle:"dashed",["".concat(l,"-name")]:{marginBottom:o}}},["".concat(a).concat(a,"-picture-circle ").concat(l)]:{["&, &::before, ".concat(l,"-thumbnail")]:{borderRadius:"50%"}}}}},$=e=>{let{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:o,calc:i}=e,a="".concat(t,"-list"),l="".concat(a,"-item"),c=e.uploadPicCardSize;return{["\n ".concat(t,"-wrapper").concat(t,"-picture-card-wrapper,\n ").concat(t,"-wrapper").concat(t,"-picture-circle-wrapper\n ")]:Object.assign(Object.assign({},(0,Z.dF)()),{display:"inline-block",width:"100%",["".concat(t).concat(t,"-select")]:{width:c,height:c,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:"".concat((0,F.bf)(e.lineWidth)," dashed ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),["> ".concat(t)]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},["&:not(".concat(t,"-disabled):hover")]:{borderColor:e.colorPrimary}},["".concat(a).concat(a,"-picture-card, ").concat(a).concat(a,"-picture-circle")]:{["".concat(a,"-item-container")]:{display:"inline-block",width:c,height:c,marginBlock:"0 ".concat((0,F.bf)(e.marginXS)),marginInline:"0 ".concat((0,F.bf)(e.marginXS)),verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")"),height:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")"),backgroundColor:e.colorBgMask,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'" "'}},["".concat(l,":hover")]:{["&::before, ".concat(l,"-actions")]:{opacity:1}},["".concat(l,"-actions")]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:"all ".concat(e.motionDurationSlow),["\n ".concat(n,"-eye,\n ").concat(n,"-download,\n ").concat(n,"-delete\n ")]:{zIndex:10,width:r,margin:"0 ".concat((0,F.bf)(e.marginXXS)),fontSize:r,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},["".concat(l,"-thumbnail, ").concat(l,"-thumbnail img")]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},["".concat(l,"-name")]:{display:"none",textAlign:"center"},["".concat(l,"-file + ").concat(l,"-name")]:{position:"absolute",bottom:e.margin,display:"block",width:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")")},["".concat(l,"-uploading")]:{["&".concat(l)]:{backgroundColor:e.colorFillAlter},["&::before, ".concat(n,"-eye, ").concat(n,"-download, ").concat(n,"-delete")]:{display:"none"}},["".concat(l,"-progress")]:{bottom:e.marginXL,width:"calc(100% - ".concat((0,F.bf)(i(e.paddingXS).mul(2).equal()),")"),paddingInlineStart:0}}}),["".concat(t,"-wrapper").concat(t,"-picture-circle-wrapper")]:{["".concat(t).concat(t,"-select")]:{borderRadius:"50%"}}}};var Y=e=>{let{componentCls:t}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"}}};let Q=e=>{let{componentCls:t,colorTextDisabled:n}=e;return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},(0,Z.Wf)(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},["".concat(t,"-select")]:{display:"inline-block"},["".concat(t,"-disabled")]:{color:n,cursor:"not-allowed"}})}};var J=(0,z.I$)("Upload",e=>{let{fontSizeHeading3:t,fontHeight:n,lineWidth:r,controlHeightLG:o,calc:i}=e,a=(0,B.TS)(e,{uploadThumbnailSize:i(t).mul(2).equal(),uploadProgressOffset:i(i(n).div(2)).add(r).equal(),uploadPicCardSize:i(o).mul(2.55).equal()});return[Q(a),H(a),X(a),$(a),q(a),U(a),Y(a),(0,L.Z)(a)]},e=>({actionsColor:e.colorTextDescription})),ee={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"},et=n(55015),en=r.forwardRef(function(e,t){return r.createElement(et.Z,(0,c.Z)({},e,{ref:t,icon:ee}))}),er=n(61935),eo={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},ei=r.forwardRef(function(e,t){return r.createElement(et.Z,(0,c.Z)({},e,{ref:t,icon:eo}))}),ea={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"},el=r.forwardRef(function(e,t){return r.createElement(et.Z,(0,c.Z)({},e,{ref:t,icon:ea}))}),ec=n(47970),es=n(51646),eu=n(68710),ed=n(19722),ef=n(73002);function ep(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function eh(e,t){let n=(0,o.Z)(t),r=n.findIndex(t=>{let{uid:n}=t;return n===e.uid});return -1===r?n.push(e):n[r]=e,n}function em(e,t){let n=void 0!==e.uid?"uid":"name";return t.filter(t=>t[n]===e[n])[0]}let eg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},ev=e=>0===e.indexOf("image/"),ey=e=>{if(e.type&&!e.thumbUrl)return ev(e.type);let t=e.thumbUrl||e.url||"",n=eg(t);return!!(/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n))||!/^data:/.test(t)&&!n};function eb(e){return new Promise(t=>{if(!e.type||!ev(e.type)){t("");return}let n=document.createElement("canvas");n.width=200,n.height=200,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(200,"px; height: ").concat(200,"px; z-index: 9999; display: none;"),document.body.appendChild(n);let r=n.getContext("2d"),o=new Image;if(o.onload=()=>{let{width:e,height:i}=o,a=200,l=200,c=0,s=0;e>i?s=-((l=200/e*i)-a)/2:c=-((a=200/i*e)-l)/2,r.drawImage(o,c,s,a,l);let u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(u)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){let t=new FileReader;t.onload=()=>{t.result&&(o.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){let n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var ex={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},ew=r.forwardRef(function(e,t){return r.createElement(et.Z,(0,c.Z)({},e,{ref:t,icon:ex}))}),eS=n(73879),ek=n(6520),eE=n(8900),eC=n(9738),eO=n(39725),ej=n(49638),eP=n(18694),eN={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},eM=function(){var e=(0,r.useRef)([]),t=(0,r.useRef)(null);return(0,r.useEffect)(function(){var n=Date.now(),r=!1;e.current.forEach(function(e){if(e){r=!0;var o=e.style;o.transitionDuration=".3s, .3s, .3s, .06s",t.current&&n-t.current<100&&(o.transitionDuration="0s, 0s")}}),r&&(t.current=Date.now())}),e.current},eI=n(26365),eR=n(94981),eT=0,eA=(0,eR.Z)(),e_=function(e){var t=r.useState(),n=(0,eI.Z)(t,2),o=n[0],i=n[1];return r.useEffect(function(){var e;i("rc_progress_".concat((eA?(e=eT,eT+=1):e="TEST_OR_SSR",e)))},[]),e||o},eD=function(e){var t=e.bg,n=e.children;return r.createElement("div",{style:{width:"100%",height:"100%",background:t}},n)};function eZ(e,t){return Object.keys(e).map(function(n){var r=parseFloat(n);return"".concat(e[n]," ").concat("".concat(Math.floor(r*t),"%"))})}var eL=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.color,i=e.gradientId,a=e.radius,l=e.style,c=e.ptg,s=e.strokeLinecap,u=e.strokeWidth,d=e.size,f=e.gapDegree,p=o&&"object"===(0,y.Z)(o),h=d/2,m=r.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:h,cy:h,stroke:p?"#FFF":void 0,strokeLinecap:s,strokeWidth:u,opacity:0===c?0:1,style:l,ref:t});if(!p)return m;var g="".concat(i,"-conic"),v=eZ(o,(360-f)/360),b=eZ(o,1),x="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(v.join(", "),")"),w="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(b.join(", "),")");return r.createElement(r.Fragment,null,r.createElement("mask",{id:g},m),r.createElement("foreignObject",{x:0,y:0,width:d,height:d,mask:"url(#".concat(g,")")},r.createElement(eD,{bg:w},r.createElement(eD,{bg:x}))))}),ez=function(e,t,n,r,o,i,a,l,c,s){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=(100-r)/100*t;return"round"===c&&100!==r&&(d+=s/2)>=t&&(d=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:d+u,transform:"rotate(".concat(o+n/100*360*((360-i)/360)+(0===i?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},eB=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function eF(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}var eH=function(e){var t,n,o,i,a=(0,m.Z)((0,m.Z)({},eN),e),s=a.id,u=a.prefixCls,d=a.steps,f=a.strokeWidth,p=a.trailWidth,h=a.gapDegree,v=void 0===h?0:h,b=a.gapPosition,x=a.trailColor,w=a.strokeLinecap,S=a.style,k=a.className,E=a.strokeColor,C=a.percent,O=(0,g.Z)(a,eB),j=e_(s),P="".concat(j,"-gradient"),N=50-f/2,M=2*Math.PI*N,I=v>0?90+v/2:-90,R=(360-v)/360*M,T="object"===(0,y.Z)(d)?d:{count:d,space:2},A=T.count,_=T.space,D=eF(C),Z=eF(E),L=Z.find(function(e){return e&&"object"===(0,y.Z)(e)}),z=L&&"object"===(0,y.Z)(L)?"butt":w,B=ez(M,R,0,100,I,v,b,x,z,f),F=eM();return r.createElement("svg",(0,c.Z)({className:l()("".concat(u,"-circle"),k),viewBox:"0 0 ".concat(100," ").concat(100),style:S,id:s,role:"presentation"},O),!A&&r.createElement("circle",{className:"".concat(u,"-circle-trail"),r:N,cx:50,cy:50,stroke:x,strokeLinecap:z,strokeWidth:p||f,style:B}),A?(t=Math.round(D[0]/100*A),n=100/A,o=0,Array(A).fill(null).map(function(e,i){var a=i<=t-1?Z[0]:x,l=a&&"object"===(0,y.Z)(a)?"url(#".concat(P,")"):void 0,c=ez(M,R,o,n,I,v,b,a,"butt",f,_);return o+=(R-c.strokeDashoffset+_)*100/R,r.createElement("circle",{key:i,className:"".concat(u,"-circle-path"),r:N,cx:50,cy:50,stroke:l,strokeWidth:f,opacity:1,style:c,ref:function(e){F[i]=e}})})):(i=0,D.map(function(e,t){var n=Z[t]||Z[Z.length-1],o=ez(M,R,i,e,I,v,b,n,z,f);return i+=e,r.createElement(eL,{key:t,color:n,ptg:e,radius:N,prefixCls:u,gradientId:P,style:o,strokeLinecap:z,strokeWidth:f,gapDegree:v,ref:function(e){F[t]=e},size:100})}).reverse()))},eq=n(75957);function eW(e){return!e||e<0?0:e>100?100:e}function eK(e){let{success:t,successPercent:n}=e,r=n;return t&&"progress"in t&&(r=t.progress),t&&"percent"in t&&(r=t.percent),r}let eV=e=>{let{percent:t,success:n,successPercent:r}=e,o=eW(eK({success:n,successPercent:r}));return[o,eW(eW(t)-o)]},eU=e=>{let{success:t={},strokeColor:n}=e,{strokeColor:r}=t;return[r||G.ez.green,n||null]},eG=(e,t,n)=>{var r,o,i,a;let l=-1,c=-1;if("step"===t){let t=n.steps,r=n.strokeWidth;"string"==typeof e||void 0===e?(l="small"===e?2:14,c=null!=r?r:8):"number"==typeof e?[l,c]=[e,e]:[l=14,c=8]=e,l*=t}else if("line"===t){let t=null==n?void 0:n.strokeWidth;"string"==typeof e||void 0===e?c=t||("small"===e?6:8):"number"==typeof e?[l,c]=[e,e]:[l=-1,c=8]=e}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[l,c]="small"===e?[60,60]:[120,120]:"number"==typeof e?[l,c]=[e,e]:(l=null!==(o=null!==(r=e[0])&&void 0!==r?r:e[1])&&void 0!==o?o:120,c=null!==(a=null!==(i=e[0])&&void 0!==i?i:e[1])&&void 0!==a?a:120));return[l,c]},eX=e=>3/e*100;var e$=e=>{let{prefixCls:t,trailColor:n=null,strokeLinecap:o="round",gapPosition:i,gapDegree:a,width:c=120,type:s,children:u,success:d,size:f=c}=e,[p,h]=eG(f,"circle"),{strokeWidth:m}=e;void 0===m&&(m=Math.max(eX(p),6));let g=r.useMemo(()=>a||0===a?a:"dashboard"===s?75:void 0,[a,s]),v="[object Object]"===Object.prototype.toString.call(e.strokeColor),y=eU({success:d,strokeColor:e.strokeColor}),b=l()("".concat(t,"-inner"),{["".concat(t,"-circle-gradient")]:v}),x=r.createElement(eH,{percent:eV(e),strokeWidth:m,trailWidth:m,strokeColor:y,strokeLinecap:o,trailColor:n,prefixCls:t,gapDegree:g,gapPosition:i||"dashboard"===s&&"bottom"||void 0});return r.createElement("div",{className:b,style:{width:p,height:h,fontSize:.15*p+6}},p<=20?r.createElement(eq.Z,{title:u},r.createElement("span",null,x)):r.createElement(r.Fragment,null,x,u))};let eY="--progress-line-stroke-color",eQ="--progress-percent",eJ=e=>{let t=e?"100%":"-100%";return new F.E4("antProgress".concat(e?"RTL":"LTR","Active"),{"0%":{transform:"translateX(".concat(t,") scaleX(0)"),opacity:.1},"20%":{transform:"translateX(".concat(t,") scaleX(0)"),opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},e0=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},(0,Z.Wf)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},["".concat(t,"-outer")]:{display:"inline-block",width:"100%"},["&".concat(t,"-show-info")]:{["".concat(t,"-outer")]:{marginInlineEnd:"calc(-2em - ".concat((0,F.bf)(e.marginXS),")"),paddingInlineEnd:"calc(2em + ".concat((0,F.bf)(e.paddingXS),")")}},["".concat(t,"-inner")]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},["".concat(t,"-inner:not(").concat(t,"-circle-gradient)")]:{["".concat(t,"-circle-path")]:{stroke:e.defaultColor}},["".concat(t,"-success-bg, ").concat(t,"-bg")]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc)},["".concat(t,"-bg")]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit","var(".concat(eY,")")]},height:"100%",width:"calc(1 / var(".concat(eQ,") * 100%)"),display:"block"}},["".concat(t,"-success-bg")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},["".concat(t,"-text")]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},["&".concat(t,"-status-active")]:{["".concat(t,"-bg::before")]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:eJ(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},["&".concat(t,"-rtl").concat(t,"-status-active")]:{["".concat(t,"-bg::before")]:{animationName:eJ(!0)}},["&".concat(t,"-status-exception")]:{["".concat(t,"-bg")]:{backgroundColor:e.colorError},["".concat(t,"-text")]:{color:e.colorError}},["&".concat(t,"-status-exception ").concat(t,"-inner:not(").concat(t,"-circle-gradient)")]:{["".concat(t,"-circle-path")]:{stroke:e.colorError}},["&".concat(t,"-status-success")]:{["".concat(t,"-bg")]:{backgroundColor:e.colorSuccess},["".concat(t,"-text")]:{color:e.colorSuccess}},["&".concat(t,"-status-success ").concat(t,"-inner:not(").concat(t,"-circle-gradient)")]:{["".concat(t,"-circle-path")]:{stroke:e.colorSuccess}}})}},e1=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{["".concat(t,"-circle-trail")]:{stroke:e.remainingColor},["&".concat(t,"-circle ").concat(t,"-inner")]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},["&".concat(t,"-circle ").concat(t,"-text")]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},["".concat(t,"-circle&-status-exception")]:{["".concat(t,"-text")]:{color:e.colorError}},["".concat(t,"-circle&-status-success")]:{["".concat(t,"-text")]:{color:e.colorSuccess}}},["".concat(t,"-inline-circle")]:{lineHeight:1,["".concat(t,"-inner")]:{verticalAlign:"bottom"}}}},e2=e=>{let{componentCls:t}=e;return{[t]:{["".concat(t,"-steps")]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:"all ".concat(e.motionDurationSlow),"&-active":{backgroundColor:e.defaultColor}}}}}},e6=e=>{let{componentCls:t,iconCls:n}=e;return{[t]:{["".concat(t,"-small&-line, ").concat(t,"-small&-line ").concat(t,"-text ").concat(n)]:{fontSize:e.fontSizeSM}}}};var e4=(0,z.I$)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),n=(0,B.TS)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[e0(n),e1(n),e2(n),e6(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:"".concat(e.fontSize/e.fontSizeSM,"em")})),e3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let e5=e=>{let t=[];return Object.keys(e).forEach(n=>{let r=parseFloat(n.replace(/%/g,""));isNaN(r)||t.push({key:r,value:e[n]})}),(t=t.sort((e,t)=>e.key-t.key)).map(e=>{let{key:t,value:n}=e;return"".concat(n," ").concat(t,"%")}).join(", ")},e8=(e,t)=>{let{from:n=G.ez.blue,to:r=G.ez.blue,direction:o="rtl"===t?"to left":"to right"}=e,i=e3(e,["from","to","direction"]);if(0!==Object.keys(i).length){let e=e5(i),t="linear-gradient(".concat(o,", ").concat(e,")");return{background:t,[eY]:t}}let a="linear-gradient(".concat(o,", ").concat(n,", ").concat(r,")");return{background:a,[eY]:a}};var e7=e=>{let{prefixCls:t,direction:n,percent:o,size:i,strokeWidth:a,strokeColor:l,strokeLinecap:c="round",children:s,trailColor:u=null,success:d}=e,f=l&&"string"!=typeof l?e8(l,n):{[eY]:l,background:l},p="square"===c||"butt"===c?0:void 0,[h,m]=eG(null!=i?i:[-1,a||("small"===i?6:8)],"line",{strokeWidth:a}),g=Object.assign(Object.assign({width:"".concat(eW(o),"%"),height:m,borderRadius:p},f),{[eQ]:eW(o)/100}),v=eK(e),y={width:"".concat(eW(v),"%"),height:m,borderRadius:p,backgroundColor:null==d?void 0:d.strokeColor};return r.createElement(r.Fragment,null,r.createElement("div",{className:"".concat(t,"-outer"),style:{width:h<0?"100%":h,height:m}},r.createElement("div",{className:"".concat(t,"-inner"),style:{backgroundColor:u||void 0,borderRadius:p}},r.createElement("div",{className:"".concat(t,"-bg"),style:g}),void 0!==v?r.createElement("div",{className:"".concat(t,"-success-bg"),style:y}):null)),s)},e9=e=>{let{size:t,steps:n,percent:o=0,strokeWidth:i=8,strokeColor:a,trailColor:c=null,prefixCls:s,children:u}=e,d=Math.round(o/100*n),[f,p]=eG(null!=t?t:["small"===t?2:14,i],"step",{steps:n,strokeWidth:i}),h=f/n,m=Array(n);for(let e=0;e<n;e++){let t=Array.isArray(a)?a[e]:a;m[e]=r.createElement("div",{key:e,className:l()("".concat(s,"-steps-item"),{["".concat(s,"-steps-item-active")]:e<=d-1}),style:{backgroundColor:e<=d-1?t:c,width:h,height:p}})}return r.createElement("div",{className:"".concat(s,"-steps-outer")},m,u)},te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let tt=["normal","exception","active","success"],tn=r.forwardRef((e,t)=>{let n;let{prefixCls:o,className:i,rootClassName:a,steps:c,strokeColor:s,percent:u=0,size:d="default",showInfo:f=!0,type:p="line",status:h,format:m,style:g}=e,v=te(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),y=r.useMemo(()=>{var t,n;let r=eK(e);return parseInt(void 0!==r?null===(t=null!=r?r:0)||void 0===t?void 0:t.toString():null===(n=null!=u?u:0)||void 0===n?void 0:n.toString(),10)},[u,e.success,e.successPercent]),b=r.useMemo(()=>!tt.includes(h)&&y>=100?"success":h||"normal",[h,y]),{getPrefixCls:x,direction:w,progress:S}=r.useContext(T.E_),k=x("progress",o),[E,C,O]=e4(k),j=r.useMemo(()=>{let t;if(!f)return null;let n=eK(e),o=m||(e=>"".concat(e,"%")),i="line"===p;return m||"exception"!==b&&"success"!==b?t=o(eW(u),eW(n)):"exception"===b?t=i?r.createElement(eO.Z,null):r.createElement(ej.Z,null):"success"===b&&(t=i?r.createElement(eE.Z,null):r.createElement(eC.Z,null)),r.createElement("span",{className:"".concat(k,"-text"),title:"string"==typeof t?t:void 0},t)},[f,u,y,b,p,k,m]),P=Array.isArray(s)?s[0]:s,N="string"==typeof s||Array.isArray(s)?s:void 0;"line"===p?n=c?r.createElement(e9,Object.assign({},e,{strokeColor:N,prefixCls:k,steps:c}),j):r.createElement(e7,Object.assign({},e,{strokeColor:P,prefixCls:k,direction:w}),j):("circle"===p||"dashboard"===p)&&(n=r.createElement(e$,Object.assign({},e,{strokeColor:P,prefixCls:k,progressStatus:b}),j));let M=l()(k,"".concat(k,"-status-").concat(b),"".concat(k,"-").concat("dashboard"===p&&"circle"||c&&"steps"||p),{["".concat(k,"-inline-circle")]:"circle"===p&&eG(d,"circle")[0]<=20,["".concat(k,"-show-info")]:f,["".concat(k,"-").concat(d)]:"string"==typeof d,["".concat(k,"-rtl")]:"rtl"===w},null==S?void 0:S.className,i,a,C,O);return E(r.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},null==S?void 0:S.style),g),className:M,role:"progressbar","aria-valuenow":y},(0,eP.Z)(v,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),n))}),tr=r.forwardRef((e,t)=>{var n,o;let{prefixCls:i,className:a,style:c,locale:s,listType:u,file:d,items:f,progress:p,iconRender:h,actionIconRender:m,itemRender:g,isImgUrl:v,showPreviewIcon:y,showRemoveIcon:b,showDownloadIcon:x,previewIcon:w,removeIcon:S,downloadIcon:k,onPreview:E,onDownload:C,onClose:O}=e,{status:j}=d,[P,N]=r.useState(j);r.useEffect(()=>{"removed"!==j&&N(j)},[j]);let[M,I]=r.useState(!1);r.useEffect(()=>{let e=setTimeout(()=>{I(!0)},300);return()=>{clearTimeout(e)}},[]);let R=h(d),A=r.createElement("div",{className:"".concat(i,"-icon")},R);if("picture"===u||"picture-card"===u||"picture-circle"===u){if("uploading"!==P&&(d.thumbUrl||d.url)){let e=(null==v?void 0:v(d))?r.createElement("img",{src:d.thumbUrl||d.url,alt:d.name,className:"".concat(i,"-list-item-image"),crossOrigin:d.crossOrigin}):R,t=l()("".concat(i,"-list-item-thumbnail"),{["".concat(i,"-list-item-file")]:v&&!v(d)});A=r.createElement("a",{className:t,onClick:e=>E(d,e),href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer"},e)}else{let e=l()("".concat(i,"-list-item-thumbnail"),{["".concat(i,"-list-item-file")]:"uploading"!==P});A=r.createElement("div",{className:e},R)}}let _=l()("".concat(i,"-list-item"),"".concat(i,"-list-item-").concat(P)),D="string"==typeof d.linkProps?JSON.parse(d.linkProps):d.linkProps,Z=b?m(("function"==typeof S?S(d):S)||r.createElement(ew,null),()=>O(d),i,s.removeFile,!0):null,L=x&&"done"===P?m(("function"==typeof k?k(d):k)||r.createElement(eS.Z,null),()=>C(d),i,s.downloadFile):null,z="picture-card"!==u&&"picture-circle"!==u&&r.createElement("span",{key:"download-delete",className:l()("".concat(i,"-list-item-actions"),{picture:"picture"===u})},L,Z),B=l()("".concat(i,"-list-item-name")),F=d.url?[r.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:B,title:d.name},D,{href:d.url,onClick:e=>E(d,e)}),d.name),z]:[r.createElement("span",{key:"view",className:B,onClick:e=>E(d,e),title:d.name},d.name),z],H=y&&(d.url||d.thumbUrl)?r.createElement("a",{href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>E(d,e),title:s.previewFile},"function"==typeof w?w(d):w||r.createElement(ek.Z,null)):null,q=("picture-card"===u||"picture-circle"===u)&&"uploading"!==P&&r.createElement("span",{className:"".concat(i,"-list-item-actions")},H,"done"===P&&L,Z),{getPrefixCls:W}=r.useContext(T.E_),K=W(),V=r.createElement("div",{className:_},A,F,q,M&&r.createElement(ec.ZP,{motionName:"".concat(K,"-fade"),visible:"uploading"===P,motionDeadline:2e3},e=>{let{className:t}=e,n="percent"in d?r.createElement(tn,Object.assign({},p,{type:"line",percent:d.percent,"aria-label":d["aria-label"],"aria-labelledby":d["aria-labelledby"]})):null;return r.createElement("div",{className:l()("".concat(i,"-list-item-progress"),t)},n)})),U=d.response&&"string"==typeof d.response?d.response:(null===(n=d.error)||void 0===n?void 0:n.statusText)||(null===(o=d.error)||void 0===o?void 0:o.message)||s.uploadError,G="error"===P?r.createElement(eq.Z,{title:U,getPopupContainer:e=>e.parentNode},V):V;return r.createElement("div",{className:l()("".concat(i,"-list-item-container"),a),style:c,ref:t},g?g(G,d,f,{download:C.bind(null,d),preview:E.bind(null,d),remove:O.bind(null,d)}):G)}),to=r.forwardRef((e,t)=>{let{listType:n="text",previewFile:i=eb,onPreview:a,onDownload:c,onRemove:s,locale:u,iconRender:d,isImageUrl:f=ey,prefixCls:p,items:h=[],showPreviewIcon:m=!0,showRemoveIcon:g=!0,showDownloadIcon:v=!1,removeIcon:y,previewIcon:b,downloadIcon:x,progress:w={size:[-1,2],showInfo:!1},appendAction:S,appendActionVisible:k=!0,itemRender:E,disabled:C}=e,O=(0,es.Z)(),[j,P]=r.useState(!1);r.useEffect(()=>{("picture"===n||"picture-card"===n||"picture-circle"===n)&&(h||[]).forEach(e=>{"undefined"!=typeof document&&"undefined"!=typeof window&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",i&&i(e.originFileObj).then(t=>{e.thumbUrl=t||"",O()}))})},[n,h,i]),r.useEffect(()=>{P(!0)},[]);let N=(e,t)=>{if(a)return null==t||t.preventDefault(),a(e)},M=e=>{"function"==typeof c?c(e):e.url&&window.open(e.url)},I=e=>{null==s||s(e)},R=e=>{if(d)return d(e,n);let t="uploading"===e.status,o=f&&f(e)?r.createElement(el,null):r.createElement(en,null),i=t?r.createElement(er.Z,null):r.createElement(ei,null);return"picture"===n?i=t?r.createElement(er.Z,null):o:("picture-card"===n||"picture-circle"===n)&&(i=t?u.uploading:o),i},A=(e,t,n,o,i)=>{let a={type:"text",size:"small",title:o,onClick:n=>{t(),(0,ed.l$)(e)&&e.props.onClick&&e.props.onClick(n)},className:"".concat(n,"-list-item-action")};if(i&&(a.disabled=C),(0,ed.l$)(e)){let t=(0,ed.Tm)(e,Object.assign(Object.assign({},e.props),{onClick:()=>{}}));return r.createElement(ef.ZP,Object.assign({},a,{icon:t}))}return r.createElement(ef.ZP,Object.assign({},a),r.createElement("span",null,e))};r.useImperativeHandle(t,()=>({handlePreview:N,handleDownload:M}));let{getPrefixCls:_}=r.useContext(T.E_),D=_("upload",p),Z=_(),L=l()("".concat(D,"-list"),"".concat(D,"-list-").concat(n)),z=(0,o.Z)(h.map(e=>({key:e.uid,file:e}))),B={motionDeadline:2e3,motionName:"".concat(D,"-").concat("picture-card"===n||"picture-circle"===n?"animate-inline":"animate"),keys:z,motionAppear:j},F=r.useMemo(()=>{let e=Object.assign({},(0,eu.Z)(Z));return delete e.onAppearEnd,delete e.onEnterEnd,delete e.onLeaveEnd,e},[Z]);return"picture-card"!==n&&"picture-circle"!==n&&(B=Object.assign(Object.assign({},F),B)),r.createElement("div",{className:L},r.createElement(ec.V4,Object.assign({},B,{component:!1}),e=>{let{key:t,file:o,className:i,style:a}=e;return r.createElement(tr,{key:t,locale:u,prefixCls:D,className:i,style:a,file:o,items:h,progress:w,listType:n,isImgUrl:f,showPreviewIcon:m,showRemoveIcon:g,showDownloadIcon:v,removeIcon:y,previewIcon:b,downloadIcon:x,iconRender:R,actionIconRender:A,itemRender:E,onPreview:N,onDownload:M,onClose:I})}),S&&r.createElement(ec.ZP,Object.assign({},B,{visible:k,forceRender:!0}),e=>{let{className:t,style:n}=e;return(0,ed.Tm)(S,e=>({className:l()(e.className,t),style:Object.assign(Object.assign(Object.assign({},n),{pointerEvents:t?"none":void 0}),e.style)}))}))}),ti="__LIST_IGNORE_".concat(Date.now(),"__"),ta=r.forwardRef((e,t)=>{let n;let{fileList:a,defaultFileList:c,onRemove:s,showUploadList:u=!0,listType:d="text",onPreview:f,onDownload:p,onChange:h,onDrop:m,previewFile:g,disabled:v,locale:y,iconRender:b,isImageUrl:x,progress:w,prefixCls:S,className:k,type:E="select",children:C,style:O,itemRender:j,maxCount:P,data:N={},multiple:M=!1,hasControlInside:Z=!0,action:L="",accept:z="",supportServerRender:B=!0,rootClassName:F}=e,H=r.useContext(A.Z),q=null!=v?v:H,[W,K]=(0,R.Z)(c||[],{value:a,postState:e=>null!=e?e:[]}),[V,U]=r.useState("drop"),G=r.useRef(null);r.useMemo(()=>{let e=Date.now();(a||[]).forEach((t,n)=>{t.uid||Object.isFrozen(t)||(t.uid="__AUTO__".concat(e,"_").concat(n,"__"))})},[a]);let X=(e,t,n)=>{let r=(0,o.Z)(t),a=!1;1===P?r=r.slice(-1):P&&(a=r.length>P,r=r.slice(0,P)),(0,i.flushSync)(()=>{K(r)});let l={file:e,fileList:r};n&&(l.event=n),(!a||r.some(t=>t.uid===e.uid))&&(0,i.flushSync)(()=>{null==h||h(l)})},$=e=>{let t=e.filter(e=>!e.file[ti]);if(!t.length)return;let n=t.map(e=>ep(e.file)),r=(0,o.Z)(W);n.forEach(e=>{r=eh(e,r)}),n.forEach((e,n)=>{let o=e;if(t[n].parsedFile)e.status="uploading";else{let t;let{originFileObj:n}=e;try{t=new File([n],n.name,{type:n.type})}catch(e){(t=new Blob([n],{type:n.type})).name=n.name,t.lastModifiedDate=new Date,t.lastModified=new Date().getTime()}t.uid=e.uid,o=t}X(o,r)})},Y=(e,t,n)=>{try{"string"==typeof e&&(e=JSON.parse(e))}catch(e){}if(!em(t,W))return;let r=ep(t);r.status="done",r.percent=100,r.response=e,r.xhr=n;let o=eh(r,W);X(r,o)},Q=(e,t)=>{if(!em(t,W))return;let n=ep(t);n.status="uploading",n.percent=e.percent;let r=eh(n,W);X(n,r,e)},ee=(e,t,n)=>{if(!em(n,W))return;let r=ep(n);r.error=e,r.response=t,r.status="error";let o=eh(r,W);X(r,o)},et=e=>{let t;Promise.resolve("function"==typeof s?s(e):s).then(n=>{var r;if(!1===n)return;let o=function(e,t){let n=void 0!==e.uid?"uid":"name",r=t.filter(t=>t[n]!==e[n]);return r.length===t.length?null:r}(e,W);o&&(t=Object.assign(Object.assign({},e),{status:"removed"}),null==W||W.forEach(e=>{let n=void 0!==t.uid?"uid":"name";e[n]!==t[n]||Object.isFrozen(e)||(e.status="removed")}),null===(r=G.current)||void 0===r||r.abort(t),X(t,o))})},en=e=>{U(e.type),"drop"===e.type&&(null==m||m(e))};r.useImperativeHandle(t,()=>({onBatchStart:$,onSuccess:Y,onProgress:Q,onError:ee,fileList:W,upload:G.current}));let{getPrefixCls:er,direction:eo,upload:ei}=r.useContext(T.E_),ea=er("upload",S),el=Object.assign(Object.assign({onBatchStart:$,onError:ee,onProgress:Q,onSuccess:Y},e),{data:N,multiple:M,action:L,accept:z,supportServerRender:B,prefixCls:ea,disabled:q,beforeUpload:(t,n)=>{var r,o,i,a;return r=void 0,o=void 0,i=void 0,a=function*(){let{beforeUpload:r,transformFile:o}=e,i=t;if(r){let e=yield r(t,n);if(!1===e)return!1;if(delete t[ti],e===ti)return Object.defineProperty(t,ti,{value:!0,configurable:!0}),!1;"object"==typeof e&&e&&(i=e)}return o&&(i=yield o(i)),i},new(i||(i=Promise))(function(e,t){function n(e){try{c(a.next(e))}catch(e){t(e)}}function l(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(n,l)}c((a=a.apply(r,o||[])).next())})},onChange:void 0,hasControlInside:Z});delete el.className,delete el.style,(!C||q)&&delete el.id;let ec="".concat(ea,"-wrapper"),[es,eu,ed]=J(ea,ec),[ef]=(0,_.Z)("Upload",D.Z.Upload),{showRemoveIcon:eg,showPreviewIcon:ev,showDownloadIcon:ey,removeIcon:eb,previewIcon:ex,downloadIcon:ew}="boolean"==typeof u?{}:u,eS=void 0===eg?!q:!!eg,ek=(e,t)=>u?r.createElement(to,{prefixCls:ea,listType:d,items:W,previewFile:g,onPreview:f,onDownload:p,onRemove:et,showRemoveIcon:eS,showPreviewIcon:ev,showDownloadIcon:ey,removeIcon:eb,previewIcon:ex,downloadIcon:ew,iconRender:b,locale:Object.assign(Object.assign({},ef),y),isImageUrl:x,progress:w,appendAction:e,appendActionVisible:t,itemRender:j,disabled:q}):e,eE=l()(ec,k,F,eu,ed,null==ei?void 0:ei.className,{["".concat(ea,"-rtl")]:"rtl"===eo,["".concat(ea,"-picture-card-wrapper")]:"picture-card"===d,["".concat(ea,"-picture-circle-wrapper")]:"picture-circle"===d}),eC=Object.assign(Object.assign({},null==ei?void 0:ei.style),O);if("drag"===E){let e=l()(eu,ea,"".concat(ea,"-drag"),{["".concat(ea,"-drag-uploading")]:W.some(e=>"uploading"===e.status),["".concat(ea,"-drag-hover")]:"dragover"===V,["".concat(ea,"-disabled")]:q,["".concat(ea,"-rtl")]:"rtl"===eo});return es(r.createElement("span",{className:eE},r.createElement("div",{className:e,style:eC,onDrop:en,onDragOver:en,onDragLeave:en},r.createElement(I,Object.assign({},el,{ref:G,className:"".concat(ea,"-btn")}),r.createElement("div",{className:"".concat(ea,"-drag-container")},C))),ek()))}let eO=l()(ea,"".concat(ea,"-select"),{["".concat(ea,"-disabled")]:q}),ej=(n=C?void 0:{display:"none"},r.createElement("div",{className:eO,style:n},r.createElement(I,Object.assign({},el,{ref:G}))));return es("picture-card"===d||"picture-circle"===d?r.createElement("span",{className:eE},ek(ej,!!C)):r.createElement("span",{className:eE},ej,ek()))});var tl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let tc=r.forwardRef((e,t)=>{var{style:n,height:o,hasControlInside:i=!1}=e,a=tl(e,["style","height","hasControlInside"]);return r.createElement(ta,Object.assign({ref:t,hasControlInside:i},a,{type:"drag",style:Object.assign(Object.assign({},n),{height:o})}))});ta.Dragger=tc,ta.LIST_IGNORE=ti;var ts=ta},49211:function(e,t,n){"use strict";var r=n(99623),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,l,c,s,u,d,f=!1;t||(t={}),a=t.debug||!1;try{if(c=r(),s=document.createRange(),u=document.getSelection(),(d=document.createElement("span")).textContent=e,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),void 0===n.clipboardData){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=o[t.format]||o.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),s.selectNodeContents(d),u.addRange(s),!document.execCommand("copy"))throw Error("copy command was unsuccessful");f=!0}catch(r){a&&console.error("unable to copy using execCommand: ",r),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(r){a&&console.error("unable to copy using clipboardData: ",r),a&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",l=n.replace(/#{\s*key\s*}/g,i),window.prompt(l,e)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}},7656:function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:function(){return r}})},47869:function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,{Z:function(){return r}})},7366:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(41154),o=n(25721),i=n(55463),a=n(99735),l=n(7656),c=n(47869);function s(e,t){if((0,l.Z)(2,arguments),!t||"object"!==(0,r.Z)(t))return new Date(NaN);var n=t.years?(0,c.Z)(t.years):0,s=t.months?(0,c.Z)(t.months):0,u=t.weeks?(0,c.Z)(t.weeks):0,d=t.days?(0,c.Z)(t.days):0,f=t.hours?(0,c.Z)(t.hours):0,p=t.minutes?(0,c.Z)(t.minutes):0,h=t.seconds?(0,c.Z)(t.seconds):0,m=(0,a.Z)(e),g=s||n?(0,i.Z)(m,s+12*n):m;return new Date((d||u?(0,o.Z)(g,d+7*u):g).getTime()+1e3*(h+60*(p+60*f)))}},25721:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(47869),o=n(99735),i=n(7656);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e),a=(0,r.Z)(t);return isNaN(a)?new Date(NaN):(a&&n.setDate(n.getDate()+a),n)}},55463:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(47869),o=n(99735),i=n(7656);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e),a=(0,r.Z)(t);if(isNaN(a))return new Date(NaN);if(!a)return n;var l=n.getDate(),c=new Date(n.getTime());return(c.setMonth(n.getMonth()+a+1,0),l>=c.getDate())?c:(n.setFullYear(c.getFullYear(),c.getMonth(),l),n)}},99735:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(41154),o=n(7656);function i(e){(0,o.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}},61134:function(e,t,n){var r;!function(o){"use strict";var i,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},l=!0,c="[DecimalError] ",s=c+"Invalid argument: ",u=c+"Exponent out of range: ",d=Math.floor,f=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,h=d(1286742750677284.5),m={};function g(e,t){var n,r,o,i,a,c,s,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),l?O(t,f):t;if(s=e.d,u=t.d,a=e.e,o=t.e,s=s.slice(),i=a-o){for(i<0?(r=s,i=-i,c=u.length):(r=u,o=a,c=s.length),i>(c=(a=Math.ceil(f/7))>c?a+1:c+1)&&(i=c,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((c=s.length)-(i=u.length)<0&&(i=c,r=u,u=s,s=r),n=0;i;)n=(s[--i]=s[i]+u[i]+n)/1e7|0,s[i]%=1e7;for(n&&(s.unshift(n),++o),c=s.length;0==s[--c];)s.pop();return t.d=s,t.e=o,l?O(t,f):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(s+e)}function y(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=k(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=k(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},m.comparedTo=m.cmp=function(e){var t,n,r,o;if(e=new this.constructor(e),this.s!==e.s)return this.s||-e.s;if(this.e!==e.e)return this.e>e.e^this.s<0?1:-1;for(t=0,n=(r=this.d.length)<(o=e.d.length)?r:o;t<n;++t)if(this.d[t]!==e.d[t])return this.d[t]>e.d[t]^this.s<0?1:-1;return r===o?0:r>o^this.s<0?1:-1},m.decimalPlaces=m.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},m.dividedBy=m.div=function(e){return b(this,new this.constructor(e))},m.dividedToIntegerBy=m.idiv=function(e){var t=this.constructor;return O(b(this,new t(e),0,1),t.precision)},m.equals=m.eq=function(e){return!this.cmp(e)},m.exponent=function(){return w(this)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){return this.cmp(e)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return 0===this.s},m.lessThan=m.lt=function(e){return 0>this.cmp(e)},m.lessThanOrEqualTo=m.lte=function(e){return 1>this.cmp(e)},m.logarithm=m.log=function(e){var t,n=this.constructor,r=n.precision,o=r+5;if(void 0===e)e=new n(10);else if((e=new n(e)).s<1||e.eq(i))throw Error(c+"NaN");if(this.s<1)throw Error(c+(this.s?"NaN":"-Infinity"));return this.eq(i)?new n(0):(l=!1,t=b(E(this,o),E(e,o),o),l=!0,O(t,r))},m.minus=m.sub=function(e){return e=new this.constructor(e),this.s==e.s?j(this,e):g(this,(e.s=-e.s,e))},m.modulo=m.mod=function(e){var t,n=this.constructor,r=n.precision;if(!(e=new n(e)).s)throw Error(c+"NaN");return this.s?(l=!1,t=b(this,e,0,1).times(e),l=!0,this.minus(t)):O(new n(this),r)},m.naturalExponential=m.exp=function(){return x(this)},m.naturalLogarithm=m.ln=function(){return E(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},m.plus=m.add=function(e){return e=new this.constructor(e),this.s==e.s?g(this,e):j(this,(e.s=-e.s,e))},m.precision=m.sd=function(e){var t,n,r;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(s+e);if(t=w(this)+1,n=7*(r=this.d.length-1)+1,r=this.d[r]){for(;r%10==0;r/=10)n--;for(r=this.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},m.squareRoot=m.sqrt=function(){var e,t,n,r,o,i,a,s=this.constructor;if(this.s<1){if(!this.s)return new s(0);throw Error(c+"NaN")}for(e=w(this),l=!1,0==(o=Math.sqrt(+this))||o==1/0?(((t=y(this.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new s(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new s(o.toString()),o=a=(n=s.precision)+3;;)if(r=(i=r).plus(b(this,i,a+2)).times(.5),y(i.d).slice(0,a)===(t=y(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(O(i,n+1,0),i.times(i).eq(this)){r=i;break}}else if("9999"!=t)break;a+=4}return l=!0,O(r,n)},m.times=m.mul=function(e){var t,n,r,o,i,a,c,s,u,d=this.constructor,f=this.d,p=(e=new d(e)).d;if(!this.s||!e.s)return new d(0);for(e.s*=this.s,n=this.e+e.e,(s=f.length)<(u=p.length)&&(i=f,f=p,p=i,a=s,s=u,u=a),i=[],r=a=s+u;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,o=s+r;o>r;)c=i[o]+p[r]*f[o-r-1]+t,i[o--]=c%1e7|0,t=c/1e7|0;i[o]=(i[o]+t)%1e7|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,l?O(e,d.precision):e},m.toDecimalPlaces=m.todp=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(v(e,0,1e9),void 0===t?t=r.rounding:v(t,0,8),O(n,e+w(n)+1,t))},m.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=P(r,!0):(v(e,0,1e9),void 0===t?t=o.rounding:v(t,0,8),n=P(r=O(new o(r),e+1,t),!0,e+1)),n},m.toFixed=function(e,t){var n,r,o=this.constructor;return void 0===e?P(this):(v(e,0,1e9),void 0===t?t=o.rounding:v(t,0,8),n=P((r=O(new o(this),e+w(this)+1,t)).abs(),!1,e+w(r)+1),this.isneg()&&!this.isZero()?"-"+n:n)},m.toInteger=m.toint=function(){var e=this.constructor;return O(new e(this),w(this)+1,e.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(e){var t,n,r,o,a,s,u=this,f=u.constructor,p=+(e=new f(e));if(!e.s)return new f(i);if(!(u=new f(u)).s){if(e.s<1)throw Error(c+"Infinity");return u}if(u.eq(i))return u;if(r=f.precision,e.eq(i))return O(u,r);if(s=(t=e.e)>=(n=e.d.length-1),a=u.s,s){if((n=p<0?-p:p)<=9007199254740991){for(o=new f(i),t=Math.ceil(r/7+4),l=!1;n%2&&N((o=o.times(u)).d,t),0!==(n=d(n/2));)N((u=u.times(u)).d,t);return l=!0,e.s<0?new f(i).div(o):O(o,r)}}else if(a<0)throw Error(c+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,l=!1,o=e.times(E(u,r+12)),l=!0,(o=x(o)).s=a,o},m.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?(n=w(o),r=P(o,n<=i.toExpNeg||n>=i.toExpPos)):(v(e,1,1e9),void 0===t?t=i.rounding:v(t,0,8),n=w(o=O(new i(o),e,t)),r=P(o,e<=n||n<=i.toExpNeg,e)),r},m.toSignificantDigits=m.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(v(e,1,1e9),void 0===t?t=n.rounding:v(t,0,8)),O(new n(this),e,t)},m.toString=m.valueOf=m.val=m.toJSON=function(){var e=w(this),t=this.constructor;return P(this,e<=t.toExpNeg||e>=t.toExpPos)};var b=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%1e7|0,r=n/1e7|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=1e7*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var l,s,u,d,f,p,h,m,g,v,y,b,x,S,k,E,C,j,P=r.constructor,N=r.s==o.s?1:-1,M=r.d,I=o.d;if(!r.s)return new P(r);if(!o.s)throw Error(c+"Division by zero");for(u=0,s=r.e-o.e,C=I.length,k=M.length,m=(h=new P(N)).d=[];I[u]==(M[u]||0);)++u;if(I[u]>(M[u]||0)&&--s,(b=null==i?i=P.precision:a?i+(w(r)-w(o))+1:i)<0)return new P(0);if(b=b/7+2|0,u=0,1==C)for(d=0,I=I[0],b++;(u<k||d)&&b--;u++)x=1e7*d+(M[u]||0),m[u]=x/I|0,d=x%I|0;else{for((d=1e7/(I[0]+1)|0)>1&&(I=e(I,d),M=e(M,d),C=I.length,k=M.length),S=C,v=(g=M.slice(0,C)).length;v<C;)g[v++]=0;(j=I.slice()).unshift(0),E=I[0],I[1]>=1e7/2&&++E;do d=0,(l=t(I,g,C,v))<0?(y=g[0],C!=v&&(y=1e7*y+(g[1]||0)),(d=y/E|0)>1?(d>=1e7&&(d=1e7-1),p=(f=e(I,d)).length,v=g.length,1==(l=t(f,g,p,v))&&(d--,n(f,C<p?j:I,p))):(0==d&&(l=d=1),f=I.slice()),(p=f.length)<v&&f.unshift(0),n(g,f,v),-1==l&&(v=g.length,(l=t(I,g,C,v))<1&&(d++,n(g,C<v?j:I,v))),v=g.length):0===l&&(d++,g=[0]),m[u++]=d,l&&g[0]?g[v++]=M[S]||0:(g=[M[S]],v=1);while((S++<k||void 0!==g[0])&&b--)}return m[0]||m.shift(),h.e=s,O(h,a?i+w(h)+1:i)}}();function x(e,t){var n,r,o,a,c,s=0,d=0,p=e.constructor,h=p.precision;if(w(e)>16)throw Error(u+w(e));if(!e.s)return new p(i);for(null==t?(l=!1,c=h):c=t,a=new p(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(c+=Math.log(f(2,d))/Math.LN10*2+5|0,n=r=o=new p(i),p.precision=c;;){if(r=O(r.times(e),c),n=n.times(++s),y((a=o.plus(b(r,n,c))).d).slice(0,c)===y(o.d).slice(0,c)){for(;d--;)o=O(o.times(o),c);return p.precision=h,null==t?(l=!0,O(o,h)):o}o=a}}function w(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function S(e,t,n){if(t>e.LN10.sd())throw l=!0,n&&(e.precision=n),Error(c+"LN10 precision limit exceeded");return O(new e(e.LN10),t)}function k(e){for(var t="";e--;)t+="0";return t}function E(e,t){var n,r,o,a,s,u,d,f,p,h=1,m=e,g=m.d,v=m.constructor,x=v.precision;if(m.s<1)throw Error(c+(m.s?"NaN":"-Infinity"));if(m.eq(i))return new v(0);if(null==t?(l=!1,f=x):f=t,m.eq(10))return null==t&&(l=!0),S(v,f);if(f+=10,v.precision=f,r=(n=y(g)).charAt(0),!(15e14>Math.abs(a=w(m))))return d=S(v,f+2,x).times(a+""),m=E(new v(r+"."+n.slice(1)),f-10).plus(d),v.precision=x,null==t?(l=!0,O(m,x)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=y((m=m.times(e)).d)).charAt(0),h++;for(a=w(m),r>1?(m=new v("0."+n),a++):m=new v(r+"."+n.slice(1)),u=s=m=b(m.minus(i),m.plus(i),f),p=O(m.times(m),f),o=3;;){if(s=O(s.times(p),f),y((d=u.plus(b(s,new v(o),f))).d).slice(0,f)===y(u.d).slice(0,f))return u=u.times(2),0!==a&&(u=u.plus(S(v,f+2,x).times(a+""))),u=b(u,new v(h),f),v.precision=x,null==t?(l=!0,O(u,x)):u;u=d,o+=2}}function C(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),l&&(e.e>h||e.e<-h))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function O(e,t,n){var r,o,i,a,c,s,p,m,g=e.d;for(a=1,i=g[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,p=g[m=0];else{if((m=Math.ceil((r+1)/7))>=(i=g.length))return e;for(a=1,p=i=g[m];i>=10;i/=10)a++;r%=7,o=r-7+a}if(void 0!==n&&(c=p/(i=f(10,a-o-1))%10|0,s=t<0||void 0!==g[m+1]||p%i,s=n<4?(c||s)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||s||6==n&&(r>0?o>0?p/f(10,a-o):0:g[m-1])%10&1||n==(e.s<0?8:7))),t<1||!g[0])return s?(i=w(e),g.length=1,t=t-i-1,g[0]=f(10,(7-t%7)%7),e.e=d(-t/7)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(0==r?(g.length=m,i=1,m--):(g.length=m+1,i=f(10,7-r),g[m]=o>0?(p/f(10,a-o)%f(10,o)|0)*i:0),s)for(;;){if(0==m){1e7==(g[0]+=i)&&(g[0]=1,++e.e);break}if(g[m]+=i,1e7!=g[m])break;g[m--]=0,i=1}for(r=g.length;0===g[--r];)g.pop();if(l&&(e.e>h||e.e<-h))throw Error(u+w(e));return e}function j(e,t){var n,r,o,i,a,c,s,u,d,f,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),l?O(t,h):t;if(s=e.d,f=t.d,r=t.e,u=e.e,s=s.slice(),a=u-r){for((d=a<0)?(n=s,a=-a,c=f.length):(n=f,r=u,c=s.length),a>(o=Math.max(Math.ceil(h/7),c)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((d=(o=s.length)<(c=f.length))&&(c=o),o=0;o<c;o++)if(s[o]!=f[o]){d=s[o]<f[o];break}a=0}for(d&&(n=s,s=f,f=n,t.s=-t.s),c=s.length,o=f.length-c;o>0;--o)s[c++]=0;for(o=f.length;o>a;){if(s[--o]<f[o]){for(i=o;i&&0===s[--i];)s[i]=1e7-1;--s[i],s[o]+=1e7}s[o]-=f[o]}for(;0===s[--c];)s.pop();for(;0===s[0];s.shift())--r;return s[0]?(t.d=s,t.e=r,l?O(t,h):t):new p(0)}function P(e,t,n){var r,o=w(e),i=y(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+k(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+k(-o-1)+i,n&&(r=n-a)>0&&(i+=k(r))):o>=a?(i+=k(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+k(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=k(r))),e.s<0?"-"+i:i}function N(e,t){if(e.length>t)return e.length=t,!0}function M(e){if(!e||"object"!=typeof e)throw Error(c+"Object expected");var t,n,r,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(d(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(s+n+": "+r)}if(void 0!==(r=e[n="LN10"])){if(r==Math.LN10)this[n]=new this(r);else throw Error(s+n+": "+r)}return this}(a=function e(t){var n,r,o;function i(e){if(!(this instanceof i))return new i(e);if(this.constructor=i,e instanceof i){this.s=e.s,this.e=e.e,this.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(s+e);if(e>0)this.s=1;else if(e<0)e=-e,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(e===~~e&&e<1e7){this.e=0,this.d=[e];return}return C(this,e.toString())}if("string"!=typeof e)throw Error(s+e);if(45===e.charCodeAt(0)?(e=e.slice(1),this.s=-1):this.s=1,p.test(e))C(this,e);else throw Error(s+e)}if(i.prototype=m,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=M,void 0===t&&(t={}),t)for(n=0,o=["precision","rounding","toExpNeg","toExpPos","LN10"];n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}(a)).default=a.Decimal=a,i=new a(1),void 0!==(r=(function(){return a}).call(t,n,t,e))&&(e.exports=r)}(0)},84617:function(e,t,n){"use strict";var r=n(9973);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(98598));e.exports=t.default},98598:function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},67973:function(e){"use strict";function t(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"==typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},77625:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var l=new o(r,i||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],l]:e._events[c].push(l):(e._events[c]=l,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1)),l.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},l.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=Array(i);o<i;o++)a[o]=r[o].fn;return a},l.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},l.prototype.emit=function(e,t,r,o,i,a){var l=n?n+e:e;if(!this._events[l])return!1;var c,s,u=this._events[l],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,a),!0}for(s=1,c=Array(d-1);s<d;s++)c[s-1]=arguments[s];u.fn.apply(u.context,c)}else{var f,p=u.length;for(s=0;s<p;s++)switch(u[s].once&&this.removeListener(e,u[s].fn,void 0,!0),d){case 1:u[s].fn.call(u[s].context);break;case 2:u[s].fn.call(u[s].context,t);break;case 3:u[s].fn.call(u[s].context,t,r);break;case 4:u[s].fn.call(u[s].context,t,r,o);break;default:if(!c)for(f=1,c=Array(d-1);f<d;f++)c[f-1]=arguments[f];u[s].fn.apply(u[s].context,c)}}return!0},l.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var l=this._events[i];if(l.fn)l.fn!==t||o&&!l.once||r&&l.context!==r||a(this,i);else{for(var c=0,s=[],u=l.length;c<u;c++)(l[c].fn!==t||o&&!l[c].once||r&&l[c].context!==r)&&s.push(l[c]);s.length?this._events[i]=1===s.length?s[0]:s:a(this,i)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l},6500:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},l=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,s,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(t=arguments[f],null!=t)for(n in t)r=c(d,n),d!==(o=c(t,n))&&(h&&o&&(a(o)||(s=i(o)))?(s?(s=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},l(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&l(d,{name:n,newValue:o}));return d}},80662:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g;function s(e){return e?e.replace(c,""):""}e.exports=function(e,c){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];c=c||{};var u=1,d=1;function f(e){var t=e.match(n);t&&(u+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new h(e),v(r),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=c.source}h.prototype.content=e;var m=[];function g(t){var n=Error(c.source+":"+u+":"+d+": "+t);if(n.reason=t,n.filename=c.source,n.line=u,n.column=d,n.source=e,c.silent)m.push(n);else throw n}function v(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function y(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,f(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}return v(r),function(){var e,n=[];for(y(n);e=function(){var e=p(),n=v(o);if(n){if(b(),!v(i))return g("property missing ':'");var r=v(a),c=e({type:"declaration",property:s(n[0].replace(t,"")),value:r?s(r[0].replace(t,"")):""});return v(l),c}}();)!1!==e&&(n.push(e),y(n));return n}()}},94975:function(e,t,n){var r=n(39866)(n(74288),"DataView");e.exports=r},9855:function(e,t,n){var r=n(43596),o=n(35907),i=n(35355),a=n(39870),l=n(73372);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=l,e.exports=c},99078:function(e,t,n){var r=n(62285),o=n(28706),i=n(63717),a=n(78410),l=n(13368);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=l,e.exports=c},88675:function(e,t,n){var r=n(39866)(n(74288),"Map");e.exports=r},76219:function(e,t,n){var r=n(38764),o=n(78615),i=n(83391),a=n(53483),l=n(74724);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=l,e.exports=c},69308:function(e,t,n){var r=n(39866)(n(74288),"Promise");e.exports=r},41497:function(e,t,n){var r=n(39866)(n(74288),"Set");e.exports=r},11549:function(e,t,n){var r=n(76219),o=n(54351),i=n(16096);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},85885:function(e,t,n){var r=n(99078),o=n(84092),i=n(31663),a=n(69135),l=n(39552),c=n(63960);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=l,s.prototype.set=c,e.exports=s},23910:function(e,t,n){var r=n(74288).Symbol;e.exports=r},80098:function(e,t,n){var r=n(74288).Uint8Array;e.exports=r},10880:function(e,t,n){var r=n(39866)(n(74288),"WeakMap");e.exports=r},60493:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},78897:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}},42774:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},26685:function(e,t,n){var r=n(47909);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},56883:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},28579:function(e,t,n){var r=n(89772),o=n(56569),i=n(25614),a=n(98051),l=n(84257),c=n(9792),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),d=!n&&!u&&a(e),f=!n&&!u&&!d&&c(e),p=n||u||d||f,h=p?r(e.length,String):[],m=h.length;for(var g in e)(t||s.call(e,g))&&!(p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||l(g,m)))&&h.push(g);return h}},73819:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},73817:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},25253:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},53417:function(e){e.exports=function(e){return e.split("")}},24457:function(e,t,n){var r=n(37560);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},83023:function(e,t,n){var r=n(4521);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},67676:function(e,t,n){var r=n(98060),o=n(97930)(r);e.exports=o},28935:function(e,t,n){var r=n(67676);e.exports=function(e,t){var n=!0;return r(e,function(e,r,o){return n=!!t(e,r,o)}),n}},67646:function(e,t,n){var r=n(78371);e.exports=function(e,t,n){for(var o=-1,i=e.length;++o<i;){var a=e[o],l=t(a);if(null!=l&&(void 0===c?l==l&&!r(l):n(l,c)))var c=l,s=a}return s}},8235:function(e){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return -1}},72569:function(e,t,n){var r=n(73817),o=n(37134);e.exports=function e(t,n,i,a,l){var c=-1,s=t.length;for(i||(i=o),l||(l=[]);++c<s;){var u=t[c];n>0&&i(u)?n>1?e(u,n-1,i,a,l):r(l,u):a||(l[l.length]=u)}return l}},63321:function(e,t,n){var r=n(33023)();e.exports=r},98060:function(e,t,n){var r=n(63321),o=n(43228);e.exports=function(e,t){return e&&r(e,t,o)}},92167:function(e,t,n){var r=n(67906),o=n(70235);e.exports=function(e,t){t=r(t,e);for(var n=0,i=t.length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},36452:function(e,t,n){var r=n(73817),o=n(25614);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},54506:function(e,t,n){var r=n(23910),o=n(4479),i=n(80910),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},58905:function(e){e.exports=function(e,t){return e>t}},93012:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},47909:function(e,t,n){var r=n(8235),o=n(31953),i=n(35281);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},90370:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},56318:function(e,t,n){var r=n(6791),o=n(10303);e.exports=function e(t,n,i,a,l){return t===n||(null!=t&&null!=n&&(o(t)||o(n))?r(t,n,i,a,e,l):t!=t&&n!=n)}},6791:function(e,t,n){var r=n(85885),o=n(97638),i=n(88030),a=n(64974),l=n(81690),c=n(25614),s=n(98051),u=n(9792),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=c(e),b=c(t),x=y?f:l(e),w=b?f:l(t);x=x==d?p:x,w=w==d?p:w;var S=x==p,k=w==p,E=x==w;if(E&&s(e)){if(!s(t))return!1;y=!0,S=!1}if(E&&!S)return v||(v=new r),y||u(e)?o(e,t,n,m,g,v):i(e,t,x,n,m,g,v);if(!(1&n)){var C=S&&h.call(e,"__wrapped__"),O=k&&h.call(t,"__wrapped__");if(C||O){var j=C?e.value():e,P=O?t.value():t;return v||(v=new r),g(j,P,n,m,v)}}return!!E&&(v||(v=new r),a(e,t,n,m,g,v))}},62538:function(e,t,n){var r=n(85885),o=n(56318);e.exports=function(e,t,n,i){var a=n.length,l=a,c=!i;if(null==e)return!l;for(e=Object(e);a--;){var s=n[a];if(c&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<l;){var u=(s=n[a])[0],d=e[u],f=s[1];if(c&&s[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(i)var h=i(d,f,u,e,t,p);if(!(void 0===h?o(f,d,3,i,p):h))return!1}}return!0}},31953:function(e){e.exports=function(e){return e!=e}},57595:function(e,t,n){var r=n(86757),o=n(79551),i=n(28302),a=n(1292),l=/^\[object .+?Constructor\]$/,c=Object.prototype,s=Function.prototype.toString,u=c.hasOwnProperty,d=RegExp("^"+s.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:l).test(a(e))}},59332:function(e,t,n){var r=n(54506),o=n(13973),i=n(10303),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},88157:function(e,t,n){var r=n(25569),o=n(51501),i=n(79586),a=n(25614),l=n(22350);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):l(e)}},4578:function(e,t,n){var r=n(35365),o=n(77184),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},20121:function(e){e.exports=function(e,t){return e<t}},24240:function(e,t,n){var r=n(67676),o=n(5629);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}},25569:function(e,t,n){var r=n(62538),o=n(58424),i=n(47073);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},51501:function(e,t,n){var r=n(56318),o=n(13735),i=n(17764),a=n(67352),l=n(45669),c=n(47073),s=n(70235);e.exports=function(e,t){return a(e)&&l(t)?c(s(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},84046:function(e,t,n){var r=n(73819),o=n(92167),i=n(88157),a=n(24240),l=n(89200),c=n(23305),s=n(80701),u=n(79586),d=n(25614);e.exports=function(e,t,n){t=t.length?r(t,function(e){return d(e)?function(t){return o(t,1===e.length?e[0]:e)}:e}):[u];var f=-1;return t=r(t,c(i)),l(a(e,function(e,n,o){return{criteria:r(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return s(e,t,n)})}},18155:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},73584:function(e,t,n){var r=n(92167);e.exports=function(e){return function(t){return r(t,e)}}},19608:function(e){var t=Math.ceil,n=Math.max;e.exports=function(e,r,o,i){for(var a=-1,l=n(t((r-e)/(o||1)),0),c=Array(l);l--;)c[i?l:++a]=e,e+=o;return c}},44843:function(e,t,n){var r=n(79586),o=n(49478),i=n(98796);e.exports=function(e,t){return i(o(e,t,r),e+"")}},9810:function(e,t,n){var r=n(92353),o=n(4521),i=n(79586),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},99558:function(e){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}},12327:function(e,t,n){var r=n(67676);e.exports=function(e,t){var n;return r(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}},89200:function(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},89772:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},65020:function(e,t,n){var r=n(23910),o=n(73819),i=n(25614),a=n(78371),l=1/0,c=r?r.prototype:void 0,s=c?c.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-l?"-0":n}},41087:function(e,t,n){var r=n(5035),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},23305:function(e){e.exports=function(e){return function(t){return e(t)}}},13826:function(e,t,n){var r=n(11549),o=n(26685),i=n(56883),a=n(65734),l=n(57600),c=n(27794);e.exports=function(e,t,n){var s=-1,u=o,d=e.length,f=!0,p=[],h=p;if(n)f=!1,u=i;else if(d>=200){var m=t?null:l(e);if(m)return c(m);f=!1,u=a,h=new r}else h=t?[]:p;e:for(;++s<d;){var g=e[s],v=t?t(g):g;if(g=n||0!==g?g:0,f&&v==v){for(var y=h.length;y--;)if(h[y]===v)continue e;t&&h.push(v),p.push(g)}else u(h,v,n)||(h!==p&&h.push(v),p.push(g))}return p}},65734:function(e){e.exports=function(e,t){return e.has(t)}},67906:function(e,t,n){var r=n(25614),o=n(67352),i=n(39365),a=n(3641);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},91684:function(e,t,n){var r=n(99558);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},1536:function(e,t,n){var r=n(78371);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),l=void 0!==t,c=null===t,s=t==t,u=r(t);if(!c&&!u&&!a&&e>t||a&&l&&s&&!c&&!u||o&&l&&s||!n&&s||!i)return 1;if(!o&&!a&&!u&&e<t||u&&n&&i&&!o&&!a||c&&n&&i||!l&&i||!s)return -1}return 0}},80701:function(e,t,n){var r=n(1536);e.exports=function(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,l=i.length,c=n.length;++o<l;){var s=r(i[o],a[o]);if(s){if(o>=c)return s;return s*("desc"==n[o]?-1:1)}}return e.index-t.index}},92077:function(e,t,n){var r=n(74288)["__core-js_shared__"];e.exports=r},97930:function(e,t,n){var r=n(5629);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,l=Object(n);(t?a--:++a<i)&&!1!==o(l[a],a,l););return n}}},33023:function(e){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var c=a[e?l:++o];if(!1===n(i[c],c,i))break}return t}}},80675:function(e,t,n){var r=n(91684),o=n(14503),i=n(88551),a=n(3641);e.exports=function(e){return function(t){var n=o(t=a(t))?i(t):void 0,l=n?n[0]:t.charAt(0),c=n?r(n,1).join(""):t.slice(1);return l[e]()+c}}},82602:function(e,t,n){var r=n(88157),o=n(5629),i=n(43228);e.exports=function(e){return function(t,n,a){var l=Object(t);if(!o(t)){var c=r(n,3);t=i(t),n=function(e){return c(l[e],e,l)}}var s=e(t,n,a);return s>-1?l[c?t[s]:s]:void 0}}},35464:function(e,t,n){var r=n(19608),o=n(49639),i=n(175);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?t<n?1:-1:i(a),r(t,n,a,e)}}},57600:function(e,t,n){var r=n(41497),o=n(93810),i=n(27794),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},4521:function(e,t,n){var r=n(39866),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},97638:function(e,t,n){var r=n(11549),o=n(25253),i=n(65734);e.exports=function(e,t,n,a,l,c){var s=1&n,u=e.length,d=t.length;if(u!=d&&!(s&&d>u))return!1;var f=c.get(e),p=c.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,g=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++h<u;){var v=e[h],y=t[h];if(a)var b=s?a(y,v,h,t,e,c):a(v,y,h,e,t,c);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!o(t,function(e,t){if(!i(g,t)&&(v===e||l(v,e,n,a,c)))return g.push(t)})){m=!1;break}}else if(!(v===y||l(v,y,n,a,c))){m=!1;break}}return c.delete(e),c.delete(t),m}},88030:function(e,t,n){var r=n(23910),o=n(80098),i=n(37560),a=n(97638),l=n(22523),c=n(27794),s=r?r.prototype:void 0,u=s?s.valueOf:void 0;e.exports=function(e,t,n,r,s,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new o(e),new o(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=l;case"[object Set]":var h=1&r;if(p||(p=c),e.size!=t.size&&!h)break;var m=f.get(e);if(m)return m==t;r|=2,f.set(e,t);var g=a(p(e),p(t),r,s,d,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},64974:function(e,t,n){var r=n(28529),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,l){var c=1&n,s=r(e),u=s.length;if(u!=r(t).length&&!c)return!1;for(var d=u;d--;){var f=s[d];if(!(c?f in t:o.call(t,f)))return!1}var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var m=!0;l.set(e,t),l.set(t,e);for(var g=c;++d<u;){var v=e[f=s[d]],y=t[f];if(i)var b=c?i(y,v,f,t,e,l):i(v,y,f,e,t,l);if(!(void 0===b?v===y||a(v,y,n,i,l):b)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(m=!1)}return l.delete(e),l.delete(t),m}},17071:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},28529:function(e,t,n){var r=n(36452),o=n(80466),i=n(43228);e.exports=function(e){return r(e,i,o)}},1507:function(e,t,n){var r=n(7545);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},58424:function(e,t,n){var r=n(45669),o=n(43228);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},39866:function(e,t,n){var r=n(57595),o=n(3138);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},62602:function(e,t,n){var r=n(45070)(Object.getPrototypeOf,Object);e.exports=r},4479:function(e,t,n){var r=n(23910),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},80466:function(e,t,n){var r=n(42774),o=n(55716),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:r(a(e=Object(e)),function(t){return i.call(e,t)})}:o;e.exports=l},81690:function(e,t,n){var r=n(94975),o=n(88675),i=n(69308),a=n(41497),l=n(10880),c=n(54506),s=n(1292),u="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",m=s(r),g=s(o),v=s(i),y=s(a),b=s(l),x=c;(r&&x(new r(new ArrayBuffer(1)))!=h||o&&x(new o)!=u||i&&x(i.resolve())!=d||a&&x(new a)!=f||l&&x(new l)!=p)&&(x=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case m:return h;case g:return u;case v:return d;case y:return f;case b:return p}return t}),e.exports=x},3138:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},59592:function(e,t,n){var r=n(67906),o=n(56569),i=n(25614),a=n(84257),l=n(13973),c=n(70235);e.exports=function(e,t,n){t=r(t,e);for(var s=-1,u=t.length,d=!1;++s<u;){var f=c(t[s]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++s!=u?d:!!(u=null==e?0:e.length)&&l(u)&&a(f,u)&&(i(e)||o(e))}},14503:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},43596:function(e,t,n){var r=n(20453);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},35907:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},35355:function(e,t,n){var r=n(20453),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},39870:function(e,t,n){var r=n(20453),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},73372:function(e,t,n){var r=n(20453);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},37134:function(e,t,n){var r=n(23910),o=n(56569),i=n(25614),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},84257:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},49639:function(e,t,n){var r=n(37560),o=n(5629),i=n(84257),a=n(28302);e.exports=function(e,t,n){if(!a(n))return!1;var l=typeof t;return("number"==l?!!(o(n)&&i(t,n.length)):"string"==l&&t in n)&&r(n[t],e)}},67352:function(e,t,n){var r=n(25614),o=n(78371),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},7545:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},79551:function(e,t,n){var r,o=n(92077),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},35365:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},45669:function(e,t,n){var r=n(28302);e.exports=function(e){return e==e&&!r(e)}},62285:function(e){e.exports=function(){this.__data__=[],this.size=0}},28706:function(e,t,n){var r=n(24457),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},63717:function(e,t,n){var r=n(24457);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},78410:function(e,t,n){var r=n(24457);e.exports=function(e){return r(this.__data__,e)>-1}},13368:function(e,t,n){var r=n(24457);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},38764:function(e,t,n){var r=n(9855),o=n(99078),i=n(88675);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},78615:function(e,t,n){var r=n(1507);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},83391:function(e,t,n){var r=n(1507);e.exports=function(e){return r(this,e).get(e)}},53483:function(e,t,n){var r=n(1507);e.exports=function(e){return r(this,e).has(e)}},74724:function(e,t,n){var r=n(1507);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},22523:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},47073:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},23787:function(e,t,n){var r=n(50967);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},20453:function(e,t,n){var r=n(39866)(Object,"create");e.exports=r},77184:function(e,t,n){var r=n(45070)(Object.keys,Object);e.exports=r},39931:function(e,t,n){e=n.nmd(e);var r=n(17071),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l},80910:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},45070:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},49478:function(e,t,n){var r=n(60493),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,l=o(i.length-t,0),c=Array(l);++a<l;)c[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=n(c),r(e,this,s)}}},74288:function(e,t,n){var r=n(17071),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},54351:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},16096:function(e){e.exports=function(e){return this.__data__.has(e)}},27794:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},98796:function(e,t,n){var r=n(9810),o=n(31610)(r);e.exports=o},31610:function(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},84092:function(e,t,n){var r=n(99078);e.exports=function(){this.__data__=new r,this.size=0}},31663:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},69135:function(e){e.exports=function(e){return this.__data__.get(e)}},39552:function(e){e.exports=function(e){return this.__data__.has(e)}},63960:function(e,t,n){var r=n(99078),o=n(88675),i=n(76219);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},35281:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return -1}},88551:function(e,t,n){var r=n(53417),o=n(14503),i=n(26364);e.exports=function(e){return o(e)?i(e):r(e)}},39365:function(e,t,n){var r=n(23787),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t});e.exports=a},70235:function(e,t,n){var r=n(78371),o=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},1292:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},5035:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},26364:function(e){var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",o="[^"+t+"]",i="(?:\ud83c[\udde6-\uddff]){2}",a="[\ud800-\udbff][\udc00-\udfff]",l="(?:"+n+"|"+r+")?",c="[\\ufe0e\\ufe0f]?",s="(?:\\u200d(?:"+[o,i,a].join("|")+")"+c+l+")*",u=RegExp(r+"(?="+r+")|(?:"+[o+n+"?",n,i,a,"["+t+"]"].join("|")+")"+(c+l+s),"g");e.exports=function(e){return e.match(u)||[]}},92353:function(e){e.exports=function(e){return function(){return e}}},7310:function(e,t,n){var r=n(28302),o=n(11121),i=n(6660),a=Math.max,l=Math.min;e.exports=function(e,t,n){var c,s,u,d,f,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=c,r=s;return c=s=void 0,h=t,d=e.apply(r,n)}function b(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||g&&r>=u}function x(){var e,n,r,i=o();if(b(i))return w(i);f=setTimeout(x,(e=i-p,n=i-h,r=t-e,g?l(r,u-n):r))}function w(e){return(f=void 0,v&&c)?y(e):(c=s=void 0,d)}function S(){var e,n=o(),r=b(n);if(c=arguments,s=this,p=n,r){if(void 0===f)return h=e=p,f=setTimeout(x,t),m?y(e):d;if(g)return clearTimeout(f),f=setTimeout(x,t),y(p)}return void 0===f&&(f=setTimeout(x,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==f&&clearTimeout(f),h=0,c=p=s=f=void 0},S.flush=function(){return void 0===f?d:w(o())},S}},37560:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},32242:function(e,t,n){var r=n(78897),o=n(28935),i=n(88157),a=n(25614),l=n(49639);e.exports=function(e,t,n){var c=a(e)?r:o;return n&&l(e,t,n)&&(t=void 0),c(e,i(t,3))}},84173:function(e,t,n){var r=n(82602)(n(12152));e.exports=r},12152:function(e,t,n){var r=n(8235),o=n(88157),i=n(85759),a=Math.max;e.exports=function(e,t,n){var l=null==e?0:e.length;if(!l)return -1;var c=null==n?0:i(n);return c<0&&(c=a(l+c,0)),r(e,o(t,3),c)}},11314:function(e,t,n){var r=n(72569),o=n(89238);e.exports=function(e,t){return r(o(e,t),1)}},13735:function(e,t,n){var r=n(92167);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},17764:function(e,t,n){var r=n(93012),o=n(59592);e.exports=function(e,t){return null!=e&&o(e,t,r)}},79586:function(e){e.exports=function(e){return e}},56569:function(e,t,n){var r=n(90370),o=n(10303),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=c},25614:function(e){var t=Array.isArray;e.exports=t},5629:function(e,t,n){var r=n(86757),o=n(13973);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},24342:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==r(e)}},98051:function(e,t,n){e=n.nmd(e);var r=n(74288),o=n(7406),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,c=l?l.isBuffer:void 0;e.exports=c||o},21652:function(e,t,n){var r=n(56318);e.exports=function(e,t){return r(e,t)}},86757:function(e,t,n){var r=n(54506),o=n(28302);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},13973:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},82559:function(e,t,n){var r=n(22345);e.exports=function(e){return r(e)&&e!=+e}},77571:function(e){e.exports=function(e){return null==e}},22345:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==r(e)}},28302:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},90231:function(e,t,n){var r=n(54506),o=n(62602),i=n(10303),a=Object.prototype,l=Function.prototype.toString,c=a.hasOwnProperty,s=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==s}},42715:function(e,t,n){var r=n(54506),o=n(25614),i=n(10303);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},78371:function(e,t,n){var r=n(54506),o=n(10303);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},9792:function(e,t,n){var r=n(59332),o=n(23305),i=n(39931),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},43228:function(e,t,n){var r=n(28579),o=n(4578),i=n(5629);e.exports=function(e){return i(e)?r(e):o(e)}},86185:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},89238:function(e,t,n){var r=n(73819),o=n(88157),i=n(24240),a=n(25614);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},41443:function(e,t,n){var r=n(83023),o=n(98060),i=n(88157);e.exports=function(e,t){var n={};return t=i(t,3),o(e,function(e,o,i){r(n,o,t(e,o,i))}),n}},95645:function(e,t,n){var r=n(67646),o=n(58905),i=n(79586);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},35802:function(e,t,n){var r=n(67646),o=n(58905),i=n(88157);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},50967:function(e,t,n){var r=n(76219);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},99008:function(e,t,n){var r=n(67646),o=n(20121),i=n(79586);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},37891:function(e,t,n){var r=n(67646),o=n(88157),i=n(20121);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},93810:function(e){e.exports=function(){}},11121:function(e,t,n){var r=n(74288);e.exports=function(){return r.Date.now()}},22350:function(e,t,n){var r=n(18155),o=n(73584),i=n(67352),a=n(70235);e.exports=function(e){return i(e)?r(a(e)):o(e)}},99676:function(e,t,n){var r=n(35464)();e.exports=r},33645:function(e,t,n){var r=n(25253),o=n(88157),i=n(12327),a=n(25614),l=n(49639);e.exports=function(e,t,n){var c=a(e)?r:i;return n&&l(e,t,n)&&(t=void 0),c(e,o(t,3))}},34935:function(e,t,n){var r=n(72569),o=n(84046),i=n(44843),a=n(49639),l=i(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])});e.exports=l},55716:function(e){e.exports=function(){return[]}},7406:function(e){e.exports=function(){return!1}},37065:function(e,t,n){var r=n(7310),o=n(28302);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},175:function(e,t,n){var r=n(6660),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},85759:function(e,t,n){var r=n(175);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},6660:function(e,t,n){var r=n(41087),o=n(28302),i=n(78371),a=0/0,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):l.test(e)?a:+e}},3641:function(e,t,n){var r=n(65020);e.exports=function(e){return null==e?"":r(e)}},47230:function(e,t,n){var r=n(88157),o=n(13826);e.exports=function(e,t){return e&&e.length?o(e,r(t,2)):[]}},75551:function(e,t,n){var r=n(80675)("toUpperCase");e.exports=r},27648:function(e,t,n){"use strict";n.d(t,{default:function(){return o.a}});var r=n(72972),o=n.n(r)},55449:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(33068);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56958:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(33068),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72972:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let r=n(47043),o=n(57437),i=r._(n(2265)),a=n(25246),l=n(53552),c=n(57497),s=n(3987),u=n(55449),d=n(25523),f=n(61956),p=n(16081),h=n(56958),m=n(1634),g=n(24673),v=new Set;function y(e,t,n,r,o,i){if("undefined"!=typeof window&&(i||(0,l.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}(async()=>i?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,c.formatUrl)(e)}let x=i.default.forwardRef(function(e,t){let n,r;let{href:c,as:v,children:x,prefetch:w=null,passHref:S,replace:k,shallow:E,scroll:C,locale:O,onClick:j,onMouseEnter:P,onTouchStart:N,legacyBehavior:M=!1,...I}=e;n=x,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=i.default.useContext(d.RouterContext),T=i.default.useContext(f.AppRouterContext),A=null!=R?R:T,_=!R,D=!1!==w,Z=null===w?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:L,as:z}=i.default.useMemo(()=>{if(!R){let e=b(c);return{href:e,as:v?b(v):e}}let[e,t]=(0,a.resolveHref)(R,c,!0);return{href:e,as:v?(0,a.resolveHref)(R,v):t||e}},[R,c,v]),B=i.default.useRef(L),F=i.default.useRef(z);M&&(r=i.default.Children.only(n));let H=M?r&&"object"==typeof r&&r.ref:t,[q,W,K]=(0,p.useIntersection)({rootMargin:"200px"}),V=i.default.useCallback(e=>{(F.current!==z||B.current!==L)&&(K(),F.current=z,B.current=L),q(e),H&&("function"==typeof H?H(e):"object"==typeof H&&(H.current=e))},[z,H,L,K,q]);i.default.useEffect(()=>{A&&W&&D&&y(A,L,z,{locale:O},{kind:Z},_)},[z,L,W,O,D,null==R?void 0:R.locale,A,_,Z]);let U={ref:V,onClick(e){M||"function"!=typeof j||j(e),M&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),A&&!e.defaultPrevented&&function(e,t,n,r,o,a,c,s,u){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,l.isLocalURL)(n)))return;e.preventDefault();let f=()=>{let e=null==c||c;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:a,locale:s,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};u?i.default.startTransition(f):f()}(e,A,L,z,k,E,C,O,_)},onMouseEnter(e){M||"function"!=typeof P||P(e),M&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),A&&(D||!_)&&y(A,L,z,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:Z},_)},onTouchStart:function(e){M||"function"!=typeof N||N(e),M&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),A&&(D||!_)&&y(A,L,z,{locale:O,priority:!0,bypassPrefetchedCheck:!0},{kind:Z},_)}};if((0,s.isAbsoluteUrl)(z))U.href=z;else if(!M||S||"a"===r.type&&!("href"in r.props)){let e=void 0!==O?O:null==R?void 0:R.locale,t=(null==R?void 0:R.isLocaleDomain)&&(0,h.getDomainLocale)(z,e,null==R?void 0:R.locales,null==R?void 0:R.domainLocales);U.href=t||(0,m.addBasePath)((0,u.addLocale)(z,e,null==R?void 0:R.defaultLocale))}return M?i.default.cloneElement(r,U):(0,o.jsx)("a",{...I,...U,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25246:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return d}});let r=n(48637),o=n(57497),i=n(17053),a=n(3987),l=n(33068),c=n(53552),s=n(86279),u=n(37205);function d(e,t,n){let d;let f="string"==typeof t?t:(0,o.formatWithValidation)(t),p=f.match(/^[a-zA-Z]{1,}:\/\//),h=p?f.slice(p[0].length):f;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+f+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,a.normalizeRepeatedSlashes)(h);f=(p?p[0]:"")+t}if(!(0,c.isLocalURL)(f))return n?[f]:f;try{d=new URL(f.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){d=new URL("/","http://n")}try{let e=new URL(f,d);e.pathname=(0,l.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:a,params:l}=(0,u.interpolateAs)(e.pathname,e.pathname,n);a&&(t=(0,o.formatWithValidation)({pathname:a,hash:e.hash,query:(0,i.omit)(n,l)}))}let a=e.origin===d.origin?e.href.slice(e.origin.length):e.href;return n?[a,t||a]:a}catch(e){return n?[f]:f}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},16081:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return c}});let r=n(2265),o=n(63515),i="function"==typeof IntersectionObserver,a=new Map,l=[];function c(e){let{rootRef:t,rootMargin:n,disabled:c}=e,s=c||!i,[u,d]=(0,r.useState)(!1),f=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{f.current=e},[]);return(0,r.useEffect)(()=>{if(i){if(s||u)return;let e=f.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:i}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=l.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},l.push(n),a.set(n,t),t}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&l.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!u){let e=(0,o.requestIdleCallback)(()=>d(!0));return()=>(0,o.cancelIdleCallback)(e)}},[s,n,t,u,f.current]),[p,u,(0,r.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24601:function(){},90042:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function o(e){return n.test(e)?e.replace(r,"\\$&"):e}},25523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext(null)},57497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{formatUrl:function(){return i},formatWithValidation:function(){return l},urlObjectKeys:function(){return a}});let r=n(53099)._(n(48637)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,i=e.protocol||"",a=e.pathname||"",l=e.hash||"",c=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:n&&(s=t+(~n.indexOf(":")?"["+n+"]":n),e.port&&(s+=":"+e.port)),c&&"object"==typeof c&&(c=String(r.urlQueryToSearchParams(c)));let u=e.search||c&&"?"+c||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||o.test(i))&&!1!==s?(s="//"+(s||""),a&&"/"!==a[0]&&(a="/"+a)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),""+i+s+(a=a.replace(/[?#]/g,encodeURIComponent))+(u=u.replace("#","%23"))+l}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return i(e)}},86279:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let r=n(14777),o=n(38104)},37205:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return i}});let r=n(4199),o=n(9964);function i(e,t,n){let i="",a=(0,o.getRouteRegex)(e),l=a.groups,c=(t!==e?(0,r.getRouteMatcher)(a)(t):"")||n;i=e;let s=Object.keys(l);return s.every(e=>{let t=c[e]||"",{repeat:n,optional:r}=l[e],o="["+(n?"...":"")+e+"]";return r&&(o=(t?"":"/")+"["+o+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in c)&&(i=i.replace(o,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(i=""),{params:s,result:i}}},38104:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let r=n(91182),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},53552:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return i}});let r=n(3987),o=n(11283);function i(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},17053:function(e,t){"use strict";function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},48637:function(e,t){"use strict";function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,o]=e;Array.isArray(o)?o.forEach(e=>t.append(n,r(e))):t.set(n,r(o))}),t}function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach(t=>{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{assign:function(){return i},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}})},4199:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let r=n(3987);function o(e){let{re:t,groups:n}=e;return e=>{let o=t.exec(e);if(!o)return!1;let i=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},a={};return Object.keys(n).forEach(e=>{let t=n[e],r=o[t.pos];void 0!==r&&(a[e]=~r.indexOf("/")?r.split("/").map(e=>i(e)):t.repeat?[i(r)]:i(r))}),a}}},9964:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getNamedMiddlewareRegex:function(){return f},getNamedRouteRegex:function(){return d},getRouteRegex:function(){return c},parseParameter:function(){return a}});let r=n(91182),o=n(90042),i=n(26674);function a(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function l(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),n={},l=1;return{parameterizedRoute:t.map(e=>{let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:r,repeat:c}=a(i[1]);return n[e]={pos:l++,repeat:c,optional:r},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:r}=a(i[1]);return n[e]={pos:l++,repeat:t,optional:r},t?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function c(e){let{parameterizedRoute:t,groups:n}=l(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function s(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:i,keyPrefix:l}=e,{key:c,optional:s,repeat:u}=a(r),d=c.replace(/\W/g,"");l&&(d=""+l+d);let f=!1;(0===d.length||d.length>30)&&(f=!0),isNaN(parseInt(d.slice(0,1)))||(f=!0),f&&(d=n()),l?i[d]=""+l+c:i[d]=c;let p=t?(0,o.escapeStringRegexp)(t):"";return u?s?"(?:/"+p+"(?<"+d+">.+?))?":"/"+p+"(?<"+d+">.+?)":"/"+p+"(?<"+d+">[^/]+?)"}function u(e,t){let n;let a=(0,i.removeTrailingSlash)(e).slice(1).split("/"),l=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),c={};return{namedParameterizedRoute:a.map(e=>{let n=r.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&i){let[n]=e.split(i[0]);return s({getSafeRouteKey:l,interceptionMarker:n,segment:i[1],routeKeys:c,keyPrefix:t?"nxtI":void 0})}return i?s({getSafeRouteKey:l,segment:i[1],routeKeys:c,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:c}}function d(e,t){let n=u(e,t);return{...c(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function f(e,t){let{parameterizedRoute:n}=l(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:o}=u(e,!1);return{namedRegex:"^"+o+(r?"(?:(/.*)?)":"")+"$"}}},14777:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let n=o.slice(1,-1),a=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),a=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function i(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,n),this.optionalRestSlugName=n,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,n),this.restSlugName=n,o="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,n),this.slugName=n,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return v},NormalizeError:function(){return m},PageNotFoundError:function(){return g},SP:function(){return f},ST:function(){return p},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return c},getLocationOrigin:function(){return a},getURL:function(){return l},isAbsoluteUrl:function(){return i},isResSent:function(){return s},loadGetInitialProps:function(){return d},normalizeRepeatedSlashes:function(){return u},stringifyError:function(){return b}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return n||(n=!0,t=e(...o)),t}}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=e=>o.test(e);function a(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function l(){let{href:e}=window.location,t=a();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function u(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function d(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await d(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&s(n))return r;if(!r)throw Error('"'+c(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let f="undefined"!=typeof performance,p=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class v extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},15452:function(e,t){var n,r,o;r=[],void 0!==(o="function"==typeof(n=function e(){var t,n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{},r=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,i={},a=0,l={};function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(i=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,i)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&w(this._config.beforeFirstChunk)&&void 0!==(i=this._config.beforeFirstChunk(e))&&(e=i),this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e,i=(this._partialLine="",this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,o)n.postMessage({results:i,workerId:l.WORKER_ID,finished:r});else if(w(this._config.chunk)&&!t){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!r||!w(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):o&&this._config.error&&n.postMessage({workerId:l.WORKER_ID,error:e,finished:!1})}}function s(e){var t;(e=e||{}).chunkSize||(e.chunkSize=l.RemoteChunkSize),c.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,n,o=this._config.downloadRequestHeaders;for(n in o)t.setRequestHeader(n,o[n])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function u(e){(e=e||{}).chunkSize||(e.chunkSize=l.LocalChunkSize),c.call(this,e);var t,n,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,o=(this._config.chunkSize&&(o=Math.min(this._start+this._config.chunkSize,this._input.size),e=n.call(e,this._start,o)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,n;if(!this._finished)return t=(e=this._config.chunkSize)?(n=t.substring(0,e),t.substring(e)):(n=t,""),this._finished=!t,this.parseChunk(n)}}function f(e){c.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=x(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=x(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=x(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=x(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function p(e){var t,n,r,o,i=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,s=0,u=0,d=!1,f=!1,p=[],g={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function y(){if(g&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!v(e)})),x()){if(g){if(Array.isArray(g.data[0])){for(var t,n=0;x()&&n<g.data.length;n++)g.data[n].forEach(o);g.data.splice(0,1)}else g.data.forEach(o)}function o(t,n){w(e.transformHeader)&&(t=e.transformHeader(t,n)),p.push(t)}}function c(t,n){for(var r=e.header?{}:[],o=0;o<t.length;o++){let n,s;var l=o,c=t[o],c=(n=l=e.header?o>=p.length?"__parsed_extra":p[o]:l,s=c=e.transform?e.transform(c,l):c,(e.dynamicTypingFunction&&void 0===e.dynamicTyping[n]&&(e.dynamicTyping[n]=e.dynamicTypingFunction(n)),!0===(e.dynamicTyping[n]||e.dynamicTyping))?"true"===s||"TRUE"===s||"false"!==s&&"FALSE"!==s&&((e=>{if(i.test(e)&&-9007199254740992<(e=parseFloat(e))&&e<9007199254740992)return 1})(s)?parseFloat(s):a.test(s)?new Date(s):""===s?null:s):s);"__parsed_extra"===l?(r[l]=r[l]||[],r[l].push(c)):r[l]=c}return e.header&&(o>p.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+o,u+n):o<p.length&&S("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+o,u+n)),r}g&&(e.header||e.dynamicTyping||e.transform)&&(t=1,!g.data.length||Array.isArray(g.data[0])?(g.data=g.data.map(c),t=g.data.length):g.data=c(g.data,0),e.header&&g.meta&&(g.meta.fields=p),u+=t)}function x(){return e.header&&0===p.length}function S(e,t,n,r){e={type:e,code:t,message:n},void 0!==r&&(e.row=r),g.errors.push(e)}w(e.step)&&(o=e.step,e.step=function(t){g=t,x()?y():(y(),0!==g.data.length&&(s+=t.data.length,e.preview&&s>e.preview?n.abort():(g.data=g.data[0],o(g,c))))}),this.parse=function(o,i,a){var c=e.quoteChar||'"',c=(e.newline||(e.newline=this.guessLineEndings(o,c)),r=!1,e.delimiter?w(e.delimiter)&&(e.delimiter=e.delimiter(o),g.meta.delimiter=e.delimiter):((c=((t,n,r,o,i)=>{var a,c,s,u;i=i||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var d=0;d<i.length;d++){for(var f,p=i[d],h=0,g=0,y=0,b=(s=void 0,new m({comments:o,delimiter:p,newline:n,preview:10}).parse(t)),x=0;x<b.data.length;x++)r&&v(b.data[x])?y++:(g+=f=b.data[x].length,void 0===s?s=f:0<f&&(h+=Math.abs(f-s),s=f));0<b.data.length&&(g/=b.data.length-y),(void 0===c||h<=c)&&(void 0===u||u<g)&&1.99<g&&(c=h,a=p,u=g)}return{successful:!!(e.delimiter=a),bestDelimiter:a}})(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=l.DefaultDelimiter),g.meta.delimiter=e.delimiter),b(e));return e.preview&&e.header&&c.preview++,t=o,g=(n=new m(c)).parse(t,i,a),y(),d?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=w(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){c.streamer._halted?(d=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return f},this.abort=function(){f=!0,n.abort(),g.meta.aborted=!0,w(e.complete)&&e.complete(g),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576);var t=RegExp(h(t)+"([^]*?)"+h(t),"gm"),n=(e=e.replace(t,"")).split("\r"),t=e.split("\n"),e=1<t.length&&t[0].length<n[0].length;if(1===n.length||e)return"\n";for(var r=0,o=0;o<n.length;o++)"\n"===n[o][0]&&r++;return r>=n.length/2?"\r\n":"\r"}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,n=e.newline,r=e.comments,o=e.step,i=e.preview,a=e.fastMode,c=null,s=!1,u=null==e.quoteChar?'"':e.quoteChar,d=u;if(void 0!==e.escapeChar&&(d=e.escapeChar),("string"!=typeof t||-1<l.BAD_DELIMITERS.indexOf(t))&&(t=","),r===t)throw Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<l.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var f=0,p=!1;this.parse=function(l,m,g){if("string"!=typeof l)throw Error("Input must be a string");var v=l.length,y=t.length,b=n.length,x=r.length,S=w(o),k=[],E=[],C=[],O=f=0;if(!l)return L();if(a||!1!==a&&-1===l.indexOf(u)){for(var j=l.split(n),P=0;P<j.length;P++){if(C=j[P],f+=C.length,P!==j.length-1)f+=n.length;else if(g)break;if(!r||C.substring(0,x)!==r){if(S){if(k=[],A(C.split(t)),z(),p)return L()}else A(C.split(t));if(i&&i<=P)return k=k.slice(0,i),L(!0)}}return L()}for(var N=l.indexOf(t,f),M=l.indexOf(n,f),I=RegExp(h(d)+h(u),"g"),R=l.indexOf(u,f);;)if(l[f]===u)for(R=f,f++;;){if(-1===(R=l.indexOf(u,R+1)))return g||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:k.length,index:f}),D();if(R===v-1)return D(l.substring(f,R).replace(I,u));if(u===d&&l[R+1]===d)R++;else if(u===d||0===R||l[R-1]!==d){-1!==N&&N<R+1&&(N=l.indexOf(t,R+1));var T=_(-1===(M=-1!==M&&M<R+1?l.indexOf(n,R+1):M)?N:Math.min(N,M));if(l.substr(R+1+T,y)===t){C.push(l.substring(f,R).replace(I,u)),l[f=R+1+T+y]!==u&&(R=l.indexOf(u,f)),N=l.indexOf(t,f),M=l.indexOf(n,f);break}if(T=_(M),l.substring(R+1+T,R+1+T+b)===n){if(C.push(l.substring(f,R).replace(I,u)),Z(R+1+T+b),N=l.indexOf(t,f),R=l.indexOf(u,f),S&&(z(),p))return L();if(i&&k.length>=i)return L(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:k.length,index:f}),R++}}else if(r&&0===C.length&&l.substring(f,f+x)===r){if(-1===M)return L();f=M+b,M=l.indexOf(n,f),N=l.indexOf(t,f)}else if(-1!==N&&(N<M||-1===M))C.push(l.substring(f,N)),f=N+y,N=l.indexOf(t,f);else{if(-1===M)break;if(C.push(l.substring(f,M)),Z(M+b),S&&(z(),p))return L();if(i&&k.length>=i)return L(!0)}return D();function A(e){k.push(e),O=f}function _(e){return -1!==e&&(e=l.substring(R+1,e))&&""===e.trim()?e.length:0}function D(e){return g||(void 0===e&&(e=l.substring(f)),C.push(e),f=v,A(C),S&&z()),L()}function Z(e){f=e,A(C),C=[],M=l.indexOf(n,f)}function L(r){if(e.header&&!m&&k.length&&!s){var o=k[0],i={},a=new Set(o);let t=!1;for(let n=0;n<o.length;n++){let r=o[n];if(i[r=w(e.transformHeader)?e.transformHeader(r,n):r]){let e,l=i[r];for(;e=r+"_"+l,l++,a.has(e););a.add(e),o[n]=e,i[r]++,t=!0,(c=null===c?{}:c)[e]=r}else i[r]=1,o[n]=r;a.add(r)}t&&console.warn("Duplicate headers found and renamed."),s=!0}return{data:k,errors:E,meta:{delimiter:t,linebreak:n,aborted:p,truncated:!!r,cursor:O+(m||0),renamedHeaders:c}}}function z(){o(L()),k=[],E=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return f}}function g(e){var t=e.data,n=i[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var o={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(w(n.userStep)){for(var a=0;a<t.results.data.length&&(n.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},o),!r);a++);delete t.results}else w(n.userChunk)&&(n.userChunk(t.results,o,t.file),delete t.results)}t.finished&&!r&&v(t.workerId,t.results)}function v(e,t){var n=i[e];w(n.userComplete)&&n.userComplete(t),n.terminate(),delete i[e]}function y(){throw Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=b(e[t]);return n}function x(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return l.parse=function(t,r){var o,c,p,h=(r=r||{}).dynamicTyping||!1;if(w(h)&&(r.dynamicTypingFunction=h,h={}),r.dynamicTyping=h,r.transform=!!w(r.transform)&&r.transform,!r.worker||!l.WORKERS_SUPPORTED){let e;return h=null,l.NODE_STREAM_INPUT,"string"==typeof t?(t=65279!==(e=t).charCodeAt(0)?e:e.slice(1),h=new(r.download?s:d)(r)):!0===t.readable&&w(t.read)&&w(t.on)?h=new f(r):(n.File&&t instanceof File||t instanceof Object)&&(h=new u(r)),h.stream(t)}(h=!!l.WORKERS_SUPPORTED&&(c=n.URL||n.webkitURL||null,p=e.toString(),o=l.BLOB_URL||(l.BLOB_URL=c.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",p,")();"],{type:"text/javascript"}))),(o=new n.Worker(o)).onmessage=g,o.id=a++,i[o.id]=o)).userStep=r.step,h.userChunk=r.chunk,h.userComplete=r.complete,h.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,h.postMessage({input:t,config:r,workerId:h.id})},l.unparse=function(e,t){var n=!1,r=!0,o=",",i="\r\n",a='"',c=a+a,s=!1,u=null,d=!1,f=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||l.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(s=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a),t.escapeFormulae instanceof RegExp?d=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(d=/^[=+\-@\t\r].*$/)}})(),RegExp(h(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,s);if("object"==typeof e[0])return p(u||Object.keys(e[0]),e,s)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],s);throw Error("Unable to serialize unrecognized input");function p(e,t,n){var a="",l=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),c=!Array.isArray(t[0]);if(l&&r){for(var s=0;s<e.length;s++)0<s&&(a+=o),a+=m(e[s],s);0<t.length&&(a+=i)}for(var u=0;u<t.length;u++){var d=(l?e:t[u]).length,f=!1,p=l?0===Object.keys(t[u]).length:0===t[u].length;if(n&&!l&&(f="greedy"===n?""===t[u].join("").trim():1===t[u].length&&0===t[u][0].length),"greedy"===n&&l){for(var h=[],g=0;g<d;g++){var v=c?e[g]:g;h.push(t[u][v])}f=""===h.join("").trim()}if(!f){for(var y=0;y<d;y++){0<y&&!p&&(a+=o);var b=l&&c?e[y]:y;a+=m(t[u][b],y)}u<t.length-1&&(!n||0<d&&!p)&&(a+=i)}}return a}function m(e,t){var r,i;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(i=!1,d&&"string"==typeof e&&d.test(e)&&(e="'"+e,i=!0),r=e.toString().replace(f,c),(i=i||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||((e,t)=>{for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1})(r,l.BAD_DELIMITERS)||-1<r.indexOf(o)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r)}},l.RECORD_SEP="\x1e",l.UNIT_SEP="\x1f",l.BYTE_ORDER_MARK="\uFEFF",l.BAD_DELIMITERS=["\r","\n",'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!r&&!!n.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=m,l.ParserHandle=p,l.NetworkStreamer=s,l.FileStreamer=u,l.StringStreamer=d,l.ReadableStreamStreamer=f,n.jQuery&&((t=n.jQuery).fn.parse=function(e){var r=e.config||{},o=[];return this.each(function(e){if(!("INPUT"===t(this).prop("tagName").toUpperCase()&&"file"===t(this).attr("type").toLowerCase()&&n.FileReader)||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)o.push({file:this.files[i],inputElem:this,instanceConfig:t.extend({},r)})}),i(),this;function i(){if(0===o.length)w(e.complete)&&e.complete();else{var n,r,i,c,s=o[0];if(w(e.before)){var u=e.before(s.file,s.inputElem);if("object"==typeof u){if("abort"===u.action)return n="AbortError",r=s.file,i=s.inputElem,c=u.reason,void(w(e.error)&&e.error({name:n},r,i,c));if("skip"===u.action)return void a();"object"==typeof u.config&&(s.instanceConfig=t.extend(s.instanceConfig,u.config))}else if("skip"===u)return void a()}var d=s.instanceConfig.complete;s.instanceConfig.complete=function(e){w(d)&&d(e,s.file,s.inputElem),a()},l.parse(s.file,s.instanceConfig)}}function a(){o.splice(0,1),i()}}),o&&(n.onmessage=function(e){e=e.data,void 0===l.WORKER_ID&&e&&(l.WORKER_ID=e.workerId),"string"==typeof e.input?n.postMessage({workerId:l.WORKER_ID,results:l.parse(e.input,e.config),finished:!0}):(n.File&&e.input instanceof File||e.input instanceof Object)&&(e=l.parse(e.input,e.config))&&n.postMessage({workerId:l.WORKER_ID,results:e,finished:!0})}),(s.prototype=Object.create(c.prototype)).constructor=s,(u.prototype=Object.create(c.prototype)).constructor=u,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,l})?n.apply(t,r):n)&&(e.exports=o)},48049:function(e,t,n){"use strict";var r=n(14397);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},40718:function(e,t,n){e.exports=n(48049)()},14397:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},20873:function(e,t,n){"use strict";var r=n(1119),o=n(31686),i=n(11993),a=n(26365),l=n(6989),c=n(36760),s=n.n(c),u=n(50506),d=n(2265),f=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],p=(0,d.forwardRef)(function(e,t){var n,c=e.prefixCls,p=void 0===c?"rc-checkbox":c,h=e.className,m=e.style,g=e.checked,v=e.disabled,y=e.defaultChecked,b=e.type,x=void 0===b?"checkbox":b,w=e.title,S=e.onChange,k=(0,l.Z)(e,f),E=(0,d.useRef)(null),C=(0,u.Z)(void 0!==y&&y,{value:g}),O=(0,a.Z)(C,2),j=O[0],P=O[1];(0,d.useImperativeHandle)(t,function(){return{focus:function(){var e;null===(e=E.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=E.current)||void 0===e||e.blur()},input:E.current}});var N=s()(p,h,(n={},(0,i.Z)(n,"".concat(p,"-checked"),j),(0,i.Z)(n,"".concat(p,"-disabled"),v),n));return d.createElement("span",{className:N,title:w,style:m},d.createElement("input",(0,r.Z)({},k,{className:"".concat(p,"-input"),ref:E,onChange:function(t){v||("checked"in e||P(t.target.checked),null==S||S({target:(0,o.Z)((0,o.Z)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:v,checked:!!j,type:x})),d.createElement("span",{className:"".concat(p,"-inner")}))});t.Z=p},71030:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(1119),o=n(11993),i=n(26365),a=n(6989),l=n(97821),c=n(36760),s=n.n(c),u=n(28791),d=n(2265),f=n(95814),p=n(53346),h=f.Z.ESC,m=f.Z.TAB,g=(0,d.forwardRef)(function(e,t){var n=e.overlay,r=e.arrow,o=e.prefixCls,i=(0,d.useMemo)(function(){return"function"==typeof n?n():n},[n]),a=(0,u.sQ)(t,null==i?void 0:i.ref);return d.createElement(d.Fragment,null,r&&d.createElement("div",{className:"".concat(o,"-arrow")}),d.cloneElement(i,{ref:(0,u.Yr)(i)?a:void 0}))}),v={adjustX:1,adjustY:1},y=[0,0],b={topLeft:{points:["bl","tl"],overflow:v,offset:[0,-4],targetOffset:y},top:{points:["bc","tc"],overflow:v,offset:[0,-4],targetOffset:y},topRight:{points:["br","tr"],overflow:v,offset:[0,-4],targetOffset:y},bottomLeft:{points:["tl","bl"],overflow:v,offset:[0,4],targetOffset:y},bottom:{points:["tc","bc"],overflow:v,offset:[0,4],targetOffset:y},bottomRight:{points:["tr","br"],overflow:v,offset:[0,4],targetOffset:y}},x=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"],w=d.forwardRef(function(e,t){var n,c,f,v,y,w,S,k,E,C,O,j,P,N,M=e.arrow,I=void 0!==M&&M,R=e.prefixCls,T=void 0===R?"rc-dropdown":R,A=e.transitionName,_=e.animation,D=e.align,Z=e.placement,L=e.placements,z=e.getPopupContainer,B=e.showAction,F=e.hideAction,H=e.overlayClassName,q=e.overlayStyle,W=e.visible,K=e.trigger,V=void 0===K?["hover"]:K,U=e.autoFocus,G=e.overlay,X=e.children,$=e.onVisibleChange,Y=(0,a.Z)(e,x),Q=d.useState(),J=(0,i.Z)(Q,2),ee=J[0],et=J[1],en="visible"in e?W:ee,er=d.useRef(null),eo=d.useRef(null),ei=d.useRef(null);d.useImperativeHandle(t,function(){return er.current});var ea=function(e){et(e),null==$||$(e)};c=(n={visible:en,triggerRef:ei,onVisibleChange:ea,autoFocus:U,overlayRef:eo}).visible,f=n.triggerRef,v=n.onVisibleChange,y=n.autoFocus,w=n.overlayRef,S=d.useRef(!1),k=function(){if(c){var e,t;null===(e=f.current)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e),null==v||v(!1)}},E=function(){var e;return null!==(e=w.current)&&void 0!==e&&!!e.focus&&(w.current.focus(),S.current=!0,!0)},C=function(e){switch(e.keyCode){case h:k();break;case m:var t=!1;S.current||(t=E()),t?e.preventDefault():k()}},d.useEffect(function(){return c?(window.addEventListener("keydown",C),y&&(0,p.Z)(E,3),function(){window.removeEventListener("keydown",C),S.current=!1}):function(){S.current=!1}},[c]);var el=function(){return d.createElement(g,{ref:eo,overlay:G,prefixCls:T,arrow:I})},ec=d.cloneElement(X,{className:s()(null===(N=X.props)||void 0===N?void 0:N.className,en&&(void 0!==(O=e.openClassName)?O:"".concat(T,"-open"))),ref:(0,u.Yr)(X)?(0,u.sQ)(ei,X.ref):void 0}),es=F;return es||-1===V.indexOf("contextMenu")||(es=["click"]),d.createElement(l.Z,(0,r.Z)({builtinPlacements:void 0===L?b:L},Y,{prefixCls:T,ref:er,popupClassName:s()(H,(0,o.Z)({},"".concat(T,"-show-arrow"),I)),popupStyle:q,action:V,showAction:B,hideAction:es,popupPlacement:void 0===Z?"bottomLeft":Z,popupAlign:D,popupTransitionName:A,popupAnimation:_,popupVisible:en,stretch:(j=e.minOverlayWidthMatchTrigger,P=e.alignPoint,"minOverlayWidthMatchTrigger"in e?j:!P)?"minWidth":"",popup:"function"==typeof G?el:el(),onPopupVisibleChange:ea,onPopupClick:function(t){var n=e.onOverlayClick;et(!1),n&&n(t)},getPopupContainer:z}),ec)})},96032:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(6989),o=n(31686),i=n(41154),a=n(2265),l=["show"];function c(e,t){return a.useMemo(function(){var n={};t&&(n.show="object"===(0,i.Z)(t)&&t.formatter?t.formatter:!!t);var a=n=(0,o.Z)((0,o.Z)({},n),e),c=a.show,s=(0,r.Z)(a,l);return(0,o.Z)((0,o.Z)({},s),{},{show:!!c,showFormatter:"function"==typeof c?c:void 0,strategy:s.strategy||function(e){return e.length}})},[e,t])}},2027:function(e,t,n){"use strict";n.d(t,{Q:function(){return d},Z:function(){return b}});var r=n(31686),o=n(1119),i=n(11993),a=n(41154),l=n(36760),c=n.n(l),s=n(2265),u=n(55041),d=function(e){var t=e.inputElement,n=e.children,l=e.prefixCls,d=e.prefix,f=e.suffix,p=e.addonBefore,h=e.addonAfter,m=e.className,g=e.style,v=e.disabled,y=e.readOnly,b=e.focused,x=e.triggerFocus,w=e.allowClear,S=e.value,k=e.handleReset,E=e.hidden,C=e.classes,O=e.classNames,j=e.dataAttrs,P=e.styles,N=e.components,M=null!=n?n:t,I=(null==N?void 0:N.affixWrapper)||"span",R=(null==N?void 0:N.groupWrapper)||"span",T=(null==N?void 0:N.wrapper)||"span",A=(null==N?void 0:N.groupAddon)||"span",_=(0,s.useRef)(null),D=(0,u.X3)(e),Z=(0,s.cloneElement)(M,{value:S,className:c()(M.props.className,!D&&(null==O?void 0:O.variant))||null});if(D){var L=null;if(w){var z,B,F,H,q=!v&&!y&&S,W="".concat(l,"-clear-icon"),K="object"===(0,a.Z)(w)&&null!=w&&w.clearIcon?w.clearIcon:"✖";L=s.createElement("span",{onClick:k,onMouseDown:function(e){return e.preventDefault()},className:c()(W,(H={},(0,i.Z)(H,"".concat(W,"-hidden"),!q),(0,i.Z)(H,"".concat(W,"-has-suffix"),!!f),H)),role:"button",tabIndex:-1},K)}var V="".concat(l,"-affix-wrapper"),U=c()(V,(F={},(0,i.Z)(F,"".concat(l,"-disabled"),v),(0,i.Z)(F,"".concat(V,"-disabled"),v),(0,i.Z)(F,"".concat(V,"-focused"),b),(0,i.Z)(F,"".concat(V,"-readonly"),y),(0,i.Z)(F,"".concat(V,"-input-with-clear-btn"),f&&w&&S),F),null==C?void 0:C.affixWrapper,null==O?void 0:O.affixWrapper,null==O?void 0:O.variant),G=(f||w)&&s.createElement("span",{className:c()("".concat(l,"-suffix"),null==O?void 0:O.suffix),style:null==P?void 0:P.suffix},L,f);Z=s.createElement(I,(0,o.Z)({className:U,style:null==P?void 0:P.affixWrapper,onClick:function(e){var t;null!==(t=_.current)&&void 0!==t&&t.contains(e.target)&&(null==x||x())}},null==j?void 0:j.affixWrapper,{ref:_}),d&&s.createElement("span",{className:c()("".concat(l,"-prefix"),null==O?void 0:O.prefix),style:null==P?void 0:P.prefix},d),Z,G)}if((0,u.He)(e)){var X="".concat(l,"-group"),$="".concat(X,"-addon"),Y="".concat(X,"-wrapper"),Q=c()("".concat(l,"-wrapper"),X,null==C?void 0:C.wrapper,null==O?void 0:O.wrapper),J=c()(Y,(0,i.Z)({},"".concat(Y,"-disabled"),v),null==C?void 0:C.group,null==O?void 0:O.groupWrapper);Z=s.createElement(R,{className:J},s.createElement(T,{className:Q},p&&s.createElement(A,{className:$},p),Z,h&&s.createElement(A,{className:$},h)))}return s.cloneElement(Z,{className:c()(null===(z=Z.props)||void 0===z?void 0:z.className,m)||null,style:(0,r.Z)((0,r.Z)({},null===(B=Z.props)||void 0===B?void 0:B.style),g),hidden:E})},f=n(83145),p=n(26365),h=n(6989),m=n(50506),g=n(18694),v=n(96032),y=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],b=(0,s.forwardRef)(function(e,t){var n,a=e.autoComplete,l=e.onChange,b=e.onFocus,x=e.onBlur,w=e.onPressEnter,S=e.onKeyDown,k=e.prefixCls,E=void 0===k?"rc-input":k,C=e.disabled,O=e.htmlSize,j=e.className,P=e.maxLength,N=e.suffix,M=e.showCount,I=e.count,R=e.type,T=e.classes,A=e.classNames,_=e.styles,D=e.onCompositionStart,Z=e.onCompositionEnd,L=(0,h.Z)(e,y),z=(0,s.useState)(!1),B=(0,p.Z)(z,2),F=B[0],H=B[1],q=(0,s.useRef)(!1),W=(0,s.useRef)(null),K=function(e){W.current&&(0,u.nH)(W.current,e)},V=(0,m.Z)(e.defaultValue,{value:e.value}),U=(0,p.Z)(V,2),G=U[0],X=U[1],$=null==G?"":String(G),Y=(0,s.useState)(null),Q=(0,p.Z)(Y,2),J=Q[0],ee=Q[1],et=(0,v.Z)(I,M),en=et.max||P,er=et.strategy($),eo=!!en&&er>en;(0,s.useImperativeHandle)(t,function(){return{focus:K,blur:function(){var e;null===(e=W.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var r;null===(r=W.current)||void 0===r||r.setSelectionRange(e,t,n)},select:function(){var e;null===(e=W.current)||void 0===e||e.select()},input:W.current}}),(0,s.useEffect)(function(){H(function(e){return(!e||!C)&&e})},[C]);var ei=function(e,t,n){var r,o,i=t;if(!q.current&&et.exceedFormatter&&et.max&&et.strategy(t)>et.max)i=et.exceedFormatter(t,{max:et.max}),t!==i&&ee([(null===(r=W.current)||void 0===r?void 0:r.selectionStart)||0,(null===(o=W.current)||void 0===o?void 0:o.selectionEnd)||0]);else if("compositionEnd"===n.source)return;X(i),W.current&&(0,u.rJ)(W.current,e,l,i)};(0,s.useEffect)(function(){if(J){var e;null===(e=W.current)||void 0===e||e.setSelectionRange.apply(e,(0,f.Z)(J))}},[J]);var ea=eo&&"".concat(E,"-out-of-range");return s.createElement(d,(0,o.Z)({},L,{prefixCls:E,className:c()(j,ea),handleReset:function(e){X(""),K(),W.current&&(0,u.rJ)(W.current,e,l)},value:$,focused:F,triggerFocus:K,suffix:function(){var e=Number(en)>0;if(N||et.show){var t=et.showFormatter?et.showFormatter({value:$,count:er,maxLength:en}):"".concat(er).concat(e?" / ".concat(en):"");return s.createElement(s.Fragment,null,et.show&&s.createElement("span",{className:c()("".concat(E,"-show-count-suffix"),(0,i.Z)({},"".concat(E,"-show-count-has-suffix"),!!N),null==A?void 0:A.count),style:(0,r.Z)({},null==_?void 0:_.count)},t),N)}return null}(),disabled:C,classes:T,classNames:A,styles:_}),(n=(0,g.Z)(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames"]),s.createElement("input",(0,o.Z)({autoComplete:a},n,{onChange:function(e){ei(e,e.target.value,{source:"change"})},onFocus:function(e){H(!0),null==b||b(e)},onBlur:function(e){H(!1),null==x||x(e)},onKeyDown:function(e){w&&"Enter"===e.key&&w(e),null==S||S(e)},className:c()(E,(0,i.Z)({},"".concat(E,"-disabled"),C),null==A?void 0:A.input),style:null==_?void 0:_.input,ref:W,size:O,type:void 0===R?"text":R,onCompositionStart:function(e){q.current=!0,null==D||D(e)},onCompositionEnd:function(e){q.current=!1,ei(e,e.currentTarget.value,{source:"compositionEnd"}),null==Z||Z(e)}}))))})},55041:function(e,t,n){"use strict";function r(e){return!!(e.addonBefore||e.addonAfter)}function o(e){return!!(e.prefix||e.suffix||e.allowClear)}function i(e,t,n,r){if(n){var o=t;if("click"===t.type){var i=e.cloneNode(!0);o=Object.create(t,{target:{value:i},currentTarget:{value:i}}),i.value="",n(o);return}if("file"!==e.type&&void 0!==r){var a=e.cloneNode(!0);o=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value=r,n(o);return}n(o)}}function a(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}n.d(t,{He:function(){return r},X3:function(){return o},nH:function(){return a},rJ:function(){return i}})},33082:function(e,t,n){"use strict";n.d(t,{iz:function(){return eZ},ck:function(){return eh},BW:function(){return eD},sN:function(){return eh},Wd:function(){return eI},ZP:function(){return eH},Xl:function(){return j}});var r=n(1119),o=n(11993),i=n(31686),a=n(83145),l=n(26365),c=n(6989),s=n(36760),u=n.n(s),d=n(1699),f=n(50506),p=n(16671),h=n(32559),m=n(2265),g=n(54887),v=m.createContext(null);function y(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function b(e){return y(m.useContext(v),e)}var x=n(6397),w=["children","locked"],S=m.createContext(null);function k(e){var t=e.children,n=e.locked,r=(0,c.Z)(e,w),o=m.useContext(S),a=(0,x.Z)(function(){var e;return e=(0,i.Z)({},o),Object.keys(r).forEach(function(t){var n=r[t];void 0!==n&&(e[t]=n)}),e},[o,r],function(e,t){return!n&&(e[0]!==t[0]||!(0,p.Z)(e[1],t[1],!0))});return m.createElement(S.Provider,{value:a},t)}var E=m.createContext(null);function C(){return m.useContext(E)}var O=m.createContext([]);function j(e){var t=m.useContext(O);return m.useMemo(function(){return void 0!==e?[].concat((0,a.Z)(t),[e]):t},[t,e])}var P=m.createContext(null),N=m.createContext({}),M=n(2857);function I(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,M.Z)(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&null===a&&(a=0),r&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a<0)}return!1}var R=n(95814),T=n(53346),A=R.Z.LEFT,_=R.Z.RIGHT,D=R.Z.UP,Z=R.Z.DOWN,L=R.Z.ENTER,z=R.Z.ESC,B=R.Z.HOME,F=R.Z.END,H=[D,Z,A,_];function q(e,t){return(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,a.Z)(e.querySelectorAll("*")).filter(function(e){return I(e,t)});return I(e,t)&&n.unshift(e),n})(e,!0).filter(function(e){return t.has(e)})}function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=q(e,t),i=o.length,a=o.findIndex(function(e){return n===e});return r<0?-1===a?a=i-1:a-=1:r>0&&(a+=1),o[a=(a+i)%i]}var K=function(e,t){var n=new Set,r=new Map,o=new Map;return e.forEach(function(e){var i=document.querySelector("[data-menu-id='".concat(y(t,e),"']"));i&&(n.add(i),o.set(i,e),r.set(e,i))}),{elements:n,key2element:r,element2key:o}},V="__RC_UTIL_PATH_SPLIT__",U=function(e){return e.join(V)},G="rc-menu-more";function X(e){var t=m.useRef(e);t.current=e;var n=m.useCallback(function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))},[]);return e?n:void 0}var $=Math.random().toFixed(5).toString().slice(2),Y=0,Q=n(76405),J=n(25049),ee=n(15354),et=n(15900),en=n(18694),er=n(28791);function eo(e,t,n,r){var o=m.useContext(S),i=o.activeKey,a=o.onActive,l=o.onInactive,c={active:i===e};return t||(c.onMouseEnter=function(t){null==n||n({key:e,domEvent:t}),a(e)},c.onMouseLeave=function(t){null==r||r({key:e,domEvent:t}),l(e)}),c}function ei(e){var t=m.useContext(S),n=t.mode,r=t.rtl,o=t.inlineIndent;return"inline"!==n?null:r?{paddingRight:e*o}:{paddingLeft:e*o}}function ea(e){var t,n=e.icon,r=e.props,o=e.children;return null===n||!1===n?null:("function"==typeof n?t=m.createElement(n,(0,i.Z)({},r)):"boolean"!=typeof n&&(t=n),t||o||null)}var el=["item"];function ec(e){var t=e.item,n=(0,c.Z)(e,el);return Object.defineProperty(n,"item",{get:function(){return(0,h.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var es=["title","attribute","elementRef"],eu=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],ed=["active"],ef=function(e){(0,ee.Z)(n,e);var t=(0,et.Z)(n);function n(){return(0,Q.Z)(this,n),t.apply(this,arguments)}return(0,J.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.attribute,o=e.elementRef,i=(0,c.Z)(e,es),a=(0,en.Z)(i,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,h.ZP)(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(d.Z.Item,(0,r.Z)({},n,{title:"string"==typeof t?t:void 0},a,{ref:o}))}}]),n}(m.Component),ep=m.forwardRef(function(e,t){var n,l=e.style,s=e.className,d=e.eventKey,f=(e.warnKey,e.disabled),p=e.itemIcon,h=e.children,g=e.role,v=e.onMouseEnter,y=e.onMouseLeave,x=e.onClick,w=e.onKeyDown,k=e.onFocus,E=(0,c.Z)(e,eu),C=b(d),O=m.useContext(S),P=O.prefixCls,M=O.onItemClick,I=O.disabled,T=O.overflowDisabled,A=O.itemIcon,_=O.selectedKeys,D=O.onActive,Z=m.useContext(N)._internalRenderMenuItem,L="".concat(P,"-item"),z=m.useRef(),B=m.useRef(),F=I||f,H=(0,er.x1)(t,B),q=j(d),W=function(e){return{key:d,keyPath:(0,a.Z)(q).reverse(),item:z.current,domEvent:e}},K=eo(d,F,v,y),V=K.active,U=(0,c.Z)(K,ed),G=_.includes(d),X=ei(q.length),$={};"option"===e.role&&($["aria-selected"]=G);var Y=m.createElement(ef,(0,r.Z)({ref:z,elementRef:H,role:null===g?"none":g||"menuitem",tabIndex:f?null:-1,"data-menu-id":T&&C?null:C},E,U,$,{component:"li","aria-disabled":f,style:(0,i.Z)((0,i.Z)({},X),l),className:u()(L,(n={},(0,o.Z)(n,"".concat(L,"-active"),V),(0,o.Z)(n,"".concat(L,"-selected"),G),(0,o.Z)(n,"".concat(L,"-disabled"),F),n),s),onClick:function(e){if(!F){var t=W(e);null==x||x(ec(t)),M(t)}},onKeyDown:function(e){if(null==w||w(e),e.which===R.Z.ENTER){var t=W(e);null==x||x(ec(t)),M(t)}},onFocus:function(e){D(d),null==k||k(e)}}),h,m.createElement(ea,{props:(0,i.Z)((0,i.Z)({},e),{},{isSelected:G}),icon:p||A}));return Z&&(Y=Z(Y,e,{selected:G})),Y}),eh=m.forwardRef(function(e,t){var n=e.eventKey,o=C(),i=j(n);return(m.useEffect(function(){if(o)return o.registerPath(n,i),function(){o.unregisterPath(n,i)}},[i]),o)?null:m.createElement(ep,(0,r.Z)({},e,{ref:t}))}),em=["className","children"],eg=m.forwardRef(function(e,t){var n=e.className,o=e.children,i=(0,c.Z)(e,em),a=m.useContext(S),l=a.prefixCls,s=a.mode,d=a.rtl;return m.createElement("ul",(0,r.Z)({className:u()(l,d&&"".concat(l,"-rtl"),"".concat(l,"-sub"),"".concat(l,"-").concat("inline"===s?"inline":"vertical"),n),role:"menu"},i,{"data-menu-list":!0,ref:t}),o)});eg.displayName="SubMenuList";var ev=n(45287);function ey(e,t){return(0,ev.Z)(e).map(function(e,n){if(m.isValidElement(e)){var r,o,i=e.key,l=null!==(r=null===(o=e.props)||void 0===o?void 0:o.eventKey)&&void 0!==r?r:i;null==l&&(l="tmp_key-".concat([].concat((0,a.Z)(t),[n]).join("-")));var c={key:l,eventKey:l};return m.cloneElement(e,c)}return e})}var eb=n(97821),ex={adjustX:1,adjustY:1},ew={topLeft:{points:["bl","tl"],overflow:ex},topRight:{points:["br","tr"],overflow:ex},bottomLeft:{points:["tl","bl"],overflow:ex},bottomRight:{points:["tr","br"],overflow:ex},leftTop:{points:["tr","tl"],overflow:ex},leftBottom:{points:["br","bl"],overflow:ex},rightTop:{points:["tl","tr"],overflow:ex},rightBottom:{points:["bl","br"],overflow:ex}},eS={topLeft:{points:["bl","tl"],overflow:ex},topRight:{points:["br","tr"],overflow:ex},bottomLeft:{points:["tl","bl"],overflow:ex},bottomRight:{points:["tr","br"],overflow:ex},rightTop:{points:["tr","tl"],overflow:ex},rightBottom:{points:["br","bl"],overflow:ex},leftTop:{points:["tl","tr"],overflow:ex},leftBottom:{points:["bl","br"],overflow:ex}};function ek(e,t,n){return t||(n?n[e]||n.other:void 0)}var eE={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function eC(e){var t=e.prefixCls,n=e.visible,r=e.children,a=e.popup,c=e.popupStyle,s=e.popupClassName,d=e.popupOffset,f=e.disabled,p=e.mode,h=e.onVisibleChange,g=m.useContext(S),v=g.getPopupContainer,y=g.rtl,b=g.subMenuOpenDelay,x=g.subMenuCloseDelay,w=g.builtinPlacements,k=g.triggerSubMenuAction,E=g.forceSubMenuRender,C=g.rootClassName,O=g.motion,j=g.defaultMotions,P=m.useState(!1),N=(0,l.Z)(P,2),M=N[0],I=N[1],R=y?(0,i.Z)((0,i.Z)({},eS),w):(0,i.Z)((0,i.Z)({},ew),w),A=eE[p],_=ek(p,O,j),D=m.useRef(_);"inline"!==p&&(D.current=_);var Z=(0,i.Z)((0,i.Z)({},D.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),L=m.useRef();return m.useEffect(function(){return L.current=(0,T.Z)(function(){I(n)}),function(){T.Z.cancel(L.current)}},[n]),m.createElement(eb.Z,{prefixCls:t,popupClassName:u()("".concat(t,"-popup"),(0,o.Z)({},"".concat(t,"-rtl"),y),s,C),stretch:"horizontal"===p?"minWidth":null,getPopupContainer:v,builtinPlacements:R,popupPlacement:A,popupVisible:M,popup:a,popupStyle:c,popupAlign:d&&{offset:d},action:f?[]:[k],mouseEnterDelay:b,mouseLeaveDelay:x,onPopupVisibleChange:h,forceRender:E,popupMotion:Z,fresh:!0},r)}var eO=n(47970);function ej(e){var t=e.id,n=e.open,o=e.keyPath,a=e.children,c="inline",s=m.useContext(S),u=s.prefixCls,d=s.forceSubMenuRender,f=s.motion,p=s.defaultMotions,h=s.mode,g=m.useRef(!1);g.current=h===c;var v=m.useState(!g.current),y=(0,l.Z)(v,2),b=y[0],x=y[1],w=!!g.current&&n;m.useEffect(function(){g.current&&x(!1)},[h]);var E=(0,i.Z)({},ek(c,f,p));o.length>1&&(E.motionAppear=!1);var C=E.onVisibleChanged;return(E.onVisibleChanged=function(e){return g.current||e||x(!0),null==C?void 0:C(e)},b)?null:m.createElement(k,{mode:c,locked:!g.current},m.createElement(eO.ZP,(0,r.Z)({visible:w},E,{forceRender:d,removeOnLeave:!1,leavedClassName:"".concat(u,"-hidden")}),function(e){var n=e.className,r=e.style;return m.createElement(eg,{id:t,className:n,style:r},a)}))}var eP=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],eN=["active"],eM=function(e){var t,n=e.style,a=e.className,s=e.title,f=e.eventKey,p=(e.warnKey,e.disabled),h=e.internalPopupClose,g=e.children,v=e.itemIcon,y=e.expandIcon,x=e.popupClassName,w=e.popupOffset,E=e.popupStyle,C=e.onClick,O=e.onMouseEnter,M=e.onMouseLeave,I=e.onTitleClick,R=e.onTitleMouseEnter,T=e.onTitleMouseLeave,A=(0,c.Z)(e,eP),_=b(f),D=m.useContext(S),Z=D.prefixCls,L=D.mode,z=D.openKeys,B=D.disabled,F=D.overflowDisabled,H=D.activeKey,q=D.selectedKeys,W=D.itemIcon,K=D.expandIcon,V=D.onItemClick,U=D.onOpenChange,G=D.onActive,$=m.useContext(N)._internalRenderSubMenuItem,Y=m.useContext(P).isSubPathKey,Q=j(),J="".concat(Z,"-submenu"),ee=B||p,et=m.useRef(),en=m.useRef(),er=null!=y?y:K,el=z.includes(f),es=!F&&el,eu=Y(q,f),ed=eo(f,ee,R,T),ef=ed.active,ep=(0,c.Z)(ed,eN),eh=m.useState(!1),em=(0,l.Z)(eh,2),ev=em[0],ey=em[1],eb=function(e){ee||ey(e)},ex=m.useMemo(function(){return ef||"inline"!==L&&(ev||Y([H],f))},[L,ef,H,ev,f,Y]),ew=ei(Q.length),eS=X(function(e){null==C||C(ec(e)),V(e)}),ek=_&&"".concat(_,"-popup"),eE=m.createElement("div",(0,r.Z)({role:"menuitem",style:ew,className:"".concat(J,"-title"),tabIndex:ee?null:-1,ref:et,title:"string"==typeof s?s:null,"data-menu-id":F&&_?null:_,"aria-expanded":es,"aria-haspopup":!0,"aria-controls":ek,"aria-disabled":ee,onClick:function(e){ee||(null==I||I({key:f,domEvent:e}),"inline"===L&&U(f,!el))},onFocus:function(){G(f)}},ep),s,m.createElement(ea,{icon:"horizontal"!==L?er:void 0,props:(0,i.Z)((0,i.Z)({},e),{},{isOpen:es,isSubMenu:!0})},m.createElement("i",{className:"".concat(J,"-arrow")}))),eO=m.useRef(L);if("inline"!==L&&Q.length>1?eO.current="vertical":eO.current=L,!F){var eM=eO.current;eE=m.createElement(eC,{mode:eM,prefixCls:J,visible:!h&&es&&"inline"!==L,popupClassName:x,popupOffset:w,popupStyle:E,popup:m.createElement(k,{mode:"horizontal"===eM?"vertical":eM},m.createElement(eg,{id:ek,ref:en},g)),disabled:ee,onVisibleChange:function(e){"inline"!==L&&U(f,e)}},eE)}var eI=m.createElement(d.Z.Item,(0,r.Z)({role:"none"},A,{component:"li",style:n,className:u()(J,"".concat(J,"-").concat(L),a,(t={},(0,o.Z)(t,"".concat(J,"-open"),es),(0,o.Z)(t,"".concat(J,"-active"),ex),(0,o.Z)(t,"".concat(J,"-selected"),eu),(0,o.Z)(t,"".concat(J,"-disabled"),ee),t)),onMouseEnter:function(e){eb(!0),null==O||O({key:f,domEvent:e})},onMouseLeave:function(e){eb(!1),null==M||M({key:f,domEvent:e})}}),eE,!F&&m.createElement(ej,{id:ek,open:es,keyPath:Q},g));return $&&(eI=$(eI,e,{selected:eu,active:ex,open:es,disabled:ee})),m.createElement(k,{onItemClick:eS,mode:"horizontal"===L?"vertical":L,itemIcon:null!=v?v:W,expandIcon:er},eI)};function eI(e){var t,n=e.eventKey,r=e.children,o=j(n),i=ey(r,o),a=C();return m.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]),t=a?i:m.createElement(eM,e,i),m.createElement(O.Provider,{value:o},t)}var eR=n(41154),eT=["className","title","eventKey","children"],eA=["children"],e_=function(e){var t=e.className,n=e.title,o=(e.eventKey,e.children),i=(0,c.Z)(e,eT),a=m.useContext(S).prefixCls,l="".concat(a,"-item-group");return m.createElement("li",(0,r.Z)({role:"presentation"},i,{onClick:function(e){return e.stopPropagation()},className:u()(l,t)}),m.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:"string"==typeof n?n:void 0},n),m.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))};function eD(e){var t=e.children,n=(0,c.Z)(e,eA),r=ey(t,j(n.eventKey));return C()?r:m.createElement(e_,(0,en.Z)(n,["warnKey"]),r)}function eZ(e){var t=e.className,n=e.style,r=m.useContext(S).prefixCls;return C()?null:m.createElement("li",{role:"separator",className:u()("".concat(r,"-item-divider"),t),style:n})}var eL=["label","children","key","type"],ez=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],eB=[],eF=m.forwardRef(function(e,t){var n,s,h,y,b,x,w,S,C,O,j,M,I,R,Q,J,ee,et,en,er,eo,ei,ea,el,es,eu,ed,ef=e.prefixCls,ep=void 0===ef?"rc-menu":ef,em=e.rootClassName,eg=e.style,ev=e.className,eb=e.tabIndex,ex=e.items,ew=e.children,eS=e.direction,ek=e.id,eE=e.mode,eC=void 0===eE?"vertical":eE,eO=e.inlineCollapsed,ej=e.disabled,eP=e.disabledOverflow,eN=e.subMenuOpenDelay,eM=e.subMenuCloseDelay,eT=e.forceSubMenuRender,eA=e.defaultOpenKeys,e_=e.openKeys,eF=e.activeKey,eH=e.defaultActiveFirst,eq=e.selectable,eW=void 0===eq||eq,eK=e.multiple,eV=void 0!==eK&&eK,eU=e.defaultSelectedKeys,eG=e.selectedKeys,eX=e.onSelect,e$=e.onDeselect,eY=e.inlineIndent,eQ=e.motion,eJ=e.defaultMotions,e0=e.triggerSubMenuAction,e1=e.builtinPlacements,e2=e.itemIcon,e6=e.expandIcon,e4=e.overflowedIndicator,e3=void 0===e4?"...":e4,e5=e.overflowedIndicatorPopupClassName,e8=e.getPopupContainer,e7=e.onClick,e9=e.onOpenChange,te=e.onKeyDown,tt=(e.openAnimation,e.openTransitionName,e._internalRenderMenuItem),tn=e._internalRenderSubMenuItem,tr=(0,c.Z)(e,ez),to=m.useMemo(function(){var e;return e=ew,ex&&(e=function e(t){return(t||[]).map(function(t,n){if(t&&"object"===(0,eR.Z)(t)){var o=t.label,i=t.children,a=t.key,l=t.type,s=(0,c.Z)(t,eL),u=null!=a?a:"tmp-".concat(n);return i||"group"===l?"group"===l?m.createElement(eD,(0,r.Z)({key:u},s,{title:o}),e(i)):m.createElement(eI,(0,r.Z)({key:u},s,{title:o}),e(i)):"divider"===l?m.createElement(eZ,(0,r.Z)({key:u},s)):m.createElement(eh,(0,r.Z)({key:u},s),o)}return null}).filter(function(e){return e})}(ex)),ey(e,eB)},[ew,ex]),ti=m.useState(!1),ta=(0,l.Z)(ti,2),tl=ta[0],tc=ta[1],ts=m.useRef(),tu=(n=(0,f.Z)(ek,{value:ek}),h=(s=(0,l.Z)(n,2))[0],y=s[1],m.useEffect(function(){Y+=1;var e="".concat($,"-").concat(Y);y("rc-menu-uuid-".concat(e))},[]),h),td="rtl"===eS,tf=(0,f.Z)(eA,{value:e_,postState:function(e){return e||eB}}),tp=(0,l.Z)(tf,2),th=tp[0],tm=tp[1],tg=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(){tm(e),null==e9||e9(e)}t?(0,g.flushSync)(n):n()},tv=m.useState(th),ty=(0,l.Z)(tv,2),tb=ty[0],tx=ty[1],tw=m.useRef(!1),tS=m.useMemo(function(){return("inline"===eC||"vertical"===eC)&&eO?["vertical",eO]:[eC,!1]},[eC,eO]),tk=(0,l.Z)(tS,2),tE=tk[0],tC=tk[1],tO="inline"===tE,tj=m.useState(tE),tP=(0,l.Z)(tj,2),tN=tP[0],tM=tP[1],tI=m.useState(tC),tR=(0,l.Z)(tI,2),tT=tR[0],tA=tR[1];m.useEffect(function(){tM(tE),tA(tC),tw.current&&(tO?tm(tb):tg(eB))},[tE,tC]);var t_=m.useState(0),tD=(0,l.Z)(t_,2),tZ=tD[0],tL=tD[1],tz=tZ>=to.length-1||"horizontal"!==tN||eP;m.useEffect(function(){tO&&tx(th)},[th]),m.useEffect(function(){return tw.current=!0,function(){tw.current=!1}},[]);var tB=(b=m.useState({}),x=(0,l.Z)(b,2)[1],w=(0,m.useRef)(new Map),S=(0,m.useRef)(new Map),C=m.useState([]),j=(O=(0,l.Z)(C,2))[0],M=O[1],I=(0,m.useRef)(0),R=(0,m.useRef)(!1),Q=function(){R.current||x({})},J=(0,m.useCallback)(function(e,t){var n,r=U(t);S.current.set(r,e),w.current.set(e,r),I.current+=1;var o=I.current;n=function(){o===I.current&&Q()},Promise.resolve().then(n)},[]),ee=(0,m.useCallback)(function(e,t){var n=U(t);S.current.delete(n),w.current.delete(e)},[]),et=(0,m.useCallback)(function(e){M(e)},[]),en=(0,m.useCallback)(function(e,t){var n=(w.current.get(e)||"").split(V);return t&&j.includes(n[0])&&n.unshift(G),n},[j]),er=(0,m.useCallback)(function(e,t){return e.some(function(e){return en(e,!0).includes(t)})},[en]),eo=(0,m.useCallback)(function(e){var t="".concat(w.current.get(e)).concat(V),n=new Set;return(0,a.Z)(S.current.keys()).forEach(function(e){e.startsWith(t)&&n.add(S.current.get(e))}),n},[]),m.useEffect(function(){return function(){R.current=!0}},[]),{registerPath:J,unregisterPath:ee,refreshOverflowKeys:et,isSubPathKey:er,getKeyPath:en,getKeys:function(){var e=(0,a.Z)(w.current.keys());return j.length&&e.push(G),e},getSubPathKeys:eo}),tF=tB.registerPath,tH=tB.unregisterPath,tq=tB.refreshOverflowKeys,tW=tB.isSubPathKey,tK=tB.getKeyPath,tV=tB.getKeys,tU=tB.getSubPathKeys,tG=m.useMemo(function(){return{registerPath:tF,unregisterPath:tH}},[tF,tH]),tX=m.useMemo(function(){return{isSubPathKey:tW}},[tW]);m.useEffect(function(){tq(tz?eB:to.slice(tZ+1).map(function(e){return e.key}))},[tZ,tz]);var t$=(0,f.Z)(eF||eH&&(null===(eu=to[0])||void 0===eu?void 0:eu.key),{value:eF}),tY=(0,l.Z)(t$,2),tQ=tY[0],tJ=tY[1],t0=X(function(e){tJ(e)}),t1=X(function(){tJ(void 0)});(0,m.useImperativeHandle)(t,function(){return{list:ts.current,focus:function(e){var t,n,r=K(tV(),tu),o=r.elements,i=r.key2element,a=r.element2key,l=q(ts.current,o),c=null!=tQ?tQ:l[0]?a.get(l[0]):null===(t=to.find(function(e){return!e.props.disabled}))||void 0===t?void 0:t.key,s=i.get(c);c&&s&&(null==s||null===(n=s.focus)||void 0===n||n.call(s,e))}}});var t2=(0,f.Z)(eU||[],{value:eG,postState:function(e){return Array.isArray(e)?e:null==e?eB:[e]}}),t6=(0,l.Z)(t2,2),t4=t6[0],t3=t6[1],t5=function(e){if(eW){var t,n=e.key,r=t4.includes(n);t3(t=eV?r?t4.filter(function(e){return e!==n}):[].concat((0,a.Z)(t4),[n]):[n]);var o=(0,i.Z)((0,i.Z)({},e),{},{selectedKeys:t});r?null==e$||e$(o):null==eX||eX(o)}!eV&&th.length&&"inline"!==tN&&tg(eB)},t8=X(function(e){null==e7||e7(ec(e)),t5(e)}),t7=X(function(e,t){var n=th.filter(function(t){return t!==e});if(t)n.push(e);else if("inline"!==tN){var r=tU(e);n=n.filter(function(e){return!r.has(e)})}(0,p.Z)(th,n,!0)||tg(n,!0)}),t9=(ei=function(e,t){var n=null!=t?t:!th.includes(e);t7(e,n)},ea=m.useRef(),(el=m.useRef()).current=tQ,es=function(){T.Z.cancel(ea.current)},m.useEffect(function(){return function(){es()}},[]),function(e){var t=e.which;if([].concat(H,[L,z,B,F]).includes(t)){var n=tV(),r=K(n,tu),i=r,a=i.elements,l=i.key2element,c=i.element2key,s=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(l.get(tQ),a),u=c.get(s),d=function(e,t,n,r){var i,a,l,c,s="prev",u="next",d="children",f="parent";if("inline"===e&&r===L)return{inlineTrigger:!0};var p=(i={},(0,o.Z)(i,D,s),(0,o.Z)(i,Z,u),i),h=(a={},(0,o.Z)(a,A,n?u:s),(0,o.Z)(a,_,n?s:u),(0,o.Z)(a,Z,d),(0,o.Z)(a,L,d),a),m=(l={},(0,o.Z)(l,D,s),(0,o.Z)(l,Z,u),(0,o.Z)(l,L,d),(0,o.Z)(l,z,f),(0,o.Z)(l,A,n?d:f),(0,o.Z)(l,_,n?f:d),l);switch(null===(c=({inline:p,horizontal:h,vertical:m,inlineSub:p,horizontalSub:m,verticalSub:m})["".concat(e).concat(t?"":"Sub")])||void 0===c?void 0:c[r]){case s:return{offset:-1,sibling:!0};case u:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case d:return{offset:1,sibling:!1};default:return null}}(tN,1===tK(u,!0).length,td,t);if(!d&&t!==B&&t!==F)return;(H.includes(t)||[B,F].includes(t))&&e.preventDefault();var f=function(e){if(e){var t=e,n=e.querySelector("a");null!=n&&n.getAttribute("href")&&(t=n);var r=c.get(e);tJ(r),es(),ea.current=(0,T.Z)(function(){el.current===r&&t.focus()})}};if([B,F].includes(t)||d.sibling||!s){var p,h=q(p=s&&"inline"!==tN?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(s):ts.current,a);f(t===B?h[0]:t===F?h[h.length-1]:W(p,a,s,d.offset))}else if(d.inlineTrigger)ei(u);else if(d.offset>0)ei(u,!0),es(),ea.current=(0,T.Z)(function(){r=K(n,tu);var e=s.getAttribute("aria-controls");f(W(document.getElementById(e),r.elements))},5);else if(d.offset<0){var m=tK(u,!0),g=m[m.length-2],v=l.get(g);ei(g,!1),f(v)}}null==te||te(e)});m.useEffect(function(){tc(!0)},[]);var ne=m.useMemo(function(){return{_internalRenderMenuItem:tt,_internalRenderSubMenuItem:tn}},[tt,tn]),nt="horizontal"!==tN||eP?to:to.map(function(e,t){return m.createElement(k,{key:e.key,overflowDisabled:t>tZ},e)}),nn=m.createElement(d.Z,(0,r.Z)({id:ek,ref:ts,prefixCls:"".concat(ep,"-overflow"),component:"ul",itemComponent:eh,className:u()(ep,"".concat(ep,"-root"),"".concat(ep,"-").concat(tN),ev,(ed={},(0,o.Z)(ed,"".concat(ep,"-inline-collapsed"),tT),(0,o.Z)(ed,"".concat(ep,"-rtl"),td),ed),em),dir:eS,style:eg,role:"menu",tabIndex:void 0===eb?0:eb,data:nt,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?to.slice(-t):null;return m.createElement(eI,{eventKey:G,title:e3,disabled:tz,internalPopupClose:0===t,popupClassName:e5},n)},maxCount:"horizontal"!==tN||eP?d.Z.INVALIDATE:d.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){tL(e)},onKeyDown:t9},tr));return m.createElement(N.Provider,{value:ne},m.createElement(v.Provider,{value:tu},m.createElement(k,{prefixCls:ep,rootClassName:em,mode:tN,openKeys:th,rtl:td,disabled:ej,motion:tl?eQ:null,defaultMotions:tl?eJ:null,activeKey:tQ,onActive:t0,onInactive:t1,selectedKeys:t4,inlineIndent:void 0===eY?24:eY,subMenuOpenDelay:void 0===eN?.1:eN,subMenuCloseDelay:void 0===eM?.1:eM,forceSubMenuRender:eT,builtinPlacements:e1,triggerSubMenuAction:void 0===e0?"hover":e0,getPopupContainer:e8,itemIcon:e2,expandIcon:e6,onItemClick:t8,onOpenChange:t7},m.createElement(P.Provider,{value:tX},nn),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(E.Provider,{value:tG},to)))))});eF.Item=eh,eF.SubMenu=eI,eF.ItemGroup=eD,eF.Divider=eZ;var eH=eF},1699:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(1119),o=n(31686),i=n(26365),a=n(6989),l=n(2265),c=n(36760),s=n.n(c),u=n(31474),d=n(27380),f=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],p=void 0,h=l.forwardRef(function(e,t){var n,i=e.prefixCls,c=e.invalidate,d=e.item,h=e.renderItem,m=e.responsive,g=e.responsiveDisabled,v=e.registerSize,y=e.itemKey,b=e.className,x=e.style,w=e.children,S=e.display,k=e.order,E=e.component,C=(0,a.Z)(e,f),O=m&&!S;l.useEffect(function(){return function(){v(y,null)}},[]);var j=h&&d!==p?h(d):w;c||(n={opacity:O?0:1,height:O?0:p,overflowY:O?"hidden":p,order:m?k:p,pointerEvents:O?"none":p,position:O?"absolute":p});var P={};O&&(P["aria-hidden"]=!0);var N=l.createElement(void 0===E?"div":E,(0,r.Z)({className:s()(!c&&i,b),style:(0,o.Z)((0,o.Z)({},n),x)},P,C,{ref:t}),j);return m&&(N=l.createElement(u.Z,{onResize:function(e){v(y,e.offsetWidth)},disabled:g},N)),N});h.displayName="Item";var m=n(58525),g=n(54887),v=n(53346);function y(e,t){var n=l.useState(t),r=(0,i.Z)(n,2),o=r[0],a=r[1];return[o,(0,m.Z)(function(t){e(function(){a(t)})})]}var b=l.createContext(null),x=["component"],w=["className"],S=["className"],k=l.forwardRef(function(e,t){var n=l.useContext(b);if(!n){var o=e.component,i=(0,a.Z)(e,x);return l.createElement(void 0===o?"div":o,(0,r.Z)({},i,{ref:t}))}var c=n.className,u=(0,a.Z)(n,w),d=e.className,f=(0,a.Z)(e,S);return l.createElement(b.Provider,{value:null},l.createElement(h,(0,r.Z)({ref:t,className:s()(c,d)},u,f)))});k.displayName="RawItem";var E=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],C="responsive",O="invalidate";function j(e){return"+ ".concat(e.length," ...")}var P=l.forwardRef(function(e,t){var n,c,f=e.prefixCls,p=void 0===f?"rc-overflow":f,m=e.data,x=void 0===m?[]:m,w=e.renderItem,S=e.renderRawItem,k=e.itemKey,P=e.itemWidth,N=void 0===P?10:P,M=e.ssr,I=e.style,R=e.className,T=e.maxCount,A=e.renderRest,_=e.renderRawRest,D=e.suffix,Z=e.component,L=e.itemComponent,z=e.onVisibleChange,B=(0,a.Z)(e,E),F="full"===M,H=(n=l.useRef(null),function(e){n.current||(n.current=[],function(e){if("undefined"==typeof MessageChannel)(0,v.Z)(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}(function(){(0,g.unstable_batchedUpdates)(function(){n.current.forEach(function(e){e()}),n.current=null})})),n.current.push(e)}),q=y(H,null),W=(0,i.Z)(q,2),K=W[0],V=W[1],U=K||0,G=y(H,new Map),X=(0,i.Z)(G,2),$=X[0],Y=X[1],Q=y(H,0),J=(0,i.Z)(Q,2),ee=J[0],et=J[1],en=y(H,0),er=(0,i.Z)(en,2),eo=er[0],ei=er[1],ea=y(H,0),el=(0,i.Z)(ea,2),ec=el[0],es=el[1],eu=(0,l.useState)(null),ed=(0,i.Z)(eu,2),ef=ed[0],ep=ed[1],eh=(0,l.useState)(null),em=(0,i.Z)(eh,2),eg=em[0],ev=em[1],ey=l.useMemo(function(){return null===eg&&F?Number.MAX_SAFE_INTEGER:eg||0},[eg,K]),eb=(0,l.useState)(!1),ex=(0,i.Z)(eb,2),ew=ex[0],eS=ex[1],ek="".concat(p,"-item"),eE=Math.max(ee,eo),eC=T===C,eO=x.length&&eC,ej=T===O,eP=eO||"number"==typeof T&&x.length>T,eN=(0,l.useMemo)(function(){var e=x;return eO?e=null===K&&F?x:x.slice(0,Math.min(x.length,U/N)):"number"==typeof T&&(e=x.slice(0,T)),e},[x,N,K,T,eO]),eM=(0,l.useMemo)(function(){return eO?x.slice(ey+1):x.slice(eN.length)},[x,eN,eO,ey]),eI=(0,l.useCallback)(function(e,t){var n;return"function"==typeof k?k(e):null!==(n=k&&(null==e?void 0:e[k]))&&void 0!==n?n:t},[k]),eR=(0,l.useCallback)(w||function(e){return e},[w]);function eT(e,t,n){(eg!==e||void 0!==t&&t!==ef)&&(ev(e),n||(eS(e<x.length-1),null==z||z(e)),void 0!==t&&ep(t))}function eA(e,t){Y(function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r})}function e_(e){return $.get(eI(eN[e],e))}(0,d.Z)(function(){if(U&&"number"==typeof eE&&eN){var e=ec,t=eN.length,n=t-1;if(!t){eT(0,null);return}for(var r=0;r<t;r+=1){var o=e_(r);if(F&&(o=o||0),void 0===o){eT(r-1,void 0,!0);break}if(e+=o,0===n&&e<=U||r===n-1&&e+e_(n)<=U){eT(n,null);break}if(e+eE>U){eT(r-1,e-o-ec+eo);break}}D&&e_(0)+ec>U&&ep(null)}},[U,$,eo,ec,eI,eN]);var eD=ew&&!!eM.length,eZ={};null!==ef&&eO&&(eZ={position:"absolute",left:ef,top:0});var eL={prefixCls:ek,responsive:eO,component:L,invalidate:ej},ez=S?function(e,t){var n=eI(e,t);return l.createElement(b.Provider,{key:n,value:(0,o.Z)((0,o.Z)({},eL),{},{order:t,item:e,itemKey:n,registerSize:eA,display:t<=ey})},S(e,t))}:function(e,t){var n=eI(e,t);return l.createElement(h,(0,r.Z)({},eL,{order:t,key:n,item:e,renderItem:eR,itemKey:n,registerSize:eA,display:t<=ey}))},eB={order:eD?ey:Number.MAX_SAFE_INTEGER,className:"".concat(ek,"-rest"),registerSize:function(e,t){ei(t),et(eo)},display:eD};if(_)_&&(c=l.createElement(b.Provider,{value:(0,o.Z)((0,o.Z)({},eL),eB)},_(eM)));else{var eF=A||j;c=l.createElement(h,(0,r.Z)({},eL,eB),"function"==typeof eF?eF(eM):eF)}var eH=l.createElement(void 0===Z?"div":Z,(0,r.Z)({className:s()(!ej&&p,R),style:I,ref:t},B),eN.map(ez),eP?c:null,D&&l.createElement(h,(0,r.Z)({},eL,{responsive:eC,responsiveDisabled:!eO,order:ey,className:"".concat(ek,"-suffix"),registerSize:function(e,t){es(t)},display:!0,style:eZ}),D));return eC&&(eH=l.createElement(u.Z,{onResize:function(e,t){V(t.clientWidth)},disabled:!eO},eH)),eH});P.displayName="Overflow",P.Item=k,P.RESPONSIVE=C,P.INVALIDATE=O;var N=P},10281:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var r=n(94981),o=function(e){if((0,r.Z)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some(function(e){return e in n.style})}return!1},i=function(e,t){if(!o(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function a(e,t){return Array.isArray(e)||void 0===t?o(e):i(e,t)}},48625:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(1119),o=n(31686),i=n(41154),a=n(26365),l=n(11993),c=n(6989),s=n(2265),u=n(54887),d=n(36760),f=n.n(d),p=n(31474),h=s.forwardRef(function(e,t){var n,i=e.height,a=e.offsetY,c=e.offsetX,u=e.children,d=e.prefixCls,h=e.onInnerResize,m=e.innerProps,g=e.rtl,v=e.extra,y={},b={display:"flex",flexDirection:"column"};return void 0!==a&&(y={height:i,position:"relative",overflow:"hidden"},b=(0,o.Z)((0,o.Z)({},b),{},(n={transform:"translateY(".concat(a,"px)")},(0,l.Z)(n,g?"marginRight":"marginLeft",-c),(0,l.Z)(n,"position","absolute"),(0,l.Z)(n,"left",0),(0,l.Z)(n,"right",0),(0,l.Z)(n,"top",0),n))),s.createElement("div",{style:y},s.createElement(p.Z,{onResize:function(e){e.offsetHeight&&h&&h()}},s.createElement("div",(0,r.Z)({style:b,className:f()((0,l.Z)({},"".concat(d,"-holder-inner"),d)),ref:t},m),u,v)))});h.displayName="Filler";var m=n(53346);function g(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}var v=s.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.rtl,c=e.scrollOffset,u=e.scrollRange,d=e.onStartMove,p=e.onStopMove,h=e.onScroll,v=e.horizontal,y=e.spinSize,b=e.containerSize,x=e.style,w=e.thumbStyle,S=s.useState(!1),k=(0,a.Z)(S,2),E=k[0],C=k[1],O=s.useState(null),j=(0,a.Z)(O,2),P=j[0],N=j[1],M=s.useState(null),I=(0,a.Z)(M,2),R=I[0],T=I[1],A=!i,_=s.useRef(),D=s.useRef(),Z=s.useState(!1),L=(0,a.Z)(Z,2),z=L[0],B=L[1],F=s.useRef(),H=function(){clearTimeout(F.current),B(!0),F.current=setTimeout(function(){B(!1)},3e3)},q=u-b||0,W=b-y||0,K=s.useMemo(function(){return 0===c||0===q?0:c/q*W},[c,q,W]),V=s.useRef({top:K,dragging:E,pageY:P,startTop:R});V.current={top:K,dragging:E,pageY:P,startTop:R};var U=function(e){C(!0),N(g(e,v)),T(V.current.top),d(),e.stopPropagation(),e.preventDefault()};s.useEffect(function(){var e=function(e){e.preventDefault()},t=_.current,n=D.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",U),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",U)}},[]);var G=s.useRef();G.current=q;var X=s.useRef();X.current=W,s.useEffect(function(){if(E){var e,t=function(t){var n=V.current,r=n.dragging,o=n.pageY,i=n.startTop;if(m.Z.cancel(e),r){var a=g(t,v)-o,l=i;!A&&v?l-=a:l+=a;var c=G.current,s=X.current,u=Math.ceil((s?l/s:0)*c);u=Math.min(u=Math.max(u,0),c),e=(0,m.Z)(function(){h(u,v)})}},n=function(){C(!1),p()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),m.Z.cancel(e)}}},[E]),s.useEffect(function(){H()},[c]),s.useImperativeHandle(t,function(){return{delayHidden:H}});var $="".concat(r,"-scrollbar"),Y={position:"absolute",visibility:z&&q>0?null:"hidden"},Q={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return v?(Y.height=8,Y.left=0,Y.right=0,Y.bottom=0,Q.height="100%",Q.width=y,A?Q.left=K:Q.right=K):(Y.width=8,Y.top=0,Y.bottom=0,A?Y.right=0:Y.left=0,Q.width="100%",Q.height=y,Q.top=K),s.createElement("div",{ref:_,className:f()($,(n={},(0,l.Z)(n,"".concat($,"-horizontal"),v),(0,l.Z)(n,"".concat($,"-vertical"),!v),(0,l.Z)(n,"".concat($,"-visible"),z),n)),style:(0,o.Z)((0,o.Z)({},Y),x),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:H},s.createElement("div",{ref:D,className:f()("".concat($,"-thumb"),(0,l.Z)({},"".concat($,"-thumb-moving"),E)),style:(0,o.Z)((0,o.Z)({},Q),w),onMouseDown:U}))});function y(e){var t=e.children,n=e.setRef,r=s.useCallback(function(e){n(e)},[]);return s.cloneElement(t,{ref:r})}var b=n(2868),x=n(76405),w=n(25049),S=function(){function e(){(0,x.Z)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,w.Z)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),k=n(27380),E=n(74126),C=("undefined"==typeof navigator?"undefined":(0,i.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),O=function(e,t){var n=(0,s.useRef)(!1),r=(0,s.useRef)(null),o=(0,s.useRef)({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e<0&&o.current.top||e>0&&o.current.bottom;return t&&i?(clearTimeout(r.current),n.current=!1):(!i||n.current)&&(clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)),!n.current&&i}},j=14/15;function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*100;return isNaN(n)&&(n=0),Math.floor(n=Math.min(n=Math.max(n,20),e/2))}var N=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],M=[],I={overflowY:"auto",overflowAnchor:"none"},R=s.forwardRef(function(e,t){var n,d,g,x,w,R,T,A,_,D,Z,L,z,B,F,H,q,W,K,V,U,G,X,$,Y,Q,J,ee,et,en,er,eo,ei,ea,el,ec=e.prefixCls,es=void 0===ec?"rc-virtual-list":ec,eu=e.className,ed=e.height,ef=e.itemHeight,ep=e.fullHeight,eh=e.style,em=e.data,eg=e.children,ev=e.itemKey,ey=e.virtual,eb=e.direction,ex=e.scrollWidth,ew=e.component,eS=e.onScroll,ek=e.onVirtualScroll,eE=e.onVisibleChange,eC=e.innerProps,eO=e.extraRender,ej=e.styles,eP=(0,c.Z)(e,N),eN=!!(!1!==ey&&ed&&ef),eM=eN&&em&&(ef*em.length>ed||!!ex),eI="rtl"===eb,eR=f()(es,(0,l.Z)({},"".concat(es,"-rtl"),eI),eu),eT=em||M,eA=(0,s.useRef)(),e_=(0,s.useRef)(),eD=(0,s.useState)(0),eZ=(0,a.Z)(eD,2),eL=eZ[0],ez=eZ[1],eB=(0,s.useState)(0),eF=(0,a.Z)(eB,2),eH=eF[0],eq=eF[1],eW=(0,s.useState)(!1),eK=(0,a.Z)(eW,2),eV=eK[0],eU=eK[1],eG=function(){eU(!0)},eX=function(){eU(!1)},e$=s.useCallback(function(e){return"function"==typeof ev?ev(e):null==e?void 0:e[ev]},[ev]);function eY(e){ez(function(t){var n,r=(n="function"==typeof e?e(t):e,Number.isNaN(tf.current)||(n=Math.min(n,tf.current)),n=Math.max(n,0));return eA.current.scrollTop=r,r})}var eQ=(0,s.useRef)({start:0,end:eT.length}),eJ=(0,s.useRef)(),e0=(n=s.useState(eT),g=(d=(0,a.Z)(n,2))[0],x=d[1],w=s.useState(null),T=(R=(0,a.Z)(w,2))[0],A=R[1],s.useEffect(function(){var e=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i<a?(r=e,o=t):(r=t,o=e);var l={__EMPTY_ITEM__:!0};function c(e){return void 0!==e?n(e):l}for(var s=null,u=1!==Math.abs(i-a),d=0;d<o.length;d+=1){var f=c(r[d]);if(f!==c(o[d])){s=d,u=u||f!==c(o[d+1]);break}}return null===s?null:{index:s,multiple:u}}(g||[],eT||[],e$);(null==e?void 0:e.index)!==void 0&&A(eT[e.index]),x(eT)},[eT]),[T]),e1=(0,a.Z)(e0,1)[0];eJ.current=e1;var e2=function(e,t,n){var r=s.useState(0),o=(0,a.Z)(r,2),i=o[0],l=o[1],c=(0,s.useRef)(new Map),u=(0,s.useRef)(new S),d=(0,s.useRef)();function f(){m.Z.cancel(d.current)}function p(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f();var t=function(){c.current.forEach(function(e,t){if(e&&e.offsetParent){var n=(0,b.Z)(e),r=n.offsetHeight;u.current.get(t)!==r&&u.current.set(t,n.offsetHeight)}}),l(function(e){return e+1})};e?t():d.current=(0,m.Z)(t)}return(0,s.useEffect)(function(){return f},[]),[function(r,o){var i=e(r),a=c.current.get(i);o?(c.current.set(i,o),p()):c.current.delete(i),!a!=!o&&(o?null==t||t(r):null==n||n(r))},p,u.current,i]}(e$,null,null),e6=(0,a.Z)(e2,4),e4=e6[0],e3=e6[1],e5=e6[2],e8=e6[3],e7=s.useMemo(function(){if(!eN)return{scrollHeight:void 0,start:0,end:eT.length-1,offset:void 0};if(!eM)return{scrollHeight:(null===(e=e_.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:eT.length-1,offset:void 0};for(var e,t,n,r,o=0,i=eT.length,a=0;a<i;a+=1){var l=e$(eT[a]),c=e5.get(l),s=o+(void 0===c?ef:c);s>=eL&&void 0===t&&(t=a,n=o),s>eL+ed&&void 0===r&&(r=a),o=s}return void 0===t&&(t=0,n=0,r=Math.ceil(ed/ef)),void 0===r&&(r=eT.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,eT.length-1),offset:n}},[eM,eN,eL,eT,e8,ed]),e9=e7.scrollHeight,te=e7.start,tt=e7.end,tn=e7.offset;eQ.current.start=te,eQ.current.end=tt;var tr=s.useState({width:0,height:ed}),to=(0,a.Z)(tr,2),ti=to[0],ta=to[1],tl=(0,s.useRef)(),tc=(0,s.useRef)(),ts=s.useMemo(function(){return P(ti.width,ex)},[ti.width,ex]),tu=s.useMemo(function(){return P(ti.height,e9)},[ti.height,e9]),td=e9-ed,tf=(0,s.useRef)(td);tf.current=td;var tp=eL<=0,th=eL>=td,tm=O(tp,th),tg=function(){return{x:eI?-eH:eH,y:eL}},tv=(0,s.useRef)(tg()),ty=(0,E.zX)(function(){if(ek){var e=tg();(tv.current.x!==e.x||tv.current.y!==e.y)&&(ek(e),tv.current=e)}});function tb(e,t){t?((0,u.flushSync)(function(){eq(e)}),ty()):eY(e)}var tx=function(e){var t=e,n=ex-ti.width;return Math.min(t=Math.max(t,0),n)},tw=(0,E.zX)(function(e,t){t?((0,u.flushSync)(function(){eq(function(t){return tx(t+(eI?-e:e))})}),ty()):eY(function(t){return t+e})}),tS=(_=!!ex,D=(0,s.useRef)(0),Z=(0,s.useRef)(null),L=(0,s.useRef)(null),z=(0,s.useRef)(!1),B=O(tp,th),F=(0,s.useRef)(null),H=(0,s.useRef)(null),[function(e){if(eN){m.Z.cancel(H.current),H.current=(0,m.Z)(function(){F.current=null},2);var t,n=e.deltaX,r=e.deltaY,o=e.shiftKey,i=n,a=r;("sx"===F.current||!F.current&&o&&r&&!n)&&(i=r,a=0,F.current="sx");var l=Math.abs(i),c=Math.abs(a);(null===F.current&&(F.current=_&&l>c?"x":"y"),"y"===F.current)?(t=a,m.Z.cancel(Z.current),D.current+=t,L.current=t,B(t)||(C||e.preventDefault(),Z.current=(0,m.Z)(function(){var e=z.current?10:1;tw(D.current*e),D.current=0}))):(tw(i,!0),C||e.preventDefault())}},function(e){eN&&(z.current=e.detail===L.current)}]),tk=(0,a.Z)(tS,2),tE=tk[0],tC=tk[1];q=function(e,t){return!tm(e,t)&&(tE({preventDefault:function(){},deltaY:e}),!0)},K=(0,s.useRef)(!1),V=(0,s.useRef)(0),U=(0,s.useRef)(null),G=(0,s.useRef)(null),X=function(e){if(K.current){var t=Math.ceil(e.touches[0].pageY),n=V.current-t;V.current=t,q(n)&&e.preventDefault(),clearInterval(G.current),G.current=setInterval(function(){(!q(n*=j,!0)||.1>=Math.abs(n))&&clearInterval(G.current)},16)}},$=function(){K.current=!1,W()},Y=function(e){W(),1!==e.touches.length||K.current||(K.current=!0,V.current=Math.ceil(e.touches[0].pageY),U.current=e.target,U.current.addEventListener("touchmove",X),U.current.addEventListener("touchend",$))},W=function(){U.current&&(U.current.removeEventListener("touchmove",X),U.current.removeEventListener("touchend",$))},(0,k.Z)(function(){return eN&&eA.current.addEventListener("touchstart",Y),function(){var e;null===(e=eA.current)||void 0===e||e.removeEventListener("touchstart",Y),W(),clearInterval(G.current)}},[eN]),(0,k.Z)(function(){function e(e){eN&&e.preventDefault()}var t=eA.current;return t.addEventListener("wheel",tE),t.addEventListener("DOMMouseScroll",tC),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",tE),t.removeEventListener("DOMMouseScroll",tC),t.removeEventListener("MozMousePixelScroll",e)}},[eN]),(0,k.Z)(function(){ex&&eq(function(e){return tx(e)})},[ti.width,ex]);var tO=function(){var e,t;null===(e=tl.current)||void 0===e||e.delayHidden(),null===(t=tc.current)||void 0===t||t.delayHidden()},tj=(Q=function(){return e3(!0)},J=s.useRef(),ee=s.useState(null),en=(et=(0,a.Z)(ee,2))[0],er=et[1],(0,k.Z)(function(){if(en&&en.times<10){if(!eA.current){er(function(e){return(0,o.Z)({},e)});return}Q();var e=en.targetAlign,t=en.originAlign,n=en.index,r=en.offset,i=eA.current.clientHeight,a=!1,l=e,c=null;if(i){for(var s=e||t,u=0,d=0,f=0,p=Math.min(eT.length-1,n),h=0;h<=p;h+=1){var m=e$(eT[h]);d=u;var g=e5.get(m);u=f=d+(void 0===g?ef:g)}for(var v="top"===s?r:i-r,y=p;y>=0;y-=1){var b=e$(eT[y]),x=e5.get(b);if(void 0===x){a=!0;break}if((v-=x)<=0)break}switch(s){case"top":c=d-r;break;case"bottom":c=f-i+r;break;default:var w=eA.current.scrollTop;d<w?l="top":f>w+i&&(l="bottom")}null!==c&&eY(c),c!==en.lastTop&&(a=!0)}a&&er((0,o.Z)((0,o.Z)({},en),{},{times:en.times+1,targetAlign:l,lastTop:c}))}},[en,eA.current]),function(e){if(null==e){tO();return}if(m.Z.cancel(J.current),"number"==typeof e)eY(e);else if(e&&"object"===(0,i.Z)(e)){var t,n=e.align;t="index"in e?e.index:eT.findIndex(function(t){return e$(t)===e.key});var r=e.offset;er({times:0,index:t,offset:void 0===r?0:r,originAlign:n})}});s.useImperativeHandle(t,function(){return{getScrollInfo:tg,scrollTo:function(e){e&&"object"===(0,i.Z)(e)&&("left"in e||"top"in e)?(void 0!==e.left&&eq(tx(e.left)),tj(e.top)):tj(e)}}}),(0,k.Z)(function(){eE&&eE(eT.slice(te,tt+1),eT)},[te,tt,eT]);var tP=(eo=s.useMemo(function(){return[new Map,[]]},[eT,e5.id,ef]),ea=(ei=(0,a.Z)(eo,2))[0],el=ei[1],function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=ea.get(e),r=ea.get(t);if(void 0===n||void 0===r)for(var o=eT.length,i=el.length;i<o;i+=1){var a,l=e$(eT[i]);ea.set(l,i);var c=null!==(a=e5.get(l))&&void 0!==a?a:ef;if(el[i]=(el[i-1]||0)+c,l===e&&(n=i),l===t&&(r=i),void 0!==n&&void 0!==r)break}return{top:el[n-1]||0,bottom:el[r]}}),tN=null==eO?void 0:eO({start:te,end:tt,virtual:eM,offsetX:eH,offsetY:tn,rtl:eI,getSize:tP}),tM=eT.slice(te,tt+1).map(function(e,t){var n=eg(e,te+t,{style:{width:ex}}),r=e$(e);return s.createElement(y,{key:r,setRef:function(t){return e4(e,t)}},n)}),tI=null;ed&&(tI=(0,o.Z)((0,l.Z)({},void 0===ep||ep?"height":"maxHeight",ed),I),eN&&(tI.overflowY="hidden",ex&&(tI.overflowX="hidden"),eV&&(tI.pointerEvents="none")));var tR={};return eI&&(tR.dir="rtl"),s.createElement("div",(0,r.Z)({style:(0,o.Z)((0,o.Z)({},eh),{},{position:"relative"}),className:eR},tR,eP),s.createElement(p.Z,{onResize:function(e){ta({width:e.width||e.offsetWidth,height:e.height||e.offsetHeight})}},s.createElement(void 0===ew?"div":ew,{className:"".concat(es,"-holder"),style:tI,ref:eA,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==eL&&eY(t),null==eS||eS(e),ty()},onMouseEnter:tO},s.createElement(h,{prefixCls:es,height:e9,offsetX:eH,offsetY:tn,scrollWidth:ex,onInnerResize:e3,ref:e_,innerProps:eC,rtl:eI,extra:tN},tM))),eM&&e9>ed&&s.createElement(v,{ref:tl,prefixCls:es,scrollOffset:eL,scrollRange:e9,rtl:eI,onScroll:tb,onStartMove:eG,onStopMove:eX,spinSize:tu,containerSize:ti.height,style:null==ej?void 0:ej.verticalScrollBar,thumbStyle:null==ej?void 0:ej.verticalScrollBarThumb}),eM&&ex&&s.createElement(v,{ref:tc,prefixCls:es,scrollOffset:eH,scrollRange:ex,rtl:eI,onScroll:tb,onStartMove:eG,onStopMove:eX,spinSize:ts,containerSize:ti.width,horizontal:!0,style:null==ej?void 0:ej.horizontalScrollBar,thumbStyle:null==ej?void 0:ej.horizontalScrollBarThumb}))});R.displayName="List";var T=R},6337:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=l(n(2265)),i=l(n(49211)),a=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,l=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=f(c);return e=t?Reflect.construct(n,arguments,f(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return p(d(e=l.call.apply(l,[this].concat(n))),"onClick",function(t){var n=e.props,r=n.text,a=n.onCopy,l=n.children,c=n.options,s=o.default.Children.only(l),u=(0,i.default)(r,c);a&&a(r,u),s&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t)}),e}return n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),r=o.default.Children.only(t);return o.default.cloneElement(r,s(s({},n),{},{onClick:this.onClick}))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,n),Object.defineProperty(c,"prototype",{writable:!1}),c}(o.default.PureComponent);t.CopyToClipboard=h,p(h,"defaultProps",{onCopy:void 0,options:void 0})},29233:function(e,t,n){"use strict";var r=n(6337).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},13126:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=(n&&Symbol.for("react.suspense_list"),n?Symbol.for("react.memo"):60115),m=n?Symbol.for("react.lazy"):60116;n&&Symbol.for("react.block"),n&&Symbol.for("react.fundamental"),n&&Symbol.for("react.responder"),n&&Symbol.for("react.scope"),t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isFragment=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof){case s:case f:case m:case h:case c:return e;default:return t}}case o:return t}}}(e)===i}},82558:function(e,t,n){"use strict";e.exports=n(13126)},52181:function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState((function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}).bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==l)throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+(e.displayName||e.name)+" uses "+("function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()")+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:function(){return a}}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},59221:function(e,t,n){"use strict";n.d(t,{ZP:function(){return eB},bO:function(){return K}});var r=n(2265),o=n(40718),i=n.n(o),a=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty;function s(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function u(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);var o=r.cache,i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var l=e(t,n,r);return o.delete(t),o.delete(n),l}}function d(e){return a(e).concat(l(e))}var f=Object.hasOwn||function(e,t){return c.call(e,t)};function p(e,t){return e||t?e===t:e===t||e!=e&&t!=t}var h="_owner",m=Object.getOwnPropertyDescriptor,g=Object.keys;function v(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function y(e,t){return p(e.getTime(),t.getTime())}function b(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.entries(),l=0;(r=a.next())&&!r.done;){for(var c=t.entries(),s=!1,u=0;(o=c.next())&&!o.done;){var d=r.value,f=d[0],p=d[1],h=o.value,m=h[0],g=h[1];!s&&!i[u]&&(s=n.equals(f,m,l,u,e,t,n)&&n.equals(p,g,f,m,e,t,n))&&(i[u]=!0),u++}if(!s)return!1;l++}return!0}function x(e,t,n){var r,o=g(e),i=o.length;if(g(t).length!==i)return!1;for(;i-- >0;)if((r=o[i])===h&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!f(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function w(e,t,n){var r,o,i,a=d(e),l=a.length;if(d(t).length!==l)return!1;for(;l-- >0;)if((r=a[l])===h&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!f(t,r)||!n.equals(e[r],t[r],r,r,e,t,n)||(o=m(e,r),i=m(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable)))return!1;return!0}function S(e,t){return p(e.valueOf(),t.valueOf())}function k(e,t){return e.source===t.source&&e.flags===t.flags}function E(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.values();(r=a.next())&&!r.done;){for(var l=t.values(),c=!1,s=0;(o=l.next())&&!o.done;)!c&&!i[s]&&(c=n.equals(r.value,o.value,r.value,o.value,e,t,n))&&(i[s]=!0),s++;if(!c)return!1}return!0}function C(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var O=Array.isArray,j="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,P=Object.assign,N=Object.prototype.toString.call.bind(Object.prototype.toString),M=I();function I(e){void 0===e&&(e={});var t,n,r,o,i,a,l,c,d,f=e.circular,p=e.createInternalComparator,h=e.createState,m=e.strict,g=(n=(t=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?w:v,areDatesEqual:y,areMapsEqual:r?s(b,w):b,areObjectsEqual:r?w:x,arePrimitiveWrappersEqual:S,areRegExpsEqual:k,areSetsEqual:r?s(E,w):E,areTypedArraysEqual:r?w:C};if(n&&(o=P({},o,n(o))),t){var i=u(o.areArraysEqual),a=u(o.areMapsEqual),l=u(o.areObjectsEqual),c=u(o.areSetsEqual);o=P({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:c})}return o}(e)).areArraysEqual,r=t.areDatesEqual,o=t.areMapsEqual,i=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,l=t.areRegExpsEqual,c=t.areSetsEqual,d=t.areTypedArraysEqual,function(e,t,s){if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return e!=e&&t!=t;var u=e.constructor;if(u!==t.constructor)return!1;if(u===Object)return i(e,t,s);if(O(e))return n(e,t,s);if(null!=j&&j(e))return d(e,t,s);if(u===Date)return r(e,t,s);if(u===RegExp)return l(e,t,s);if(u===Map)return o(e,t,s);if(u===Set)return c(e,t,s);var f=N(e);return"[object Date]"===f?r(e,t,s):"[object RegExp]"===f?l(e,t,s):"[object Map]"===f?o(e,t,s):"[object Set]"===f?c(e,t,s):"[object Object]"===f?"function"!=typeof e.then&&"function"!=typeof t.then&&i(e,t,s):"[object Arguments]"===f?i(e,t,s):("[object Boolean]"===f||"[object Number]"===f||"[object String]"===f)&&a(e,t,s)}),M=p?p(g):function(e,t,n,r,o,i,a){return g(e,t,a)};return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(e,a){var l=r(),c=l.cache;return n(e,a,{cache:void 0===c?t?new WeakMap:void 0:c,equals:o,meta:l.meta,strict:i})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,t){return n(e,t,a)}}({circular:void 0!==f&&f,comparator:g,createState:h,equals:M,strict:void 0!==m&&m})}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){if(n<0&&(n=o),o-n>t)e(o),n=-1;else{var i;i=r,"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(i)}})}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L(e,t,n){var r;return(r=function(e,t){if("object"!==_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==_(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===_(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}I({strict:!0}),I({circular:!0}),I({circular:!0,strict:!0}),I({createInternalComparator:function(){return p}}),I({strict:!0,createInternalComparator:function(){return p}}),I({circular:!0,createInternalComparator:function(){return p}}),I({circular:!0,createInternalComparator:function(){return p},strict:!0});var z=["Webkit","Moz","O","ms"],B=["-webkit-","-moz-","-o-","-ms-"],F=["transform","transformOrigin","transition"],H=function(e){return e},q=function(e,t){if(-1===F.indexOf(e))return L({},e,Number.isNaN(t)?0:t);var n="transition"===e,r=e.replace(/(\w)/,function(e){return e.toUpperCase()}),o=t;return z.reduce(function(e,i,a){return n&&(o=t.replace(/(transform|transform-origin)/gim,"".concat(B[a],"$1"))),Z(Z({},e),{},L({},i+r,o))},{})},W=function(e,t){return Object.keys(t).reduce(function(n,r){return Z(Z({},n),{},L({},r,e(r,t[r])))},{})},K=function(e){return Object.keys(e).reduce(function(e,t){return Z(Z({},e),q(t,e[t]))},e)},V=function(e,t,n){return e.map(function(e){return"".concat(e.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())})," ").concat(t,"ms ").concat(n)}).join(",")},U=function(e,t,n,r,o,i,a,l){};function G(e,t){if(e){if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X(e,t)}}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},Y=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},Q=function(e,t){return function(n){return Y($(e,t),n)}},J=function(){for(var e,t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r[0],a=r[1],l=r[2],c=r[3];if(1===r.length)switch(r[0]){case"linear":i=0,a=0,l=1,c=1;break;case"ease":i=.25,a=.1,l=.25,c=1;break;case"ease-in":i=.42,a=0,l=1,c=1;break;case"ease-out":i=.42,a=0,l=.58,c=1;break;case"ease-in-out":i=0,a=0,l=.58,c=1;break;default:var s=r[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var u,d=function(e){if(Array.isArray(e))return e}(u=s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),4!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(u,4)||G(u,4)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();i=d[0],a=d[1],l=d[2],c=d[3]}else U(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}U([i,l,a,c].every(function(e){return"number"==typeof e&&e>=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=Q(i,l),p=Q(a,c),h=(e=i,t=l,function(n){var r;return Y([].concat(function(e){if(Array.isArray(e))return X(e)}(r=$(e,t).map(function(e,t){return e*t}).slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||G(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[0]),n)}),m=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o,i=f(n)-t,a=h(n);if(1e-4>Math.abs(i-t)||a<1e-4)break;n=(o=n-i/a)>1?1:o<0?0:o}return p(n)};return m.isStepper=!1,m},ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,l=function(e,t,r){var i=r+(-(e-t)*n-r*o)*a/1e3,l=r*a/1e3+e;return 1e-4>Math.abs(l-t)&&1e-4>Math.abs(i)?[t,0]:[l,i]};return l.isStepper=!0,l.dt=a,l},et=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return J(r);case"spring":return ee();default:if("cubic-bezier"===r.split("(")[0])return J(r);U(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",t)}return"function"==typeof r?r:(U(!1,"[configEasing]: first argument type should be function or string, instead received %s",t),null)};function en(e){return(en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function er(e){return function(e){if(Array.isArray(e))return ec(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||el(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(n),!0).forEach(function(t){ea(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ea(e,t,n){var r;return(r=function(e,t){if("object"!==en(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==en(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===en(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function el(e,t){if(e){if("string"==typeof e)return ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ec(e,t)}}function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var es=function(e,t,n){return e+(t-e)*n},eu=function(e){return e.from!==e.to},ed=function e(t,n,r){var o=W(function(e,n){if(eu(n)){var r,o=function(e){if(Array.isArray(e))return e}(r=t(n.from,n.to,n.velocity))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(r,2)||el(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1];return ei(ei({},n),{},{from:i,velocity:a})}return n},n);return r<1?W(function(e,t){return eu(t)?ei(ei({},t),{},{velocity:es(t.velocity,o[e].velocity,r),from:es(t.from,o[e].from,r)}):t},n):e(t,o,r-1)},ef=function(e,t,n,r,o){var i,a,l=[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})}),c=l.reduce(function(n,r){return ei(ei({},n),{},ea({},r,[e[r],t[r]]))},{}),s=l.reduce(function(n,r){return ei(ei({},n),{},ea({},r,{from:e[r],velocity:0,to:t[r]}))},{}),u=-1,d=function(){return null};return d=n.isStepper?function(r){i||(i=r);var a=(r-i)/n.dt;s=ed(n,s,a),o(ei(ei(ei({},e),t),W(function(e,t){return t.from},s))),i=r,Object.values(s).filter(eu).length&&(u=requestAnimationFrame(d))}:function(i){a||(a=i);var l=(i-a)/r,s=W(function(e,t){return es.apply(void 0,er(t).concat([n(l)]))},c);if(o(ei(ei(ei({},e),t),s)),l<1)u=requestAnimationFrame(d);else{var f=W(function(e,t){return es.apply(void 0,er(t).concat([n(1)]))},c);o(ei(ei(ei({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(u)}}};function ep(e){return(ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var eh=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function em(e){return function(e){if(Array.isArray(e))return eg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eg(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eg(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ev(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ey(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(n),!0).forEach(function(t){eb(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ev(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eb(e,t,n){return(t=ex(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ex(e){var t=function(e,t){if("object"!==ep(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ep(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ep(t)?t:String(t)}function ew(e,t){return(ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eS(e,t){if(t&&("object"===ep(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return ek(e)}function ek(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eE(e){return(eE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ew(e,t)}(i,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=eE(i);return e=t?Reflect.construct(n,arguments,eE(this).constructor):n.apply(this,arguments),eS(this,e)});function i(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i);var n,r=(n=o.call(this,e,t)).props,a=r.isActive,l=r.attributeName,c=r.from,s=r.to,u=r.steps,d=r.children,f=r.duration;if(n.handleStyleChange=n.handleStyleChange.bind(ek(n)),n.changeStyle=n.changeStyle.bind(ek(n)),!a||f<=0)return n.state={style:{}},"function"==typeof d&&(n.state={style:s}),eS(n);if(u&&u.length)n.state={style:u[0].style};else if(c){if("function"==typeof d)return n.state={style:c},eS(n);n.state={style:l?eb({},l,c):c}}else n.state={style:{}};return n}return n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,i=t.shouldReAnimate,a=t.to,l=t.from,c=this.state.style;if(r){if(!n){var s={style:o?eb({},o,a):a};this.state&&c&&(o&&c[o]!==a||!o&&c!==a)&&this.setState(s);return}if(!M(e.to,a)||!e.canBegin||!e.isActive){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||i?l:e.to;if(this.state&&c){var f={style:o?eb({},o,d):d};(o&&[o]!==d||!o&&c!==d)&&this.setState(f)}this.runAnimation(ey(ey({},this.props),{},{from:d,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,i=e.easing,a=e.begin,l=e.onAnimationEnd,c=e.onAnimationStart,s=ef(n,r,et(i),o,this.changeStyle);this.manager.start([c,a,function(){t.stopJSAnimation=s()},o,l])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,i=n[0],a=i.style,l=i.duration;return this.manager.start([o].concat(em(n.reduce(function(e,r,o){if(0===o)return e;var i=r.duration,a=r.easing,l=void 0===a?"ease":a,c=r.style,s=r.properties,u=r.onAnimationEnd,d=o>0?n[o-1]:r,f=s||Object.keys(c);if("function"==typeof l||"spring"===l)return[].concat(em(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:i,easing:l}),i]);var p=V(f,i,l),h=ey(ey(ey({},d.style),c),{},{transition:p});return[].concat(em(e),[h,i,u]).filter(H)},[a,Math.max(void 0===l?0:l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){if(!this.manager){var t,n,r;this.manager=(t=function(){return null},n=!1,r=function e(r){if(!n){if(Array.isArray(r)){if(!r.length)return;var o=function(e){if(Array.isArray(e))return e}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return A(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o.slice(1);if("number"==typeof i){R(e.bind(null,a),i);return}e(i),R(e.bind(null,a));return}"object"===T(r)&&t(r),"function"==typeof r&&r()}},{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}})}var o=e.begin,i=e.duration,a=e.attributeName,l=e.to,c=e.easing,s=e.onAnimationStart,u=e.onAnimationEnd,d=e.steps,f=e.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),"function"==typeof c||"function"==typeof f||"spring"===c){this.runJSAnimation(e);return}if(d.length>1){this.runStepAnimation(e);return}var h=a?eb({},a,l):l,m=V(Object.keys(h),i,c);p.start([s,o,ey(ey({},h),{},{transition:m}),i,u])}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration),o=(e.attributeName,e.easing,e.isActive),i=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eh)),a=r.Children.count(t),l=K(this.state.style);if("function"==typeof t)return t(l);if(!o||0===a||n<=0)return t;var c=function(e){var t=e.props,n=t.style,o=t.className;return(0,r.cloneElement)(e,ey(ey({},i),{},{style:ey(ey({},void 0===n?{}:n),l),className:o}))};return 1===a?c(r.Children.only(t)):r.createElement("div",null,r.Children.map(t,function(e){return c(e)}))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ex(r.key),r)}}(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}(r.PureComponent);eC.displayName="Animate",eC.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},eC.propTypes={from:i().oneOfType([i().object,i().string]),to:i().oneOfType([i().object,i().string]),attributeName:i().string,duration:i().number,begin:i().number,easing:i().oneOfType([i().string,i().func]),steps:i().arrayOf(i().shape({duration:i().number.isRequired,style:i().object.isRequired,easing:i().oneOfType([i().oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),i().func]),properties:i().arrayOf("string"),onAnimationEnd:i().func})),children:i().oneOfType([i().node,i().func]),isActive:i().bool,canBegin:i().bool,onAnimationEnd:i().func,shouldReAnimate:i().bool,onAnimationStart:i().func,onAnimationReStart:i().func};var eO=n(30719),ej=["children","appearOptions","enterOptions","leaveOptions"];function eP(e){return(eP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eN(){return(eN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eM(Object(n),!0).forEach(function(t){e_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eR(e,t){return(eR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eT(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eA(e){return(eA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e_(e,t,n){return(t=eD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eD(e){var t=function(e,t){if("object"!==eP(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==eP(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===eP(t)?t:String(t)}void 0===Number.isFinite&&(Number.isFinite=function(e){return"number"==typeof e&&isFinite(e)});var eZ=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.steps,n=e.duration;return t&&t.length?t.reduce(function(e,t){return e+(Number.isFinite(t.duration)&&t.duration>0?t.duration:0)},0):Number.isFinite(n)?n:0},eL=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eR(e,t)}(i,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=eA(i);return e=t?Reflect.construct(n,arguments,eA(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===eP(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return eT(e)}(this,e)});function i(){var e;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),e_(eT(e=o.call(this)),"handleEnter",function(t,n){var r=e.props,o=r.appearOptions,i=r.enterOptions;e.handleStyleActive(n?o:i)}),e_(eT(e),"handleExit",function(){var t=e.props.leaveOptions;e.handleStyleActive(t)}),e.state={isActive:!1},e}return n=[{key:"handleStyleActive",value:function(e){if(e){var t=e.onAnimationEnd?function(){e.onAnimationEnd()}:null;this.setState(eI(eI({},e),{},{onAnimationEnd:t,isActive:!0}))}}},{key:"parseTimeout",value:function(){var e=this.props,t=e.appearOptions,n=e.enterOptions,r=e.leaveOptions;return eZ(t)+eZ(n)+eZ(r)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=(t.appearOptions,t.enterOptions,t.leaveOptions,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,ej));return r.createElement(eO.Transition,eN({},o,{onEnter:this.handleEnter,onExit:this.handleExit,timeout:this.parseTimeout()}),function(){return r.createElement(eC,e.state,r.Children.only(n))})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eD(r.key),r)}}(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}(r.Component);function ez(e){var t=e.component,n=e.children,o=e.appear,i=e.enter,a=e.leave;return r.createElement(eO.TransitionGroup,{component:t},r.Children.map(n,function(e,t){return r.createElement(eL,{appearOptions:o,enterOptions:i,leaveOptions:a,key:"child-".concat(t)},e)}))}eL.propTypes={appearOptions:i().object,enterOptions:i().object,leaveOptions:i().object,children:i().element},ez.propTypes={appear:i().object,enter:i().object,leave:i().object,children:i().oneOfType([i().array,i().element]),component:i().any},ez.defaultProps={component:"span"};var eB=eC},94263:function(e,t){"use strict";t.Z={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}},33664:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(!e||!e.__esModule){var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}}t.default=e}}(n(40718));var r=l(n(84617)),o=l(n(67973)),i=l(n(2265)),a=l(n(20536));function l(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n(32601);var s=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,r.default)(e,t)})},u=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,o.default)(e,t)})},d=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),s(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName;t.removeClasses(e,n?"appear":"enter"),s(e,n?r+" "+o:o),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),s(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),s(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e],i=r?o+"-active":n[e+"Active"],a=r?o+"-done":n[e+"Done"];return{className:o,activeClassName:i,doneClassName:a}},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&u(e,r),o&&u(e,o),i&&u(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,s(e,t))},n.render=function(){var e=c({},this.props);return delete e.classNames,i.default.createElement(a.default,c({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(i.default.Component);d.defaultProps={classNames:""},d.propTypes={},t.default=d,e.exports=t.default},31601:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,a(n(40718));var r=a(n(2265)),o=n(54887),i=a(n(38244));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n=t.prototype;return n.handleLifecycle=function(e,t,n){var i,a=this.props.children,l=r.default.Children.toArray(a)[t];l.props[e]&&(i=l.props)[e].apply(i,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),l=a[0],c=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(l,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(c,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(r.default.Component);l.propTypes={},t.default=l,e.exports=t.default},20536:function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}}return t.default=e,t}(n(40718)),o=l(n(2265)),i=l(n(54887)),a=n(52181);function l(e){return e&&e.__esModule?e:{default:e}}n(32601);var c="unmounted";t.UNMOUNTED=c;var s="exited";t.EXITED=s;var u="entering";t.ENTERING=u;var d="entered";t.ENTERED=d;var f="exiting";t.EXITING=f;var p=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=s,r.appearStatus=u):o=d:o=t.unmountOnExit||t.mountOnEnter?c:s,r.state={status:o},r.nextCallback=null,r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===c?{status:s}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==d&&(t=u):(n===u||n===d)&&(t=f)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=i.default.findDOMNode(this);t===u?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===s&&this.setState({status:c})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;if(!t&&!r){this.safeSetState({status:d},function(){n.props.onEntered(e)});return}this.props.onEnter(e,o),this.safeSetState({status:u},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:d},function(){n.props.onEntered(e,o)})})})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n){this.safeSetState({status:s},function(){t.props.onExited(e)});return}this.props.onExit(e),this.safeSetState({status:f},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:s},function(){t.props.onExited(e)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;if(!e||r){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)},n.render=function(){var e=this.state.status;if(e===c)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},t}(o.default.Component);function h(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:h,onEntering:h,onEntered:h,onExit:h,onExiting:h,onExited:h},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var m=(0,a.polyfill)(p);t.default=m},38244:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(40718)),o=l(n(2265)),i=n(52181),a=n(28710);function l(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},d=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e;var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,r):(0,a.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=c({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=u(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?i:o.default.createElement(t,r,i)},t}(o.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,i.polyfill)(d);t.default=f,e.exports=t.default},30719:function(e,t,n){"use strict";var r=l(n(33664)),o=l(n(31601)),i=l(n(38244)),a=l(n(20536));function l(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},28710:function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var l=o(e.children),c=i(t,l);return Object.keys(c).forEach(function(o){var i=c[o];if((0,r.isValidElement)(i)){var s=o in t,u=o in l,d=t[o],f=(0,r.isValidElement)(d)&&!d.props.in;u&&(!s||f)?c[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)}):u||!s||f?u&&s&&(0,r.isValidElement)(d)&&(c[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:d.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):c[o]=(0,r.cloneElement)(i,{in:!1})}}),c};var r=n(2265);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,r.isValidElement)(e)?t(e):e}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var l={};for(var c in t){if(o[c])for(r=0;r<o[c].length;r++){var s=o[c][r];l[o[c][r]]=n(s)}l[c]=n(c)}for(r=0;r<i.length;r++)l[i[r]]=n(i[r]);return l}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}},32601:function(e,t,n){"use strict";var r;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(r=n(40718))&&r.__esModule,t.timeoutsShape=null,t.classNamesShape=null},31699:function(e,t,n){"use strict";n.d(t,{$:function(){return L}});var r=n(2265),o=n(61994),i=n(59221),a=n(21652),l=n.n(a),c=n(77571),s=n.n(c),u=n(9841),d=n(13137),f=n(20407),p=n(58772),h=n(16630),m=n(82944),g=n(34067),v=n(85355),y=n(41637),b=n(11638);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var w=["x","y"];function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==x(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===x(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){var n=e.x,r=e.y,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,w),i=parseInt("".concat(n),10),a=parseInt("".concat(r),10),l=parseInt("".concat(t.height||o.height),10),c=parseInt("".concat(t.width||o.width),10);return E(E(E(E(E({},t),o),i?{x:i}:{}),a?{y:a}:{}),{},{height:l,width:c,name:t.name,radius:t.radius})}function O(e){return r.createElement(b.bn,S({shapeType:"rectangle",propTransformer:C,activeClassName:"recharts-active-bar"},e))}var j=["value","background"];function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(){return(N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function T(e,t){return(T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function A(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t,n){return(t=Z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){var t=function(e,t){if("object"!==P(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==P(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P(t)?t:String(t)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(f,e);var t,n,a,c=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=_(f);return e=t?Reflect.construct(n,arguments,_(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return A(e)}(this,e)});function f(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,f);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return D(A(e=c.call.apply(c,[this].concat(n))),"state",{isAnimationFinished:!1}),D(A(e),"id",(0,h.EL)("recharts-bar-")),D(A(e),"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),D(A(e),"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return n=[{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props,o=n.shape,i=n.dataKey,a=n.activeIndex,l=n.activeBar,c=(0,m.L6)(this.props,!1);return e&&e.map(function(e,n){var s=n===a,d=I(I(I({},c),e),{},{isActive:s,option:s?l:o,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return r.createElement(u.m,N({className:"recharts-bar-rectangle"},(0,y.bw)(t.props,e,n),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),r.createElement(O,d))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,o=t.layout,a=t.isAnimationActive,l=t.animationBegin,c=t.animationDuration,s=t.animationEasing,d=t.animationId,f=this.state.prevData;return r.createElement(i.ZP,{begin:l,duration:c,isActive:a,easing:s,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=n.map(function(e,t){var n=f&&f[t];if(n){var r=(0,h.k4)(n.x,e.x),a=(0,h.k4)(n.y,e.y),l=(0,h.k4)(n.width,e.width),c=(0,h.k4)(n.height,e.height);return I(I({},e),{},{x:r(i),y:a(i),width:l(i),height:c(i)})}if("horizontal"===o){var s=(0,h.k4)(0,e.height)(i);return I(I({},e),{},{y:e.y+e.height-s,height:s})}var u=(0,h.k4)(0,e.width)(i);return I(I({},e),{},{width:u})});return r.createElement(u.m,null,e.renderRectanglesStatically(a))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return n&&t&&t.length&&(!r||!l()(r,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}},{key:"renderBackground",value:function(){var e=this,t=this.props,n=t.data,o=t.dataKey,i=t.activeIndex,a=(0,m.L6)(this.props.background,!1);return n.map(function(t,n){t.value;var l=t.background,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,j);if(!l)return null;var s=I(I(I(I(I({},c),{},{fill:"#eee"},l),a),(0,y.bw)(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:o,index:n,key:"background-bar-".concat(n),className:"recharts-bar-background-rectangle"});return r.createElement(O,N({option:e.props.background,isActive:n===i},s))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,o=n.data,i=n.xAxis,a=n.yAxis,l=n.layout,c=n.children,s=(0,m.NN)(c,d.W);if(!s)return null;var f="vertical"===l?o[0].height/2:o[0].width/2,p=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:(0,v.F$)(e,t)}};return r.createElement(u.m,{clipPath:e?"url(#clipPath-".concat(t,")"):null},s.map(function(e){return r.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:o,xAxis:i,yAxis:a,layout:l,offset:f,dataPointFormatter:p})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,i=e.className,a=e.xAxis,l=e.yAxis,c=e.left,d=e.top,f=e.width,h=e.height,m=e.isAnimationActive,g=e.background,v=e.id;if(t||!n||!n.length)return null;var y=this.state.isAnimationFinished,b=(0,o.Z)("recharts-bar",i),x=a&&a.allowDataOverflow,w=l&&l.allowDataOverflow,S=x||w,k=s()(v)?this.id:v;return r.createElement(u.m,{className:b},x||w?r.createElement("defs",null,r.createElement("clipPath",{id:"clipPath-".concat(k)},r.createElement("rect",{x:x?c:c-f/2,y:w?d:d-h/2,width:x?f:2*f,height:w?h:2*h}))):null,r.createElement(u.m,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(k,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,k),(!m||y)&&p.e.renderCallByParent(this.props,n))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],n&&R(f.prototype,n),a&&R(f,a),Object.defineProperty(f,"prototype",{writable:!1}),f}(r.PureComponent);D(L,"displayName","Bar"),D(L,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!g.x.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),D(L,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,s=e.stackedData,u=e.dataStartIndex,d=e.displayedData,p=e.offset,g=(0,v.Bu)(r,n);if(!g)return null;var y=t.layout,b=n.props,x=b.dataKey,w=b.children,S=b.minPointSize,k="horizontal"===y?a:i,E=s?k.scale.domain():null,C=(0,v.Yj)({numericAxis:k}),O=(0,m.NN)(w,f.b),j=d.map(function(e,t){var r,d,f,p,m,b;if(s?r=(0,v.Vv)(s[u+t],E):Array.isArray(r=(0,v.F$)(e,x))||(r=[C,r]),"horizontal"===y){var w,k=[a.scale(r[0]),a.scale(r[1])],j=k[0],P=k[1];d=(0,v.Fy)({axis:i,ticks:l,bandSize:o,offset:g.offset,entry:e,index:t}),f=null!==(w=null!=P?P:j)&&void 0!==w?w:void 0,p=g.size;var N=j-P;if(m=Number.isNaN(N)?0:N,b={x:d,y:a.y,width:p,height:a.height},Math.abs(S)>0&&Math.abs(m)<Math.abs(S)){var M=(0,h.uY)(m||S)*(Math.abs(S)-Math.abs(m));f-=M,m+=M}}else{var R=[i.scale(r[0]),i.scale(r[1])],T=R[0],A=R[1];if(d=T,f=(0,v.Fy)({axis:a,ticks:c,bandSize:o,offset:g.offset,entry:e,index:t}),p=A-T,m=g.size,b={x:i.x,y:f,width:i.width,height:m},Math.abs(S)>0&&Math.abs(p)<Math.abs(S)){var _=(0,h.uY)(p||S)*(Math.abs(S)-Math.abs(p));p+=_}}return I(I(I({},e),{},{x:d,y:f,width:p,height:m,value:s?r:r[1],payload:e,background:b},O&&O[t]&&O[t].props),{},{tooltipPayload:[(0,v.Qo)(n,e)],tooltipPosition:{x:d+p/2,y:f+m/2}})});return I({data:j,layout:y},p)})},80285:function(e,t,n){"use strict";n.d(t,{O:function(){return M}});var r=n(2265),o=n(86757),i=n.n(o),a=n(13735),l=n.n(a),c=n(61994),s=n(46485),u=n(9841),d=n(58811),f=n(26680),p=n(16630),h=n(41637),m=n(82944),g=n(78242),v=["viewBox"],y=["viewBox"],b=["ticks"];function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(){return(w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,N(r.key),r)}}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){var t=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==x(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===x(t)?t:String(t)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(S,e);var t,n,o,a=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=j(S);return e=t?Reflect.construct(n,arguments,j(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function S(e){var t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,S),(t=a.call(this,e)).state={fontSize:"",letterSpacing:""},t}return n=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=E(e,v),o=this.props,i=o.viewBox,a=E(o,y);return!(0,s.w)(n,i)||!(0,s.w)(r,a)||!(0,s.w)(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,i,a,l=this.props,c=l.x,s=l.y,u=l.width,d=l.height,f=l.orientation,h=l.tickSize,m=l.mirror,g=l.tickMargin,v=m?-1:1,y=e.tickSize||h,b=(0,p.hj)(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=n=e.coordinate,a=(r=(o=s+ +!m*d)-v*y)-v*g,i=b;break;case"left":r=o=e.coordinate,i=(t=(n=c+ +!m*u)-v*y)-v*g,a=b;break;case"right":r=o=e.coordinate,i=(t=(n=c+ +m*u)+v*y)+v*g,a=b;break;default:t=n=e.coordinate,a=(r=(o=s+ +m*d)+v*y)+v*g,i=b}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,o=e.width,i=e.height,a=e.orientation,s=e.mirror,u=e.axisLine,d=k(k(k({},(0,m.L6)(this.props,!1)),(0,m.L6)(u,!1)),{},{fill:"none"});if("top"===a||"bottom"===a){var f=+("top"===a&&!s||"bottom"===a&&s);d=k(k({},d),{},{x1:t,y1:n+f*i,x2:t+o,y2:n+f*i})}else{var p=+("left"===a&&!s||"right"===a&&s);d=k(k({},d),{},{x1:t+p*o,y1:n,x2:t+p*o,y2:n+i})}return r.createElement("line",w({},d,{className:(0,c.Z)("recharts-cartesian-axis-line",l()(u,"className"))}))}},{key:"renderTicks",value:function(e,t,n){var o=this,a=this.props,s=a.tickLine,d=a.stroke,f=a.tick,p=a.tickFormatter,v=a.unit,y=(0,g.f)(k(k({},this.props),{},{ticks:e}),t,n),b=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),E=(0,m.L6)(this.props,!1),C=(0,m.L6)(f,!1),O=k(k({},E),{},{fill:"none"},(0,m.L6)(s,!1)),j=y.map(function(e,t){var n=o.getTickLineCoord(e),a=n.line,m=n.tick,g=k(k(k(k({textAnchor:b,verticalAnchor:x},E),{},{stroke:"none",fill:d},C),m),{},{index:t,payload:e,visibleTicksCount:y.length,tickFormatter:p});return r.createElement(u.m,w({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},(0,h.bw)(o.props,e,t)),s&&r.createElement("line",w({},O,a,{className:(0,c.Z)("recharts-cartesian-axis-tick-line",l()(s,"className"))})),f&&S.renderTickItem(f,g,"".concat(i()(p)?p(e.value,t):e.value).concat(v||"")))});return r.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var e=this,t=this.props,n=t.axisLine,o=t.width,a=t.height,l=t.ticksGenerator,s=t.className;if(t.hide)return null;var d=this.props,p=d.ticks,h=E(d,b),m=p;return(i()(l)&&(m=l(p&&p.length>0?this.props:h)),o<=0||a<=0||!m||!m.length)?null:r.createElement(u.m,{className:(0,c.Z)("recharts-cartesian-axis",s),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),f._.renderCallByParent(this.props))}}],o=[{key:"renderTickItem",value:function(e,t,n){return r.isValidElement(e)?r.cloneElement(e,t):i()(e)?e(t):r.createElement(d.x,w({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],n&&C(S.prototype,n),o&&C(S,o),Object.defineProperty(S,"prototype",{writable:!1}),S}(r.Component);P(M,"displayName","CartesianAxis"),P(M,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"})},56940:function(e,t,n){"use strict";n.d(t,{q:function(){return N}});var r=n(2265),o=n(86757),i=n.n(o),a=n(1175),l=n(16630),c=n(82944),s=n(85355),u=n(78242),d=n(80285),f=n(25739),p=["x1","y1","x2","y2","key"],h=["offset"];function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==m(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(){return(y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var x=function(e){var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,o=e.x,i=e.y,a=e.width,l=e.height;return r.createElement("rect",{x:o,y:i,width:a,height:l,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function w(e,t){var n;if(r.isValidElement(e))n=r.cloneElement(e,t);else if(i()(e))n=e(t);else{var o=t.x1,a=t.y1,l=t.x2,s=t.y2,u=t.key,d=b(t,p),f=(0,c.L6)(d,!1),m=(f.offset,b(f,h));n=r.createElement("line",y({},m,{x1:o,y1:a,x2:l,y2:s,fill:"none",key:u}))}return n}function S(e){var t=e.x,n=e.width,o=e.horizontal,i=void 0===o||o,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var l=a.map(function(r,o){return w(i,v(v({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:"line-".concat(o),index:o}))});return r.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function k(e){var t=e.y,n=e.height,o=e.vertical,i=void 0===o||o,a=e.verticalPoints;if(!i||!a||!a.length)return null;var l=a.map(function(r,o){return w(i,v(v({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:"line-".concat(o),index:o}))});return r.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function E(e){var t=e.horizontalFill,n=e.fillOpacity,o=e.x,i=e.y,a=e.width,l=e.height,c=e.horizontalPoints,s=e.horizontal;if(!(void 0===s||s)||!t||!t.length)return null;var u=c.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==u[0]&&u.unshift(0);var d=u.map(function(e,c){var s=u[c+1]?u[c+1]-e:i+l-e;if(s<=0)return null;var d=c%t.length;return r.createElement("rect",{key:"react-".concat(c),y:e,x:o,height:s,width:a,stroke:"none",fill:t[d],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function C(e){var t=e.vertical,n=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,l=e.width,c=e.height,s=e.verticalPoints;if(!(void 0===t||t)||!n||!n.length)return null;var u=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var s=u[t+1]?u[t+1]-e:i+l-e;if(s<=0)return null;var d=t%n.length;return r.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:s,height:c,stroke:"none",fill:n[d],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var O=function(e,t){var n=e.xAxis,r=e.width,o=e.height,i=e.offset;return(0,s.Rf)((0,u.f)(v(v(v({},d.O.defaultProps),n),{},{ticks:(0,s.uY)(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},j=function(e,t){var n=e.yAxis,r=e.width,o=e.height,i=e.offset;return(0,s.Rf)((0,u.f)(v(v(v({},d.O.defaultProps),n),{},{ticks:(0,s.uY)(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},P={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function N(e){var t,n,o,c,s,u,d=(0,f.zn)(),p=(0,f.Mw)(),h=(0,f.qD)(),g=v(v({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:P.stroke,fill:null!==(n=e.fill)&&void 0!==n?n:P.fill,horizontal:null!==(o=e.horizontal)&&void 0!==o?o:P.horizontal,horizontalFill:null!==(c=e.horizontalFill)&&void 0!==c?c:P.horizontalFill,vertical:null!==(s=e.vertical)&&void 0!==s?s:P.vertical,verticalFill:null!==(u=e.verticalFill)&&void 0!==u?u:P.verticalFill}),b=g.x,w=g.y,N=g.width,M=g.height,I=g.xAxis,R=g.yAxis,T=g.syncWithTicks,A=g.horizontalValues,_=g.verticalValues;if(!(0,l.hj)(N)||N<=0||!(0,l.hj)(M)||M<=0||!(0,l.hj)(b)||b!==+b||!(0,l.hj)(w)||w!==+w)return null;var D=g.verticalCoordinatesGenerator||O,Z=g.horizontalCoordinatesGenerator||j,L=g.horizontalPoints,z=g.verticalPoints;if((!L||!L.length)&&i()(Z)){var B=A&&A.length,F=Z({yAxis:R?v(v({},R),{},{ticks:B?A:R.ticks}):void 0,width:d,height:p,offset:h},!!B||T);(0,a.Z)(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(m(F),"]")),Array.isArray(F)&&(L=F)}if((!z||!z.length)&&i()(D)){var H=_&&_.length,q=D({xAxis:I?v(v({},I),{},{ticks:H?_:I.ticks}):void 0,width:d,height:p,offset:h},!!H||T);(0,a.Z)(Array.isArray(q),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(m(q),"]")),Array.isArray(q)&&(z=q)}return r.createElement("g",{className:"recharts-cartesian-grid"},r.createElement(x,{fill:g.fill,fillOpacity:g.fillOpacity,x:g.x,y:g.y,width:g.width,height:g.height}),r.createElement(S,y({},g,{offset:h,horizontalPoints:L})),r.createElement(k,y({},g,{offset:h,verticalPoints:z})),r.createElement(E,y({},g,{horizontalPoints:L})),r.createElement(C,y({},g,{verticalPoints:z})))}N.displayName="CartesianGrid"},13137:function(e,t,n){"use strict";n.d(t,{W:function(){return u}});var r=n(2265),o=n(69398),i=n(9841),a=n(82944),l=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=e.offset,n=e.layout,u=e.width,d=e.dataKey,f=e.data,p=e.dataPointFormatter,h=e.xAxis,m=e.yAxis,g=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l),v=(0,a.L6)(g,!1);"x"===e.direction&&"number"!==h.type&&(0,o.Z)(!1);var y=f.map(function(e){var o,a,l=p(e,d),f=l.x,g=l.y,y=l.value,b=l.errorVal;if(!b)return null;var x=[];if(Array.isArray(b)){var w=function(e){if(Array.isArray(e))return e}(b)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(b,2)||function(e,t){if(e){if("string"==typeof e)return s(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,2)}}(b,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();o=w[0],a=w[1]}else o=a=b;if("vertical"===n){var S=h.scale,k=g+t,E=k+u,C=k-u,O=S(y-o),j=S(y+a);x.push({x1:j,y1:E,x2:j,y2:C}),x.push({x1:O,y1:k,x2:j,y2:k}),x.push({x1:O,y1:E,x2:O,y2:C})}else if("horizontal"===n){var P=m.scale,N=f+t,M=N-u,I=N+u,R=P(y-o),T=P(y+a);x.push({x1:M,y1:T,x2:I,y2:T}),x.push({x1:N,y1:R,x2:N,y2:T}),x.push({x1:M,y1:R,x2:I,y2:R})}return r.createElement(i.m,c({className:"recharts-errorBar",key:"bar-".concat(x.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},v),x.map(function(e){return r.createElement("line",c({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return r.createElement(i.m,{className:"recharts-errorBars"},y)}u.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},u.displayName="ErrorBar"},54061:function(e,t,n){"use strict";n.d(t,{x:function(){return A}});var r=n(2265),o=n(59221),i=n(86757),a=n.n(i),l=n(77571),c=n.n(l),s=n(21652),u=n.n(s),d=n(61994),f=n(57165),p=n(81889),h=n(9841),m=n(58772),g=n(13137),v=n(16630),y=n(82944),b=n(34067),x=n(85355),w=["type","layout","connectNulls","ref"];function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){R(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return j(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,T(r.key),r)}}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function M(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){var t=function(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==S(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===S(t)?t:String(t)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(s,e);var t,n,i,l=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=I(s);return e=t?Reflect.construct(n,arguments,I(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return M(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return R(M(e=l.call.apply(l,[this].concat(n))),"state",{isAnimationFinished:!0,totalLength:0}),R(M(e),"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),R(M(e),"getStrokeDasharray",function(t,n,r){var o=r.reduce(function(e,t){return e+t});if(!o)return e.generateSimpleStrokeDasharray(n,t);for(var i=t%o,a=n-t,l=[],c=0,u=0;c<r.length;u+=r[c],++c)if(u+r[c]>i){l=[].concat(O(r.slice(0,c)),[i-u]);break}var d=l.length%2==0?[0,a]:[a];return[].concat(O(s.repeat(r,Math.floor(t/o))),O(l),d).map(function(e){return"".concat(e,"px")}).join(", ")}),R(M(e),"id",(0,v.EL)("recharts-line-")),R(M(e),"pathRef",function(t){e.mainCurve=t}),R(M(e),"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),R(M(e),"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return n=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,o=n.points,i=n.xAxis,a=n.yAxis,l=n.layout,c=n.children,s=(0,y.NN)(c,g.W);if(!s)return null;var u=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:(0,x.F$)(e.payload,t)}};return r.createElement(h.m,{clipPath:e?"url(#clipPath-".concat(t,")"):null},s.map(function(e){return r.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:o,xAxis:i,yAxis:a,layout:l,dataPointFormatter:u})}))}},{key:"renderDots",value:function(e,t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.dot,a=o.points,l=o.dataKey,c=(0,y.L6)(this.props,!1),u=(0,y.L6)(i,!0),d=a.map(function(e,t){var n=C(C(C({key:"dot-".concat(t),r:3},c),u),{},{value:e.value,dataKey:l,cx:e.x,cy:e.y,index:t,payload:e.payload});return s.renderDotItem(i,n)}),f={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(n,")"):null};return r.createElement(h.m,k({className:"recharts-line-dots",key:"dots"},f),d)}},{key:"renderCurveStatically",value:function(e,t,n,o){var i=this.props,a=i.type,l=i.layout,c=i.connectNulls,s=(i.ref,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(i,w)),u=C(C(C({},(0,y.L6)(s,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},o),{},{type:a,layout:l,connectNulls:c});return r.createElement(f.H,k({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,i=this.props,a=i.points,l=i.strokeDasharray,c=i.isAnimationActive,s=i.animationBegin,u=i.animationDuration,d=i.animationEasing,f=i.animationId,p=i.animateNewValues,h=i.width,m=i.height,g=this.state,y=g.prevPoints,b=g.totalLength;return r.createElement(o.ZP,{begin:s,duration:u,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o,i=r.t;if(y){var c=y.length/a.length,s=a.map(function(e,t){var n=Math.floor(t*c);if(y[n]){var r=y[n],o=(0,v.k4)(r.x,e.x),a=(0,v.k4)(r.y,e.y);return C(C({},e),{},{x:o(i),y:a(i)})}if(p){var l=(0,v.k4)(2*h,e.x),s=(0,v.k4)(m/2,e.y);return C(C({},e),{},{x:l(i),y:s(i)})}return C(C({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(s,e,t)}var u=(0,v.k4)(0,b)(i);if(l){var d="".concat(l).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});o=n.getStrokeDasharray(u,b,d)}else o=n.generateSimpleStrokeDasharray(b,u);return n.renderCurveStatically(a,e,t,{strokeDasharray:o})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,i=this.state,a=i.prevPoints,l=i.totalLength;return o&&r&&r.length&&(!a&&l>0||!u()(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,o=t.dot,i=t.points,a=t.className,l=t.xAxis,s=t.yAxis,u=t.top,f=t.left,p=t.width,g=t.height,v=t.isAnimationActive,b=t.id;if(n||!i||!i.length)return null;var x=this.state.isAnimationFinished,w=1===i.length,S=(0,d.Z)("recharts-line",a),k=l&&l.allowDataOverflow,E=s&&s.allowDataOverflow,C=k||E,O=c()(b)?this.id:b,j=null!==(e=(0,y.L6)(o,!1))&&void 0!==e?e:{r:3,strokeWidth:2},P=j.r,N=j.strokeWidth,M=((0,y.$k)(o)?o:{}).clipDot,I=void 0===M||M,R=2*(void 0===P?3:P)+(void 0===N?2:N);return r.createElement(h.m,{className:S},k||E?r.createElement("defs",null,r.createElement("clipPath",{id:"clipPath-".concat(O)},r.createElement("rect",{x:k?f:f-p/2,y:E?u:u-g/2,width:k?p:2*p,height:E?g:2*g})),!I&&r.createElement("clipPath",{id:"clipPath-dots-".concat(O)},r.createElement("rect",{x:f-R/2,y:u-R/2,width:p+R,height:g+R}))):null,!w&&this.renderCurve(C,O),this.renderErrorBar(C,O),(w||o)&&this.renderDots(C,I,O),(!v||x)&&m.e.renderCallByParent(this.props,i))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(O(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(O(r),O(n));return r}},{key:"renderDotItem",value:function(e,t){var n;if(r.isValidElement(e))n=r.cloneElement(e,t);else if(a()(e))n=e(t);else{var o=(0,d.Z)("recharts-line-dot",e?e.className:"");n=r.createElement(p.o,k({},t,{className:o}))}return n}}],n&&P(s.prototype,n),i&&P(s,i),Object.defineProperty(s,"prototype",{writable:!1}),s}(r.PureComponent);R(A,"displayName","Line"),R(A,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!b.x.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),R(A,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,l=e.bandSize,s=e.displayedData,u=e.offset,d=t.layout;return C({points:s.map(function(e,t){var s=(0,x.F$)(e,a);return"horizontal"===d?{x:(0,x.Hv)({axis:n,ticks:o,bandSize:l,entry:e,index:t}),y:c()(s)?null:r.scale(s),value:s,payload:e}:{x:c()(s)?null:n.scale(s),y:(0,x.Hv)({axis:r,ticks:i,bandSize:l,entry:e,index:t}),value:s,payload:e}}),layout:d},u)})},97059:function(e,t,n){"use strict";n.d(t,{K:function(){return s}});var r=n(2265),o=n(61994),i=n(25739),a=n(80285),l=n(85355);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var s=function(e){var t=e.xAxisId,n=(0,i.zn)(),s=(0,i.Mw)(),u=(0,i.bH)(t);return null==u?null:r.createElement(a.O,c({},u,{className:(0,o.Z)("recharts-".concat(u.axisType," ").concat(u.axisType),u.className),viewBox:{x:0,y:0,width:n,height:s},ticksGenerator:function(e){return(0,l.uY)(e,!0)}}))};s.displayName="XAxis",s.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0}},62994:function(e,t,n){"use strict";n.d(t,{B:function(){return s}});var r=n(2265),o=n(61994),i=n(25739),a=n(80285),l=n(85355);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var s=function(e){var t=e.yAxisId,n=(0,i.zn)(),s=(0,i.Mw)(),u=(0,i.Ud)(t);return null==u?null:r.createElement(a.O,c({},u,{className:(0,o.Z)("recharts-".concat(u.axisType," ").concat(u.axisType),u.className),viewBox:{x:0,y:0,width:n,height:s},ticksGenerator:function(e){return(0,l.uY)(e,!0)}}))};s.displayName="YAxis",s.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1}},78242:function(e,t,n){"use strict";n.d(t,{f:function(){return h}});var r=n(86757),o=n.n(r),i=n(16630),a=n(4094),l=n(34067),c=n(25311);function s(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t){if(void 0!==n&&!0!==n(e[o]))return;r.push(e[o])}return r}function u(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t,n){var r,d,f,h,m,g=e.tick,v=e.ticks,y=e.viewBox,b=e.minTickGap,x=e.orientation,w=e.interval,S=e.tickFormatter,k=e.unit,E=e.angle;if(!v||!v.length||!g)return[];if((0,i.hj)(w)||l.x.isSsr)return s(v,("number"==typeof w&&(0,i.hj)(w)?w:0)+1);var C="top"===x||"bottom"===x?"width":"height",O=k&&"width"===C?(0,a.xE)(k,{fontSize:t,letterSpacing:n}):{width:0,height:0},j=function(e,r){var i,l,s=o()(S)?S(e.value,r):e.value;return"width"===C?(l={width:(i=(0,a.xE)(s,{fontSize:t,letterSpacing:n})).width+O.width,height:i.height+O.height},(0,c.xE)(l,E)):(0,a.xE)(s,{fontSize:t,letterSpacing:n})[C]},P=v.length>=2?(0,i.uY)(v[1].coordinate-v[0].coordinate):1,N=(r="width"===C,d=y.x,f=y.y,h=y.width,m=y.height,1===P?{start:r?d:f,end:r?d+h:f+m}:{start:r?d+h:f+m,end:r?d:f});return"equidistantPreserveStart"===w?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),l=t.start,c=t.end,d=0,f=1,p=l;f<=a.length;)if(i=function(){var t,i=null==r?void 0:r[d];if(void 0===i)return{v:s(r,f)};var a=d,h=function(){return void 0===t&&(t=n(i,a)),t},m=i.coordinate,g=0===d||u(e,m,h,p,c);g||(d=0,p=l,f+=1),g&&(p=m+e*(h()/2+o),d+=f)}())return i.v;return[]}(P,N,j,v,b):("preserveStart"===w||"preserveStartEnd"===w?function(e,t,n,r,o,i){var a=(r||[]).slice(),l=a.length,c=t.start,s=t.end;if(i){var d=r[l-1],f=n(d,l-1),h=e*(d.coordinate+e*f/2-s);a[l-1]=d=p(p({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate}),u(e,d.tickCoord,function(){return f},c,s)&&(s=d.tickCoord-e*(f/2+o),a[l-1]=p(p({},d),{},{isShow:!0}))}for(var m=i?l-1:l,g=function(t){var r,i=a[t],l=function(){return void 0===r&&(r=n(i,t)),r};if(0===t){var d=e*(i.coordinate-e*l()/2-c);a[t]=i=p(p({},i),{},{tickCoord:d<0?i.coordinate-d*e:i.coordinate})}else a[t]=i=p(p({},i),{},{tickCoord:i.coordinate});u(e,i.tickCoord,l,c,s)&&(c=i.tickCoord+e*(l()/2+o),a[t]=p(p({},i),{},{isShow:!0}))},v=0;v<m;v++)g(v);return a}(P,N,j,v,b,"preserveStartEnd"===w):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,l=t.start,c=t.end,s=function(t){var r,s=i[t],d=function(){return void 0===r&&(r=n(s,t)),r};if(t===a-1){var f=e*(s.coordinate+e*d()/2-c);i[t]=s=p(p({},s),{},{tickCoord:f>0?s.coordinate-f*e:s.coordinate})}else i[t]=s=p(p({},s),{},{tickCoord:s.coordinate});u(e,s.tickCoord,d,l,c)&&(c=s.tickCoord-e*(d()/2+o),i[t]=p(p({},s),{},{isShow:!0}))},d=a-1;d>=0;d--)s(d);return i}(P,N,j,v,b)).filter(function(e){return e.isShow})}},93765:function(e,t,n){"use strict";n.d(t,{z:function(){return tx}});var r=n(2265),o=n(77571),i=n.n(o),a=n(86757),l=n.n(a),c=n(99676),s=n.n(c),u=n(13735),d=n.n(u),f=n(34935),p=n.n(f),h=n(37065),m=n.n(h),g=n(84173),v=n.n(g),y=n(32242),b=n.n(y),x=n(61994),w=n(69398),S=n(48777),k=n(9841),E=n(8147),C=n(22190),O=n(81889),j=n(73649),P=n(82944),N=n(55284),M=n(58811),I=n(85355),R=n(16630);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D(e,t,n){var r;return(r=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==T(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===T(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=["Webkit","Moz","O","ms"],L=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=Z.reduce(function(e,r){return _(_({},e),{},D({},r+n,t))},{});return r[e]=t,r};function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach(function(t){U(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G(r.key),r)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function K(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e,t,n){return(t=G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e){var t=function(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==z(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===z(t)?t:String(t)}var X=function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,i=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var l=t.length,c=(0,N.x)().domain(s()(0,l)).range([o,o+i-a]),u=c.domain().map(function(e){return c(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(r),scale:c,scaleValues:u}},$=function(e){return e.changedTouches&&!!e.changedTouches.length},Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(a,e);var t,n,o,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=V(a);return e=t?Reflect.construct(n,arguments,V(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return K(e)}(this,e)});function a(e){var t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),U(K(t=i.call(this,e)),"handleDrag",function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)}),U(K(t),"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])}),U(K(t),"handleDragEnd",function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=t.props,n=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:n,startIndex:o})}),t.detachDragEndListener()}),U(K(t),"handleLeaveWrapper",function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))}),U(K(t),"handleEnterSlideOrTraveller",function(){t.setState({isTextActive:!0})}),U(K(t),"handleLeaveSlideOrTraveller",function(){t.setState({isTextActive:!1})}),U(K(t),"handleSlideDragStart",function(e){var n=$(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()}),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(K(t),"startX"),endX:t.handleTravellerDragStart.bind(K(t),"endX")},t.state={},t}return n=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.state.scaleValues,o=this.props,i=o.gap,l=o.data.length-1,c=a.getIndexInRange(r,Math.min(t,n)),s=a.getIndexInRange(r,Math.max(t,n));return{startIndex:c-c%i,endIndex:s===l?l:s-s%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=(0,I.F$)(n[e],o,e);return l()(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,i=this.props,a=i.x,l=i.width,c=i.travellerWidth,s=i.startIndex,u=i.endIndex,d=i.onChange,f=e.pageX-n;f>0?f=Math.min(f,a+l-c-o,a+l-c-r):f<0&&(f=Math.max(f,a-r,a-o));var p=this.getIndex({startX:r+f,endX:o+f});(p.startIndex!==s||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:o+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=$(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,o=n.movingTravellerId,i=n.endX,a=n.startX,l=this.state[o],c=this.props,s=c.x,u=c.width,d=c.travellerWidth,f=c.onChange,p=c.gap,h=c.data,m={startX:this.state.startX,endX:this.state.endX},g=e.pageX-r;g>0?g=Math.min(g,s+u-d-l):g<0&&(g=Math.max(g,s-l)),m[o]=l+g;var v=this.getIndex(m),y=v.startIndex,b=v.endIndex,x=function(){var e=h.length-1;return"startX"===o&&(i>a?y%p==0:b%p==0)||i<a&&b===e||"endX"===o&&(i>a?b%p==0:y%p==0)||i>a&&b===e};this.setState((U(t={},o,l+g),U(t,"brushMoveStartX",e.pageX),t),function(){f&&x()&&f(v)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,i=r.startX,a=r.endX,l=this.state[t],c=o.indexOf(l);if(-1!==c){var s=c+e;if(-1!==s&&!(s>=o.length)){var u=o[s];"startX"===t&&u>=a||"endX"===t&&u<=i||this.setState(U({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,o=e.width,i=e.height,a=e.fill,l=e.stroke;return r.createElement("rect",{stroke:l,fill:a,x:t,y:n,width:o,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,o=e.width,i=e.height,a=e.data,l=e.children,c=e.padding,s=r.Children.only(l);return s?r.cloneElement(s,{x:t,y:n,width:o,height:i,margin:c,compact:!0,data:a}):null}},{key:"renderTravellerLayer",value:function(e,t){var n=this,o=this.props,i=o.y,l=o.travellerWidth,c=o.height,s=o.traveller,u=o.ariaLabel,d=o.data,f=o.startIndex,p=o.endIndex,h=Math.max(e,this.props.x),m=H(H({},(0,P.L6)(this.props,!1)),{},{x:h,y:i,width:l,height:c}),g=u||"Min value: ".concat(d[f].name,", Max value: ").concat(d[p].name);return r.createElement(k.m,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),n.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){n.setState({isTravellerFocused:!0})},onBlur:function(){n.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},a.renderTraveller(s,m))}},{key:"renderSlide",value:function(e,t){var n=this.props,o=n.y,i=n.height,a=n.stroke,l=n.travellerWidth;return r.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:Math.min(e,t)+l,y:o,width:Math.max(Math.abs(t-e)-l,0),height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,o=e.y,i=e.height,a=e.travellerWidth,l=e.stroke,c=this.state,s=c.startX,u=c.endX,d={pointerEvents:"none",fill:l};return r.createElement(k.m,{className:"recharts-brush-texts"},r.createElement(M.x,B({textAnchor:"end",verticalAnchor:"middle",x:Math.min(s,u)-5,y:o+i/2},d),this.getTextOfTick(t)),r.createElement(M.x,B({textAnchor:"start",verticalAnchor:"middle",x:Math.max(s,u)+a+5,y:o+i/2},d),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,o=e.children,i=e.x,a=e.y,l=e.width,c=e.height,s=e.alwaysShowText,u=this.state,d=u.startX,f=u.endX,p=u.isTextActive,h=u.isSlideMoving,m=u.isTravellerMoving,g=u.isTravellerFocused;if(!t||!t.length||!(0,R.hj)(i)||!(0,R.hj)(a)||!(0,R.hj)(l)||!(0,R.hj)(c)||l<=0||c<=0)return null;var v=(0,x.Z)("recharts-brush",n),y=1===r.Children.count(o),b=L("userSelect","none");return r.createElement(k.m,{className:v,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(d,f),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(f,"endX"),(p||h||m||g||s)&&this.renderText())}}],o=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,o=e.width,i=e.height,a=e.stroke,l=Math.floor(n+i/2)-1;return r.createElement(r.Fragment,null,r.createElement("rect",{x:t,y:n,width:o,height:i,fill:a,stroke:"none"}),r.createElement("line",{x1:t+1,y1:l,x2:t+o-1,y2:l,fill:"none",stroke:"#fff"}),r.createElement("line",{x1:t+1,y1:l+2,x2:t+o-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):l()(e)?e(t):a.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,i=e.travellerWidth,a=e.updateId,l=e.startIndex,c=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return H({prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r},n&&n.length?X({data:n,width:r,x:o,travellerWidth:i,startIndex:l,endIndex:c}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([o,o+r-i]);var s=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=e.length,r=0,o=n-1;o-r>1;){var i=Math.floor((r+o)/2);e[i]>t?o=i:r=i}return t>=e[o]?o:r}}],n&&q(a.prototype,n),o&&q(a,o),Object.defineProperty(a,"prototype",{writable:!1}),a}(r.PureComponent);U(Y,"displayName","Brush"),U(Y,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Q=n(4094),J=n(38569),ee=n(26680),et=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},en=n(25311),er=n(1175);function eo(e){return(eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ei(){return(ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function el(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ea(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==eo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==eo(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===eo(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ea(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ec=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,i=(0,en.Ky)({x:r.scale,y:o.scale}),a=i.apply({x:t,y:n},{bandAware:!0});return et(e,"discard")&&!i.isInRange(a)?null:a};function es(e){var t=e.x,n=e.y,o=e.r,i=e.alwaysShow,a=e.clipPathId,l=(0,R.P2)(t),c=(0,R.P2)(n);if((0,er.Z)(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var s=ec(e);if(!s)return null;var u=s.x,d=s.y,f=e.shape,p=e.className,h=el(el({clipPath:et(e,"hidden")?"url(#".concat(a,")"):void 0},(0,P.L6)(e,!0)),{},{cx:u,cy:d});return r.createElement(k.m,{className:(0,x.Z)("recharts-reference-dot",p)},es.renderDot(f,h),ee._.renderCallByParent(e,{x:u-o,y:d-o,width:2*o,height:2*o}))}es.displayName="ReferenceDot",es.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},es.renderDot=function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):l()(e)?e(t):r.createElement(O.o,ei({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))};var eu=n(33645),ed=n.n(eu),ef=n(25739);function ep(e){return(ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function em(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eh(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==ep(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ep(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ep(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ev(){return(ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ey=function(e,t,n,r,o,i,a,l,c){var s=o.x,u=o.y,d=o.width,f=o.height;if(n){var p=c.y,h=e.y.apply(p,{position:i});if(et(c,"discard")&&!e.y.isInRange(h))return null;var m=[{x:s+d,y:h},{x:s,y:h}];return"left"===l?m.reverse():m}if(t){var g=c.x,v=e.x.apply(g,{position:i});if(et(c,"discard")&&!e.x.isInRange(v))return null;var y=[{x:v,y:u+f},{x:v,y:u}];return"top"===a?y.reverse():y}if(r){var b=c.segment.map(function(t){return e.apply(t,{position:i})});return et(c,"discard")&&ed()(b,function(t){return!e.isInRange(t)})?null:b}return null};function eb(e){var t,n,o=e.x,i=e.y,a=e.segment,c=e.xAxisId,s=e.yAxisId,u=e.shape,d=e.className,f=e.alwaysShow,p=(0,ef.sp)(),h=(0,ef.bH)(c),m=(0,ef.Ud)(s),g=(0,ef.d2)();if(!p||!g)return null;(0,er.Z)(void 0===f,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=ey((0,en.Ky)({x:h.scale,y:m.scale}),(0,R.P2)(o),(0,R.P2)(i),a&&2===a.length,g,e.position,h.orientation,m.orientation,e);if(!v)return null;var y=function(e){if(Array.isArray(e))return e}(v)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(v,2)||function(e,t){if(e){if("string"==typeof e)return eg(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eg(e,2)}}(v,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),b=y[0],w=b.x,S=b.y,E=y[1],C=E.x,O=E.y,j=em(em({clipPath:et(e,"hidden")?"url(#".concat(p,")"):void 0},(0,P.L6)(e,!0)),{},{x1:w,y1:S,x2:C,y2:O});return r.createElement(k.m,{className:(0,x.Z)("recharts-reference-line",d)},(t=u,n=j,r.isValidElement(t)?r.cloneElement(t,n):l()(t)?t(n):r.createElement("line",ev({},n,{className:"recharts-reference-line-line"}))),ee._.renderCallByParent(e,(0,en._b)({x1:w,y1:S,x2:C,y2:O})))}function ex(e){return(ex="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ew(){return(ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eS(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==ex(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ex(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ex(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}eb.displayName="ReferenceLine",eb.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"};var eE=function(e,t,n,r,o){var i=o.x1,a=o.x2,l=o.y1,c=o.y2,s=o.xAxis,u=o.yAxis;if(!s||!u)return null;var d=(0,en.Ky)({x:s.scale,y:u.scale}),f={x:e?d.x.apply(i,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},p={x:t?d.x.apply(a,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(c,{position:"end"}):d.y.rangeMax};return!et(o,"discard")||d.isInRange(f)&&d.isInRange(p)?(0,en.O1)(f,p):null};function eC(e){var t=e.x1,n=e.x2,o=e.y1,i=e.y2,a=e.className,l=e.alwaysShow,c=e.clipPathId;(0,er.Z)(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var s=(0,R.P2)(t),u=(0,R.P2)(n),d=(0,R.P2)(o),f=(0,R.P2)(i),p=e.shape;if(!s&&!u&&!d&&!f&&!p)return null;var h=eE(s,u,d,f,e);if(!h&&!p)return null;var m=et(e,"hidden")?"url(#".concat(c,")"):void 0;return r.createElement(k.m,{className:(0,x.Z)("recharts-reference-area",a)},eC.renderRect(p,ek(ek({clipPath:m},(0,P.L6)(e,!0)),h)),ee._.renderCallByParent(e,h))}function eO(e){return function(e){if(Array.isArray(e))return ej(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ej(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ej(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ej(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}eC.displayName="ReferenceArea",eC.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},eC.renderRect=function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):l()(e)?e(t):r.createElement(j.A,ew({},t,{className:"recharts-reference-area-rect"}))};var eP=function(e,t,n,r,o){var i=(0,P.NN)(e,eb),a=(0,P.NN)(e,es),l=[].concat(eO(i),eO(a)),c=(0,P.NN)(e,eC),s="".concat(r,"Id"),u=r[0],d=t;if(l.length&&(d=l.reduce(function(e,t){if(t.props[s]===n&&et(t.props,"extendDomain")&&(0,R.hj)(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),c.length){var f="".concat(u,"1"),p="".concat(u,"2");d=c.reduce(function(e,t){if(t.props[s]===n&&et(t.props,"extendDomain")&&(0,R.hj)(t.props[f])&&(0,R.hj)(t.props[p])){var r=t.props[f],o=t.props[p];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e},d)}return o&&o.length&&(d=o.reduce(function(e,t){return(0,R.hj)(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},eN=n(39206),eM=n(46485),eI=n(77625),eR=new(n.n(eI)()),eT="recharts.syncMouseEvents",eA=n(41637);function e_(e){return(e_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eD(e,t,n){return(t=eZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eZ(e){var t=function(e,t){if("object"!==e_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==e_(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===e_(t)?t:String(t)}var eL=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),eD(this,"activeIndex",0),eD(this,"coordinateList",[]),eD(this,"layout","horizontal")}return e=[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,i=void 0===o?null:o,a=e.layout,l=void 0===a?null:a,c=e.offset,s=void 0===c?null:c,u=e.mouseHandlerCallback,d=void 0===u?null:u;this.coordinateList=null!==(t=null!=r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!=i?i:this.container,this.layout=null!=l?l:this.layout,this.offset=null!=s?s:this.offset,this.mouseHandlerCallback=null!=d?d:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){if("horizontal"===this.layout&&0!==this.coordinateList.length){var e,t,n=this.container.getBoundingClientRect(),r=n.x,o=n.y,i=n.height,a=this.coordinateList[this.activeIndex].coordinate,l=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,c=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,s=o+this.offset.top+i/2+c;this.mouseHandlerCallback({pageX:r+a+l,pageY:s})}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eZ(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(),ez=n(11638),eB=n(57165);function eF(e){return(eF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var eH=["x","y","top","left","width","height","className"];function eq(){return(eq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var eK=function(e){var t=e.x,n=void 0===t?0:t,o=e.y,i=void 0===o?0:o,a=e.top,l=void 0===a?0:a,c=e.left,s=void 0===c?0:c,u=e.width,d=void 0===u?0:u,f=e.height,p=void 0===f?0:f,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eW(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==eF(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==eF(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===eF(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:i,top:l,left:s,width:d,height:p},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eH));return(0,R.hj)(n)&&(0,R.hj)(i)&&(0,R.hj)(d)&&(0,R.hj)(p)&&(0,R.hj)(l)&&(0,R.hj)(s)?r.createElement("path",eq({},(0,P.L6)(m,!0),{className:(0,x.Z)("recharts-cross",h),d:"M".concat(n,",").concat(l,"v").concat(p,"M").concat(s,",").concat(i,"h").concat(d)})):null};function eV(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[(0,eN.op)(t,n,r,o),(0,eN.op)(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}var eU=n(60474);function eG(e){return(eG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function e$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eX(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==eG(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==eG(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===eG(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eY(e){var t,n,o=e.element,i=e.tooltipEventType,a=e.isActive,l=e.activeCoordinate,c=e.activePayload,s=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName;if(!o||!o.props.cursor||!a||!l||"ScatterChart"!==p&&"axis"!==i)return null;var h=eB.H;if("ScatterChart"===p)n=l,h=eK;else if("BarChart"===p)t=d/2,n={stroke:"none",fill:"#ccc",x:"horizontal"===f?l.x-t:s.left+.5,y:"horizontal"===f?s.top+.5:l.y-t,width:"horizontal"===f?d:s.width-1,height:"horizontal"===f?s.height-1:d},h=j.A;else if("radial"===f){var m=eV(l),g=m.cx,v=m.cy,y=m.radius;n={cx:g,cy:v,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:y,outerRadius:y},h=eU.L}else n={points:function(e,t,n){var r,o,i,a;if("horizontal"===e)i=r=t.x,o=n.top,a=n.top+n.height;else if("vertical"===e)a=o=t.y,r=n.left,i=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return eV(t);var l=t.cx,c=t.cy,s=t.innerRadius,u=t.outerRadius,d=t.angle,f=(0,eN.op)(l,c,s,d),p=(0,eN.op)(l,c,u,d);r=f.x,o=f.y,i=p.x,a=p.y}return[{x:r,y:o},{x:i,y:a}]}(f,l,s)},h=eB.H;var b=e$(e$(e$(e$({stroke:"#ccc",pointerEvents:"none"},s),n),(0,P.L6)(o.props.cursor,!1)),{},{payload:c,payloadIndex:u,className:"recharts-tooltip-cursor"});return(0,r.isValidElement)(o.props.cursor)?(0,r.cloneElement)(o.props.cursor,b):(0,r.createElement)(h,b)}var eQ=["item"],eJ=["children","className","width","height","style","compact","title","desc"];function e0(e){return(e0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e1(){return(e1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function e2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||e7(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e6(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function e4(e,t){return(e4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function e3(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e5(e){return(e5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e8(e){return function(e){if(Array.isArray(e))return e9(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||e7(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e7(e,t){if(e){if("string"==typeof e)return e9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e9(e,t)}}function e9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach(function(t){tn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tn(e,t,n){return(t=tr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tr(e){var t=function(e,t){if("object"!==e0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==e0(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===e0(t)?t:String(t)}var to={xAxis:["bottom","top"],yAxis:["left","right"]},ti={width:"100%",height:"100%"},ta={x:0,y:0};function tl(e){return e}var tc=function(e,t,n,r){var o=t.find(function(e){return e&&e.index===n});if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var i=o.coordinate,a=r.radius;return tt(tt(tt({},r),(0,eN.op)(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var l=o.coordinate,c=r.angle;return tt(tt(tt({},r),(0,eN.op)(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return ta},ts=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,i=(null!=n?n:[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(e8(e),e8(n)):e},[]);return i.length>0?i:e&&e.length&&(0,R.hj)(r)&&(0,R.hj)(o)?e.slice(r,o+1):[]};function tu(e){return"number"===e?[0,"auto"]:void 0}var td=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=ts(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce(function(o,l){var c,s,u=null!==(c=l.props.data)&&void 0!==c?c:t;if(u&&e.dataStartIndex+e.dataEndIndex!==0&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),i.dataKey&&!i.allowDuplicatedCategory){var d=void 0===u?a:u;s=(0,R.Ap)(d,i.dataKey,r)}else s=u&&u[n]||a[n];return s?[].concat(e8(o),[(0,I.Qo)(l,s)]):o},[])},tf=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},i="horizontal"===n?o.x:"vertical"===n?o.y:"centric"===n?o.angle:o.radius,a=e.orderedTooltipTicks,l=e.tooltipAxis,c=e.tooltipTicks,s=(0,I.VO)(i,a,c,l);if(s>=0&&c){var u=c[s]&&c[s].value,d=td(e,t,s,u),f=tc(n,a,s,o);return{activeTooltipIndex:s,activeLabel:u,activePayload:d,activeCoordinate:f}}return null},tp=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,a=t.axisIdKey,l=t.stackGroups,c=t.dataStartIndex,u=t.dataEndIndex,d=e.layout,f=e.children,p=e.stackOffset,h=(0,I.NA)(d,o);return n.reduce(function(t,n){var m=n.props,g=m.type,v=m.dataKey,y=m.allowDataOverflow,b=m.allowDuplicatedCategory,x=m.scale,w=m.ticks,S=m.includeHidden,k=n.props[a];if(t[k])return t;var E=ts(e.data,{graphicalItems:r.filter(function(e){return e.props[a]===k}),dataStartIndex:c,dataEndIndex:u}),C=E.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&(0,R.hj)(r)&&(0,R.hj)(o))return!0}return!1})(n.props.domain,y,g)&&(P=(0,I.LG)(n.props.domain,null,y),h&&("number"===g||"auto"!==x)&&(M=(0,I.gF)(E,v,"category")));var O=tu(g);if(!P||0===P.length){var j,P,N,M,T,A=null!==(T=n.props.domain)&&void 0!==T?T:O;if(v){if(P=(0,I.gF)(E,v,g),"category"===g&&h){var _=(0,R.bv)(P);b&&_?(N=P,P=s()(0,C)):b||(P=(0,I.ko)(A,P,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(e8(e),[t])},[]))}else if("category"===g)P=b?P.filter(function(e){return""!==e&&!i()(e)}):(0,I.ko)(A,P,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||i()(t)?e:[].concat(e8(e),[t])},[]);else if("number"===g){var D=(0,I.ZI)(E,r.filter(function(e){return e.props[a]===k&&(S||!e.props.hide)}),v,o,d);D&&(P=D)}h&&("number"===g||"auto"!==x)&&(M=(0,I.gF)(E,v,"category"))}else P=h?s()(0,C):l&&l[k]&&l[k].hasStack&&"number"===g?"expand"===p?[0,1]:(0,I.EB)(l[k].stackGroups,c,u):(0,I.s6)(E,r.filter(function(e){return e.props[a]===k&&(S||!e.props.hide)}),g,d,!0);"number"===g?(P=eP(f,P,k,o,w),A&&(P=(0,I.LG)(A,P,y))):"category"===g&&A&&P.every(function(e){return A.indexOf(e)>=0})&&(P=A)}return tt(tt({},t),{},tn({},k,tt(tt({},n.props),{},{axisType:o,domain:P,categoricalDomain:M,duplicateDomain:N,originalDomain:null!==(j=n.props.domain)&&void 0!==j?j:O,isCategorical:h,layout:d})))},{})},th=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,l=t.dataStartIndex,c=t.dataEndIndex,u=e.layout,f=e.children,p=ts(e.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),h=p.length,m=(0,I.NA)(u,o),g=-1;return n.reduce(function(e,t){var v,y=t.props[i],b=tu("number");return e[y]?e:(g++,v=m?s()(0,h):a&&a[y]&&a[y].hasStack?eP(f,v=(0,I.EB)(a[y].stackGroups,l,c),y,o):eP(f,v=(0,I.LG)(b,(0,I.s6)(p,n.filter(function(e){return e.props[i]===y&&!e.props.hide}),"number",u),r.defaultProps.allowDataOverflow),y,o),tt(tt({},e),{},tn({},y,tt(tt({axisType:o},r.defaultProps),{},{hide:!0,orientation:d()(to,"".concat(o,".").concat(g%2),null),domain:v,originalDomain:b,isCategorical:m,layout:u}))))},{})},tm=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,i=t.graphicalItems,a=t.stackGroups,l=t.dataStartIndex,c=t.dataEndIndex,s=e.children,u="".concat(r,"Id"),d=(0,P.NN)(s,o),f={};return d&&d.length?f=tp(e,{axes:d,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:l,dataEndIndex:c}):i&&i.length&&(f=th(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:l,dataEndIndex:c})),f},tg=function(e){var t=(0,R.Kt)(e),n=(0,I.uY)(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:p()(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:(0,I.zT)(t,n)}},tv=function(e){var t=e.children,n=e.defaultShowTooltip,r=(0,P.sP)(t,Y),o=0,i=0;return e.data&&0!==e.data.length&&(i=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(i=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},ty=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},tb=function(e,t){var n=e.props,r=e.graphicalItems,o=e.xAxisMap,i=void 0===o?{}:o,a=e.yAxisMap,l=void 0===a?{}:a,c=n.width,s=n.height,u=n.children,f=n.margin||{},p=(0,P.sP)(u,Y),h=(0,P.sP)(u,C.D),m=Object.keys(l).reduce(function(e,t){var n=l[t],r=n.orientation;return n.mirror||n.hide?e:tt(tt({},e),{},tn({},r,e[r]+n.width))},{left:f.left||0,right:f.right||0}),g=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:tt(tt({},e),{},tn({},r,d()(e,"".concat(r))+n.height))},{top:f.top||0,bottom:f.bottom||0}),v=tt(tt({},g),m),y=v.bottom;p&&(v.bottom+=p.props.height||Y.defaultProps.height),h&&t&&(v=(0,I.By)(v,r,n,t));var b=c-v.left-v.right,x=s-v.top-v.bottom;return tt(tt({brushBottom:y},v),{},{width:Math.max(b,0),height:Math.max(x,0)})},tx=function(e){var t,n=e.chartName,o=e.GraphicalChild,a=e.defaultTooltipEventType,c=void 0===a?"axis":a,s=e.validateTooltipEventTypes,u=void 0===s?["axis"]:s,f=e.axisComponents,p=e.legendContent,h=e.formatAxisMap,g=e.defaultProps,y=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,a=t.updateId,l=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,d=e.barGap,p=e.barCategoryGap,h=e.maxBarSize,m=ty(u),g=m.numericAxisName,v=m.cateAxisName,y=!!n&&!!n.length&&n.some(function(e){var t=(0,P.Gf)(e&&e.type);return t&&t.indexOf("Bar")>=0})&&(0,I.pt)({barSize:s,stackGroups:r}),b=[];return n.forEach(function(n,s){var m,x=ts(e.data,{graphicalItems:[n],dataStartIndex:l,dataEndIndex:c}),S=n.props,k=S.dataKey,E=S.maxBarSize,C=n.props["".concat(g,"Id")],O=n.props["".concat(v,"Id")],j=f.reduce(function(e,r){var o,i=t["".concat(r.axisType,"Map")],a=n.props["".concat(r.axisType,"Id")];i&&i[a]||"zAxis"===r.axisType||(0,w.Z)(!1);var l=i[a];return tt(tt({},e),{},(tn(o={},r.axisType,l),tn(o,"".concat(r.axisType,"Ticks"),(0,I.uY)(l)),o))},{}),N=j[v],M=j["".concat(v,"Ticks")],R=r&&r[C]&&r[C].hasStack&&(0,I.O3)(n,r[C].stackGroups),T=(0,P.Gf)(n.type).indexOf("Bar")>=0,A=(0,I.zT)(N,M),_=[];if(T){var D,Z,L=i()(E)?h:E,z=null!==(D=null!==(Z=(0,I.zT)(N,M,!0))&&void 0!==Z?Z:L)&&void 0!==D?D:0;_=(0,I.qz)({barGap:d,barCategoryGap:p,bandSize:z!==A?z:A,sizeList:y[O],maxBarSize:L}),z!==A&&(_=_.map(function(e){return tt(tt({},e),{},{position:tt(tt({},e.position),{},{offset:e.position.offset-z/2})})}))}var B=n&&n.type&&n.type.getComposedData;B&&b.push({props:tt(tt({},B(tt(tt({},j),{},{displayedData:x,props:e,dataKey:k,item:n,bandSize:A,barPosition:_,offset:o,stackedData:R,layout:u,dataStartIndex:l,dataEndIndex:c}))),{},(tn(m={key:n.key||"item-".concat(s)},g,j[g]),tn(m,v,j[v]),tn(m,"animationId",a),m)),childIndex:(0,P.$R)(n,e.children),item:n})}),b},C=function(e,t){var r=e.props,i=e.dataStartIndex,a=e.dataEndIndex,l=e.updateId;if(!(0,P.TT)({props:r}))return null;var c=r.children,s=r.layout,u=r.stackOffset,d=r.data,p=r.reverseStackOrder,m=ty(s),g=m.numericAxisName,v=m.cateAxisName,b=(0,P.NN)(c,o),x=(0,I.wh)(d,b,"".concat(g,"Id"),"".concat(v,"Id"),u,p),w=f.reduce(function(e,t){var n="".concat(t.axisType,"Map");return tt(tt({},e),{},tn({},n,tm(r,tt(tt({},t),{},{graphicalItems:b,stackGroups:t.axisType===g&&x,dataStartIndex:i,dataEndIndex:a}))))},{}),S=tb(tt(tt({},w),{},{props:r,graphicalItems:b}),null==t?void 0:t.legendBBox);Object.keys(w).forEach(function(e){w[e]=h(r,w[e],S,e.replace("Map",""),n)});var k=tg(w["".concat(v,"Map")]),E=y(r,tt(tt({},w),{},{dataStartIndex:i,dataEndIndex:a,updateId:l,graphicalItems:b,stackGroups:x,offset:S}));return tt(tt({formattedGraphicalItems:E,graphicalItems:b,offset:S,stackGroups:x},k),w)};return t=function(e){(function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&e4(e,t)})(s,e);var t,o,a=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=e5(s);return e=t?Reflect.construct(n,arguments,e5(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===e0(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return e3(e)}(this,e)});function s(e){var t,o,c;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,s),tn(e3(c=a.call(this,e)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),tn(e3(c),"accessibilityManager",new eL),tn(e3(c),"handleLegendBBoxUpdate",function(e){if(e){var t=c.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;c.setState(tt({legendBBox:e},C({props:c.props,dataStartIndex:n,dataEndIndex:r,updateId:o},tt(tt({},c.state),{},{legendBBox:e}))))}}),tn(e3(c),"handleReceiveSyncEvent",function(e,t,n){c.props.syncId===e&&(n!==c.eventEmitterSymbol||"function"==typeof c.props.syncMethod)&&c.applySyncEvent(t)}),tn(e3(c),"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==c.state.dataStartIndex||n!==c.state.dataEndIndex){var r=c.state.updateId;c.setState(function(){return tt({dataStartIndex:t,dataEndIndex:n},C({props:c.props,dataStartIndex:t,dataEndIndex:n,updateId:r},c.state))}),c.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),tn(e3(c),"handleMouseEnter",function(e){var t=c.getMouseInfo(e);if(t){var n=tt(tt({},t),{},{isTooltipActive:!0});c.setState(n),c.triggerSyncEvent(n);var r=c.props.onMouseEnter;l()(r)&&r(n,e)}}),tn(e3(c),"triggeredAfterMouseMove",function(e){var t=c.getMouseInfo(e),n=t?tt(tt({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};c.setState(n),c.triggerSyncEvent(n);var r=c.props.onMouseMove;l()(r)&&r(n,e)}),tn(e3(c),"handleItemMouseEnter",function(e){c.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),tn(e3(c),"handleItemMouseLeave",function(){c.setState(function(){return{isTooltipActive:!1}})}),tn(e3(c),"handleMouseMove",function(e){e.persist(),c.throttleTriggeredAfterMouseMove(e)}),tn(e3(c),"handleMouseLeave",function(e){var t={isTooltipActive:!1};c.setState(t),c.triggerSyncEvent(t);var n=c.props.onMouseLeave;l()(n)&&n(t,e)}),tn(e3(c),"handleOuterEvent",function(e){var t,n=(0,P.Bh)(e),r=d()(c.props,"".concat(n));n&&l()(r)&&r(null!==(t=/.*touch.*/i.test(n)?c.getMouseInfo(e.changedTouches[0]):c.getMouseInfo(e))&&void 0!==t?t:{},e)}),tn(e3(c),"handleClick",function(e){var t=c.getMouseInfo(e);if(t){var n=tt(tt({},t),{},{isTooltipActive:!0});c.setState(n),c.triggerSyncEvent(n);var r=c.props.onClick;l()(r)&&r(n,e)}}),tn(e3(c),"handleMouseDown",function(e){var t=c.props.onMouseDown;l()(t)&&t(c.getMouseInfo(e),e)}),tn(e3(c),"handleMouseUp",function(e){var t=c.props.onMouseUp;l()(t)&&t(c.getMouseInfo(e),e)}),tn(e3(c),"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&c.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),tn(e3(c),"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&c.handleMouseDown(e.changedTouches[0])}),tn(e3(c),"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&c.handleMouseUp(e.changedTouches[0])}),tn(e3(c),"triggerSyncEvent",function(e){void 0!==c.props.syncId&&eR.emit(eT,c.props.syncId,e,c.eventEmitterSymbol)}),tn(e3(c),"applySyncEvent",function(e){var t=c.props,n=t.layout,r=t.syncMethod,o=c.state.updateId,i=e.dataStartIndex,a=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)c.setState(tt({dataStartIndex:i,dataEndIndex:a},C({props:c.props,dataStartIndex:i,dataEndIndex:a,updateId:o},c.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,s=e.chartY,u=e.activeTooltipIndex,d=c.state,f=d.offset,p=d.tooltipTicks;if(!f)return;if("function"==typeof r)u=r(p,e);else if("value"===r){u=-1;for(var h=0;h<p.length;h++)if(p[h].value===e.activeLabel){u=h;break}}var m=tt(tt({},f),{},{x:f.left,y:f.top}),g=Math.min(l,m.x+m.width),v=Math.min(s,m.y+m.height),y=p[u]&&p[u].value,b=td(c.state,c.props.data,u),x=p[u]?{x:"horizontal"===n?p[u].coordinate:g,y:"horizontal"===n?v:p[u].coordinate}:ta;c.setState(tt(tt({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:b,activeTooltipIndex:u}))}else c.setState(e)}),tn(e3(c),"renderCursor",function(e){var t,o=c.state,i=o.isTooltipActive,a=o.activeCoordinate,l=o.activePayload,s=o.offset,u=o.activeTooltipIndex,d=o.tooltipAxisBandSize,f=c.getTooltipEventType(),p=null!==(t=e.props.active)&&void 0!==t?t:i,h=c.props.layout,m=e.key||"_recharts-cursor";return r.createElement(eY,{key:m,activeCoordinate:a,activePayload:l,activeTooltipIndex:u,chartName:n,element:e,isActive:p,layout:h,offset:s,tooltipAxisBandSize:d,tooltipEventType:f})}),tn(e3(c),"renderPolarAxis",function(e,t,n){var o=d()(e,"type.axisType"),i=d()(c.state,"".concat(o,"Map")),a=i&&i[e.props["".concat(o,"Id")]];return(0,r.cloneElement)(e,tt(tt({},a),{},{className:o,key:e.key||"".concat(t,"-").concat(n),ticks:(0,I.uY)(a,!0)}))}),tn(e3(c),"renderGrid",function(e){var t=c.state,n=t.xAxisMap,o=t.yAxisMap,i=t.offset,a=(0,R.Kt)(n),l=v()(o,function(e){return b()(e.domain,Number.isFinite)})||(0,R.Kt)(o),s=e.props||{};return(0,r.cloneElement)(e,{key:e.key||"grid",x:(0,R.hj)(s.x)?s.x:i.left,y:(0,R.hj)(s.y)?s.y:i.top,width:(0,R.hj)(s.width)?s.width:i.width,height:(0,R.hj)(s.height)?s.height:i.height,xAxis:a,yAxis:l,verticalCoordinatesGenerator:s.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:s.horizontalCoordinatesGenerator})}),tn(e3(c),"renderPolarGrid",function(e){var t=e.props,n=t.radialLines,o=t.polarAngles,i=t.polarRadius,a=c.state,l=a.radiusAxisMap,s=a.angleAxisMap,u=(0,R.Kt)(l),d=(0,R.Kt)(s),f=d.cx,p=d.cy,h=d.innerRadius,m=d.outerRadius;return(0,r.cloneElement)(e,{polarAngles:Array.isArray(o)?o:(0,I.uY)(d,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(i)?i:(0,I.uY)(u,!0).map(function(e){return e.coordinate}),cx:f,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:n})}),tn(e3(c),"renderLegend",function(){var e=c.state.formattedGraphicalItems,t=c.props,n=t.children,o=t.width,i=t.height,a=c.props.margin||{},l=o-(a.left||0)-(a.right||0),s=(0,J.z)({children:n,formattedGraphicalItems:e,legendWidth:l,legendContent:p});if(!s)return null;var u=s.item,d=e6(s,eQ);return(0,r.cloneElement)(u,tt(tt({},d),{},{chartWidth:o,chartHeight:i,margin:a,onBBoxUpdate:c.handleLegendBBoxUpdate}))}),tn(e3(c),"renderTooltip",function(){var e,t=c.props.children,n=(0,P.sP)(t,E.u);if(!n)return null;var o=c.state,i=o.isTooltipActive,a=o.activeCoordinate,l=o.activePayload,s=o.activeLabel,u=o.offset,d=null!==(e=n.props.active)&&void 0!==e?e:i;return(0,r.cloneElement)(n,{viewBox:tt(tt({},u),{},{x:u.left,y:u.top}),active:d,label:s,payload:d?l:[],coordinate:a})}),tn(e3(c),"renderBrush",function(e){var t=c.props,n=t.margin,o=t.data,i=c.state,a=i.offset,l=i.dataStartIndex,s=i.dataEndIndex,u=i.updateId;return(0,r.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:(0,I.DO)(c.handleBrushChange,e.props.onChange),data:o,x:(0,R.hj)(e.props.x)?e.props.x:a.left,y:(0,R.hj)(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(n.bottom||0),width:(0,R.hj)(e.props.width)?e.props.width:a.width,startIndex:l,endIndex:s,updateId:"brush-".concat(u)})}),tn(e3(c),"renderReferenceElement",function(e,t,n){if(!e)return null;var o=e3(c).clipPathId,i=c.state,a=i.xAxisMap,l=i.yAxisMap,s=i.offset,u=e.props,d=u.xAxisId,f=u.yAxisId;return(0,r.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(n),xAxis:a[d],yAxis:l[f],viewBox:{x:s.left,y:s.top,width:s.width,height:s.height},clipPathId:o})}),tn(e3(c),"renderActivePoints",function(e){var t=e.item,n=e.activePoint,r=e.basePoint,o=e.childIndex,i=e.isRange,a=[],l=t.props.key,c=t.item.props,u=c.activeDot,d=tt(tt({index:o,dataKey:c.dataKey,cx:n.x,cy:n.y,r:4,fill:(0,I.fk)(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value,key:"".concat(l,"-activePoint-").concat(o)},(0,P.L6)(u,!1)),(0,eA.Ym)(u));return a.push(s.renderActiveDot(u,d)),r?a.push(s.renderActiveDot(u,tt(tt({},d),{},{cx:r.x,cy:r.y,key:"".concat(l,"-basePoint-").concat(o)}))):i&&a.push(null),a}),tn(e3(c),"renderGraphicChild",function(e,t,n){var o=c.filterFormatItem(e,t,n);if(!o)return null;var a=c.getTooltipEventType(),l=c.state,s=l.isTooltipActive,u=l.tooltipAxis,d=l.activeTooltipIndex,f=l.activeLabel,p=c.props.children,h=(0,P.sP)(p,E.u),m=o.props,g=m.points,v=m.isRange,y=m.baseLine,b=o.item.props,x=b.activeDot,w=b.hide,S=b.activeBar,k=b.activeShape,C={};"axis"!==a&&h&&"click"===h.props.trigger?C={onClick:(0,I.DO)(c.handleItemMouseEnter,e.props.onClick)}:"axis"!==a&&(C={onMouseLeave:(0,I.DO)(c.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:(0,I.DO)(c.handleItemMouseEnter,e.props.onMouseEnter)});var O=(0,r.cloneElement)(e,tt(tt({},o.props),C));if(!w&&s&&h&&(x||S||k)){if(d>=0){if(u.dataKey&&!u.allowDuplicatedCategory){var j="function"==typeof u.dataKey?function(e){return"function"==typeof u.dataKey?u.dataKey(e.payload):null}:"payload.".concat(u.dataKey.toString());M=(0,R.Ap)(g,j,f),T=v&&y&&(0,R.Ap)(y,j,f)}else M=null==g?void 0:g[d],T=v&&y&&y[d];if(k||S){var N=void 0!==e.props.activeIndex?e.props.activeIndex:d;return[(0,r.cloneElement)(e,tt(tt(tt({},o.props),C),{},{activeIndex:N})),null,null]}if(!i()(M))return[O].concat(e8(c.renderActivePoints({item:o,activePoint:M,basePoint:T,childIndex:d,isRange:v})))}else{var M,T,A,_=(null!==(A=c.getItemByXY(c.state.activeCoordinate))&&void 0!==A?A:{graphicalItem:O}).graphicalItem,D=_.item,Z=void 0===D?e:D,L=_.childIndex,z=tt(tt(tt({},o.props),C),{},{activeIndex:L});return[(0,r.cloneElement)(Z,z),null,null]}}return v?[O,null,null]:[O,null]}),tn(e3(c),"renderCustomized",function(e,t,n){return(0,r.cloneElement)(e,tt(tt({key:"recharts-customized-".concat(n)},c.props),c.state))}),tn(e3(c),"renderMap",{CartesianGrid:{handler:c.renderGrid,once:!0},ReferenceArea:{handler:c.renderReferenceElement},ReferenceLine:{handler:tl},ReferenceDot:{handler:c.renderReferenceElement},XAxis:{handler:tl},YAxis:{handler:tl},Brush:{handler:c.renderBrush,once:!0},Bar:{handler:c.renderGraphicChild},Line:{handler:c.renderGraphicChild},Area:{handler:c.renderGraphicChild},Radar:{handler:c.renderGraphicChild},RadialBar:{handler:c.renderGraphicChild},Scatter:{handler:c.renderGraphicChild},Pie:{handler:c.renderGraphicChild},Funnel:{handler:c.renderGraphicChild},Tooltip:{handler:c.renderCursor,once:!0},PolarGrid:{handler:c.renderPolarGrid,once:!0},PolarAngleAxis:{handler:c.renderPolarAxis},PolarRadiusAxis:{handler:c.renderPolarAxis},Customized:{handler:c.renderCustomized}}),c.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:(0,R.EL)("recharts"),"-clip"),c.throttleTriggeredAfterMouseMove=m()(c.triggeredAfterMouseMove,null!==(o=e.throttleDelay)&&void 0!==o?o:1e3/60),c.state={},c}return o=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,i=(0,P.sP)(t,E.u);if(i){var a=i.props.defaultIndex;if("number"==typeof a&&!(a<0)&&!(a>this.state.tooltipTicks.length)){var l=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,c=td(this.state,n,a,l),s=this.state.tooltipTicks[a].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:s,y:u}:{y:s,x:u},f=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});f&&(d=tt(tt({},d),f.props.points[a].tooltipPosition),c=f.props.points[a].tooltipPayload);var p={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:l,activePayload:c,activeCoordinate:d};this.setState(p),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin){var n,r;this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}})}return null}},{key:"componentDidUpdate",value:function(e){(0,P.rL)([(0,P.sP)(e.children,E.u)],[(0,P.sP)(this.props.children,E.u)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=(0,P.sP)(this.props.children,E.u);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return u.indexOf(t)>=0?t:c}return c}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=(0,Q.os)(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},i=n.width/t.offsetWidth||1,a=this.inRange(o.chartX,o.chartY,i);if(!a)return null;var l=this.state,c=l.xAxisMap,s=l.yAxisMap;if("axis"!==this.getTooltipEventType()&&c&&s){var u=(0,R.Kt)(c).scale,d=(0,R.Kt)(s).scale,f=u&&u.invert?u.invert(o.chartX):null,p=d&&d.invert?d.invert(o.chartY):null;return tt(tt({},o),{},{xValue:f,yValue:p})}var h=tf(this.state,this.props.data,this.props.layout,a);return h?tt(tt({},o),h):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,i=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var l=this.state,c=l.angleAxisMap,s=l.radiusAxisMap;if(c&&s){var u=(0,R.Kt)(c);return(0,eN.z3)({x:o,y:i},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=(0,P.sP)(e,E.u),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),tt(tt({},(0,eA.Ym)(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){eR.on(eT,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eR.removeListener(eT,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,i=r.length;o<i;o++){var a=r[o];if(a.item===e||a.props.key===e.key||t===(0,P.Gf)(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,o=t.top,i=t.height,a=t.width;return r.createElement("defs",null,r.createElement("clipPath",{id:e},r.createElement("rect",{x:n,y:o,height:i,width:a})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=e2(t,2),r=n[0],o=n[1];return tt(tt({},e),{},tn({},r,o.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=e2(t,2),r=n[0],o=n[1];return tt(tt({},e),{},tn({},r,o.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,i=n.length;o<i;o++){var a=n[o],l=a.props,c=a.item,s=(0,P.Gf)(c.type);if("Bar"===s){var u=(l.data||[]).find(function(t){return(0,j.X)(e,t)});if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===s){var d=(l.data||[]).find(function(t){return(0,eN.z3)(e,t)});if(d)return{graphicalItem:a,payload:d}}else if((0,ez.lT)(a,r)||(0,ez.V$)(a,r)||(0,ez.w7)(a,r)){var f=(0,ez.a3)({graphicalItem:a,activeTooltipItem:r,itemData:c.props.data}),p=void 0===c.props.activeIndex?f:c.props.activeIndex;return{graphicalItem:tt(tt({},a),{},{childIndex:p}),payload:(0,ez.w7)(a,r)?c.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var e,t,n=this;if(!(0,P.TT)(this))return null;var o=this.props,i=o.children,a=o.className,l=o.width,c=o.height,s=o.style,u=o.compact,d=o.title,f=o.desc,p=e6(o,eJ),h=(0,P.L6)(p,!1);if(u)return r.createElement(S.T,e1({},h,{width:l,height:c,title:d,desc:f}),this.renderClipPath(),(0,P.eu)(i,this.renderMap));this.props.accessibilityLayer&&(h.tabIndex=null!==(e=this.props.tabIndex)&&void 0!==e?e:0,h.role=null!==(t=this.props.role)&&void 0!==t?t:"img",h.onKeyDown=function(e){n.accessibilityManager.keyboardEvent(e)},h.onFocus=function(){n.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return r.createElement(ef.br,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},r.createElement("div",e1({className:(0,x.Z)("recharts-wrapper",a),style:tt({position:"relative",cursor:"default",width:l,height:c},s)},m,{ref:function(e){n.container=e},role:"region"}),r.createElement(S.T,e1({},h,{width:l,height:c,title:d,desc:f,style:ti}),this.renderClipPath(),(0,P.eu)(i,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tr(r.key),r)}}(s.prototype,o),Object.defineProperty(s,"prototype",{writable:!1}),s}(r.Component),tn(t,"displayName",n),tn(t,"defaultProps",tt({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},g)),tn(t,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,o=e.children,a=e.width,l=e.height,c=e.layout,s=e.stackOffset,u=e.margin,d=t.dataStartIndex,f=t.dataEndIndex;if(void 0===t.updateId){var p=tv(e);return tt(tt(tt({},p),{},{updateId:0},C(tt(tt({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:l,prevLayout:c,prevStackOffset:s,prevMargin:u,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||l!==t.prevHeight||c!==t.prevLayout||s!==t.prevStackOffset||!(0,eM.w)(u,t.prevMargin)){var h=tv(e),m={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=tt(tt({},tf(t,r,c)),{},{updateId:t.updateId+1}),v=tt(tt(tt({},h),m),g);return tt(tt(tt({},v),C(tt({props:e},v),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:l,prevLayout:c,prevStackOffset:s,prevMargin:u,prevChildren:o})}if(!(0,P.rL)(o,t.prevChildren)){var y,b,x,w,S=(0,P.sP)(o,Y),k=S&&null!==(y=null===(b=S.props)||void 0===b?void 0:b.startIndex)&&void 0!==y?y:d,E=S&&null!==(x=null===(w=S.props)||void 0===w?void 0:w.endIndex)&&void 0!==x?x:f,O=i()(r)||k!==d||E!==f?t.updateId+1:t.updateId;return tt(tt({updateId:O},C(tt(tt({props:e},t),{},{updateId:O,dataStartIndex:k,dataEndIndex:E}),t)),{},{prevChildren:o,dataStartIndex:k,dataEndIndex:E})}return null}),tn(t,"renderActiveDot",function(e,t){var n;return n=(0,r.isValidElement)(e)?(0,r.cloneElement)(e,t):l()(e)?e(t):r.createElement(O.o,t),r.createElement(k.m,{className:"recharts-active-dot",key:t.key},n)}),t}},20407:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var r=function(e){return null};r.displayName="Cell"},26680:function(e,t,n){"use strict";n.d(t,{_:function(){return C}});var r=n(2265),o=n(77571),i=n.n(o),a=n(86757),l=n.n(a),c=n(28302),s=n.n(c),u=n(61994),d=n(58811),f=n(82944),p=n(16630),h=n(39206);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var g=["offset"];function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==m(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var w=function(e){var t=e.value,n=e.formatter,r=i()(e.children)?t:e.children;return l()(n)?n(r):r},S=function(e,t,n){var o,a,l=e.position,c=e.viewBox,s=e.offset,d=e.className,f=c.cx,m=c.cy,g=c.innerRadius,v=c.outerRadius,y=c.startAngle,b=c.endAngle,w=c.clockWise,S=(g+v)/2,k=(0,p.uY)(b-y)*Math.min(Math.abs(b-y),360),E=k>=0?1:-1;"insideStart"===l?(o=y+E*s,a=w):"insideEnd"===l?(o=b-E*s,a=!w):"end"===l&&(o=b+E*s,a=w),a=k<=0?a:!a;var C=(0,h.op)(f,m,S,o),O=(0,h.op)(f,m,S,o+(a?1:-1)*359),j="M".concat(C.x,",").concat(C.y,"\n A").concat(S,",").concat(S,",0,1,").concat(a?0:1,",\n ").concat(O.x,",").concat(O.y),P=i()(e.id)?(0,p.EL)("recharts-radial-line-"):e.id;return r.createElement("text",x({},n,{dominantBaseline:"central",className:(0,u.Z)("recharts-radial-bar-label",d)}),r.createElement("defs",null,r.createElement("path",{id:P,d:j})),r.createElement("textPath",{xlinkHref:"#".concat(P)},t))},k=function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t.cx,i=t.cy,a=t.innerRadius,l=t.outerRadius,c=(t.startAngle+t.endAngle)/2;if("outside"===r){var s=(0,h.op)(o,i,l+n,c),u=s.x;return{x:u,y:s.y,textAnchor:u>=o?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(0,h.op)(o,i,(a+l)/2,c);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}},E=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,i=t.x,a=t.y,l=t.width,c=t.height,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",h=u>0?"start":"end",m=l>=0?1:-1,g=m*r,v=m>0?"end":"start",y=m>0?"start":"end";if("top"===o)return b(b({},{x:i+l/2,y:a-u*r,textAnchor:"middle",verticalAnchor:f}),n?{height:Math.max(a-n.y,0),width:l}:{});if("bottom"===o)return b(b({},{x:i+l/2,y:a+c+d,textAnchor:"middle",verticalAnchor:h}),n?{height:Math.max(n.y+n.height-(a+c),0),width:l}:{});if("left"===o){var x={x:i-g,y:a+c/2,textAnchor:v,verticalAnchor:"middle"};return b(b({},x),n?{width:Math.max(x.x-n.x,0),height:c}:{})}if("right"===o){var w={x:i+l+g,y:a+c/2,textAnchor:y,verticalAnchor:"middle"};return b(b({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:c}:{})}var S=n?{width:l,height:c}:{};return"insideLeft"===o?b({x:i+g,y:a+c/2,textAnchor:y,verticalAnchor:"middle"},S):"insideRight"===o?b({x:i+l-g,y:a+c/2,textAnchor:v,verticalAnchor:"middle"},S):"insideTop"===o?b({x:i+l/2,y:a+d,textAnchor:"middle",verticalAnchor:h},S):"insideBottom"===o?b({x:i+l/2,y:a+c-d,textAnchor:"middle",verticalAnchor:f},S):"insideTopLeft"===o?b({x:i+g,y:a+d,textAnchor:y,verticalAnchor:h},S):"insideTopRight"===o?b({x:i+l-g,y:a+d,textAnchor:v,verticalAnchor:h},S):"insideBottomLeft"===o?b({x:i+g,y:a+c-d,textAnchor:y,verticalAnchor:f},S):"insideBottomRight"===o?b({x:i+l-g,y:a+c-d,textAnchor:v,verticalAnchor:f},S):s()(o)&&((0,p.hj)(o.x)||(0,p.hU)(o.x))&&((0,p.hj)(o.y)||(0,p.hU)(o.y))?b({x:i+(0,p.h1)(o.x,l),y:a+(0,p.h1)(o.y,c),textAnchor:"end",verticalAnchor:"end"},S):b({x:i+l/2,y:a+c/2,textAnchor:"middle",verticalAnchor:"middle"},S)};function C(e){var t,n=e.offset,o=b({offset:void 0===n?5:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,g)),a=o.viewBox,c=o.position,s=o.value,h=o.children,m=o.content,v=o.className,y=o.textBreakAll;if(!a||i()(s)&&i()(h)&&!(0,r.isValidElement)(m)&&!l()(m))return null;if((0,r.isValidElement)(m))return(0,r.cloneElement)(m,o);if(l()(m)){if(t=(0,r.createElement)(m,o),(0,r.isValidElement)(t))return t}else t=w(o);var C="cx"in a&&(0,p.hj)(a.cx),O=(0,f.L6)(o,!0);if(C&&("insideStart"===c||"insideEnd"===c||"end"===c))return S(o,t,O);var j=C?k(o):E(o);return r.createElement(d.x,x({className:(0,u.Z)("recharts-label",void 0===v?"":v)},O,j,{breakAll:y}),t)}C.displayName="Label";var O=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,l=e.radius,c=e.innerRadius,s=e.outerRadius,u=e.x,d=e.y,f=e.top,h=e.left,m=e.width,g=e.height,v=e.clockWise,y=e.labelViewBox;if(y)return y;if((0,p.hj)(m)&&(0,p.hj)(g)){if((0,p.hj)(u)&&(0,p.hj)(d))return{x:u,y:d,width:m,height:g};if((0,p.hj)(f)&&(0,p.hj)(h))return{x:f,y:h,width:m,height:g}}return(0,p.hj)(u)&&(0,p.hj)(d)?{x:u,y:d,width:0,height:0}:(0,p.hj)(t)&&(0,p.hj)(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:i||r||0,innerRadius:c||0,outerRadius:s||l||a||0,clockWise:v}:e.viewBox?e.viewBox:{}};C.parseViewBox=O,C.renderCallByParent=function(e,t){var n,o,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&i&&!e.label)return null;var a=e.children,c=O(e),u=(0,f.NN)(a,C).map(function(e,n){return(0,r.cloneElement)(e,{viewBox:t||c,key:"label-".concat(n)})});return i?[(n=e.label,o=t||c,n?!0===n?r.createElement(C,{key:"label-implicit",viewBox:o}):(0,p.P2)(n)?r.createElement(C,{key:"label-implicit",viewBox:o,value:n}):(0,r.isValidElement)(n)?n.type===C?(0,r.cloneElement)(n,{key:"label-implicit",viewBox:o}):r.createElement(C,{key:"label-implicit",content:n,viewBox:o}):l()(n)?r.createElement(C,{key:"label-implicit",content:n,viewBox:o}):s()(n)?r.createElement(C,x({viewBox:o},n,{key:"label-implicit"})):null:null)].concat(function(e){if(Array.isArray(e))return v(e)}(u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||function(e,t){if(e){if("string"==typeof e)return v(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,void 0)}}(u)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):u}},58772:function(e,t,n){"use strict";n.d(t,{e:function(){return C}});var r=n(2265),o=n(77571),i=n.n(o),a=n(28302),l=n.n(a),c=n(86757),s=n.n(c),u=n(86185),d=n.n(u),f=n(26680),p=n(9841),h=n(82944),m=n(85355);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var v=["valueAccessor"],y=["data","dataKey","clockWise","id","textBreakAll"];function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(e){return Array.isArray(e.value)?d()(e.value):e.value};function C(e){var t=e.valueAccessor,n=void 0===t?E:t,o=k(e,v),a=o.data,l=o.dataKey,c=o.clockWise,s=o.id,u=o.textBreakAll,d=k(o,y);return a&&a.length?r.createElement(p.m,{className:"recharts-label-list"},a.map(function(e,t){var o=i()(l)?n(e,t):(0,m.F$)(e&&e.payload,l),a=i()(s)?{}:{id:"".concat(s,"-").concat(t)};return r.createElement(f._,x({},(0,h.L6)(e,!0),d,a,{parentViewBox:e.parentViewBox,value:o,textBreakAll:u,viewBox:f._.parseViewBox(i()(c)?e:S(S({},e),{},{clockWise:c})),key:"label-".concat(t),index:t}))})):null}C.displayName="LabelList",C.renderCallByParent=function(e,t){var n,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&o&&!e.label)return null;var i=e.children,a=(0,h.NN)(i,C).map(function(e,n){return(0,r.cloneElement)(e,{data:t,key:"labelList-".concat(n)})});return o?[(n=e.label)?!0===n?r.createElement(C,{key:"labelList-implicit",data:t}):r.isValidElement(n)||s()(n)?r.createElement(C,{key:"labelList-implicit",data:t,content:n}):l()(n)?r.createElement(C,x({data:t},n,{key:"labelList-implicit"})):null:null].concat(function(e){if(Array.isArray(e))return b(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return b(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,void 0)}}(a)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):a}},22190:function(e,t,n){"use strict";n.d(t,{D:function(){return R}});var r=n(2265),o=n(86757),i=n.n(o),a=n(61994),l=n(1175),c=n(48777),s=n(14870),u=n(41637);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(y,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=m(y);return e=t?Reflect.construct(n,arguments,m(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(){return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,y),o.apply(this,arguments)}return n=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=32/6,o=32/3,i=e.inactive?t:e.color;if("plainline"===e.type)return r.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:16,x2:32,y2:16,className:"recharts-legend-icon"});if("line"===e.type)return r.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(16,"h").concat(o,"\n A").concat(n,",").concat(n,",0,1,1,").concat(2*o,",").concat(16,"\n H").concat(32,"M").concat(2*o,",").concat(16,"\n A").concat(n,",").concat(n,",0,1,1,").concat(o,",").concat(16),className:"recharts-legend-icon"});if("rect"===e.type)return r.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(4,"h").concat(32,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(r.isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete a.legendIcon,r.cloneElement(e.legendIcon,a)}return r.createElement(s.v,{fill:i,cx:16,cy:16,size:32,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,o=t.iconSize,s=t.layout,d=t.formatter,p=t.inactiveColor,h={x:0,y:0,width:32,height:32},m={display:"horizontal"===s?"inline-block":"block",marginRight:10},v={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map(function(t,n){var s,y=t.formatter||d,b=(0,a.Z)((g(s={"recharts-legend-item":!0},"legend-item-".concat(n),!0),g(s,"inactive",t.inactive),s));if("none"===t.type)return null;var x=i()(t.value)?null:t.value;(0,l.Z)(!i()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var w=t.inactive?p:t.color;return r.createElement("li",f({className:b,style:m,key:"legend-item-".concat(n)},(0,u.bw)(e.props,t,n)),r.createElement(c.T,{width:o,height:o,viewBox:h,style:v},e.renderIcon(t)),r.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},y?y(x,t,n):x))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,o=e.align;return t&&t.length?r.createElement("ul",{className:"recharts-default-legend",style:{padding:0,margin:0,textAlign:"horizontal"===n?o:"left"}},this.renderItems()):null}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}(y.prototype,n),Object.defineProperty(y,"prototype",{writable:!1}),y}(r.PureComponent);g(y,"displayName","Legend"),g(y,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var b=n(16630),x=n(93528);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var S=["ref"];function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function O(e,t){return(O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e,t,n){return(t=M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){var t=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==w(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===w(t)?t:String(t)}function I(e){return e.value}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(a,e);var t,n,o,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=P(a);return e=t?Reflect.construct(n,arguments,P(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return j(e)}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(j(e=i.call.apply(i,[this].concat(n))),"lastBoundingBox",{width:-1,height:-1}),e}return n=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?E({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,l=r.margin,c=r.chartWidth,s=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===i&&"vertical"===o?{left:((c||0)-this.getBBoxSnapshot().width)/2}:"right"===i?{right:l&&l.right||0}:{left:l&&l.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:l&&l.bottom||0}:{top:l&&l.top||0}),E(E({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,o=t.width,i=t.height,a=t.wrapperStyle,l=t.payloadUniqBy,c=t.payload,s=E(E({position:"absolute",width:o||"auto",height:i||"auto"},this.getDefaultPosition(a)),a);return r.createElement("div",{className:"recharts-legend-wrapper",style:s,ref:function(t){e.wrapperNode=t}},function(e,t){if(r.isValidElement(e))return r.cloneElement(e,t);if("function"==typeof e)return r.createElement(e,t);t.ref;var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,S);return r.createElement(y,n)}(n,E(E({},this.props),{},{payload:(0,x.z)(c,l,I)})))}}],o=[{key:"getWithHeight",value:function(e,t){var n=e.props.layout;return"vertical"===n&&(0,b.hj)(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],n&&C(a.prototype,n),o&&C(a,o),Object.defineProperty(a,"prototype",{writable:!1}),a}(r.PureComponent);N(R,"displayName","Legend"),N(R,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"})},47625:function(e,t,n){"use strict";n.d(t,{h:function(){return m}});var r=n(61994),o=n(2265),i=n(37065),a=n.n(i),l=n(82558),c=n(16630),s=n(1175),u=n(82944);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=(0,o.forwardRef)(function(e,t){var n,i=e.aspect,d=e.initialDimension,f=void 0===d?{width:-1,height:-1}:d,m=e.width,g=void 0===m?"100%":m,v=e.height,y=void 0===v?"100%":v,b=e.minWidth,x=void 0===b?0:b,w=e.minHeight,S=e.maxHeight,k=e.children,E=e.debounce,C=void 0===E?0:E,O=e.id,j=e.className,P=e.onResize,N=e.style,M=(0,o.useRef)(null),I=(0,o.useRef)();I.current=P,(0,o.useImperativeHandle)(t,function(){return Object.assign(M.current,{get current(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),M.current}})});var R=function(e){if(Array.isArray(e))return e}(n=(0,o.useState)({containerWidth:f.width,containerHeight:f.height}))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,2)||function(e,t){if(e){if("string"==typeof e)return h(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),T=R[0],A=R[1],_=(0,o.useCallback)(function(e,t){A(function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);(0,o.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;_(r,o),null===(t=I.current)||void 0===t||t.call(I,r,o)};C>0&&(e=a()(e,C,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=M.current.getBoundingClientRect();return _(n.width,n.height),t.observe(M.current),function(){t.disconnect()}},[_,C]);var D=(0,o.useMemo)(function(){var e=T.containerWidth,t=T.containerHeight;if(e<0||t<0)return null;(0,s.Z)((0,c.hU)(g)||(0,c.hU)(y),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",g,y),(0,s.Z)(!i||i>0,"The aspect(%s) must be greater than zero.",i);var n=(0,c.hU)(g)?e:g,r=(0,c.hU)(y)?t:y;i&&i>0&&(n?r=n/i:r&&(n=r*i),S&&r>S&&(r=S)),(0,s.Z)(n>0||r>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",n,r,g,y,x,w,i);var a=!Array.isArray(k)&&(0,l.isElement)(k)&&(0,u.Gf)(k.type).endsWith("Chart");return o.Children.map(k,function(e){return(0,l.isElement)(e)?(0,o.cloneElement)(e,p({width:n,height:r},a?{style:p({height:"100%",width:"100%",maxHeight:r,maxWidth:n},e.props.style)}:{})):e})},[i,k,y,S,w,x,T,g]);return o.createElement("div",{id:O?"".concat(O):void 0,className:(0,r.Z)("recharts-responsive-container",j),style:p(p({},void 0===N?{}:N),{},{width:g,height:y,minWidth:x,minHeight:w,maxHeight:S}),ref:M},D)})},58811:function(e,t,n){"use strict";n.d(t,{x:function(){return Z}});var r=n(2265),o=n(77571),i=n.n(o),a=n(61994),l=n(16630),c=n(34067),s=n(82944),u=n(4094);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}(r.key),r)}}var m=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,g=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,v=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,y=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,b={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},x=Object.keys(b),w=function(){var e,t;function n(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.num=e,this.unit=t,this.num=e,this.unit=t,Number.isNaN(e)&&(this.unit=""),""===t||v.test(t)||(this.num=NaN,this.unit=""),x.includes(t)&&(this.num=e*b[t],this.unit="px")}return e=[{key:"add",value:function(e){return this.unit!==e.unit?new n(NaN,""):new n(this.num+e.num,this.unit)}},{key:"subtract",value:function(e){return this.unit!==e.unit?new n(NaN,""):new n(this.num-e.num,this.unit)}},{key:"multiply",value:function(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new n(NaN,""):new n(this.num*e.num,this.unit||e.unit)}},{key:"divide",value:function(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new n(NaN,""):new n(this.num/e.num,this.unit||e.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],t=[{key:"parse",value:function(e){var t,r=f(null!==(t=y.exec(e))&&void 0!==t?t:[],3),o=r[1],i=r[2];return new n(parseFloat(o),null!=i?i:"")}}],e&&h(n.prototype,e),t&&h(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();function S(e){if(e.includes("NaN"))return"NaN";for(var t=e;t.includes("*")||t.includes("/");){var n,r=f(null!==(n=m.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],l=w.parse(null!=o?o:""),c=w.parse(null!=a?a:""),s="*"===i?l.multiply(c):l.divide(c);if(s.isNaN())return"NaN";t=t.replace(m,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,d=f(null!==(u=g.exec(t))&&void 0!==u?u:[],4),p=d[1],h=d[2],v=d[3],y=w.parse(null!=p?p:""),b=w.parse(null!=v?v:""),x="+"===h?y.add(b):y.subtract(b);if(x.isNaN())return"NaN";t=t.replace(g,x.toString())}return t}var k=/\(([^()]*)\)/;function E(e){var t=function(e){try{var t;return t=e.replace(/\s+/g,""),t=function(e){for(var t=e;t.includes("(");){var n=f(k.exec(t),2)[1];t=t.replace(k,S(n))}return t}(t),t=S(t)}catch(e){return"NaN"}}(e.slice(5,-1));return"NaN"===t?"":t}var C=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],O=["dx","dy","angle","className","breakAll"];function j(){return(j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function P(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I=/[ \f\n\r\t\v\u2028\u2029]+/,R=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];i()(t)||(o=n?t.toString().split(""):t.toString().split(I));var a=o.map(function(e){return{word:e,width:(0,u.xE)(e,r).width}}),l=n?0:(0,u.xE)("\xa0",r).width;return{wordsWithComputedWidth:a,spaceWidth:l}}catch(e){return null}},T=function(e,t,n,r,o){var i,a=e.maxLines,c=e.children,s=e.style,u=e.breakAll,d=(0,l.hj)(a),f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(function(e,t){var i=t.word,a=t.width,l=e[e.length-1];return l&&(null==r||o||l.width+a+n<Number(r))?(l.words.push(i),l.width+=a+n):e.push({words:[i],width:a}),e},[])},p=f(t);if(!d)return p;for(var h=function(e){var t=f(R({breakAll:u,style:s,children:c.slice(0,e)+"…"}).wordsWithComputedWidth);return[t.length>a||t.reduce(function(e,t){return e.width>t.width?e:t}).width>Number(r),t]},m=0,g=c.length-1,v=0;m<=g&&v<=c.length-1;){var y=Math.floor((m+g)/2),b=N(h(y-1),2),x=b[0],w=b[1],S=N(h(y),1)[0];if(x||S||(m=y+1),x&&S&&(g=y-1),!x&&S){i=w;break}v++}return i||p},A=function(e){return[{words:i()(e)?[]:e.toString().split(I)}]},_=function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!c.x.isSsr){var l=R({breakAll:i,children:r,style:o});return l?T({breakAll:i,children:r,maxLines:a,style:o},l.wordsWithComputedWidth,l.spaceWidth,t,n):A(r)}return A(r)},D="#808080",Z=function(e){var t,n=e.x,o=void 0===n?0:n,i=e.y,c=void 0===i?0:i,u=e.lineHeight,d=void 0===u?"1em":u,f=e.capHeight,p=void 0===f?"0.71em":f,h=e.scaleToFit,m=void 0!==h&&h,g=e.textAnchor,v=e.verticalAnchor,y=e.fill,b=void 0===y?D:y,x=P(e,C),w=(0,r.useMemo)(function(){return _({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:m,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,m,x.style,x.width]),S=x.dx,k=x.dy,N=x.angle,M=x.className,I=x.breakAll,R=P(x,O);if(!(0,l.P2)(o)||!(0,l.P2)(c))return null;var T=o+((0,l.hj)(S)?S:0),A=c+((0,l.hj)(k)?k:0);switch(void 0===v?"end":v){case"start":t=E("calc(".concat(p,")"));break;case"middle":t=E("calc(".concat((w.length-1)/2," * -").concat(d," + (").concat(p," / 2))"));break;default:t=E("calc(".concat(w.length-1," * -").concat(d,")"))}var Z=[];if(m){var L=w[0].width,z=x.width;Z.push("scale(".concat(((0,l.hj)(z)?z/L:1)/L,")"))}return N&&Z.push("rotate(".concat(N,", ").concat(T,", ").concat(A,")")),Z.length&&(R.transform=Z.join(" ")),r.createElement("text",j({},(0,s.L6)(R,!0),{x:T,y:A,className:(0,a.Z)("recharts-text",M),textAnchor:void 0===g?"start":g,fill:b.includes("url")?D:b}),w.map(function(e,n){var o=e.words.join(I?"":" ");return r.createElement("tspan",{x:T,dy:0===n?t:d,key:o},o)}))}},8147:function(e,t,n){"use strict";n.d(t,{u:function(){return F}});var r=n(2265),o=n(34935),i=n.n(o),a=n(77571),l=n.n(a),c=n(61994),s=n(16630);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function h(e){return Array.isArray(e)&&(0,s.P2)(e[0])&&(0,s.P2)(e[1])?e.join(" ~ "):e}var m=function(e){var t=e.separator,n=void 0===t?" : ":t,o=e.contentStyle,a=e.itemStyle,u=void 0===a?{}:a,f=e.labelStyle,m=e.payload,g=e.formatter,v=e.itemSorter,y=e.wrapperClassName,b=e.labelClassName,x=e.label,w=e.labelFormatter,S=p({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},void 0===o?{}:o),k=p({margin:0},void 0===f?{}:f),E=!l()(x),C=E?x:"",O=(0,c.Z)("recharts-default-tooltip",y),j=(0,c.Z)("recharts-tooltip-label",b);return E&&w&&null!=m&&(C=w(x,m)),r.createElement("div",{className:O,style:S},r.createElement("p",{className:j,style:k},r.isValidElement(C)?C:"".concat(C)),function(){if(m&&m.length){var e=(v?i()(m,v):m).map(function(e,t){if("none"===e.type)return null;var o=p({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},u),i=e.formatter||g||h,a=e.value,l=e.name,c=a,f=l;if(i&&null!=c&&null!=f){var v=i(a,l,e,t,m);if(Array.isArray(v)){var y=function(e){if(Array.isArray(e))return e}(v)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(v,2)||function(e,t){if(e){if("string"==typeof e)return d(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,2)}}(v,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();c=y[0],f=y[1]}else c=v}return r.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:o},(0,s.P2)(f)?r.createElement("span",{className:"recharts-tooltip-item-name"},f):null,(0,s.P2)(f)?r.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,r.createElement("span",{className:"recharts-tooltip-item-value"},c),r.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return r.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())},g=n(59221);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t,n){var r;return(r=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==v(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===v(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b="recharts-tooltip-wrapper",x={visibility:"hidden"};function w(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&(0,s.hj)(i[r]))return i[r];var d=n[r]-l-o,f=n[r]+o;return t[r]?a[r]?d:f:a[r]?d<c[r]?Math.max(f,c[r]):Math.max(d,c[r]):f+l>c[r]+u?Math.max(d,c[r]):Math.max(f,c[r])}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function O(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){var t=function(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==S(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===S(t)?t:String(t)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(i,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=j(i);return e=t?Reflect.construct(n,arguments,j(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return O(e)}(this,e)});function i(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return P(O(e=o.call.apply(o,[this].concat(n))),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),P(O(e),"lastBoundingBox",{width:-1,height:-1}),P(O(e),"handleKeyDown",function(t){if("Escape"===t.key){var n,r,o,i;e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})}}),e}return n=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e,t,n,o,i,a,l,u,d,f,p,h,m,v,S,k,C,O,j,P,N,M=this,I=this.props,R=I.active,T=I.allowEscapeViewBox,A=I.animationDuration,_=I.animationEasing,D=I.children,Z=I.coordinate,L=I.hasPayload,z=I.isAnimationActive,B=I.offset,F=I.position,H=I.reverseDirection,q=I.useTranslate3d,W=I.viewBox,K=I.wrapperStyle,V=(v=(e={allowEscapeViewBox:T,coordinate:Z,offsetTopLeft:B,position:F,reverseDirection:H,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:q,viewBox:W}).allowEscapeViewBox,S=e.coordinate,k=e.offsetTopLeft,C=e.position,O=e.reverseDirection,j=e.tooltipBox,P=e.useTranslate3d,N=e.viewBox,j.height>0&&j.width>0&&S?(n=(t={translateX:h=w({allowEscapeViewBox:v,coordinate:S,key:"x",offsetTopLeft:k,position:C,reverseDirection:O,tooltipDimension:j.width,viewBox:N,viewBoxDimension:N.width}),translateY:m=w({allowEscapeViewBox:v,coordinate:S,key:"y",offsetTopLeft:k,position:C,reverseDirection:O,tooltipDimension:j.height,viewBox:N,viewBoxDimension:N.height}),useTranslate3d:P}).translateX,o=t.translateY,i=t.useTranslate3d,p=(0,g.bO)({transform:i?"translate3d(".concat(n,"px, ").concat(o,"px, 0)"):"translate(".concat(n,"px, ").concat(o,"px)")})):p=x,{cssProperties:p,cssClasses:(u=(a={translateX:h,translateY:m,coordinate:S}).coordinate,d=a.translateX,f=a.translateY,(0,c.Z)(b,(y(l={},"".concat(b,"-right"),(0,s.hj)(d)&&u&&(0,s.hj)(u.x)&&d>=u.x),y(l,"".concat(b,"-left"),(0,s.hj)(d)&&u&&(0,s.hj)(u.x)&&d<u.x),y(l,"".concat(b,"-bottom"),(0,s.hj)(f)&&u&&(0,s.hj)(u.y)&&f>=u.y),y(l,"".concat(b,"-top"),(0,s.hj)(f)&&u&&(0,s.hj)(u.y)&&f<u.y),l)))}),U=V.cssClasses,G=V.cssProperties,X=E(E(E({},z&&R&&(0,g.bO)({transition:"transform ".concat(A,"ms ").concat(_)})),G),{},{pointerEvents:"none",visibility:!this.state.dismissed&&R&&L?"visible":"hidden",position:"absolute",top:0,left:0},K);return r.createElement("div",{tabIndex:-1,role:"dialog",className:U,style:X,ref:function(e){M.wrapperNode=e}},D)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,N(r.key),r)}}(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}(r.PureComponent),I=n(34067),R=n(93528);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D(e,t){return(D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){var t=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==T(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===T(t)?t:String(t)}function B(e){return e.dataKey}var F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(i,e);var t,n,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=Z(i);return e=t?Reflect.construct(n,arguments,Z(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return n=[{key:"render",value:function(){var e,t=this,n=this.props,o=n.active,i=n.allowEscapeViewBox,a=n.animationDuration,l=n.animationEasing,c=n.content,s=n.coordinate,u=n.filterNull,d=n.isAnimationActive,f=n.offset,p=n.payload,h=n.payloadUniqBy,g=n.position,v=n.reverseDirection,y=n.useTranslate3d,b=n.viewBox,x=n.wrapperStyle,w=null!=p?p:[];u&&w.length&&(w=(0,R.z)(p.filter(function(e){return null!=e.value&&(!0!==e.hide||t.props.includeHidden)}),h,B));var S=w.length>0;return r.createElement(M,{allowEscapeViewBox:i,animationDuration:a,animationEasing:l,isAnimationActive:d,active:o,coordinate:s,hasPayload:S,offset:f,position:g,reverseDirection:v,useTranslate3d:y,viewBox:b,wrapperStyle:x},(e=_(_({},this.props),{},{payload:w}),r.isValidElement(c)?r.cloneElement(c,e):"function"==typeof c?r.createElement(c,e):r.createElement(m,e)))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,z(r.key),r)}}(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}(r.PureComponent);L(F,"displayName","Tooltip"),L(F,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!I.x.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}})},9841:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var r=n(2265),o=n(61994),i=n(82944),a=["children","className"];function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=r.forwardRef(function(e,t){var n=e.children,c=e.className,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),u=(0,o.Z)("recharts-layer",c);return r.createElement("g",l({className:u},(0,i.L6)(s,!0),{ref:t}),n)})},48777:function(e,t,n){"use strict";n.d(t,{T:function(){return c}});var r=n(2265),o=n(61994),i=n(82944),a=["children","width","height","viewBox","className","style","title","desc"];function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e){var t=e.children,n=e.width,c=e.height,s=e.viewBox,u=e.className,d=e.style,f=e.title,p=e.desc,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),m=s||{width:n,height:c,x:0,y:0},g=(0,o.Z)("recharts-surface",u);return r.createElement("svg",l({},(0,i.L6)(h,!0,"svg"),{className:g,width:n,height:c,style:d,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),r.createElement("title",null,f),r.createElement("desc",null,p),t)}},25739:function(e,t,n){"use strict";n.d(t,{br:function(){return h},Mw:function(){return w},zn:function(){return x},sp:function(){return m},qD:function(){return b},d2:function(){return y},bH:function(){return g},Ud:function(){return v}});var r=n(2265),o=n(69398),i=n(50967),a=n.n(i)()(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),l=(0,r.createContext)(void 0),c=(0,r.createContext)(void 0),s=(0,r.createContext)(void 0),u=(0,r.createContext)({}),d=(0,r.createContext)(void 0),f=(0,r.createContext)(0),p=(0,r.createContext)(0),h=function(e){var t=e.state,n=t.xAxisMap,o=t.yAxisMap,i=t.offset,h=e.clipPathId,m=e.children,g=e.width,v=e.height,y=a(i);return r.createElement(l.Provider,{value:n},r.createElement(c.Provider,{value:o},r.createElement(u.Provider,{value:i},r.createElement(s.Provider,{value:y},r.createElement(d.Provider,{value:h},r.createElement(f.Provider,{value:v},r.createElement(p.Provider,{value:g},m)))))))},m=function(){return(0,r.useContext)(d)},g=function(e){var t=(0,r.useContext)(l);null!=t||(0,o.Z)(!1);var n=t[e];return null!=n||(0,o.Z)(!1),n},v=function(e){var t=(0,r.useContext)(c);null!=t||(0,o.Z)(!1);var n=t[e];return null!=n||(0,o.Z)(!1),n},y=function(){return(0,r.useContext)(s)},b=function(){return(0,r.useContext)(u)},x=function(){return(0,r.useContext)(p)},w=function(){return(0,r.useContext)(f)}},57165:function(e,t,n){"use strict";n.d(t,{H:function(){return U}});var r=n(2265);function o(){}function i(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function a(e){this._context=e}function l(e){this._context=e}function c(e){this._context=e}a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:i(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:i(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},l.prototype={areaStart:o,areaEnd:o,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:i(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:i(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class s{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function u(e){this._context=e}function d(e){this._context=e}function f(e){return new d(e)}function p(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0);return((i<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs((i*o+a*r)/(r+o)))||0}function h(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function m(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,o+l*t,i-l,a-l*n,i,a)}function g(e){this._context=e}function v(e){this._context=new y(e)}function y(e){this._context=e}function b(e){this._context=e}function x(e){var t,n,r=e.length-1,o=Array(r),i=Array(r),a=Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(t=0,i[r-1]=(e[r]+o[r-1])/2;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function w(e,t){this._context=e,this._t=t}u.prototype={areaStart:o,areaEnd:o,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},d.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:m(this,this._t0,h(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,m(this,h(this,n=p(this,e,t)),n);break;default:m(this,this._t0,n=p(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(v.prototype=Object.create(g.prototype)).point=function(e,t){g.prototype.point.call(this,t,e)},y.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=x(e),o=x(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a])}(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var S=n(22516),k=n(76115),E=n(67790);function C(e){return e[0]}function O(e){return e[1]}function j(e,t){var n=(0,k.Z)(!0),r=null,o=f,i=null,a=(0,E.d)(l);function l(l){var c,s,u,d=(l=(0,S.Z)(l)).length,f=!1;for(null==r&&(i=o(u=a())),c=0;c<=d;++c)!(c<d&&n(s=l[c],c,l))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(s,c,l),+t(s,c,l));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?C:(0,k.Z)(e),t="function"==typeof t?t:void 0===t?O:(0,k.Z)(t),l.x=function(t){return arguments.length?(e="function"==typeof t?t:(0,k.Z)(+t),l):e},l.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,k.Z)(+e),l):t},l.defined=function(e){return arguments.length?(n="function"==typeof e?e:(0,k.Z)(!!e),l):n},l.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),l):o},l.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),l):r},l}function P(e,t,n){var r=null,o=(0,k.Z)(!0),i=null,a=f,l=null,c=(0,E.d)(s);function s(s){var u,d,f,p,h,m=(s=(0,S.Z)(s)).length,g=!1,v=Array(m),y=Array(m);for(null==i&&(l=a(h=c())),u=0;u<=m;++u){if(!(u<m&&o(p=s[u],u,s))===g){if(g=!g)d=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=u-1;f>=d;--f)l.point(v[f],y[f]);l.lineEnd(),l.areaEnd()}}g&&(v[u]=+e(p,u,s),y[u]=+t(p,u,s),l.point(r?+r(p,u,s):v[u],n?+n(p,u,s):y[u]))}if(h)return l=null,h+""||null}function u(){return j().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?C:(0,k.Z)(+e),t="function"==typeof t?t:void 0===t?(0,k.Z)(0):(0,k.Z)(+t),n="function"==typeof n?n:void 0===n?O:(0,k.Z)(+n),s.x=function(t){return arguments.length?(e="function"==typeof t?t:(0,k.Z)(+t),r=null,s):e},s.x0=function(t){return arguments.length?(e="function"==typeof t?t:(0,k.Z)(+t),s):e},s.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:(0,k.Z)(+e),s):r},s.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,k.Z)(+e),n=null,s):t},s.y0=function(e){return arguments.length?(t="function"==typeof e?e:(0,k.Z)(+e),s):t},s.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:(0,k.Z)(+e),s):n},s.lineX0=s.lineY0=function(){return u().x(e).y(t)},s.lineY1=function(){return u().x(e).y(n)},s.lineX1=function(){return u().x(r).y(t)},s.defined=function(e){return arguments.length?(o="function"==typeof e?e:(0,k.Z)(!!e),s):o},s.curve=function(e){return arguments.length?(a=e,null!=i&&(l=a(i)),s):a},s.context=function(e){return arguments.length?(null==e?i=l=null:l=a(i=e),s):i},s}var N=n(75551),M=n.n(N),I=n(86757),R=n.n(I),T=n(61994),A=n(41637),_=n(82944),D=n(16630);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(){return(L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==Z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Z(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Z(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var F={curveBasisClosed:function(e){return new l(e)},curveBasisOpen:function(e){return new c(e)},curveBasis:function(e){return new a(e)},curveBumpX:function(e){return new s(e,!0)},curveBumpY:function(e){return new s(e,!1)},curveLinearClosed:function(e){return new u(e)},curveLinear:f,curveMonotoneX:function(e){return new g(e)},curveMonotoneY:function(e){return new v(e)},curveNatural:function(e){return new b(e)},curveStep:function(e){return new w(e,.5)},curveStepAfter:function(e){return new w(e,1)},curveStepBefore:function(e){return new w(e,0)}},H=function(e){return e.x===+e.x&&e.y===+e.y},q=function(e){return e.x},W=function(e){return e.y},K=function(e,t){if(R()(e))return e;var n="curve".concat(M()(e));return("curveMonotone"===n||"curveBump"===n)&&t?F["".concat(n).concat("vertical"===t?"Y":"X")]:F[n]||f},V=function(e){var t,n=e.type,r=e.points,o=void 0===r?[]:r,i=e.baseLine,a=e.layout,l=e.connectNulls,c=void 0!==l&&l,s=K(void 0===n?"linear":n,a),u=c?o.filter(function(e){return H(e)}):o;if(Array.isArray(i)){var d=c?i.filter(function(e){return H(e)}):i,f=u.map(function(e,t){return B(B({},e),{},{base:d[t]})});return(t="vertical"===a?P().y(W).x1(q).x0(function(e){return e.base.x}):P().x(q).y1(W).y0(function(e){return e.base.y})).defined(H).curve(s),t(f)}return(t="vertical"===a&&(0,D.hj)(i)?P().y(W).x1(q).x0(i):(0,D.hj)(i)?P().x(q).y1(W).y0(i):j().x(q).y(W)).defined(H).curve(s),t(u)},U=function(e){var t=e.className,n=e.points,o=e.path,i=e.pathRef;if((!n||!n.length)&&!o)return null;var a=n&&n.length?V(e):o;return r.createElement("path",L({},(0,_.L6)(e,!1),(0,A.Ym)(e),{className:(0,T.Z)("recharts-curve",t),d:a,ref:i}))}},81889:function(e,t,n){"use strict";n.d(t,{o:function(){return c}});var r=n(2265),o=n(61994),i=n(41637),a=n(82944);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=function(e){var t=e.cx,n=e.cy,c=e.r,s=e.className,u=(0,o.Z)("recharts-dot",s);return t===+t&&n===+n&&c===+c?r.createElement("circle",l({},(0,a.L6)(e,!1),(0,i.Ym)(e),{className:u,cx:t,cy:n,r:c})):null}},73649:function(e,t,n){"use strict";n.d(t,{A:function(){return m},X:function(){return p}});var r=n(2265),o=n(61994),i=n(59221),a=n(82944);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==l(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===l(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var f=function(e,t,n,r,o){var i,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),l=r>=0?1:-1,c=n>=0?1:-1,s=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>a?a:o[d];i="M".concat(e,",").concat(t+l*u[0]),u[0]>0&&(i+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(s,",").concat(e+c*u[0],",").concat(t)),i+="L ".concat(e+n-c*u[1],",").concat(t),u[1]>0&&(i+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(s,",\n ").concat(e+n,",").concat(t+l*u[1])),i+="L ".concat(e+n,",").concat(t+r-l*u[2]),u[2]>0&&(i+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(s,",\n ").concat(e+n-c*u[2],",").concat(t+r)),i+="L ".concat(e+c*u[3],",").concat(t+r),u[3]>0&&(i+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(s,",\n ").concat(e,",").concat(t+r-l*u[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var f=Math.min(a,o);i="M ".concat(e,",").concat(t+l*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+c*f,",").concat(t,"\n L ").concat(e+n-c*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+n,",").concat(t+l*f,"\n L ").concat(e+n,",").concat(t+r-l*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+n-c*f,",").concat(t+r,"\n L ").concat(e+c*f,",").concat(t+r,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e,",").concat(t+r-l*f," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},p=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,i=t.y,a=t.width,l=t.height;return!!(Math.abs(a)>0&&Math.abs(l)>0)&&n>=Math.min(o,o+a)&&n<=Math.max(o,o+a)&&r>=Math.min(i,i+l)&&r<=Math.max(i,i+l)},h={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},m=function(e){var t,n=d(d({},h),e),l=(0,r.useRef)(),u=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)(-1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return s(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=u[0],m=u[1];(0,r.useEffect)(function(){if(l.current&&l.current.getTotalLength)try{var e=l.current.getTotalLength();e&&m(e)}catch(e){}},[]);var g=n.x,v=n.y,y=n.width,b=n.height,x=n.radius,w=n.className,S=n.animationEasing,k=n.animationDuration,E=n.animationBegin,C=n.isAnimationActive,O=n.isUpdateAnimationActive;if(g!==+g||v!==+v||y!==+y||b!==+b||0===y||0===b)return null;var j=(0,o.Z)("recharts-rectangle",w);return O?r.createElement(i.ZP,{canBegin:p>0,from:{width:y,height:b,x:g,y:v},to:{width:y,height:b,x:g,y:v},duration:k,animationEasing:S,isActive:O},function(e){var t=e.width,o=e.height,s=e.x,u=e.y;return r.createElement(i.ZP,{canBegin:p>0,from:"0px ".concat(-1===p?1:p,"px"),to:"".concat(p,"px 0px"),attributeName:"strokeDasharray",begin:E,duration:k,isActive:C,easing:S},r.createElement("path",c({},(0,a.L6)(n,!0),{className:j,d:f(s,u,t,o,x),ref:l})))}):r.createElement("path",c({},(0,a.L6)(n,!0),{className:j,d:f(g,v,y,b,x)}))}},60474:function(e,t,n){"use strict";n.d(t,{L:function(){return g}});var r=n(2265),o=n(61994),i=n(82944),a=n(39206),l=n(16630);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==c(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var f=function(e){var t=e.cx,n=e.cy,r=e.radius,o=e.angle,i=e.sign,l=e.isExternal,c=e.cornerRadius,s=e.cornerIsExternal,u=c*(l?1:-1)+r,d=Math.asin(c/u)/a.Wk,f=s?o:o+i*d;return{center:(0,a.op)(t,n,u,f),circleTangency:(0,a.op)(t,n,r,f),lineTangency:(0,a.op)(t,n,u*Math.cos(d*a.Wk),s?o-i*d:o),theta:d}},p=function(e){var t,n=e.cx,r=e.cy,o=e.innerRadius,i=e.outerRadius,c=e.startAngle,s=(t=e.endAngle,(0,l.uY)(t-c)*Math.min(Math.abs(t-c),359.999)),u=c+s,d=(0,a.op)(n,r,i,c),f=(0,a.op)(n,r,i,u),p="M ".concat(d.x,",").concat(d.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(c>u),",\n ").concat(f.x,",").concat(f.y,"\n ");if(o>0){var h=(0,a.op)(n,r,o,c),m=(0,a.op)(n,r,o,u);p+="L ".concat(m.x,",").concat(m.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(s)>180),",").concat(+(c<=u),",\n ").concat(h.x,",").concat(h.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},h=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,c=e.cornerIsExternal,s=e.startAngle,u=e.endAngle,d=(0,l.uY)(u-s),h=f({cx:t,cy:n,radius:o,angle:s,sign:d,cornerRadius:i,cornerIsExternal:c}),m=h.circleTangency,g=h.lineTangency,v=h.theta,y=f({cx:t,cy:n,radius:o,angle:u,sign:-d,cornerRadius:i,cornerIsExternal:c}),b=y.circleTangency,x=y.lineTangency,w=y.theta,S=c?Math.abs(s-u):Math.abs(s-u)-v-w;if(S<0)return a?"M ".concat(g.x,",").concat(g.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(-(2*i),",0\n "):p({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:s,endAngle:u});var k="M ".concat(g.x,",").concat(g.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,"\n A").concat(o,",").concat(o,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(b.x,",").concat(b.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,"\n ");if(r>0){var E=f({cx:t,cy:n,radius:r,angle:s,sign:d,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),C=E.circleTangency,O=E.lineTangency,j=E.theta,P=f({cx:t,cy:n,radius:r,angle:u,sign:-d,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),N=P.circleTangency,M=P.lineTangency,I=P.theta,R=c?Math.abs(s-u):Math.abs(s-u)-j-I;if(R<0&&0===i)return"".concat(k,"L").concat(t,",").concat(n,"Z");k+="L".concat(M.x,",").concat(M.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"\n A").concat(r,",").concat(r,",0,").concat(+(R>180),",").concat(+(d>0),",").concat(C.x,",").concat(C.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(O.x,",").concat(O.y,"Z")}else k+="L".concat(t,",").concat(n,"Z");return k},m={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},g=function(e){var t,n=d(d({},m),e),a=n.cx,c=n.cy,u=n.innerRadius,f=n.outerRadius,g=n.cornerRadius,v=n.forceCornerRadius,y=n.cornerIsExternal,b=n.startAngle,x=n.endAngle,w=n.className;if(f<u||b===x)return null;var S=(0,o.Z)("recharts-sector",w),k=f-u,E=(0,l.h1)(g,k,0,!0);return t=E>0&&360>Math.abs(b-x)?h({cx:a,cy:c,innerRadius:u,outerRadius:f,cornerRadius:Math.min(E,k/2),forceCornerRadius:v,cornerIsExternal:y,startAngle:b,endAngle:x}):p({cx:a,cy:c,innerRadius:u,outerRadius:f,startAngle:b,endAngle:x}),r.createElement("path",s({},(0,i.L6)(n,!0),{className:S,d:t,role:"img"}))}},14870:function(e,t,n){"use strict";n.d(t,{v:function(){return T}});var r=n(2265),o=n(75551),i=n.n(o);let a=Math.cos,l=Math.sin,c=Math.sqrt,s=Math.PI,u=2*s;var d={draw(e,t){let n=c(t/s);e.moveTo(n,0),e.arc(0,0,n,0,u)}};let f=c(1/3),p=2*f,h=l(s/10)/l(7*s/10),m=l(u/10)*h,g=-a(u/10)*h,v=c(3),y=c(3)/2,b=1/c(12),x=(b/2+1)*3;var w=n(76115),S=n(67790);c(3),c(3);var k=n(61994),E=n(82944);function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var O=["type","size","sizeType"];function j(){return(j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==C(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===C(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var M={symbolCircle:d,symbolCross:{draw(e,t){let n=c(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},symbolDiamond:{draw(e,t){let n=c(t/p),r=n*f;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},symbolSquare:{draw(e,t){let n=c(t),r=-n/2;e.rect(r,r,n,n)}},symbolStar:{draw(e,t){let n=c(.8908130915292852*t),r=m*n,o=g*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){let i=u*t/5,c=a(i),s=l(i);e.lineTo(s*n,-c*n),e.lineTo(c*r-s*o,s*r+c*o)}e.closePath()}},symbolTriangle:{draw(e,t){let n=-c(t/(3*v));e.moveTo(0,2*n),e.lineTo(-v*n,-n),e.lineTo(v*n,-n),e.closePath()}},symbolWye:{draw(e,t){let n=c(t/x),r=n/2,o=n*b,i=n*b+n,a=-r;e.moveTo(r,o),e.lineTo(r,i),e.lineTo(a,i),e.lineTo(-.5*r-y*o,y*r+-.5*o),e.lineTo(-.5*r-y*i,y*r+-.5*i),e.lineTo(-.5*a-y*i,y*a+-.5*i),e.lineTo(-.5*r+y*o,-.5*o-y*r),e.lineTo(-.5*r+y*i,-.5*i-y*r),e.lineTo(-.5*a+y*i,-.5*i-y*a),e.closePath()}}},I=Math.PI/180,R=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*I;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},T=function(e){var t,n=e.type,o=void 0===n?"circle":n,a=e.size,l=void 0===a?64:a,c=e.sizeType,s=void 0===c?"area":c,u=N(N({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,O)),{},{type:o,size:l,sizeType:s}),f=u.className,p=u.cx,h=u.cy,m=(0,E.L6)(u,!0);return p===+p&&h===+h&&l===+l?r.createElement("path",j({},m,{className:(0,k.Z)("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(h,")"),d:(t=M["symbol".concat(i()(o))]||d,(function(e,t){let n=null,r=(0,S.d)(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:(0,w.Z)(e||d),t="function"==typeof t?t:(0,w.Z)(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:(0,w.Z)(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:(0,w.Z)(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o})().type(t).size(R(l,s,o))())})):null};T.registerSymbol=function(e,t){M["symbol".concat(i()(e))]=t}},11638:function(e,t,n){"use strict";n.d(t,{bn:function(){return R},a3:function(){return z},lT:function(){return T},V$:function(){return A},w7:function(){return _}});var r=n(2265),o=n(86757),i=n.n(o),a=n(90231),l=n.n(a),c=n(24342),s=n.n(c),u=n(21652),d=n.n(u),f=n(73649),p=n(61994),h=n(59221),m=n(82944);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var w=function(e,t,n,r,o){var i=n-r;return"M ".concat(e,",").concat(t)+"L ".concat(e+n,",").concat(t)+"L ".concat(e+n-i/2,",").concat(t+o)+"L ".concat(e+n-i/2-r,",").concat(t+o)+"L ".concat(e,",").concat(t," Z")},S={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},k=function(e){var t,n=x(x({},S),e),o=(0,r.useRef)(),i=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)(-1))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return y(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],l=i[1];(0,r.useEffect)(function(){if(o.current&&o.current.getTotalLength)try{var e=o.current.getTotalLength();e&&l(e)}catch(e){}},[]);var c=n.x,s=n.y,u=n.upperWidth,d=n.lowerWidth,f=n.height,g=n.className,b=n.animationEasing,k=n.animationDuration,E=n.animationBegin,C=n.isUpdateAnimationActive;if(c!==+c||s!==+s||u!==+u||d!==+d||f!==+f||0===u&&0===d||0===f)return null;var O=(0,p.Z)("recharts-trapezoid",g);return C?r.createElement(h.ZP,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:f,x:c,y:s},to:{upperWidth:u,lowerWidth:d,height:f,x:c,y:s},duration:k,animationEasing:b,isActive:C},function(e){var t=e.upperWidth,i=e.lowerWidth,l=e.height,c=e.x,s=e.y;return r.createElement(h.ZP,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:E,duration:k,easing:b},r.createElement("path",v({},(0,m.L6)(n,!0),{className:O,d:w(c,s,t,i,l),ref:o})))}):r.createElement("g",null,r.createElement("path",v({},(0,m.L6)(n,!0),{className:O,d:w(c,s,u,d,f)})))},E=n(60474),C=n(9841),O=n(14870),j=["option","shapeType","propTransformer","activeClassName","isActive"];function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==P(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==P(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function I(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return r.createElement(f.A,n);case"trapezoid":return r.createElement(k,n);case"sector":return r.createElement(E.L,n);case"symbols":if("symbols"===t)return r.createElement(O.v,n);break;default:return null}}function R(e){var t,n=e.option,o=e.shapeType,a=e.propTransformer,c=e.activeClassName,u=e.isActive,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,j);if((0,r.isValidElement)(n))t=(0,r.cloneElement)(n,M(M({},d),(0,r.isValidElement)(n)?n.props:n));else if(i()(n))t=n(d);else if(l()(n)&&!s()(n)){var f=(void 0===a?function(e,t){return M(M({},t),e)}:a)(n,d);t=r.createElement(I,{shapeType:o,elementProps:f})}else t=r.createElement(I,{shapeType:o,elementProps:d});return u?r.createElement(C.m,{className:void 0===c?"recharts-active-shape":c},t):t}function T(e,t){return null!=t&&"trapezoids"in e.props}function A(e,t){return null!=t&&"sectors"in e.props}function _(e,t){return null!=t&&"points"in e.props}function D(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,i=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&i}function Z(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function L(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function z(e){var t,n,r,o=e.activeTooltipItem,i=e.graphicalItem,a=e.itemData,l=(T(i,o)?t="trapezoids":A(i,o)?t="sectors":_(i,o)&&(t="points"),t),c=T(i,o)?null===(n=o.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:A(i,o)?null===(r=o.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:_(i,o)?o.payload:{},s=a.filter(function(e,t){var n=d()(c,e),r=i.props[l].filter(function(e){var t;return(T(i,o)?t=D:A(i,o)?t=Z:_(i,o)&&(t=L),t)(e,o)}),a=i.props[l].indexOf(r[r.length-1]);return n&&t===a});return a.indexOf(s[s.length-1])}},25311:function(e,t,n){"use strict";n.d(t,{Ky:function(){return w},O1:function(){return y},_b:function(){return b},t9:function(){return v},xE:function(){return S}});var r=n(41443),o=n.n(r),i=n(32242),a=n.n(i),l=n(85355),c=n(82944),s=n(16630),u=n(31699);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==d(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===d(t)?t:String(t)}var v=function(e,t,n,r,o){var i=e.width,a=e.height,d=e.layout,f=e.children,p=Object.keys(t),g={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},v=!!(0,c.sP)(f,u.$);return p.reduce(function(i,a){var c,u,f,p,y,b=t[a],x=b.orientation,w=b.domain,S=b.padding,k=void 0===S?{}:S,E=b.mirror,C=b.reversed,O="".concat(x).concat(E?"Mirror":"");if("number"===b.type&&("gap"===b.padding||"no-gap"===b.padding)){var j=w[1]-w[0],P=1/0,N=b.categoricalDomain.sort();N.forEach(function(e,t){t>0&&(P=Math.min((e||0)-(N[t-1]||0),P))});var M=P/j,I="vertical"===b.layout?n.height:n.width;if("gap"===b.padding&&(c=M*I/2),"no-gap"===b.padding){var R=(0,s.h1)(e.barCategoryGap,M*I),T=M*I/2;c=T-R-(T-R)/I*R}}u="xAxis"===r?[n.left+(k.left||0)+(c||0),n.left+n.width-(k.right||0)-(c||0)]:"yAxis"===r?"horizontal"===d?[n.top+n.height-(k.bottom||0),n.top+(k.top||0)]:[n.top+(k.top||0)+(c||0),n.top+n.height-(k.bottom||0)-(c||0)]:b.range,C&&(u=[u[1],u[0]]);var A=(0,l.Hq)(b,o,v),_=A.scale,D=A.realScaleType;_.domain(w).range(u),(0,l.zF)(_);var Z=(0,l.g$)(_,h(h({},b),{},{realScaleType:D}));"xAxis"===r?(y="top"===x&&!E||"bottom"===x&&E,f=n.left,p=g[O]-y*b.height):"yAxis"===r&&(y="left"===x&&!E||"right"===x&&E,f=g[O]-y*b.width,p=n.top);var L=h(h(h({},b),Z),{},{realScaleType:D,x:f,y:p,scale:_,width:"xAxis"===r?n.width:b.width,height:"yAxis"===r?n.height:b.height});return L.bandSize=(0,l.zT)(L,Z),b.hide||"xAxis"!==r?b.hide||(g[O]+=(y?-1:1)*L.width):g[O]+=(y?-1:1)*L.height,h(h({},i),{},m({},a,L))},{})},y=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return{x:Math.min(n,o),y:Math.min(r,i),width:Math.abs(o-n),height:Math.abs(i-r)}},b=function(e){return y({x:e.x1,y:e.y1},{x:e.x2,y:e.y2})},x=function(){var e,t;function n(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),this.scale=e}return e=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],t=[{key:"create",value:function(e){return new n(e)}}],e&&f(n.prototype,e),t&&f(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();m(x,"EPS",1e-4);var w=function(e){var t=Object.keys(e).reduce(function(t,n){return h(h({},t),{},m({},n,x.create(e[n])))},{});return h(h({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,i=n.position;return o()(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return a()(e,function(e,n){return t[n].isInRange(e)})}})},S=function(e){var t=e.width,n=e.height,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(r%180+180)%180*Math.PI/180,i=Math.atan(n/t);return Math.abs(o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o))}},85355:function(e,t,n){"use strict";n.d(t,{By:function(){return r4},VO:function(){return r0},zF:function(){return oo},DO:function(){return on},Bu:function(){return oi},zT:function(){return ob},qz:function(){return r6},pt:function(){return r2},Yj:function(){return op},Fy:function(){return of},Hv:function(){return od},Rf:function(){return r9},gF:function(){return rJ},s6:function(){return r8},EB:function(){return om},fk:function(){return r1},wh:function(){return os},O3:function(){return oh},uY:function(){return oe},g$:function(){return ou},Qo:function(){return ow},F$:function(){return rQ},NA:function(){return r7},ko:function(){return ox},ZI:function(){return r5},Hq:function(){return or},LG:function(){return oy},Vv:function(){return oa}});var r,o,i,a,l,c,s,u={};n.r(u),n.d(u,{scaleBand:function(){return d.Z},scaleDiverging:function(){return function e(){var t=e_(nQ()(eg));return t.copy=function(){return nX(t,e())},ek.O.apply(t,arguments)}},scaleDivergingLog:function(){return function e(){var t=eW(nQ()).domain([.1,1,10]);return t.copy=function(){return nX(t,e()).base(t.base())},ek.O.apply(t,arguments)}},scaleDivergingPow:function(){return nJ},scaleDivergingSqrt:function(){return n0},scaleDivergingSymlog:function(){return function e(){var t=eU(nQ());return t.copy=function(){return nX(t,e()).constant(t.constant())},ek.O.apply(t,arguments)}},scaleIdentity:function(){return function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,eh),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,eh):[0,1],e_(r)}},scaleImplicit:function(){return eG.O},scaleLinear:function(){return eD},scaleLog:function(){return function e(){let t=eW(ew()).domain([1,10]);return t.copy=()=>ex(t,e()).base(t.base()),ek.o.apply(t,arguments),t}},scaleOrdinal:function(){return eG.Z},scalePoint:function(){return d.x},scalePow:function(){return eJ},scaleQuantile:function(){return function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=Array(t-1);++e<t;)o[e-1]=function(e,t,n=k){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[C(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();for(let t of(n=[],e))null==t||isNaN(t=+t)||n.push(t);return n.sort(b),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},ek.o.apply(a,arguments)}},scaleQuantize:function(){return function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function l(e){return null!=e&&e<=e?a[C(i,e,0,o)]:t}function c(){var e=-1;for(i=Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+1);return l}return l.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,c()):[n,r]},l.range=function(e){return arguments.length?(o=(a=Array.from(e)).length-1,c()):a.slice()},l.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},l.unknown=function(e){return arguments.length&&(t=e),l},l.thresholds=function(){return i.slice()},l.copy=function(){return e().domain([n,r]).range(a).unknown(t)},ek.o.apply(e_(l),arguments)}},scaleRadial:function(){return function e(){var t,n=eS(),r=[0,1],o=!1;function i(e){var r,i=Math.sign(r=n(e))*Math.sqrt(Math.abs(r));return isNaN(i)?t:o?Math.round(i):i}return i.invert=function(e){return n.invert(e1(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,eh)).map(e1)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},ek.o.apply(i,arguments),e_(i)}},scaleSequential:function(){return function e(){var t=e_(nG()(eg));return t.copy=function(){return nX(t,e())},ek.O.apply(t,arguments)}},scaleSequentialLog:function(){return function e(){var t=eW(nG()).domain([1,10]);return t.copy=function(){return nX(t,e()).base(t.base())},ek.O.apply(t,arguments)}},scaleSequentialPow:function(){return n$},scaleSequentialQuantile:function(){return function e(){var t=[],n=eg;function r(e){if(null!=e&&!isNaN(e=+e))return n((C(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();for(let n of(t=[],e))null==n||isNaN(n=+n)||t.push(n);return t.sort(b),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>(function(e,t,n){if(!(!(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,void 0))).length)||isNaN(t=+t))){if(t<=0||r<2)return e6(e);if(t>=1)return e2(e);var r,o=(r-1)*t,i=Math.floor(o),a=e2((function e(t,n,r=0,o=1/0,i){if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),o=Math.floor(Math.min(t.length-1,o)),!(r<=n&&n<=o))return t;for(i=void 0===i?e4:function(e=b){if(e===b)return e4;if("function"!=typeof e)throw TypeError("compare is not a function");return(t,n)=>{let r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(i);o>r;){if(o-r>600){let a=o-r+1,l=n-r+1,c=Math.log(a),s=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*s*(a-s)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(n-l*s/a+u)),f=Math.min(o,Math.floor(n+(a-l)*s/a+u));e(t,n,d,f,i)}let a=t[n],l=r,c=o;for(e3(t,r,n),i(t[o],a)>0&&e3(t,r,o);l<c;){for(e3(t,l,c),++l,--c;0>i(t[l],a);)++l;for(;i(t[c],a)>0;)--c}0===i(t[r],a)?e3(t,r,c):e3(t,++c,o),c<=n&&(r=c+1),n<=c&&(o=c-1)}return t})(e,i).subarray(0,i+1));return a+(e6(e.subarray(i+1))-a)*(o-i)}})(t,r/e))},r.copy=function(){return e(n).domain(t)},ek.O.apply(r,arguments)}},scaleSequentialSqrt:function(){return nY},scaleSequentialSymlog:function(){return function e(){var t=eU(nG());return t.copy=function(){return nX(t,e()).constant(t.constant())},ek.O.apply(t,arguments)}},scaleSqrt:function(){return e0},scaleSymlog:function(){return function e(){var t=eU(ew());return t.copy=function(){return ex(t,e()).constant(t.constant())},ek.o.apply(t,arguments)}},scaleThreshold:function(){return function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[C(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(o=Math.min((n=Array.from(e)).length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},ek.o.apply(i,arguments)}},scaleTime:function(){return nV},scaleUtc:function(){return nU},tickFormat:function(){return eA}});var d=n(55284);let f=Math.sqrt(50),p=Math.sqrt(10),h=Math.sqrt(2);function m(e,t,n){let r,o,i;let a=(t-e)/Math.max(0,n),l=Math.floor(Math.log10(a)),c=a/Math.pow(10,l),s=c>=f?10:c>=p?5:c>=h?2:1;return(l<0?(r=Math.round(e*(i=Math.pow(10,-l)/s)),o=Math.round(t*i),r/i<e&&++r,o/i>t&&--o,i=-i):(r=Math.round(e/(i=Math.pow(10,l)*s)),o=Math.round(t/i),r*i<e&&++r,o*i>t&&--o),o<r&&.5<=n&&n<2)?m(e,t,2*n):[r,o,i]}function g(e,t,n){if(t=+t,e=+e,!((n=+n)>0))return[];if(e===t)return[e];let r=t<e,[o,i,a]=r?m(t,e,n):m(e,t,n);if(!(i>=o))return[];let l=i-o+1,c=Array(l);if(r){if(a<0)for(let e=0;e<l;++e)c[e]=-((i-e)/a);else for(let e=0;e<l;++e)c[e]=(i-e)*a}else if(a<0)for(let e=0;e<l;++e)c[e]=-((o+e)/a);else for(let e=0;e<l;++e)c[e]=(o+e)*a;return c}function v(e,t,n){return m(e=+e,t=+t,n=+n)[2]}function y(e,t,n){t=+t,e=+e,n=+n;let r=t<e,o=r?v(t,e,n):v(e,t,n);return(r?-1:1)*(o<0?-(1/o):o)}function b(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function x(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function w(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{let t=o+i>>>1;0>n(e[t],r)?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=b,n=(t,n)=>b(e(t),n),r=(t,n)=>e(t)-n):(t=e===b||e===x?e:S,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){let a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{let t=o+i>>>1;0>=n(e[t],r)?o=t+1:i=t}while(o<i)}return o}}}function S(){return 0}function k(e){return null===e?NaN:+e}let E=w(b),C=E.right;function O(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function j(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function P(){}E.left,w(k).center;var N="\\s*([+-]?\\d+)\\s*",M="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",I="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",R=/^#([0-9a-f]{3,8})$/,T=RegExp(`^rgb\\(${N},${N},${N}\\)$`),A=RegExp(`^rgb\\(${I},${I},${I}\\)$`),_=RegExp(`^rgba\\(${N},${N},${N},${M}\\)$`),D=RegExp(`^rgba\\(${I},${I},${I},${M}\\)$`),Z=RegExp(`^hsl\\(${M},${I},${I}\\)$`),L=RegExp(`^hsla\\(${M},${I},${I},${M}\\)$`),z={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function B(){return this.rgb().formatHex()}function F(){return this.rgb().formatRgb()}function H(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=R.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?q(t):3===n?new V(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?W(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?W(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=T.exec(e))?new V(t[1],t[2],t[3],1):(t=A.exec(e))?new V(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_.exec(e))?W(t[1],t[2],t[3],t[4]):(t=D.exec(e))?W(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Z.exec(e))?Q(t[1],t[2]/100,t[3]/100,1):(t=L.exec(e))?Q(t[1],t[2]/100,t[3]/100,t[4]):z.hasOwnProperty(e)?q(z[e]):"transparent"===e?new V(NaN,NaN,NaN,0):null}function q(e){return new V(e>>16&255,e>>8&255,255&e,1)}function W(e,t,n,r){return r<=0&&(e=t=n=NaN),new V(e,t,n,r)}function K(e,t,n,r){var o;return 1==arguments.length?((o=e)instanceof P||(o=H(o)),o)?new V((o=o.rgb()).r,o.g,o.b,o.opacity):new V:new V(e,t,n,null==r?1:r)}function V(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function U(){return`#${Y(this.r)}${Y(this.g)}${Y(this.b)}`}function G(){let e=X(this.opacity);return`${1===e?"rgb(":"rgba("}${$(this.r)}, ${$(this.g)}, ${$(this.b)}${1===e?")":`, ${e})`}`}function X(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Y(e){return((e=$(e))<16?"0":"")+e.toString(16)}function Q(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ee(e,t,n,r)}function J(e){if(e instanceof ee)return new ee(e.h,e.s,e.l,e.opacity);if(e instanceof P||(e=H(e)),!e)return new ee;if(e instanceof ee)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,l=i-o,c=(i+o)/2;return l?(a=t===i?(n-r)/l+(n<r)*6:n===i?(r-t)/l+2:(t-n)/l+4,l/=c<.5?i+o:2-i-o,a*=60):l=c>0&&c<1?0:a,new ee(a,l,c,e.opacity)}function ee(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function et(e){return(e=(e||0)%360)<0?e+360:e}function en(e){return Math.max(0,Math.min(1,e||0))}function er(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function eo(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}O(P,H,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:B,formatHex:B,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return J(this).formatHsl()},formatRgb:F,toString:F}),O(V,K,j(P,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new V(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new V(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new V($(this.r),$(this.g),$(this.b),X(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:function(){return`#${Y(this.r)}${Y(this.g)}${Y(this.b)}${Y((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:G,toString:G})),O(ee,function(e,t,n,r){return 1==arguments.length?J(e):new ee(e,t,n,null==r?1:r)},j(P,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new ee(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ee(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new V(er(e>=240?e-240:e+120,o,r),er(e,o,r),er(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new ee(et(this.h),en(this.s),en(this.l),X(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=X(this.opacity);return`${1===e?"hsl(":"hsla("}${et(this.h)}, ${100*en(this.s)}%, ${100*en(this.l)}%${1===e?")":`, ${e})`}`}}));var ei=e=>()=>e;function ea(e,t){var n=t-e;return n?function(t){return e+t*n}:ei(isNaN(e)?t:e)}var el=function e(t){var n,r=1==(n=+(n=t))?ea:function(e,t){var r,o,i;return t-e?(r=e,o=t,r=Math.pow(r,i=n),o=Math.pow(o,i)-r,i=1/i,function(e){return Math.pow(r+e*o,i)}):ei(isNaN(e)?t:e)};function o(e,t){var n=r((e=K(e)).r,(t=K(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=ea(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function ec(e){return function(t){var n,r,o=t.length,i=Array(o),a=Array(o),l=Array(o);for(n=0;n<o;++n)r=K(t[n]),i[n]=r.r||0,a[n]=r.g||0,l[n]=r.b||0;return i=e(i),a=e(a),l=e(l),r.opacity=1,function(e){return r.r=i(e),r.g=a(e),r.b=l(e),r+""}}}function es(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}ec(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,l=r<t-1?e[r+2]:2*i-o;return eo((n-r/t)*t,a,o,i,l)}}),ec(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],l=e[(r+2)%t];return eo((n-r/t)*t,o,i,a,l)}});var eu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ed=RegExp(eu.source,"g");function ef(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?ei(t):("number"===o?es:"string"===o?(r=H(t))?(t=r,el):function(e,t){var n,r,o,i,a,l=eu.lastIndex=ed.lastIndex=0,c=-1,s=[],u=[];for(e+="",t+="";(o=eu.exec(e))&&(i=ed.exec(t));)(a=i.index)>l&&(a=t.slice(l,a),s[c]?s[c]+=a:s[++c]=a),(o=o[0])===(i=i[0])?s[c]?s[c]+=i:s[++c]=i:(s[++c]=null,u.push({i:c,x:es(o,i)})),l=ed.lastIndex;return l<t.length&&(a=t.slice(l),s[c]?s[c]+=a:s[++c]=a),s.length<2?u[0]?(n=u[0].x,function(e){return n(e)+""}):(r=t,function(){return r}):(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}:t instanceof H?el:t instanceof Date?function(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}:!ArrayBuffer.isView(n=t)||n instanceof DataView?Array.isArray(t)?function(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=Array(o),a=Array(r);for(n=0;n<o;++n)i[n]=ef(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var n,r={},o={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=ef(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}:es:function(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}})(e,t)}function ep(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function eh(e){return+e}var em=[0,1];function eg(e){return e}function ev(e,t){var n;return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n})}function ey(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=ev(o,r),i=n(a,i)):(r=ev(r,o),i=n(i,a)),function(e){return i(r(e))}}function eb(e,t,n){var r=Math.min(e.length,t.length)-1,o=Array(r),i=Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=ev(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=C(e,t,1,r)-1;return i[n](o[n](t))}}function ex(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ew(){var e,t,n,r,o,i,a=em,l=em,c=ef,s=eg;function u(){var e,t,n,c=Math.min(a.length,l.length);return s!==eg&&(e=a[0],t=a[c-1],e>t&&(n=e,e=t,t=n),s=function(n){return Math.max(e,Math.min(t,n))}),r=c>2?eb:ey,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),l,c)))(e(s(t)))}return d.invert=function(n){return s(t((i||(i=r(l,a.map(e),es)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,eh),u()):a.slice()},d.range=function(e){return arguments.length?(l=Array.from(e),u()):l.slice()},d.rangeRound=function(e){return l=Array.from(e),c=ep,u()},d.clamp=function(e){return arguments.length?(s=!!e||eg,u()):s!==eg},d.interpolate=function(e){return arguments.length?(c=e,u()):c},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function eS(){return ew()(eg,eg)}var ek=n(89999),eE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function eC(e){var t;if(!(t=eE.exec(e)))throw Error("invalid format: "+e);return new eO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function eO(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function ej(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function eP(e){return(e=ej(Math.abs(e)))?e[1]:NaN}function eN(e,t){var n=ej(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+Array(o-r.length+2).join("0")}eC.prototype=eO.prototype,eO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var eM={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>eN(100*e,t),r:eN,s:function(e,t){var n=ej(e,t);if(!n)return e+"";var o=n[0],i=n[1],a=i-(r=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=o.length;return a===l?o:a>l?o+Array(a-l+1).join("0"):a>0?o.slice(0,a)+"."+o.slice(a):"0."+Array(1-a).join("0")+ej(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function eI(e){return e}var eR=Array.prototype.map,eT=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function eA(e,t,n,r){var o,l,c=y(e,t,n);switch((r=eC(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(l=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(eP(s)/3)))-eP(Math.abs(c))))||(r.precision=l),a(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(l=Math.max(0,eP(Math.abs(Math.max(Math.abs(e),Math.abs(t)))-(o=Math.abs(o=c)))-eP(o))+1)||(r.precision=l-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(l=Math.max(0,-eP(Math.abs(c))))||(r.precision=l-("%"===r.type)*2)}return i(r)}function e_(e){var t=e.domain;return e.ticks=function(e){var n=t();return g(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return eA(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,l=i.length-1,c=i[a],s=i[l],u=10;for(s<c&&(o=c,c=s,s=o,o=a,a=l,l=o);u-- >0;){if((o=v(c,s,n))===r)return i[a]=c,i[l]=s,t(i);if(o>0)c=Math.floor(c/o)*o,s=Math.ceil(s/o)*o;else if(o<0)c=Math.ceil(c*o)/o,s=Math.floor(s*o)/o;else break;r=o}return e},e}function eD(){var e=eS();return e.copy=function(){return ex(e,eD())},ek.o.apply(e,arguments),e_(e)}function eZ(e,t){e=e.slice();var n,r=0,o=e.length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function eL(e){return Math.log(e)}function ez(e){return Math.exp(e)}function eB(e){return-Math.log(-e)}function eF(e){return-Math.exp(-e)}function eH(e){return isFinite(e)?+("1e"+e):e<0?0:e}function eq(e){return(t,n)=>-e(-t,n)}function eW(e){let t,n;let r=e(eL,ez),o=r.domain,a=10;function l(){var i,l;return t=(i=a)===Math.E?Math.log:10===i&&Math.log10||2===i&&Math.log2||(i=Math.log(i),e=>Math.log(e)/i),n=10===(l=a)?eH:l===Math.E?Math.exp:e=>Math.pow(l,e),o()[0]<0?(t=eq(t),n=eq(n),e(eB,eF)):e(eL,ez),r}return r.base=function(e){return arguments.length?(a=+e,l()):a},r.domain=function(e){return arguments.length?(o(e),l()):o()},r.ticks=e=>{let r,i;let l=o(),c=l[0],s=l[l.length-1],u=s<c;u&&([c,s]=[s,c]);let d=t(c),f=t(s),p=null==e?10:+e,h=[];if(!(a%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),c>0){for(;d<=f;++d)for(r=1;r<a;++r)if(!((i=d<0?r/n(-d):r*n(d))<c)){if(i>s)break;h.push(i)}}else for(;d<=f;++d)for(r=a-1;r>=1;--r)if(!((i=d>0?r/n(-d):r*n(d))<c)){if(i>s)break;h.push(i)}2*h.length<p&&(h=g(c,s,p))}else h=g(d,f,Math.min(f-d,p)).map(n);return u?h.reverse():h},r.tickFormat=(e,o)=>{if(null==e&&(e=10),null==o&&(o=10===a?"s":","),"function"!=typeof o&&(a%1||null!=(o=eC(o)).precision||(o.trim=!0),o=i(o)),e===1/0)return o;let l=Math.max(1,a*e/r.ticks().length);return e=>{let r=e/n(Math.round(t(e)));return r*a<a-.5&&(r*=a),r<=l?o(e):""}},r.nice=()=>o(eZ(o(),{floor:e=>n(Math.floor(t(e))),ceil:e=>n(Math.ceil(t(e)))})),r}function eK(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function eV(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function eU(e){var t=1,n=e(eK(1),eV(t));return n.constant=function(n){return arguments.length?e(eK(t=+n),eV(t)):t},e_(n)}i=(o=function(e){var t,n,o,i=void 0===e.grouping||void 0===e.thousands?eI:(t=eR.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,l=t[0],c=0;o>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(e.substring(o-=l,o+l)),!((c+=l+1)>r));)l=t[a=(a+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",l=void 0===e.currency?"":e.currency[1]+"",c=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?eI:(o=eR.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return o[+e]})}),u=void 0===e.percent?"%":e.percent+"",d=void 0===e.minus?"−":e.minus+"",f=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=eC(e)).fill,n=e.align,o=e.sign,p=e.symbol,h=e.zero,m=e.width,g=e.comma,v=e.precision,y=e.trim,b=e.type;"n"===b?(g=!0,b="g"):eM[b]||(void 0===v&&(v=12),y=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var x="$"===p?a:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===p?l:/[%p]/.test(b)?u:"",S=eM[b],k=/[defgprs%]/.test(b);function E(e){var a,l,u,p=x,E=w;if("c"===b)E=S(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?f:S(Math.abs(e),v),y&&(e=function(e){t:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break t;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==o&&(C=!1),p=(C?"("===o?o:d:"-"===o||"("===o?"":o)+p,E=("s"===b?eT[8+r/3]:"")+E+(C&&"("===o?")":""),k){for(a=-1,l=e.length;++a<l;)if(48>(u=e.charCodeAt(a))||u>57){E=(46===u?c+e.slice(a+1):e.slice(a))+E,e=e.slice(0,a);break}}}g&&!h&&(e=i(e,1/0));var O=p.length+e.length+E.length,j=O<m?Array(m-O+1).join(t):"";switch(g&&h&&(e=i(j+e,j.length?m-E.length:1/0),j=""),n){case"<":e=p+e+E+j;break;case"=":e=p+j+e+E;break;case"^":e=j.slice(0,O=j.length>>1)+p+e+E+j.slice(O);break;default:e=j+p+e+E}return s(e)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),E.toString=function(){return e+""},E}return{format:p,formatPrefix:function(e,t){var n=p(((e=eC(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(eP(t)/3))),o=Math.pow(10,-r),i=eT[8+r/3];return function(e){return n(o*e)+i}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,a=o.formatPrefix;var eG=n(36967);function eX(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function e$(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function eY(e){return e<0?-e*e:e*e}function eQ(e){var t=e(eg,eg),n=1;return t.exponent=function(t){return arguments.length?1==(n=+t)?e(eg,eg):.5===n?e(e$,eY):e(eX(n),eX(1/n)):n},e_(t)}function eJ(){var e=eQ(ew());return e.copy=function(){return ex(e,eJ()).exponent(e.exponent())},ek.o.apply(e,arguments),e}function e0(){return eJ.apply(null,arguments).exponent(.5)}function e1(e){return Math.sign(e)*e*e}function e2(e,t){let n;if(void 0===t)for(let t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function e6(e,t){let n;if(void 0===t)for(let t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function e4(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function e3(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}let e5=new Date,e8=new Date;function e7(e,t,n,r){function o(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{let t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{let a;let l=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r)||!(i>0))return l;do l.push(a=new Date(+n)),t(n,i),e(n);while(a<n&&n<r);return l},o.filter=n=>e7(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(o.count=(t,r)=>(e5.setTime(+t),e8.setTime(+r),e(e5),e(e8),Math.floor(n(e5,e8))),o.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null),o}let e9=e7(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);e9.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?e7(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):e9:null,e9.range;let te=e7(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds());te.range;let tt=e7(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes());tt.range;let tn=e7(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes());tn.range;let tr=e7(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours());tr.range;let to=e7(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours());to.range;let ti=e7(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1);ti.range;let ta=e7(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1);ta.range;let tl=e7(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5));function tc(e){return e7(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}tl.range;let ts=tc(0),tu=tc(1),td=tc(2),tf=tc(3),tp=tc(4),th=tc(5),tm=tc(6);function tg(e){return e7(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}ts.range,tu.range,td.range,tf.range,tp.range,th.range,tm.range;let tv=tg(0),ty=tg(1),tb=tg(2),tx=tg(3),tw=tg(4),tS=tg(5),tk=tg(6);tv.range,ty.range,tb.range,tx.range,tw.range,tS.range,tk.range;let tE=e7(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());tE.range;let tC=e7(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());tC.range;let tO=e7(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());tO.every=e=>isFinite(e=Math.floor(e))&&e>0?e7(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,tO.range;let tj=e7(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function tP(e,t,n,r,o,i){let a=[[te,1,1e3],[te,5,5e3],[te,15,15e3],[te,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function l(t,n,r){let o=Math.abs(n-t)/r,i=w(([,,e])=>e).right(a,o);if(i===a.length)return e.every(y(t/31536e6,n/31536e6,r));if(0===i)return e9.every(Math.max(y(t,n,r),1));let[l,c]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return l.every(c)}return[function(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let o=n&&"function"==typeof n.range?n:l(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},l]}tj.every=e=>isFinite(e=Math.floor(e))&&e>0?e7(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,tj.range;let[tN,tM]=tP(tj,tC,tv,tl,to,tn),[tI,tR]=tP(tO,tE,ts,ti,tr,tt);function tT(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function tA(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function t_(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var tD={"-":"",_:" ",0:"0"},tZ=/^\s*\d+/,tL=/^%/,tz=/[\\^$*+?|[\]().{}]/g;function tB(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?Array(n-i+1).join(t)+o:o)}function tF(e){return e.replace(tz,"\\$&")}function tH(e){return RegExp("^(?:"+e.map(tF).join("|")+")","i")}function tq(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function tW(e,t,n){var r=tZ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function tK(e,t,n){var r=tZ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function tV(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function tU(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tG(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function tX(e,t,n){var r=tZ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function t$(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tQ(e,t,n){var r=tZ.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function tJ(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function t0(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function t1(e,t,n){var r=tZ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function t2(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function t6(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function t4(e,t,n){var r=tZ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function t3(e,t,n){var r=tZ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function t5(e,t,n){var r=tZ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function t8(e,t,n){var r=tL.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function t7(e,t,n){var r=tZ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function t9(e,t,n){var r=tZ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ne(e,t){return tB(e.getDate(),t,2)}function nt(e,t){return tB(e.getHours(),t,2)}function nn(e,t){return tB(e.getHours()%12||12,t,2)}function nr(e,t){return tB(1+ti.count(tO(e),e),t,3)}function no(e,t){return tB(e.getMilliseconds(),t,3)}function ni(e,t){return no(e,t)+"000"}function na(e,t){return tB(e.getMonth()+1,t,2)}function nl(e,t){return tB(e.getMinutes(),t,2)}function nc(e,t){return tB(e.getSeconds(),t,2)}function ns(e){var t=e.getDay();return 0===t?7:t}function nu(e,t){return tB(ts.count(tO(e)-1,e),t,2)}function nd(e){var t=e.getDay();return t>=4||0===t?tp(e):tp.ceil(e)}function nf(e,t){return e=nd(e),tB(tp.count(tO(e),e)+(4===tO(e).getDay()),t,2)}function np(e){return e.getDay()}function nh(e,t){return tB(tu.count(tO(e)-1,e),t,2)}function nm(e,t){return tB(e.getFullYear()%100,t,2)}function ng(e,t){return tB((e=nd(e)).getFullYear()%100,t,2)}function nv(e,t){return tB(e.getFullYear()%1e4,t,4)}function ny(e,t){var n=e.getDay();return tB((e=n>=4||0===n?tp(e):tp.ceil(e)).getFullYear()%1e4,t,4)}function nb(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+tB(t/60|0,"0",2)+tB(t%60,"0",2)}function nx(e,t){return tB(e.getUTCDate(),t,2)}function nw(e,t){return tB(e.getUTCHours(),t,2)}function nS(e,t){return tB(e.getUTCHours()%12||12,t,2)}function nk(e,t){return tB(1+ta.count(tj(e),e),t,3)}function nE(e,t){return tB(e.getUTCMilliseconds(),t,3)}function nC(e,t){return nE(e,t)+"000"}function nO(e,t){return tB(e.getUTCMonth()+1,t,2)}function nj(e,t){return tB(e.getUTCMinutes(),t,2)}function nP(e,t){return tB(e.getUTCSeconds(),t,2)}function nN(e){var t=e.getUTCDay();return 0===t?7:t}function nM(e,t){return tB(tv.count(tj(e)-1,e),t,2)}function nI(e){var t=e.getUTCDay();return t>=4||0===t?tw(e):tw.ceil(e)}function nR(e,t){return e=nI(e),tB(tw.count(tj(e),e)+(4===tj(e).getUTCDay()),t,2)}function nT(e){return e.getUTCDay()}function nA(e,t){return tB(ty.count(tj(e)-1,e),t,2)}function n_(e,t){return tB(e.getUTCFullYear()%100,t,2)}function nD(e,t){return tB((e=nI(e)).getUTCFullYear()%100,t,2)}function nZ(e,t){return tB(e.getUTCFullYear()%1e4,t,4)}function nL(e,t){var n=e.getUTCDay();return tB((e=n>=4||0===n?tw(e):tw.ceil(e)).getUTCFullYear()%1e4,t,4)}function nz(){return"+0000"}function nB(){return"%"}function nF(e){return+e}function nH(e){return Math.floor(+e/1e3)}function nq(e){return new Date(e)}function nW(e){return e instanceof Date?+e:+new Date(+e)}function nK(e,t,n,r,o,i,a,l,c,s){var u=eS(),d=u.invert,f=u.domain,p=s(".%L"),h=s(":%S"),m=s("%I:%M"),g=s("%I %p"),v=s("%a %d"),y=s("%b %d"),b=s("%B"),x=s("%Y");function w(e){return(c(e)<e?p:l(e)<e?h:a(e)<e?m:i(e)<e?g:r(e)<e?o(e)<e?v:y:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,nW)):f().map(nq)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:s(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(eZ(n,e)):u},u.copy=function(){return ex(u,nK(e,t,n,r,o,i,a,l,c,s))},u}function nV(){return ek.o.apply(nK(tI,tR,tO,tE,ts,ti,tr,tt,te,c).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function nU(){return ek.o.apply(nK(tN,tM,tj,tC,tv,ta,to,tn,te,s).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nG(){var e,t,n,r,o,i=0,a=1,l=eg,c=!1;function s(t){return null==t||isNaN(t=+t)?o:l(0===n?.5:(t=(r(t)-e)*n,c?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,l=e(n,r),s):[l(0),l(1)]}}return s.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),s):[i,a]},s.clamp=function(e){return arguments.length?(c=!!e,s):c},s.interpolator=function(e){return arguments.length?(l=e,s):l},s.range=u(ef),s.rangeRound=u(ep),s.unknown=function(e){return arguments.length?(o=e,s):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),s}}function nX(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function n$(){var e=eQ(nG());return e.copy=function(){return nX(e,n$()).exponent(e.exponent())},ek.O.apply(e,arguments)}function nY(){return n$.apply(null,arguments).exponent(.5)}function nQ(){var e,t,n,r,o,i,a,l=0,c=.5,s=1,u=1,d=eg,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=ef);for(var n=0,r=t.length-1,o=t[0],i=Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([l,c,s]=a,e=i(l=+l),t=i(c=+c),n=i(s=+s),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[l,c,s]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(ef),p.rangeRound=h(ep),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(l),t=a(c),n=a(s),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function nJ(){var e=eQ(nQ());return e.copy=function(){return nX(e,nJ()).exponent(e.exponent())},ek.O.apply(e,arguments)}function n0(){return nJ.apply(null,arguments).exponent(.5)}function n1(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],l=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}c=(l=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,l=e.months,c=e.shortMonths,s=tH(o),u=tq(o),d=tH(i),f=tq(i),p=tH(a),h=tq(a),m=tH(l),g=tq(l),v=tH(c),y=tq(c),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:null,d:ne,e:ne,f:ni,g:ng,G:ny,H:nt,I:nn,j:nr,L:no,m:na,M:nl,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:nF,s:nH,S:nc,u:ns,U:nu,V:nf,w:np,W:nh,x:null,X:null,y:nm,Y:nv,Z:nb,"%":nB},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return c[e.getUTCMonth()]},B:function(e){return l[e.getUTCMonth()]},c:null,d:nx,e:nx,f:nC,g:nD,G:nL,H:nw,I:nS,j:nk,L:nE,m:nO,M:nj,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:nF,s:nH,S:nP,u:nN,U:nM,V:nR,w:nT,W:nA,x:null,X:null,y:n_,Y:nZ,Z:nz,"%":nB},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:t0,e:t0,f:t5,g:t$,G:tX,H:t2,I:t2,j:t1,L:t3,m:tJ,M:t6,p:function(e,t,n){var r=s.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:tQ,Q:t7,s:t9,S:t4,u:tK,U:tV,V:tU,w:tW,W:tG,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:t$,Y:tX,Z:tY,"%":t8};function S(e,t){return function(n){var r,o,i,a=[],l=-1,c=0,s=e.length;for(n instanceof Date||(n=new Date(+n));++l<s;)37===e.charCodeAt(l)&&(a.push(e.slice(c,l)),null!=(o=tD[r=e.charAt(++l)])?r=e.charAt(++l):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),c=l+1);return a.push(e.slice(c,l)),a.join("")}}function k(e,t){return function(n){var r,o,i=t_(1900,void 0,1);if(E(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(!t||"Z"in i||(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(o=(r=tA(t_(i.y,0,1))).getUTCDay())>4||0===o?ty.ceil(r):ty(r),r=ta.offset(r,(i.V-1)*7),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(r=(o=(r=tT(t_(i.y,0,1))).getDay())>4||0===o?tu.ceil(r):tu(r),r=ti.offset(r,(i.V-1)*7),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?tA(t_(i.y,0,1)).getUTCDay():tT(t_(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,tA(i)):tT(i)}}function E(e,t,n,r){for(var o,i,a=0,l=t.length,c=n.length;a<l;){if(r>=c)return -1;if(37===(o=t.charCodeAt(a++))){if(!(i=w[(o=t.charAt(a++))in tD?t.charAt(a++):o])||(r=i(e,n,r))<0)return -1}else if(o!=n.charCodeAt(r++))return -1}return r}return b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,l.parse,s=l.utcFormat,l.utcParse;var n2=n(22516),n6=n(76115);function n4(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function n3(e,t){return e[t]}function n5(e){let t=[];return t.key=e,t}var n8=n(95645),n7=n.n(n8),n9=n(99008),re=n.n(n9),rt=n(77571),rn=n.n(rt),rr=n(86757),ro=n.n(rr),ri=n(42715),ra=n.n(ri),rl=n(13735),rc=n.n(rl),rs=n(11314),ru=n.n(rs),rd=n(82559),rf=n.n(rd),rp=n(75551),rh=n.n(rp),rm=n(21652),rg=n.n(rm),rv=n(34935),ry=n.n(rv),rb=n(61134),rx=n.n(rb);function rw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rS=function(e){return e},rk={},rE=function(e){return e===rk},rC=function(e){return function t(){return 0==arguments.length||1==arguments.length&&rE(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},rO=function(e){return function e(t,n){return 1===t?n:rC(function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter(function(e){return e!==rk}).length;return a>=t?n.apply(void 0,o):e(t-a,rC(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.map(function(e){return rE(e)?t.shift():e});return n.apply(void 0,((function(e){if(Array.isArray(e))return rw(e)})(i)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return rw(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rw(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(t))}))})}(e.length,e)},rj=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},rP=rO(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),rN=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return rS;var r=t.reverse(),o=r[0],i=r.slice(1);return function(){return i.reduce(function(e,t){return t(e)},o.apply(void 0,arguments))}},rM=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},rI=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return t&&o.every(function(e,n){return e===t[n]})?n:(t=o,n=e.apply(void 0,o))}},rR=(rO(function(e,t,n){var r=+e;return r+n*(+t-r)}),rO(function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)}),rO(function(e,t,n){var r=t-+e;return Math.max(0,Math.min(1,(n-e)/(r=r||1/0)))}),{rangeStep:function(e,t,n){for(var r=new(rx())(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i},getDigitCount:function(e){return 0===e?1:Math.floor(new(rx())(e).abs().log(10).toNumber())+1}});function rT(e){return function(e){if(Array.isArray(e))return rD(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||r_(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||r_(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r_(e,t){if(e){if("string"==typeof e)return rD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rD(e,t)}}function rD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rZ(e){var t=rA(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function rL(e,t,n){if(e.lte(0))return new(rx())(0);var r=rR.getDigitCount(e.toNumber()),o=new(rx())(10).pow(r),i=e.div(o),a=1!==r?.05:.1,l=new(rx())(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?l:new(rx())(Math.ceil(l))}function rz(e,t,n){var r=1,o=new(rx())(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new(rx())(10).pow(rR.getDigitCount(e)-1),o=new(rx())(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new(rx())(Math.floor(e)))}else 0===e?o=new(rx())(Math.floor((t-1)/2)):n||(o=new(rx())(Math.floor(e)));var a=Math.floor((t-1)/2);return rN(rP(function(e){return o.add(new(rx())(e-a).mul(r)).toNumber()}),rj)(0,t)}var rB=rI(function(e){var t=rA(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=Math.max(o,2),l=rA(rZ([n,r]),2),c=l[0],s=l[1];if(c===-1/0||s===1/0){var u=s===1/0?[c].concat(rT(rj(0,o-1).map(function(){return 1/0}))):[].concat(rT(rj(0,o-1).map(function(){return-1/0})),[s]);return n>r?rM(u):u}if(c===s)return rz(c,o,i);var d=function e(t,n,r,o){var i,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new(rx())(0),tickMin:new(rx())(0),tickMax:new(rx())(0)};var l=rL(new(rx())(n).sub(t).div(r-1),o,a),c=Math.ceil((i=t<=0&&n>=0?new(rx())(0):(i=new(rx())(t).add(n).div(2)).sub(new(rx())(i).mod(l))).sub(t).div(l).toNumber()),s=Math.ceil(new(rx())(n).sub(i).div(l).toNumber()),u=c+s+1;return u>r?e(t,n,r,o,a+1):(u<r&&(s=n>0?s+(r-u):s,c=n>0?c:c+(r-u)),{step:l,tickMin:i.sub(new(rx())(c).mul(l)),tickMax:i.add(new(rx())(s).mul(l))})}(c,s,a,i),f=d.step,p=d.tickMin,h=d.tickMax,m=rR.rangeStep(p,h.add(new(rx())(.1).mul(f)),f);return n>r?rM(m):m});rI(function(e){var t=rA(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=Math.max(o,2),l=rA(rZ([n,r]),2),c=l[0],s=l[1];if(c===-1/0||s===1/0)return[n,r];if(c===s)return rz(c,o,i);var u=rL(new(rx())(s).sub(c).div(a-1),i,0),d=rN(rP(function(e){return new(rx())(c).add(new(rx())(e).mul(u)).toNumber()}),rj)(0,a).filter(function(e){return e>=c&&e<=s});return n>r?rM(d):d});var rF=rI(function(e,t){var n=rA(e,2),r=n[0],o=n[1],i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=rA(rZ([r,o]),2),l=a[0],c=a[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var s=rL(new(rx())(c).sub(l).div(Math.max(t,2)-1),i,0),u=[].concat(rT(rR.rangeStep(new(rx())(l),new(rx())(c).sub(new(rx())(.99).mul(s)),s)),[c]);return r>o?rM(u):u}),rH=n(13137),rq=n(16630),rW=n(82944),rK=n(38569);function rV(e){return(rV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rU(Object(n),!0).forEach(function(t){rX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rX(e,t,n){var r;return(r=function(e,t){if("object"!==rV(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==rV(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===rV(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r$(e){return function(e){if(Array.isArray(e))return rY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return rY(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rY(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rQ(e,t,n){return rn()(e)||rn()(t)?n:(0,rq.P2)(t)?rc()(e,t,n):ro()(t)?t(e):n}function rJ(e,t,n,r){var o=ru()(e,function(e){return rQ(e,t)});if("number"===n){var i=o.filter(function(e){return(0,rq.hj)(e)||parseFloat(e)});return i.length?[re()(i),n7()(i)]:[1/0,-1/0]}return(r?o.filter(function(e){return!rn()(e)}):o).map(function(e){return(0,rq.P2)(e)||e instanceof Date?e:""})}var r0=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,a=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(o&&"angleAxis"===o.axisType&&1e-6>=Math.abs(Math.abs(o.range[1]-o.range[0])-360))for(var l=o.range,c=0;c<a;c++){var s=c>0?r[c-1].coordinate:r[a-1].coordinate,u=r[c].coordinate,d=c>=a-1?r[0].coordinate:r[c+1].coordinate,f=void 0;if((0,rq.uY)(u-s)!==(0,rq.uY)(d-u)){var p=[];if((0,rq.uY)(d-u)===(0,rq.uY)(l[1]-l[0])){f=d;var h=u+l[1]-l[0];p[0]=Math.min(h,(h+s)/2),p[1]=Math.max(h,(h+s)/2)}else{f=s;var m=d+l[1]-l[0];p[0]=Math.min(u,(m+u)/2),p[1]=Math.max(u,(m+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){i=r[c].index;break}}else{var v=Math.min(s,d),y=Math.max(s,d);if(e>(v+u)/2&&e<=(y+u)/2){i=r[c].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}return i},r1=function(e){var t,n=e.type.displayName,r=e.props,o=r.stroke,i=r.fill;switch(n){case"Line":t=o;break;case"Area":case"Radar":t=o&&"none"!==o?o:i;break;default:t=i}return t},r2=function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var o={},i=Object.keys(r),a=0,l=i.length;a<l;a++)for(var c=r[i[a]].stackGroups,s=Object.keys(c),u=0,d=s.length;u<d;u++){var f=c[s[u]],p=f.items,h=f.cateAxisId,m=p.filter(function(e){return(0,rW.Gf)(e.type).indexOf("Bar")>=0});if(m&&m.length){var g=m[0].props.barSize,v=m[0].props[h];o[v]||(o[v]=[]),o[v].push({item:m[0],stackList:m.slice(1),barSize:rn()(g)?t:g})}}return o},r6=function(e){var t,n=e.barGap,r=e.barCategoryGap,o=e.bandSize,i=e.sizeList,a=void 0===i?[]:i,l=e.maxBarSize,c=a.length;if(c<1)return null;var s=(0,rq.h1)(n,o,0,!0),u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=o/c,p=a.reduce(function(e,t){return e+t.barSize||0},0);(p+=(c-1)*s)>=o&&(p-=(c-1)*s,s=0),p>=o&&f>0&&(d=!0,f*=.9,p=c*f);var h={offset:((o-p)/2>>0)-s,size:0};t=a.reduce(function(e,t){var n={item:t.item,position:{offset:h.offset+h.size+s,size:d?f:t.barSize}},r=[].concat(r$(e),[n]);return h=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:h})}),r},u)}else{var m=(0,rq.h1)(r,o,0,!0);o-2*m-(c-1)*s<=0&&(s=0);var g=(o-2*m-(c-1)*s)/c;g>1&&(g>>=0);var v=l===+l?Math.min(g,l):g;t=a.reduce(function(e,t,n){var r=[].concat(r$(e),[{item:t.item,position:{offset:m+(g+s)*n+(g-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return t},r4=function(e,t,n,r){var o=n.children,i=n.width,a=n.margin,l=i-(a.left||0)-(a.right||0),c=(0,rK.z)({children:o,legendWidth:l});if(c){var s=r||{},u=s.width,d=s.height,f=c.align,p=c.verticalAlign,h=c.layout;if(("vertical"===h||"horizontal"===h&&"middle"===p)&&"center"!==f&&(0,rq.hj)(e[f]))return rG(rG({},e),{},rX({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==p&&(0,rq.hj)(e[p]))return rG(rG({},e),{},rX({},p,e[p]+(d||0)))}return e},r3=function(e,t,n,r,o){var i=t.props.children,a=(0,rW.NN)(i,rH.W).filter(function(e){var t;return t=e.props.direction,!!rn()(o)||("horizontal"===r?"yAxis"===o:"vertical"===r||"x"===t?"xAxis"===o:"y"!==t||"yAxis"===o)});if(a&&a.length){var l=a.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=rQ(t,n,0),o=Array.isArray(r)?[re()(r),n7()(r)]:[r,r],i=l.reduce(function(e,n){var r=rQ(t,n,0),i=o[0]-Math.abs(Array.isArray(r)?r[0]:r),a=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(a,e[1])]},[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]},[1/0,-1/0])}return null},r5=function(e,t,n,r,o){var i=t.map(function(t){return r3(e,t,n,o,r)}).filter(function(e){return!rn()(e)});return i&&i.length?i.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},r8=function(e,t,n,r,o){var i=t.map(function(t){var i=t.props.dataKey;return"number"===n&&i&&r3(e,t,i,r)||rJ(e,i,n,o)});if("number"===n)return i.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var a={};return i.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e},[])},r7=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},r9=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var o,i,a=e.map(function(e){return e.coordinate===t&&(o=!0),e.coordinate===n&&(i=!0),e.coordinate});return o||a.push(t),i||a.push(n),a},oe=function(e,t,n){if(!e)return null;var r=e.scale,o=e.duplicateDomain,i=e.type,a=e.range,l="scaleBand"===e.realScaleType?r.bandwidth()/2:2,c=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/l:0;return(c="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*(0,rq.uY)(a[0]-a[1])*c:c,t&&(e.ticks||e.niceTicks))?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(o?o.indexOf(e):e)+c,value:e,offset:c}}).filter(function(e){return!rf()(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+c,value:e,index:t,offset:c}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+c,value:e,offset:c}}):r.domain().map(function(e,t){return{coordinate:r(e)+c,value:o?o[e]:e,index:t,offset:c}})},ot=new WeakMap,on=function(e,t){if("function"!=typeof t)return e;ot.has(e)||ot.set(e,new WeakMap);var n=ot.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},or=function(e,t,n){var r=e.scale,o=e.type,i=e.layout,a=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===a?{scale:d.Z(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:eD(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:d.x(),realScaleType:"point"}:"category"===o?{scale:d.Z(),realScaleType:"band"}:{scale:eD(),realScaleType:"linear"};if(ra()(r)){var l="scale".concat(rh()(r));return{scale:(u[l]||d.x)(),realScaleType:u[l]?l:"point"}}return ro()(r)?{scale:r}:{scale:d.x(),realScaleType:"point"}},oo=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-1e-4,i=Math.max(r[0],r[1])+1e-4,a=e(t[0]),l=e(t[n-1]);(a<o||a>i||l<o||l>i)&&e.domain([t[0],t[n-1]])}},oi=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},oa=function(e,t){if(!t||2!==t.length||!(0,rq.hj)(t[0])||!(0,rq.hj)(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!(0,rq.hj)(e[0])||e[0]<n)&&(o[0]=n),(!(0,rq.hj)(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o},ol={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0,a=0;a<t;++a){var l=rf()(e[a][n][1])?e[a][n][0]:e[a][n][1];l>=0?(e[a][n][0]=o,e[a][n][1]=o+l,o=e[a][n][1]):(e[a][n][0]=i,e[a][n][1]=i+l,i=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}n1(e,t)}},none:n1,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,l=0;a<n;++a)l+=e[a][r][1]||0;o[r][1]+=o[r][0]=-l/2}n1(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var l=0,c=0,s=0;l<o;++l){for(var u=e[t[l]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<l;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}c+=d,s+=f*d}n[a-1][1]+=n[a-1][0]=i,c&&(i-=s/c)}n[a-1][1]+=n[a-1][0]=i,n1(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0;i<t;++i){var a=rf()(e[i][n][1])?e[i][n][0]:e[i][n][1];a>=0?(e[i][n][0]=o,e[i][n][1]=o+a,o=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},oc=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),o=ol[n];return(function(){var e=(0,n6.Z)([]),t=n4,n=n1,r=n3;function o(o){var i,a,l=Array.from(e.apply(this,arguments),n5),c=l.length,s=-1;for(let e of o)for(i=0,++s;i<c;++i)(l[i][s]=[0,+r(e,l[i].key,s,o)]).data=e;for(i=0,a=(0,n2.Z)(t(l));i<c;++i)l[a[i]].index=i;return n(l,a),l}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:(0,n6.Z)(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:(0,n6.Z)(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?n4:"function"==typeof e?e:(0,n6.Z)(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?n1:e,o):n},o})().keys(r).value(function(e,t){return+rQ(e,t,0)}).order(n4).offset(o)(e)},os=function(e,t,n,r,o,i){if(!e)return null;var a=(i?t.reverse():t).reduce(function(e,t){var o=t.props,i=o.stackId;if(o.hide)return e;var a=t.props[n],l=e[a]||{hasStack:!1,stackGroups:{}};if((0,rq.P2)(i)){var c=l.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[i]=c}else l.stackGroups[(0,rq.EL)("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return rG(rG({},e),{},rX({},a,l))},{});return Object.keys(a).reduce(function(t,i){var l=a[i];return l.hasStack&&(l.stackGroups=Object.keys(l.stackGroups).reduce(function(t,i){var a=l.stackGroups[i];return rG(rG({},t),{},rX({},i,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:oc(e,a.items,o)}))},{})),rG(rG({},t),{},rX({},i,l))},{})},ou=function(e,t){var n=t.realScaleType,r=t.type,o=t.tickCount,i=t.originalDomain,a=t.allowDecimals,l=n||t.scale;if("auto"!==l&&"linear"!==l)return null;if(o&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var c=e.domain();if(!c.length)return null;var s=rB(c,o,a);return e.domain([re()(s),n7()(s)]),{niceTicks:s}}return o&&"number"===r?{niceTicks:rF(e.domain(),o,a)}:null},od=function(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!rn()(o[t.dataKey])){var l=(0,rq.Ap)(n,"value",o[t.dataKey]);if(l)return l.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=rQ(o,rn()(a)?t.dataKey:a);return rn()(c)?null:t.scale(c)},of=function(e){var t=e.axis,n=e.ticks,r=e.offset,o=e.bandSize,i=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var l=rQ(i,t.dataKey,t.domain[a]);return rn()(l)?null:t.scale(l)-o/2+r},op=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]},oh=function(e,t){var n=e.props.stackId;if((0,rq.P2)(n)){var r=t[n];if(r){var o=r.items.indexOf(e);return o>=0?r.stackedData[o]:null}}return null},om=function(e,t,n){return Object.keys(e).reduce(function(r,o){var i=e[o].stackedData.reduce(function(e,r){var o=r.slice(t,n+1).reduce(function(e,t){return[re()(t.concat([e[0]]).filter(rq.hj)),n7()(t.concat([e[1]]).filter(rq.hj))]},[1/0,-1/0]);return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]},[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},og=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ov=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oy=function(e,t,n){if(ro()(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if((0,rq.hj)(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(og.test(e[0])){var o=+og.exec(e[0])[1];r[0]=t[0]-o}else ro()(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if((0,rq.hj)(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(ov.test(e[1])){var i=+ov.exec(e[1])[1];r[1]=t[1]+i}else ro()(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},ob=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=ry()(t,function(e){return e.coordinate}),i=1/0,a=1,l=o.length;a<l;a++){var c=o[a],s=o[a-1];i=Math.min((c.coordinate||0)-(s.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},ox=function(e,t,n){return!e||!e.length||rg()(e,rc()(n,"type.defaultProps.domain"))?t:e},ow=function(e,t){var n=e.props,r=n.dataKey,o=n.name,i=n.unit,a=n.formatter,l=n.tooltipType,c=n.chartType,s=n.hide;return rG(rG({},(0,rW.L6)(e,!1)),{},{dataKey:r,unit:i,formatter:a,name:o||r,color:r1(e),value:rQ(t,r),type:l,payload:t,chartType:c,hide:s})}},4094:function(e,t,n){"use strict";n.d(t,{os:function(){return d},xE:function(){return u}});var r=n(34067);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var l={widthCache:{},cacheCount:0},c={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},s="recharts_measurement_span",u=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||r.x.isSsr)return{width:0,height:0};var o=(Object.keys(t=a({},n)).forEach(function(e){t[e]||delete t[e]}),t),i=JSON.stringify({text:e,copyStyle:o});if(l.widthCache[i])return l.widthCache[i];try{var u=document.getElementById(s);u||((u=document.createElement("span")).setAttribute("id",s),u.setAttribute("aria-hidden","true"),document.body.appendChild(u));var d=a(a({},c),o);Object.assign(u.style,d),u.textContent="".concat(e);var f=u.getBoundingClientRect(),p={width:f.width,height:f.height};return l.widthCache[i]=p,++l.cacheCount>2e3&&(l.cacheCount=0,l.widthCache={}),p}catch(e){return{width:0,height:0}}},d=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}}},16630:function(e,t,n){"use strict";n.d(t,{Ap:function(){return w},EL:function(){return g},Kt:function(){return y},P2:function(){return h},bv:function(){return b},h1:function(){return v},hU:function(){return f},hj:function(){return p},k4:function(){return x},uY:function(){return d}});var r=n(42715),o=n.n(r),i=n(82559),a=n.n(i),l=n(13735),c=n.n(l),s=n(22345),u=n.n(s),d=function(e){return 0===e?0:e>0?1:-1},f=function(e){return o()(e)&&e.indexOf("%")===e.length-1},p=function(e){return u()(e)&&!a()(e)},h=function(e){return p(e)||o()(e)},m=0,g=function(e){var t=++m;return"".concat(e||"").concat(t)},v=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!p(e)&&!o()(e))return r;if(f(e)){var l=e.indexOf("%");n=t*parseFloat(e.slice(0,l))/100}else n=+e;return a()(n)&&(n=r),i&&n>t&&(n=t),n},y=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},b=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1},x=function(e,t){return p(e)&&p(t)?function(n){return e+n*(t-e)}:function(){return t}};function w(e,t,n){return e&&e.length?e.find(function(e){return e&&("function"==typeof t?t(e):c()(e,t))===n}):null}},34067:function(e,t,n){"use strict";n.d(t,{x:function(){return r}});var r={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return r[e]},set:function(e,t){if("string"==typeof e)r[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){r[t]=e[t]})}}}},1175:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]}},39206:function(e,t,n){"use strict";n.d(t,{$4:function(){return h},Wk:function(){return f},op:function(){return p},t9:function(){return m},z3:function(){return b}});var r=n(77571),o=n.n(r),i=n(16630),a=n(85355);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){var r;return(r=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==l(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===l(r)?r:String(r))in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var f=Math.PI/180,p=function(e,t,n,r){return{x:e+Math.cos(-f*r)*n,y:t+Math.sin(-f*r)*n}},h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},m=function(e,t,n,r,l){var c=e.width,f=e.height,p=e.startAngle,m=e.endAngle,g=(0,i.h1)(e.cx,c,c/2),v=(0,i.h1)(e.cy,f,f/2),y=h(c,f,n),b=(0,i.h1)(e.innerRadius,y,0),x=(0,i.h1)(e.outerRadius,y,.8*y);return Object.keys(t).reduce(function(e,n){var i,c=t[n],f=c.domain,h=c.reversed;if(o()(c.range))"angleAxis"===r?i=[p,m]:"radiusAxis"===r&&(i=[b,x]),h&&(i=[i[1],i[0]]);else{var y,w=function(e){if(Array.isArray(e))return e}(y=i=c.range)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{for(i=(n=n.call(e)).next;!(c=(r=i.call(n)).done)&&(l.push(r.value),2!==l.length);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(y,2)||function(e,t){if(e){if("string"==typeof e)return d(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,2)}}(y,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();p=w[0],m=w[1]}var S=(0,a.Hq)(c,l),k=S.realScaleType,E=S.scale;E.domain(f).range(i),(0,a.zF)(E);var C=(0,a.g$)(E,s(s({},c),{},{realScaleType:k})),O=s(s(s({},c),C),{},{range:i,radius:x,realScaleType:k,scale:E,cx:g,cy:v,innerRadius:b,outerRadius:x,startAngle:p,endAngle:m});return s(s({},e),{},u({},n,O))},{})},g=function(e,t){var n=e.x,r=e.y;return Math.sqrt(Math.pow(n-t.x,2)+Math.pow(r-t.y,2))},v=function(e,t){var n=e.x,r=e.y,o=t.cx,i=t.cy,a=g({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a};var l=Math.acos((n-o)/a);return r>i&&(l=2*Math.PI-l),{radius:a,angle:180*l/Math.PI,angleInRadian:l}},y=function(e){var t=e.startAngle,n=e.endAngle,r=Math.min(Math.floor(t/360),Math.floor(n/360));return{startAngle:t-360*r,endAngle:n-360*r}},b=function(e,t){var n,r=v({x:e.x,y:e.y},t),o=r.radius,i=r.angle,a=t.innerRadius,l=t.outerRadius;if(o<a||o>l)return!1;if(0===o)return!0;var c=y(t),u=c.startAngle,d=c.endAngle,f=i;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;n=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;n=f>=d&&f<=u}return n?s(s({},t),{},{radius:o,angle:f+360*Math.min(Math.floor(t.startAngle/360),Math.floor(t.endAngle/360))}):null}},82944:function(e,t,n){"use strict";n.d(t,{$R:function(){return L},$k:function(){return I},Bh:function(){return Z},Gf:function(){return k},L6:function(){return T},NN:function(){return j},TT:function(){return N},eu:function(){return D},rL:function(){return A},sP:function(){return P}});var r=n(13735),o=n.n(r),i=n(77571),a=n.n(i),l=n(42715),c=n.n(l),s=n(86757),u=n.n(s),d=n(28302),f=n.n(d),p=n(2265),h=n(82558),m=n(16630),g=n(46485),v=n(41637),y=["children"],b=["children"];function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var S={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},k=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},E=null,C=null,O=function e(t){if(t===E&&Array.isArray(C))return C;var n=[];return p.Children.forEach(t,function(t){a()(t)||((0,h.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),C=n,E=t,n};function j(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return k(e)}):[k(t)],O(e).forEach(function(e){var t=o()(e,"type.displayName")||o()(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}function P(e,t){var n=j(e,t);return n&&n[0]}var N=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!!(0,m.hj)(n)&&!(n<=0)&&!!(0,m.hj)(r)&&!(r<=0)},M=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],I=function(e){return e&&"object"===w(e)&&"cx"in e&&"cy"in e&&"r"in e},R=function(e,t,n,r){var o,i=null!==(o=null===v.ry||void 0===v.ry?void 0:v.ry[r])&&void 0!==o?o:[];return!u()(e)&&(r&&i.includes(t)||v.Yh.includes(t))||n&&v.nv.includes(t)},T=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,p.isValidElement)(e)&&(r=e.props),!f()(r))return null;var o={};return Object.keys(r).forEach(function(e){var i;R(null===(i=r)||void 0===i?void 0:i[e],e,t,n)&&(o[e]=r[e])}),o},A=function e(t,n){if(t===n)return!0;var r=p.Children.count(t);if(r!==p.Children.count(n))return!1;if(0===r)return!0;if(1===r)return _(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var i=t[o],a=n[o];if(Array.isArray(i)||Array.isArray(a)){if(!e(i,a))return!1}else if(!_(i,a))return!1}return!0},_=function(e,t){if(a()(e)&&a()(t))return!0;if(!a()(e)&&!a()(t)){var n=e.props||{},r=n.children,o=x(n,y),i=t.props||{},l=i.children,c=x(i,b);if(r&&l)return(0,g.w)(o,c)&&A(r,l);if(!r&&!l)return(0,g.w)(o,c)}return!1},D=function(e,t){var n=[],r={};return O(e).forEach(function(e,o){if(e&&e.type&&c()(e.type)&&M.indexOf(e.type)>=0)n.push(e);else if(e){var i=k(e.type),a=t[i]||{},l=a.handler,s=a.once;if(l&&(!s||!r[i])){var u=l(e,i,o);n.push(u),r[i]=!0}}}),n},Z=function(e){var t=e&&e.type;return t&&S[t]?S[t]:null},L=function(e,t){return O(t).indexOf(e)}},46485:function(e,t,n){"use strict";function r(e,t){for(var n in e)if(({}).hasOwnProperty.call(e,n)&&(!({}).hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if(({}).hasOwnProperty.call(t,r)&&!({}).hasOwnProperty.call(e,r))return!1;return!0}n.d(t,{w:function(){return r}})},38569:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(22190),o=n(85355),i=n(82944);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var s=function(e){var t,n=e.children,a=e.formattedGraphicalItems,l=e.legendWidth,s=e.legendContent,u=(0,i.sP)(n,r.D);return u?(t=u.props&&u.props.payload?u.props&&u.props.payload:"children"===s?(a||[]).reduce(function(e,t){var n=t.item,r=t.props,o=r.sectors||r.data||[];return e.concat(o.map(function(e){return{type:u.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(a||[]).map(function(e){var t=e.item,n=t.props,r=n.dataKey,i=n.name,a=n.legendType;return{inactive:n.hide,dataKey:r,type:u.props.iconType||a||"square",color:(0,o.fk)(t),value:i||r,payload:t.props}}),c(c(c({},u.props),r.D.getWithHeight(u,l)),{},{payload:t,item:u})):null}},93528:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(47230),o=n.n(r),i=n(86757),a=n.n(i);function l(e,t,n){return!0===t?o()(e,n):a()(t)?o()(e,t):e}},41637:function(e,t,n){"use strict";n.d(t,{Yh:function(){return l},Ym:function(){return d},bw:function(){return f},nv:function(){return u},ry:function(){return s}});var r=n(2265),o=n(28302),i=n.n(o);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var l=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],c=["points","pathLength"],s={svg:["viewBox","children"],polygon:c,polyline:c},u=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],d=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,r.isValidElement)(e)&&(n=e.props),!i()(n))return null;var o={};return Object.keys(n).forEach(function(e){u.includes(e)&&(o[e]=t||function(t){return n[e](n,t)})}),o},f=function(e,t,n){if(!i()(e)||"object"!==a(e))return null;var r=null;return Object.keys(e).forEach(function(o){var i=e[o];u.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=function(e){return i(t,n,e),null})}),r}},52744:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(80662));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach(function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}}),n}},18975:function(e,t,n){"use strict";var r=n(40257);n(24601);var o=n(2265),i=o&&"object"==typeof o&&"default"in o?o:{default:o},a=void 0!==r&&r.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},c=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,o=t.optimizeForSpeed,i=void 0===o?a:o;s(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",s("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var c="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=c?c.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){s("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),s(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(s(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(a||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){if(s(l(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return a||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},t.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var n="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){a||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];s(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},t.deleteRule=function(e){if("undefined"==typeof window){this._serverSheet.deleteRule(e);return}if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];s(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},t.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},t.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},t.makeStyleTag=function(e,t,n){t&&s(l(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var o=document.head||document.getElementsByTagName("head")[0];return n?o.insertBefore(r,n):o.appendChild(r),r},function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function s(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var u=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},d={};function f(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return d[r]||(d[r]="jsx-"+u(e+"-"+n)),d[r]}function p(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var n=e+t;return d[n]||(d[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[n]}var h=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,o=t.optimizeForSpeed,i=void 0!==o&&o;this._sheet=r||new c({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),r&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,o=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var i=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=i,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var o=f(r,n);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return p(o,e)}):[p(o,t)]}}return{styleId:f(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=o.createContext(null);m.displayName="StyleSheetContext";var g=i.default.useInsertionEffect||i.default.useLayoutEffect,v="undefined"!=typeof window?new h:void 0;function y(e){var t=v||o.useContext(m);return t&&("undefined"==typeof window?t.add(e):g(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}y.dynamic=function(e){return e.map(function(e){return f(e[0],e[1])}).join(" ")},t.style=y},29:function(e,t,n){"use strict";e.exports=n(18975).style},99623:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},21092:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],l=i[1],s=new o((a+l)*3/4-l),u=0,d=l>0?a-4:a;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,s[u++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t),s},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,l=r-o;a<l;a+=16383)i.push(function(e,t,r){for(var o,i=[],a=t;a<r;a+=3)i.push(n[(o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return i.join("")}(e,a,a+16383>l?l:a+16383));return 1===o?i.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===o&&i.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=i.length;a<l;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},10536:function(e,t,n){"use strict";var r=n(21092),o=n(32119),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!l.isEncoding(t))throw TypeError("Unknown encoding: "+t);var n=0|h(e,t),r=a(n),o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(N(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);var o=function(e){if(l.isBuffer(e)){var t,n=0|p(e.length),r=a(n);return 0===r.length||e.copy(r,0,0,n),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return s(e),a(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),n=a(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){var r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),l.prototype),r}function p(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(o)return r?-1:O(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,n){var o,i,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=M[e[i]];return o}(this,t,n);case"utf8":case"utf-8":return b(this,t,n);case"ascii":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}(this,t,n);case"base64":return o=t,i=n,0===o&&i===this.length?r.fromByteArray(this):r.fromByteArray(this.slice(o,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}(this,t,n);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){var i;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(i=n=+n)!=i&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return -1;n=e.length-1}else if(n<0){if(!o)return -1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,l=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,l/=2,c/=2,n/=2}function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;i<l;i++)if(s(e,i)===s(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===c)return u*a}else -1!==u&&(i-=i-u),u=-1}else for(n+c>l&&(n=l-c),i=n;i>=0;i--){for(var d=!0,f=0;f<c;f++)if(s(e,i+f)!==s(t,f)){d=!1;break}if(d)return i}return -1}function b(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,l,c,s=e[o],u=null,d=s>239?4:s>223?3:s>191?2:1;if(o+d<=n)switch(d){case 1:s<128&&(u=s);break;case 2:(192&(i=e[o+1]))==128&&(c=(31&s)<<6|63&i)>127&&(u=c);break;case 3:i=e[o+1],a=e[o+2],(192&i)==128&&(192&a)==128&&(c=(15&s)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:i=e[o+1],a=e[o+2],l=e[o+3],(192&i)==128&&(192&a)==128&&(192&l)==128&&(c=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&l)>65535&&c<1114112&&(u=c)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function x(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function w(e,t,n,r,o,i){if(!l.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function S(e,t,n,r,o,i){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function k(e,t,n,r,i){return t=+t,n>>>=0,i||S(e,t,n,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,n,r,23,4),n+4}function E(e,t,n,r,i){return t=+t,n>>>=0,i||S(e,t,n,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,n,r,52,8),n+8}t.lW=l,t.h2=50,l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return(s(e),e<=0)?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;var n,r=l.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(N(i,Uint8Array))o+i.length>r.length?l.from(i).copy(r,o):Uint8Array.prototype.set.call(r,i,o);else if(l.isBuffer(i))i.copy(r,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=i.length}return r},l.byteLength=h,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.h2;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,o){if(N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var i=o-r,a=n-t,c=Math.min(i,a),s=this.slice(r,o),u=e.slice(t,n),d=0;d<c;++d)if(s[d]!==u[d]){i=s[d],a=u[d];break}return i<a?-1:a<i?1:0},l.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,a,l,c,s,u,d,f=this.length-t;if((void 0===n||n>f)&&(n=f),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var p=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;r>i/2&&(r=i/2);for(var a=0;a<r;++a){var l=parseInt(t.substr(2*a,2),16);if(l!=l)break;e[n+a]=l}return a}(this,e,t,n);case"utf8":case"utf-8":return o=t,i=n,P(O(e,this.length-o),this,o,i);case"ascii":case"latin1":case"binary":return a=t,l=n,P(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(e),this,a,l);case"base64":return c=t,s=n,P(j(e),this,c,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,d=n,P(function(e,t){for(var n,r,o=[],i=0;i<e.length&&!((t-=2)<0);++i)r=(n=e.charCodeAt(i))>>8,o.push(n%256),o.push(r);return o}(e,this.length-u),this,u,d);default:if(p)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return(e>>>=0,t||x(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var o=Math.pow(2,8*n)-1;w(this,e,t,n,o,0)}var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var o=Math.pow(2,8*n)-1;w(this,e,t,n,o,0)}var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);w(this,e,t,n,o-1,-o)}var i=0,a=1,l=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===l&&0!==this[t+i-1]&&(l=1),this[t+i]=(e/a>>0)-l&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);w(this,e,t,n,o-1,-o)}var i=n-1,a=1,l=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/a>>0)-l&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return E(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return E(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var o,i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:l.from(e,r),c=a.length;if(0===c)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%c]}return this};var C=/[^+/0-9A-Za-z-_]/g;function O(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319||a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return i}function j(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length)&&!(o>=e.length);++o)t[o+n]=e[o];return o}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var M=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()},32119:function(e,t){t.read=function(e,t,n,r,o){var i,a,l=8*o-r-1,c=(1<<l)-1,s=c>>1,u=-7,d=n?o-1:0,f=n?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-u)-1,p>>=-u,u+=l;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-s;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=s}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,l,c,s=8*i-o-1,u=(1<<s)-1,d=u>>1,f=23===o?5960464477539062e-23:0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(l=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+d>=1?t+=f/c:t+=f*Math.pow(2,1-d),t*c>=2&&(a++,c/=2),a+d>=u?(l=0,a=u):a+d>=1?(l=(t*c-1)*Math.pow(2,o),a+=d):(l=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&l,p+=h,l/=256,o-=8);for(a=a<<o|l,s+=o;s>0;e[n+p]=255&a,p+=h,a/=256,s-=8);e[n+p-h]|=128*m}},9973:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},21886:function(e,t,n){"use strict";let r,o;n.d(t,{p:function(){return P}});var i,a=n(2265),l=n(13323),c=n(17684),s=n(80004),u=n(93689),d=n(37863),f=n(47634),p=n(24536),h=n(40293),m=n(27847);let g=null!=(i=a.startTransition)?i:function(e){e()};var v=n(37388),y=((r=y||{})[r.Open=0]="Open",r[r.Closed=1]="Closed",r),b=((o=b||{})[o.ToggleDisclosure=0]="ToggleDisclosure",o[o.CloseDisclosure=1]="CloseDisclosure",o[o.SetButtonId=2]="SetButtonId",o[o.SetPanelId=3]="SetPanelId",o[o.LinkPanel=4]="LinkPanel",o[o.UnlinkPanel=5]="UnlinkPanel",o);let x={0:e=>({...e,disclosureState:(0,p.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},4:e=>!0===e.linkedPanel?e:{...e,linkedPanel:!0},5:e=>!1===e.linkedPanel?e:{...e,linkedPanel:!1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},w=(0,a.createContext)(null);function S(e){let t=(0,a.useContext)(w);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Disclosure /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}w.displayName="DisclosureContext";let k=(0,a.createContext)(null);k.displayName="DisclosureAPIContext";let E=(0,a.createContext)(null);function C(e,t){return(0,p.E)(t.type,x,e,t)}E.displayName="DisclosurePanelContext";let O=a.Fragment,j=m.AN.RenderStrategy|m.AN.Static,P=Object.assign((0,m.yV)(function(e,t){let{defaultOpen:n=!1,...r}=e,o=(0,a.useRef)(null),i=(0,u.T)(t,(0,u.h)(e=>{o.current=e},void 0===e.as||e.as===a.Fragment)),c=(0,a.useRef)(null),s=(0,a.useRef)(null),f=(0,a.useReducer)(C,{disclosureState:n?0:1,linkedPanel:!1,buttonRef:s,panelRef:c,buttonId:null,panelId:null}),[{disclosureState:g,buttonId:v},y]=f,b=(0,l.z)(e=>{y({type:1});let t=(0,h.r)(o);if(!t||!v)return;let n=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(v):t.getElementById(v);null==n||n.focus()}),x=(0,a.useMemo)(()=>({close:b}),[b]),S=(0,a.useMemo)(()=>({open:0===g,close:b}),[g,b]);return a.createElement(w.Provider,{value:f},a.createElement(k.Provider,{value:x},a.createElement(d.up,{value:(0,p.E)(g,{0:d.ZM.Open,1:d.ZM.Closed})},(0,m.sY)({ourProps:{ref:i},theirProps:r,slot:S,defaultTag:O,name:"Disclosure"}))))}),{Button:(0,m.yV)(function(e,t){let n=(0,c.M)(),{id:r="headlessui-disclosure-button-".concat(n),...o}=e,[i,d]=S("Disclosure.Button"),p=(0,a.useContext)(E),h=null!==p&&p===i.panelId,g=(0,a.useRef)(null),y=(0,u.T)(g,t,h?null:i.buttonRef),b=(0,m.Y2)();(0,a.useEffect)(()=>{if(!h)return d({type:2,buttonId:r}),()=>{d({type:2,buttonId:null})}},[r,d,h]);let x=(0,l.z)(e=>{var t;if(h){if(1===i.disclosureState)return;switch(e.key){case v.R.Space:case v.R.Enter:e.preventDefault(),e.stopPropagation(),d({type:0}),null==(t=i.buttonRef.current)||t.focus()}}else switch(e.key){case v.R.Space:case v.R.Enter:e.preventDefault(),e.stopPropagation(),d({type:0})}}),w=(0,l.z)(e=>{e.key===v.R.Space&&e.preventDefault()}),k=(0,l.z)(t=>{var n;(0,f.P)(t.currentTarget)||e.disabled||(h?(d({type:0}),null==(n=i.buttonRef.current)||n.focus()):d({type:0}))}),C=(0,a.useMemo)(()=>({open:0===i.disclosureState}),[i]),O=(0,s.f)(e,g),j=h?{ref:y,type:O,onKeyDown:x,onClick:k}:{ref:y,id:r,type:O,"aria-expanded":0===i.disclosureState,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:x,onKeyUp:w,onClick:k};return(0,m.sY)({mergeRefs:b,ourProps:j,theirProps:o,slot:C,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,m.yV)(function(e,t){let n=(0,c.M)(),{id:r="headlessui-disclosure-panel-".concat(n),...o}=e,[i,l]=S("Disclosure.Panel"),{close:s}=function e(t){let n=(0,a.useContext)(k);if(null===n){let n=Error("<".concat(t," /> is missing a parent <Disclosure /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}return n}("Disclosure.Panel"),f=(0,m.Y2)(),p=(0,u.T)(t,i.panelRef,e=>{g(()=>l({type:e?4:5}))});(0,a.useEffect)(()=>(l({type:3,panelId:r}),()=>{l({type:3,panelId:null})}),[r,l]);let h=(0,d.oJ)(),v=null!==h?(h&d.ZM.Open)===d.ZM.Open:0===i.disclosureState,y=(0,a.useMemo)(()=>({open:0===i.disclosureState,close:s}),[i,s]);return a.createElement(E.Provider,{value:i.panelId},(0,m.sY)({mergeRefs:f,ourProps:{ref:p,id:r},theirProps:o,slot:y,defaultTag:"div",features:j,visible:v,name:"Disclosure.Panel"}))})})},28517:function(e,t,n){"use strict";let r,o,i,a,l;n.d(t,{R:function(){return V}});var c=n(2265),s=n(64518),u=n(31948);function d(e,t){let[n,r]=(0,c.useState)(e),o=(0,u.E)(e);return(0,s.e)(()=>r(o.current),[o,r,...t]),n}var f=n(62963),p=n(90945),h=n(13323),m=n(17684),g=n(98505),v=n(80004),y=n(93689);let b=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function x(e){var t,n;let r=null!=(t=e.innerText)?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let e of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),i=!0;let a=i?null!=(n=o.innerText)?n:"":r;return b.test(a)&&(a=a.replace(b,"")),a}function w(e){return[e.screenX,e.screenY]}var S=n(38198),k=n(37863),E=n(47634),C=((r=C||{})[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r),O=n(16015),j=n(37105),P=n(56314),N=n(24536),M=n(40293),I=n(27847),R=n(37388),T=((o=T||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o),A=((i=A||{})[i.Single=0]="Single",i[i.Multi=1]="Multi",i),_=((a=_||{})[a.Pointer=0]="Pointer",a[a.Other=1]="Other",a),D=((l=D||{})[l.OpenListbox=0]="OpenListbox",l[l.CloseListbox=1]="CloseListbox",l[l.GoToOption=2]="GoToOption",l[l.Search=3]="Search",l[l.ClearSearch=4]="ClearSearch",l[l.RegisterOption=5]="RegisterOption",l[l.UnregisterOption=6]="UnregisterOption",l[l.RegisterLabel=7]="RegisterLabel",l);function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=(0,j.z2)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return -1===o&&(o=null),{options:r,activeOptionIndex:o}}let L={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(e=>n(e.dataRef.current.value));return -1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||1===e.listboxState)return e;let r=Z(e),o=function(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw Error("Unexpected object: "+e)}(e)}}(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:o,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))}),i=o?e.options.indexOf(o):-1;return -1===i||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Z(e,e=>[...e,n]);return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Z(e,e=>{let n=e.findIndex(e=>e.id===t.id);return -1!==n&&e.splice(n,1),e});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},z=(0,c.createContext)(null);function B(e){let t=(0,c.useContext)(z);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Listbox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,B),t}return t}z.displayName="ListboxActionsContext";let F=(0,c.createContext)(null);function H(e){let t=(0,c.useContext)(F);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Listbox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,H),t}return t}function q(e,t){return(0,N.E)(t.type,L,e,t)}F.displayName="ListboxDataContext";let W=c.Fragment,K=I.AN.RenderStrategy|I.AN.Static,V=Object.assign((0,I.yV)(function(e,t){let{value:n,defaultValue:r,form:o,name:i,onChange:a,by:l=(e,t)=>e===t,disabled:u=!1,horizontal:d=!1,multiple:m=!1,...v}=e,b=d?"horizontal":"vertical",x=(0,y.T)(t),[w=m?[]:void 0,E]=(0,f.q)(n,a,r),[O,M]=(0,c.useReducer)(q,{dataRef:(0,c.createRef)(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),R=(0,c.useRef)({static:!1,hold:!1}),T=(0,c.useRef)(null),A=(0,c.useRef)(null),_=(0,c.useRef)(null),D=(0,h.z)("string"==typeof l?(e,t)=>(null==e?void 0:e[l])===(null==t?void 0:t[l]):l),Z=(0,c.useCallback)(e=>(0,N.E)(L.mode,{1:()=>w.some(t=>D(t,e)),0:()=>D(w,e)}),[w]),L=(0,c.useMemo)(()=>({...O,value:w,disabled:u,mode:m?1:0,orientation:b,compare:D,isSelected:Z,optionsPropsRef:R,labelRef:T,buttonRef:A,optionsRef:_}),[w,u,m,O]);(0,s.e)(()=>{O.dataRef.current=L},[L]),(0,g.O)([L.buttonRef,L.optionsRef],(e,t)=>{var n;M({type:1}),(0,j.sP)(t,j.tJ.Loose)||(e.preventDefault(),null==(n=L.buttonRef.current)||n.focus())},0===L.listboxState);let B=(0,c.useMemo)(()=>({open:0===L.listboxState,disabled:u,value:w}),[L,u,w]),H=(0,h.z)(e=>{let t=L.options.find(t=>t.id===e);t&&Y(t.dataRef.current.value)}),K=(0,h.z)(()=>{if(null!==L.activeOptionIndex){let{dataRef:e,id:t}=L.options[L.activeOptionIndex];Y(e.current.value),M({type:2,focus:C.Specific,id:t})}}),V=(0,h.z)(()=>M({type:0})),U=(0,h.z)(()=>M({type:1})),G=(0,h.z)((e,t,n)=>e===C.Specific?M({type:2,focus:C.Specific,id:t,trigger:n}):M({type:2,focus:e,trigger:n})),X=(0,h.z)((e,t)=>(M({type:5,id:e,dataRef:t}),()=>M({type:6,id:e}))),$=(0,h.z)(e=>(M({type:7,id:e}),()=>M({type:7,id:null}))),Y=(0,h.z)(e=>(0,N.E)(L.mode,{0:()=>null==E?void 0:E(e),1(){let t=L.value.slice(),n=t.findIndex(t=>D(t,e));return -1===n?t.push(e):t.splice(n,1),null==E?void 0:E(t)}})),Q=(0,h.z)(e=>M({type:3,value:e})),J=(0,h.z)(()=>M({type:4})),ee=(0,c.useMemo)(()=>({onChange:Y,registerOption:X,registerLabel:$,goToOption:G,closeListbox:U,openListbox:V,selectActiveOption:K,selectOption:H,search:Q,clearSearch:J}),[]),et=(0,c.useRef)(null),en=(0,p.G)();return(0,c.useEffect)(()=>{et.current&&void 0!==r&&en.addEventListener(et.current,"reset",()=>{null==E||E(r)})},[et,E]),c.createElement(z.Provider,{value:ee},c.createElement(F.Provider,{value:L},c.createElement(k.up,{value:(0,N.E)(L.listboxState,{0:k.ZM.Open,1:k.ZM.Closed})},null!=i&&null!=w&&(0,P.t)({[i]:w}).map((e,t)=>{let[n,r]=e;return c.createElement(S._,{features:S.A.Hidden,ref:0===t?e=>{var t;et.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...(0,I.oA)({key:n,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:o,name:n,value:r})})}),(0,I.sY)({ourProps:{ref:x},theirProps:v,slot:B,defaultTag:W,name:"Listbox"}))))}),{Button:(0,I.yV)(function(e,t){var n;let r=(0,m.M)(),{id:o="headlessui-listbox-button-".concat(r),...i}=e,a=H("Listbox.Button"),l=B("Listbox.Button"),s=(0,y.T)(a.buttonRef,t),u=(0,p.G)(),f=(0,h.z)(e=>{switch(e.key){case R.R.Space:case R.R.Enter:case R.R.ArrowDown:e.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption(C.First)});break;case R.R.ArrowUp:e.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption(C.Last)})}}),g=(0,h.z)(e=>{e.key===R.R.Space&&e.preventDefault()}),b=(0,h.z)(e=>{if((0,E.P)(e.currentTarget))return e.preventDefault();0===a.listboxState?(l.closeListbox(),u.nextFrame(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})})):(e.preventDefault(),l.openListbox())}),x=d(()=>{if(a.labelId)return[a.labelId,o].join(" ")},[a.labelId,o]),w=(0,c.useMemo)(()=>({open:0===a.listboxState,disabled:a.disabled,value:a.value}),[a]),S={ref:s,id:o,type:(0,v.f)(e,a.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(n=a.optionsRef.current)?void 0:n.id,"aria-expanded":0===a.listboxState,"aria-labelledby":x,disabled:a.disabled,onKeyDown:f,onKeyUp:g,onClick:b};return(0,I.sY)({ourProps:S,theirProps:i,slot:w,defaultTag:"button",name:"Listbox.Button"})}),Label:(0,I.yV)(function(e,t){let n=(0,m.M)(),{id:r="headlessui-listbox-label-".concat(n),...o}=e,i=H("Listbox.Label"),a=B("Listbox.Label"),l=(0,y.T)(i.labelRef,t);(0,s.e)(()=>a.registerLabel(r),[r]);let u=(0,h.z)(()=>{var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),d=(0,c.useMemo)(()=>({open:0===i.listboxState,disabled:i.disabled}),[i]);return(0,I.sY)({ourProps:{ref:l,id:r,onClick:u},theirProps:o,slot:d,defaultTag:"label",name:"Listbox.Label"})}),Options:(0,I.yV)(function(e,t){var n;let r=(0,m.M)(),{id:o="headlessui-listbox-options-".concat(r),...i}=e,a=H("Listbox.Options"),l=B("Listbox.Options"),s=(0,y.T)(a.optionsRef,t),u=(0,p.G)(),f=(0,p.G)(),g=(0,k.oJ)(),v=null!==g?(g&k.ZM.Open)===k.ZM.Open:0===a.listboxState;(0,c.useEffect)(()=>{var e;let t=a.optionsRef.current;t&&0===a.listboxState&&t!==(null==(e=(0,M.r)(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})},[a.listboxState,a.optionsRef]);let b=(0,h.z)(e=>{switch(f.dispose(),e.key){case R.R.Space:if(""!==a.searchQuery)return e.preventDefault(),e.stopPropagation(),l.search(e.key);case R.R.Enter:if(e.preventDefault(),e.stopPropagation(),null!==a.activeOptionIndex){let{dataRef:e}=a.options[a.activeOptionIndex];l.onChange(e.current.value)}0===a.mode&&(l.closeListbox(),(0,O.k)().nextFrame(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case(0,N.E)(a.orientation,{vertical:R.R.ArrowDown,horizontal:R.R.ArrowRight}):return e.preventDefault(),e.stopPropagation(),l.goToOption(C.Next);case(0,N.E)(a.orientation,{vertical:R.R.ArrowUp,horizontal:R.R.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),l.goToOption(C.Previous);case R.R.Home:case R.R.PageUp:return e.preventDefault(),e.stopPropagation(),l.goToOption(C.First);case R.R.End:case R.R.PageDown:return e.preventDefault(),e.stopPropagation(),l.goToOption(C.Last);case R.R.Escape:return e.preventDefault(),e.stopPropagation(),l.closeListbox(),u.nextFrame(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})});case R.R.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(l.search(e.key),f.setTimeout(()=>l.clearSearch(),350))}}),x=d(()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.id},[a.buttonRef.current]),w=(0,c.useMemo)(()=>({open:0===a.listboxState}),[a]),S={"aria-activedescendant":null===a.activeOptionIndex||null==(n=a.options[a.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===a.mode||void 0,"aria-labelledby":x,"aria-orientation":a.orientation,id:o,onKeyDown:b,role:"listbox",tabIndex:0,ref:s};return(0,I.sY)({ourProps:S,theirProps:i,slot:w,defaultTag:"ul",features:K,visible:v,name:"Listbox.Options"})}),Option:(0,I.yV)(function(e,t){let n,r,o;let i=(0,m.M)(),{id:a="headlessui-listbox-option-".concat(i),disabled:l=!1,value:d,...f}=e,p=H("Listbox.Option"),g=B("Listbox.Option"),v=null!==p.activeOptionIndex&&p.options[p.activeOptionIndex].id===a,b=p.isSelected(d),S=(0,c.useRef)(null),k=(n=(0,c.useRef)(""),r=(0,c.useRef)(""),(0,h.z)(()=>{let e=S.current;if(!e)return"";let t=e.innerText;if(n.current===t)return r.current;let o=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():x(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return x(e).trim()})(e).trim().toLowerCase();return n.current=t,r.current=o,o})),E=(0,u.E)({disabled:l,value:d,domRef:S,get textValue(){return k()}}),j=(0,y.T)(t,S);(0,s.e)(()=>{if(0!==p.listboxState||!v||0===p.activationTrigger)return;let e=(0,O.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=S.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[S,v,p.listboxState,p.activationTrigger,p.activeOptionIndex]),(0,s.e)(()=>g.registerOption(a,E),[E,a]);let P=(0,h.z)(e=>{if(l)return e.preventDefault();g.onChange(d),0===p.mode&&(g.closeListbox(),(0,O.k)().nextFrame(()=>{var e;return null==(e=p.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),N=(0,h.z)(()=>{if(l)return g.goToOption(C.Nothing);g.goToOption(C.Specific,a)}),M=(o=(0,c.useRef)([-1,-1]),{wasMoved(e){let t=w(e);return(o.current[0]!==t[0]||o.current[1]!==t[1])&&(o.current=t,!0)},update(e){o.current=w(e)}}),R=(0,h.z)(e=>M.update(e)),T=(0,h.z)(e=>{M.wasMoved(e)&&(l||v||g.goToOption(C.Specific,a,0))}),A=(0,h.z)(e=>{M.wasMoved(e)&&(l||v&&g.goToOption(C.Nothing))}),_=(0,c.useMemo)(()=>({active:v,selected:b,disabled:l}),[v,b,l]);return(0,I.sY)({ourProps:{id:a,ref:j,role:"option",tabIndex:!0===l?void 0:-1,"aria-disabled":!0===l||void 0,"aria-selected":b,disabled:void 0,onClick:P,onFocus:N,onPointerEnter:R,onMouseEnter:R,onPointerMove:T,onMouseMove:T,onPointerLeave:A,onMouseLeave:A},theirProps:f,slot:_,defaultTag:"li",name:"Listbox.Option"})})})},33044:function(e,t,n){"use strict";let r;n.d(t,{u:function(){return R}});var o=n(2265),i=n(90945),a=n(13323),l=n(93394),c=n(64518),s=n(31948),u=n(72238),d=n(93689),f=n(16015),p=n(24536);function h(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e&&n.length>0&&e.classList.add(...n)}function m(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e&&n.length>0&&e.classList.remove(...n)}var g=n(37863),v=n(42120),y=n(27847);function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/\s+/).filter(e=>e.length>1)}let x=(0,o.createContext)(null);x.displayName="TransitionContext";var w=((r=w||{}).Visible="visible",r.Hidden="hidden",r);let S=(0,o.createContext)(null);function k(e){return"children"in e?k(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function E(e,t){let n=(0,s.E)(e),r=(0,o.useRef)([]),c=(0,l.t)(),u=(0,i.G)(),d=(0,a.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.l4.Hidden,o=r.current.findIndex(t=>{let{el:n}=t;return n===e});-1!==o&&((0,p.E)(t,{[y.l4.Unmount](){r.current.splice(o,1)},[y.l4.Hidden](){r.current[o].state="hidden"}}),u.microTask(()=>{var e;!k(r)&&c.current&&(null==(e=n.current)||e.call(n))}))}),f=(0,a.z)(e=>{let t=r.current.find(t=>{let{el:n}=t;return n===e});return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>d(e,y.l4.Unmount)}),h=(0,o.useRef)([]),m=(0,o.useRef)(Promise.resolve()),g=(0,o.useRef)({enter:[],leave:[],idle:[]}),v=(0,a.z)((e,n,r)=>{h.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(t=>{let[n]=t;return n!==e})),null==t||t.chains.current[n].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(g.current[n].map(e=>{let[t,n]=e;return n})).then(()=>e())})]),"enter"===n?m.current=m.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),b=(0,a.z)((e,t,n)=>{Promise.all(g.current[t].splice(0).map(e=>{let[t,n]=e;return n})).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>n(t))});return(0,o.useMemo)(()=>({children:r,register:f,unregister:d,onStart:v,onStop:b,wait:m,chains:g}),[f,d,r,v,b,g,m])}function C(){}S.displayName="NestingContext";let O=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function j(e){var t;let n={};for(let r of O)n[r]=null!=(t=e[r])?t:C;return n}let P=y.AN.RenderStrategy,N=(0,y.yV)(function(e,t){let{show:n,appear:r=!1,unmount:i=!0,...l}=e,s=(0,o.useRef)(null),f=(0,d.T)(s,t);(0,u.H)();let p=(0,g.oJ)();if(void 0===n&&null!==p&&(n=(p&g.ZM.Open)===g.ZM.Open),![!0,!1].includes(n))throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[h,m]=(0,o.useState)(n?"visible":"hidden"),v=E(()=>{m("hidden")}),[b,w]=(0,o.useState)(!0),C=(0,o.useRef)([n]);(0,c.e)(()=>{!1!==b&&C.current[C.current.length-1]!==n&&(C.current.push(n),w(!1))},[C,n]);let O=(0,o.useMemo)(()=>({show:n,appear:r,initial:b}),[n,r,b]);(0,o.useEffect)(()=>{if(n)m("visible");else if(k(v)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&m("hidden")}else m("hidden")},[n,v]);let j={unmount:i},N=(0,a.z)(()=>{var t;b&&w(!1),null==(t=e.beforeEnter)||t.call(e)}),I=(0,a.z)(()=>{var t;b&&w(!1),null==(t=e.beforeLeave)||t.call(e)});return o.createElement(S.Provider,{value:v},o.createElement(x.Provider,{value:O},(0,y.sY)({ourProps:{...j,as:o.Fragment,children:o.createElement(M,{ref:f,...j,...l,beforeEnter:N,beforeLeave:I})},theirProps:{},defaultTag:o.Fragment,features:P,visible:"visible"===h,name:"Transition"})))}),M=(0,y.yV)(function(e,t){var n,r,w;let C;let{beforeEnter:O,afterEnter:N,beforeLeave:M,afterLeave:I,enter:R,enterFrom:T,enterTo:A,entered:_,leave:D,leaveFrom:Z,leaveTo:L,...z}=e,B=(0,o.useRef)(null),F=(0,d.T)(B,t),H=null==(n=z.unmount)||n?y.l4.Unmount:y.l4.Hidden,{show:q,appear:W,initial:K}=function(){let e=(0,o.useContext)(x);if(null===e)throw Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[V,U]=(0,o.useState)(q?"visible":"hidden"),G=function(){let e=(0,o.useContext)(S);if(null===e)throw Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:X,unregister:$}=G;(0,o.useEffect)(()=>X(B),[X,B]),(0,o.useEffect)(()=>{if(H===y.l4.Hidden&&B.current){if(q&&"visible"!==V){U("visible");return}return(0,p.E)(V,{hidden:()=>$(B),visible:()=>X(B)})}},[V,B,X,$,q,H]);let Y=(0,s.E)({base:b(z.className),enter:b(R),enterFrom:b(T),enterTo:b(A),entered:b(_),leave:b(D),leaveFrom:b(Z),leaveTo:b(L)}),Q=(w={beforeEnter:O,afterEnter:N,beforeLeave:M,afterLeave:I},C=(0,o.useRef)(j(w)),(0,o.useEffect)(()=>{C.current=j(w)},[w]),C),J=(0,u.H)();(0,o.useEffect)(()=>{if(J&&"visible"===V&&null===B.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[B,V,J]);let ee=W&&q&&K,et=J&&(!K||W)?q?"enter":"leave":"idle",en=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,n]=(0,o.useState)(e),r=(0,l.t)(),i=(0,o.useCallback)(e=>{r.current&&n(t=>t|e)},[t,r]),a=(0,o.useCallback)(e=>!!(t&e),[t]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:(0,o.useCallback)(e=>{r.current&&n(t=>t&~e)},[n,r]),toggleFlag:(0,o.useCallback)(e=>{r.current&&n(t=>t^e)},[n])}}(0),er=(0,a.z)(e=>(0,p.E)(e,{enter:()=>{en.addFlag(g.ZM.Opening),Q.current.beforeEnter()},leave:()=>{en.addFlag(g.ZM.Closing),Q.current.beforeLeave()},idle:()=>{}})),eo=(0,a.z)(e=>(0,p.E)(e,{enter:()=>{en.removeFlag(g.ZM.Opening),Q.current.afterEnter()},leave:()=>{en.removeFlag(g.ZM.Closing),Q.current.afterLeave()},idle:()=>{}})),ei=E(()=>{U("hidden"),$(B)},G),ea=(0,o.useRef)(!1);!function(e){let{immediate:t,container:n,direction:r,classes:o,onStart:a,onStop:u}=e,d=(0,l.t)(),g=(0,i.G)(),v=(0,s.E)(r);(0,c.e)(()=>{t&&(v.current="enter")},[t]),(0,c.e)(()=>{let e=(0,f.k)();g.add(e.dispose);let t=n.current;if(t&&"idle"!==v.current&&d.current){var r,i,l;let n,c,s,d,g,y,b;return e.dispose(),a.current(v.current),e.add((r=o.current,i="enter"===v.current,l=()=>{e.dispose(),u.current(v.current)},c=i?"enter":"leave",s=(0,f.k)(),d=void 0!==l?(n={called:!1},function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!n.called)return n.called=!0,l(...t)}):()=>{},"enter"===c&&(t.removeAttribute("hidden"),t.style.display=""),g=(0,p.E)(c,{enter:()=>r.enter,leave:()=>r.leave}),y=(0,p.E)(c,{enter:()=>r.enterTo,leave:()=>r.leaveTo}),b=(0,p.E)(c,{enter:()=>r.enterFrom,leave:()=>r.leaveFrom}),m(t,...r.base,...r.enter,...r.enterTo,...r.enterFrom,...r.leave,...r.leaveFrom,...r.leaveTo,...r.entered),h(t,...r.base,...g,...b),s.nextFrame(()=>{m(t,...r.base,...g,...b),h(t,...r.base,...g,...y),function(e,t){let n=(0,f.k)();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t}),l=i+a;if(0!==l){n.group(n=>{n.setTimeout(()=>{t(),n.dispose()},l),n.addEventListener(e,"transitionrun",e=>{e.target===e.currentTarget&&n.dispose()})});let r=n.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();n.add(()=>t()),n.dispose}(t,()=>(m(t,...r.base,...g),h(t,...r.base,...r.entered),d()))}),s.dispose)),e.dispose}},[r])}({immediate:ee,container:B,classes:Y,direction:et,onStart:(0,s.E)(e=>{ea.current=!0,ei.onStart(B,e,er)}),onStop:(0,s.E)(e=>{ea.current=!1,ei.onStop(B,e,eo),"leave"!==e||k(ei)||(U("hidden"),$(B))})});let el=z;return ee?el={...el,className:(0,v.A)(z.className,...Y.current.enter,...Y.current.enterFrom)}:ea.current&&(el.className=(0,v.A)(z.className,null==(r=B.current)?void 0:r.className),""===el.className&&delete el.className),o.createElement(S.Provider,{value:ei},o.createElement(g.up,{value:(0,p.E)(V,{visible:g.ZM.Open,hidden:g.ZM.Closed})|en.flags},(0,y.sY)({ourProps:{ref:F},theirProps:el,defaultTag:"div",features:P,visible:"visible"===V,name:"Transition.Child"})))}),I=(0,y.yV)(function(e,t){let n=null!==(0,o.useContext)(x),r=null!==(0,g.oJ)();return o.createElement(o.Fragment,null,!n&&r?o.createElement(N,{ref:t,...e}):o.createElement(M,{ref:t,...e}))}),R=Object.assign(N,{Child:I,Root:N})},62963:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(2265),o=n(13323);function i(e,t,n){let[i,a]=(0,r.useState)(n),l=void 0!==e,c=(0,r.useRef)(l),s=(0,r.useRef)(!1),u=(0,r.useRef)(!1);return!l||c.current||s.current?l||!c.current||u.current||(u.current=!0,c.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,c.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:i,(0,o.z)(e=>(l||a(e),null==t?void 0:t(e)))]}},90945:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(2265),o=n(16015);function i(){let[e]=(0,r.useState)(o.k);return(0,r.useEffect)(()=>()=>e.dispose(),[e]),e}},98505:function(e,t,n){"use strict";n.d(t,{O:function(){return c}});var r=n(2265),o=n(37105),i=n(31948);function a(e,t,n){let o=(0,i.E)(t);(0,r.useEffect)(()=>{function t(e){o.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}var l=n(3141);function c(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=(0,r.useRef)(!1);function c(n,r){if(!i.current||n.defaultPrevented)return;let a=r(n);if(null!==a&&a.getRootNode().contains(a)&&a.isConnected){for(let t of function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e)){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(a)||n.composed&&n.composedPath().includes(e))return}return(0,o.sP)(a,o.tJ.Loose)||-1===a.tabIndex||n.preventDefault(),t(n,a)}}(0,r.useEffect)(()=>{requestAnimationFrame(()=>{i.current=n})},[n]);let s=(0,r.useRef)(null);a("pointerdown",e=>{var t,n;i.current&&(s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),a("mousedown",e=>{var t,n;i.current&&(s.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),a("click",e=>{/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)||s.current&&(c(e,()=>s.current),s.current=null)},!0),a("touchend",e=>c(e,()=>e.target instanceof HTMLElement?e.target:null),!0),(0,l.s)("blur",e=>c(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}},3141:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var r=n(2265),o=n(31948);function i(e,t,n){let i=(0,o.E)(t);(0,r.useEffect)(()=>{function t(e){i.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)},[e,n])}},37863:function(e,t,n){"use strict";let r;n.d(t,{ZM:function(){return a},oJ:function(){return l},up:function(){return c}});var o=n(2265);let i=(0,o.createContext)(null);i.displayName="OpenClosedContext";var a=((r=a||{})[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r);function l(){return(0,o.useContext)(i)}function c(e){let{value:t,children:n}=e;return o.createElement(i.Provider,{value:t},n)}},47634:function(e,t,n){"use strict";function r(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}n.d(t,{P:function(){return r}})},16015:function(e,t,n){"use strict";n.d(t,{k:function(){return function e(){let t=[],n={addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),n.add(()=>e.removeEventListener(t,r,o))),requestAnimationFrame(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let o=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(o))},nextFrame(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let o=setTimeout(...t);return n.add(()=>clearTimeout(o))},microTask(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];let i={current:!0};return(0,r.Y)(()=>{i.current&&t[0]()}),n.add(()=>{i.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(t){let n=e();return t(n),this.add(()=>n.dispose())},add:e=>(t.push(e),()=>{let n=t.indexOf(e);if(n>=0)for(let e of t.splice(n,1))e()}),dispose(){for(let e of t.splice(0))e()}};return n}}});var r=n(96822)},56314:function(e,t,n){"use strict";function r(e,t){return e?e+"["+t+"]":t}function o(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type)){t.click();return}null==(n=r.requestSubmit)||n.call(r)}}n.d(t,{g:function(){return o},t:function(){return function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[i,a]of Object.entries(t))!function t(n,o,i){if(Array.isArray(i))for(let[e,a]of i.entries())t(n,r(o,e.toString()),a);else i instanceof Date?n.push([o,i.toISOString()]):"boolean"==typeof i?n.push([o,i?"1":"0"]):"string"==typeof i?n.push([o,i]):"number"==typeof i?n.push([o,"".concat(i)]):null==i?n.push([o,""]):e(i,o,n)}(o,r(n,i),a);return o}}})},10900:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=o},44643:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},82422:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});t.Z=o},86462:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=o},44633:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=o},51853:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});t.Z=o},2356:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});t.Z=o},15731:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},45589:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});t.Z=o},53410:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=o},23628:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});t.Z=o},49084:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=o},74998:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=o},71157:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},3837:function(e,t,n){"use strict";var r=n(2265);let o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});t.Z=o},87045:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});var r=n(24112),o=n(45345),i=new class extends r.l{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!o.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}}},18238:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=e=>setTimeout(e,0),i=r=>{t?e.push(r):o(()=>{n(r)})},a=()=>{let t=e;e=[],t.length&&o(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||a()}return n},batchCalls:e=>(...t)=>{i(()=>{e(...t)})},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}()},57853:function(e,t,n){"use strict";n.d(t,{N:function(){return i}});var r=n(24112),o=n(45345),i=new class extends r.l{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!o.sk&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#r}}},21733:function(e,t,n){"use strict";n.d(t,{A:function(){return l},z:function(){return c}});var r=n(45345),o=n(18238),i=n(11255),a=n(7989),l=class extends a.F{#o;#i;#a;#l;#c;#s;constructor(e){super(),this.#s=!1,this.#c=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){let n=(0,r.oE)(this.state.data,e,this.options);return this.#u({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#u({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(r.ZT).catch(r.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(e=>!1!==(0,r.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===r.CN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,r.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#l&&(this.#s?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#u({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=(0,r.cG)(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return(o(n),this.#s=!1,this.options.persister)?this.options.persister(e,n,this):e(n)}};o(a),this.options.behavior?.onFetch(a,this),this.#i=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#u({type:"fetch",meta:a.fetchOptions?.meta});let l=e=>{(0,i.DV)(e)&&e.silent||this.#u({type:"error",error:e}),(0,i.DV)(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#l=(0,i.Mz)({initialPromise:t?.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e){l(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){l(e);return}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:l,onFail:(e,t)=>{this.#u({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),this.#l.start()}#u(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...c(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if((0,i.DV)(n)&&n.revert&&this.#i)return{...this.#i,fetchStatus:"idle"};return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),o.V.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function c(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,i.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},90946:function(e,t,n){"use strict";n.d(t,{S:function(){return v}});var r=n(45345),o=n(21733),i=n(18238),a=n(24112),l=class extends a.l{constructor(e={}){super(),this.config=e,this.#d=new Map}#d;build(e,t,n){let i=t.queryKey,a=t.queryHash??(0,r.Rm)(i,t),l=this.get(a);return l||(l=new o.A({cache:this,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#d.has(e.queryHash)||(this.#d.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#d.get(e.queryHash);t&&(e.destroy(),t===e&&this.#d.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#d.get(e)}getAll(){return[...this.#d.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r._x)(e,t)):t}notify(e){i.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},c=n(7989),s=n(11255),u=class extends c.F{#f;#p;#l;constructor(e){super(),this.mutationId=e.mutationId,this.#p=e.mutationCache,this.#f=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#f.includes(e)||(this.#f.push(e),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#f=this.#f.filter(t=>t!==e),this.scheduleGc(),this.#p.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#f.length||("pending"===this.state.status?this.scheduleGc():this.#p.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){this.#l=(0,s.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#u({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#p.canRun(this)});let t="pending"===this.state.status,n=!this.#l.canStart();try{if(!t){this.#u({type:"pending",variables:e,isPaused:n}),await this.#p.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#u({type:"pending",context:t,variables:e,isPaused:n})}let r=await this.#l.start();return await this.#p.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#p.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#u({type:"success",data:r}),r}catch(t){try{throw await this.#p.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#p.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#u({type:"error",error:t})}}finally{this.#p.runNext(this)}}#u(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),i.V.batch(()=>{this.#f.forEach(t=>{t.onMutationUpdate(e)}),this.#p.notify({mutation:this,type:"updated",action:e})})}},d=class extends a.l{constructor(e={}){super(),this.config=e,this.#h=new Set,this.#m=new Map,this.#g=0}#h;#m;#g;build(e,t,n){let r=new u({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#h.add(e);let t=f(e);if("string"==typeof t){let n=this.#m.get(t);n?n.push(e):this.#m.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#h.delete(e)){let t=f(e);if("string"==typeof t){let n=this.#m.get(t);if(n){if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#m.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=f(e);if("string"!=typeof t)return!0;{let n=this.#m.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=f(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#m.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){i.V.batch(()=>{this.#h.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#h.clear(),this.#m.clear()})}getAll(){return Array.from(this.#h)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.X7)(e,t))}notify(e){i.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return i.V.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.ZT))))}};function f(e){return e.options.scope?.id}var p=n(87045),h=n(57853);function m(e){return{onFetch:(t,n)=>{let o=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],l=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},s=0,u=async()=>{let n=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})},d=(0,r.cG)(t.options,t.fetchOptions),f=async(e,o,i)=>{if(n)return Promise.reject();if(null==o&&e.pages.length)return Promise.resolve(e);let a={queryKey:t.queryKey,pageParam:o,direction:i?"backward":"forward",meta:t.options.meta};u(a);let l=await d(a),{maxPages:c}=t.options,s=i?r.Ht:r.VX;return{pages:s(e.pages,l,c),pageParams:s(e.pageParams,o,c)}};if(i&&a.length){let e="backward"===i,t={pages:a,pageParams:l},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:g)(o,t);c=await f(t,n,e)}else{let t=e??a.length;do{let e=0===s?l[0]??o.initialPageParam:g(o,c);if(s>0&&null==e)break;c=await f(c,e),s++}while(s<t)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function g(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var v=class{#v;#p;#c;#y;#b;#x;#w;#S;constructor(e={}){this.#v=e.queryCache||new l,this.#p=e.mutationCache||new d,this.#c=e.defaultOptions||{},this.#y=new Map,this.#b=new Map,this.#x=0}mount(){this.#x++,1===this.#x&&(this.#w=p.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#v.onFocus())}),this.#S=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#v.onOnline())}))}unmount(){this.#x--,0===this.#x&&(this.#w?.(),this.#w=void 0,this.#S?.(),this.#S=void 0)}isFetching(e){return this.#v.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#p.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#v.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#v.build(this,t),o=n.state.data;return void 0===o?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,r.KC)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#v.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let o=this.defaultQueryOptions({queryKey:e}),i=this.#v.get(o.queryHash),a=i?.state.data,l=(0,r.SE)(t,a);if(void 0!==l)return this.#v.build(this,o).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return i.V.batch(()=>this.#v.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#v.get(t.queryHash)?.state}removeQueries(e){let t=this.#v;i.V.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#v,r={type:"active",...e};return i.V.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(i.V.batch(()=>this.#v.findAll(e).map(e=>e.cancel(n)))).then(r.ZT).catch(r.ZT)}invalidateQueries(e,t={}){return i.V.batch(()=>{if(this.#v.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")return Promise.resolve();let n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(i.V.batch(()=>this.#v.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#v.build(this,t);return n.isStaleByTime((0,r.KC)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.ZT).catch(r.ZT)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.ZT).catch(r.ZT)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#p.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#v}getMutationCache(){return this.#p}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#y.set((0,r.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#y.values()],n={};return t.forEach(t=>{(0,r.to)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#b.set((0,r.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#b.values()],n={};return t.forEach(t=>{(0,r.to)(e,t.mutationKey)&&(n={...n,...t.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#v.clear(),this.#p.clear()}}},7989:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(45345),o=class{#k;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,r.PN)(this.gcTime)&&(this.#k=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r.sk?1/0:3e5))}clearGcTimeout(){this.#k&&(clearTimeout(this.#k),this.#k=void 0)}}},11255:function(e,t,n){"use strict";n.d(t,{DV:function(){return u},Kw:function(){return c},Mz:function(){return d}});var r=n(87045),o=n(57853),i=n(16803),a=n(45345);function l(e){return Math.min(1e3*2**e,3e4)}function c(e){return(e??"online")!=="online"||o.N.isOnline()}var s=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function u(e){return e instanceof s}function d(e){let t,n=!1,u=0,d=!1,f=(0,i.O)(),p=()=>r.j.isFocused()&&("always"===e.networkMode||o.N.isOnline())&&e.canRun(),h=()=>c(e.networkMode)&&e.canRun(),m=n=>{d||(d=!0,e.onSuccess?.(n),t?.(),f.resolve(n))},g=n=>{d||(d=!0,e.onError?.(n),t?.(),f.reject(n))},v=()=>new Promise(n=>{t=e=>{(d||p())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,d||e.onContinue?.()}),y=()=>{let t;if(d)return;let r=0===u?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{if(d)return;let r=e.retry??(a.sk?0:3),o=e.retryDelay??l,i="function"==typeof o?o(u,t):o,c=!0===r||"number"==typeof r&&u<r||"function"==typeof r&&r(u,t);if(n||!c){g(t);return}u++,e.onFail?.(u,t),(0,a._v)(i).then(()=>p()?void 0:v()).then(()=>{n?g(t):y()})})};return{promise:f,cancel:t=>{d||(g(new s(t)),e.abort?.())},continue:()=>(t?.(),f),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:h,start:()=>(h()?y():v().then(y),f)}}},24112:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},16803:function(e,t,n){"use strict";function r(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}n.d(t,{O:function(){return r}})},45345:function(e,t,n){"use strict";n.d(t,{CN:function(){return k},Ht:function(){return S},KC:function(){return c},Kp:function(){return l},Nc:function(){return s},PN:function(){return a},Rm:function(){return f},SE:function(){return i},VS:function(){return m},VX:function(){return w},X7:function(){return d},Ym:function(){return p},ZT:function(){return o},_v:function(){return b},_x:function(){return u},cG:function(){return E},oE:function(){return x},sk:function(){return r},to:function(){return h}});var r="undefined"==typeof window||"Deno"in globalThis;function o(){}function i(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t){return"function"==typeof e?e(t):e}function s(e,t){return"function"==typeof e?e(t):e}function u(e,t){let{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==f(a,t.options))return!1}else if(!h(t.queryKey,a))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(!o||o===t.state.fetchStatus)&&(!i||!!i(t))}function d(e,t){let{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(i))return!1}else if(!h(t.options.mutationKey,i))return!1}return(!r||t.state.status===r)&&(!o||!!o(t))}function f(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>v(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function h(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!h(e[n],t[n]))}function m(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e){if(!y(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!(y(n)&&n.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function y(e){return"[object Object]"===Object.prototype.toString.call(e)}function b(e){return new Promise(t=>{setTimeout(t,e)})}function x(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?function e(t,n){if(t===n)return t;let r=g(t)&&g(n);if(r||v(t)&&v(n)){let o=r?t:Object.keys(t),i=o.length,a=r?n:Object.keys(n),l=a.length,c=r?[]:{},s=0;for(let i=0;i<l;i++){let l=r?i:a[i];(!r&&o.includes(l)||r)&&void 0===t[l]&&void 0===n[l]?(c[l]=void 0,s++):(c[l]=e(t[l],n[l]),c[l]===t[l]&&void 0!==t[l]&&s++)}return i===l&&s===i?t:c}return n}(e,t):t}function w(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function S(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function E(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==k?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}},29827:function(e,t,n){"use strict";n.d(t,{NL:function(){return a},aH:function(){return l}});var r=n(2265),o=n(57437),i=r.createContext(void 0),a=e=>{let t=r.useContext(i);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},l=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,o.jsx)(i.Provider,{value:t,children:n})}},20016:function(e,t,n){"use strict";let r;n.d(t,{a:function(){return N}});var o=n(87045),i=n(18238),a=n(21733),l=n(24112),c=n(16803),s=n(45345),u=class extends l.l{constructor(e,t){super(),this.options=t,this.#E=e,this.#C=null,this.#O=(0,c.O)(),this.options.experimental_prefetchInRender||this.#O.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#E;#j=void 0;#P=void 0;#N=void 0;#M;#I;#O;#C;#R;#T;#A;#_;#D;#Z;#L=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#j.addObserver(this),d(this.#j,this.options)?this.#z():this.updateResult(),this.#B())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return f(this.#j,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.#j,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#F(),this.#H(),this.#j.removeObserver(this)}setOptions(e,t){let n=this.options,r=this.#j;if(this.options=this.#E.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,s.Nc)(this.options.enabled,this.#j))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#q(),this.#j.setOptions(this.options),n._defaulted&&!(0,s.VS)(this.options,n)&&this.#E.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#j,observer:this});let o=this.hasListeners();o&&p(this.#j,r,this.options,n)&&this.#z(),this.updateResult(t),o&&(this.#j!==r||(0,s.Nc)(this.options.enabled,this.#j)!==(0,s.Nc)(n.enabled,this.#j)||(0,s.KC)(this.options.staleTime,this.#j)!==(0,s.KC)(n.staleTime,this.#j))&&this.#W();let i=this.#K();o&&(this.#j!==r||(0,s.Nc)(this.options.enabled,this.#j)!==(0,s.Nc)(n.enabled,this.#j)||i!==this.#Z)&&this.#V(i)}getOptimisticResult(e){let t=this.#E.getQueryCache().build(this.#E,e),n=this.createResult(t,e);return(0,s.VS)(this.getCurrentResult(),n)||(this.#N=n,this.#I=this.options,this.#M=this.#j.state),n}getCurrentResult(){return this.#N}trackResult(e,t){let n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#L.add(e)}getCurrentQuery(){return this.#j}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#E.defaultQueryOptions(e),n=this.#E.getQueryCache().build(this.#E,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#z({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#N))}#z(e){this.#q();let t=this.#j.fetch(this.options,e);return e?.throwOnError||(t=t.catch(s.ZT)),t}#W(){this.#F();let e=(0,s.KC)(this.options.staleTime,this.#j);if(s.sk||this.#N.isStale||!(0,s.PN)(e))return;let t=(0,s.Kp)(this.#N.dataUpdatedAt,e);this.#_=setTimeout(()=>{this.#N.isStale||this.updateResult()},t+1)}#K(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#j):this.options.refetchInterval)??!1}#V(e){this.#H(),this.#Z=e,!s.sk&&!1!==(0,s.Nc)(this.options.enabled,this.#j)&&(0,s.PN)(this.#Z)&&0!==this.#Z&&(this.#D=setInterval(()=>{(this.options.refetchIntervalInBackground||o.j.isFocused())&&this.#z()},this.#Z))}#B(){this.#W(),this.#V(this.#K())}#F(){this.#_&&(clearTimeout(this.#_),this.#_=void 0)}#H(){this.#D&&(clearInterval(this.#D),this.#D=void 0)}createResult(e,t){let n;let r=this.#j,o=this.options,i=this.#N,l=this.#M,u=this.#I,f=e!==r?e.state:this.#P,{state:m}=e,g={...m},v=!1;if(t._optimisticResults){let n=this.hasListeners(),i=!n&&d(e,t),l=n&&p(e,r,t,o);(i||l)&&(g={...g,...(0,a.z)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:x}=g;if(t.select&&void 0!==g.data){if(i&&g.data===l?.data&&t.select===this.#R)n=this.#T;else try{this.#R=t.select,n=t.select(g.data),n=(0,s.oE)(i?.data,n,t),this.#T=n,this.#C=null}catch(e){this.#C=e}}else n=g.data;if(void 0!==t.placeholderData&&void 0===n&&"pending"===x){let e;if(i?.isPlaceholderData&&t.placeholderData===u?.placeholderData)e=i.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#A?.state.data,this.#A):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#C=null}catch(e){this.#C=e}void 0!==e&&(x="success",n=(0,s.oE)(i?.data,e,t),v=!0)}this.#C&&(y=this.#C,n=this.#T,b=Date.now(),x="error");let w="fetching"===g.fetchStatus,S="pending"===x,k="error"===x,E=S&&w,C=void 0!==n,O={status:x,fetchStatus:g.fetchStatus,isPending:S,isSuccess:"success"===x,isError:k,isInitialLoading:E,isLoading:E,data:n,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:k&&!C,isPaused:"paused"===g.fetchStatus,isPlaceholderData:v,isRefetchError:k&&C,isStale:h(e,t),refetch:this.refetch,promise:this.#O};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===O.status?e.reject(O.error):void 0!==O.data&&e.resolve(O.data)},n=()=>{t(this.#O=O.promise=(0,c.O)())},o=this.#O;switch(o.status){case"pending":e.queryHash===r.queryHash&&t(o);break;case"fulfilled":("error"===O.status||O.data!==o.value)&&n();break;case"rejected":("error"!==O.status||O.error!==o.reason)&&n()}}return O}updateResult(e){let t=this.#N,n=this.createResult(this.#j,this.options);if(this.#M=this.#j.state,this.#I=this.options,void 0!==this.#M.data&&(this.#A=this.#j),(0,s.VS)(n,t))return;this.#N=n;let r={};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#L.size)return!0;let r=new Set(n??this.#L);return this.options.throwOnError&&r.add("error"),Object.keys(this.#N).some(e=>this.#N[e]!==t[e]&&r.has(e))})()&&(r.listeners=!0),this.#U({...r,...e})}#q(){let e=this.#E.getQueryCache().build(this.#E,this.options);if(e===this.#j)return;let t=this.#j;this.#j=e,this.#P=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#B()}#U(e){i.V.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#N)}),this.#E.getQueryCache().notify({query:this.#j,type:"observerResultsUpdated"})})}};function d(e,t){return!1!==(0,s.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&f(e,t,t.refetchOnMount)}function f(e,t,n){if(!1!==(0,s.Nc)(t.enabled,e)){let r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&h(e,t)}return!1}function p(e,t,n,r){return(e!==t||!1===(0,s.Nc)(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return!1!==(0,s.Nc)(t.enabled,e)&&e.isStaleByTime((0,s.KC)(t.staleTime,e))}var m=n(2265),g=n(29827);n(57437);var v=m.createContext((r=!1,{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r})),y=()=>m.useContext(v);function b(){}var x=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},w=e=>{m.useEffect(()=>{e.clearReset()},[e])},S=e=>{var t;let{result:n,errorResetBoundary:r,throwOnError:o,query:i}=e;return n.isError&&!r.isReset()&&!n.isFetching&&i&&(t=[n.error,i],"function"==typeof o?o(...t):!!o)},k=m.createContext(!1),E=()=>m.useContext(k);k.Provider;var C=e=>{let t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},O=(e,t)=>e.isLoading&&e.isFetching&&!t,j=(e,t)=>e?.suspense&&t.isPending,P=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function N(e,t){return function(e,t,n){var r,o,a,l,c;let u=(0,g.NL)(n),d=E(),f=y(),p=u.defaultQueryOptions(e);null===(o=u.getDefaultOptions().queries)||void 0===o||null===(r=o._experimental_beforeQuery)||void 0===r||r.call(o,p),p._optimisticResults=d?"isRestoring":"optimistic",C(p),x(p,f),w(f);let h=!u.getQueryCache().get(p.queryHash),[v]=m.useState(()=>new t(u,p)),k=v.getOptimisticResult(p),N=!d&&!1!==e.subscribed;if(m.useSyncExternalStore(m.useCallback(e=>{let t=N?v.subscribe(i.V.batchCalls(e)):b;return v.updateResult(),t},[v,N]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),m.useEffect(()=>{v.setOptions(p,{listeners:!1})},[p,v]),j(p,k))throw P(p,v,f);if(S({result:k,errorResetBoundary:f,throwOnError:p.throwOnError,query:u.getQueryCache().get(p.queryHash)}))throw k.error;if(null===(l=u.getDefaultOptions().queries)||void 0===l||null===(a=l._experimental_afterQuery)||void 0===a||a.call(l,p,k),p.experimental_prefetchInRender&&!s.sk&&O(k,d)){let e=h?P(p,v,f):null===(c=u.getQueryCache().get(p.queryHash))||void 0===c?void 0:c.promise;null==e||e.catch(b).finally(()=>{v.updateResult()})}return p.notifyOnChangeProps?k:v.trackResult(k)}(e,u,t)}},71594:function(e,t,n){"use strict";n.d(t,{b7:function(){return a},ie:function(){return i}});var r=n(2265),o=n(24525);function i(e,t){return e?"function"==typeof e&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()||"function"==typeof e||"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)?r.createElement(e,t):e:null}function a(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=r.useState(()=>({current:(0,o.W_)(t)})),[i,a]=r.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...i,...e.state},onStateChange:t=>{a(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}},24525:function(e,t,n){"use strict";function r(e,t){return"function"==typeof e?e(t):e}function o(e,t){return n=>{t.setState(t=>({...t,[e]:r(n,t[e])}))}}function i(e){return e instanceof Function}function a(e,t,n){let r,o=[];return i=>{let a,l;n.key&&n.debug&&(a=Date.now());let c=e(i);if(!(c.length!==o.length||c.some((e,t)=>o[t]!==e)))return r;if(o=c,n.key&&n.debug&&(l=Date.now()),r=t(...c),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){let e=Math.round((Date.now()-a)*100)/100,t=Math.round((Date.now()-l)*100)/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,` + font-size: .6rem; + font-weight: bold; + color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function l(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}n.d(t,{W_:function(){return q},rV:function(){return K},sC:function(){return W},tj:function(){return V}});let c="debugHeaders";function s(e,t,n){var r;let o={id:null!=(r=n.id)?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:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(o,e)}),o}function u(e,t,n,r){var o,i;let a=0,l=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&l(e.columns,t+1)},0)};l(e);let c=[],u=(e,t)=>{let o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach(e=>{let a;let l=[...i].reverse()[0],c=e.column.depth===o.depth,u=!1;if(c&&e.column.parent?a=e.column.parent:(a=e.column,u=!0),l&&(null==l?void 0:l.column)===a)l.subHeaders.push(e);else{let o=s(n,a,{id:[r,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:u,placeholderId:u?`${i.filter(e=>e.column===a).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o}),c.push(o),t>0&&u(i,t-1)};u(t.map((e,t)=>s(n,e,{depth:a,index:t})),a-1),c.reverse();let d=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)})):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return d(null!=(o=null==(i=c[0])?void 0:i.headers)?o:[]),c}let d=(e,t,n,r,o,i,c)=>{let s={id:t,index:r,original:n,depth:o,parentId:c,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);return null!=n&&n.accessorFn?(n.columnDef.getUniqueValues?s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r):s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=i?i:[],getLeafRows:()=>(function(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let o=t(e);null!=o&&o.length&&r(o)})};return r(e),n})(s.subRows,e=>e.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:a(()=>[e.getAllLeafColumns()],t=>t.map(t=>(function(e,t,n,r){let o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:a(()=>[e,n,t,o],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),l(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{null==r.createCell||r.createCell(o,n,t,e)},{}),o})(e,s,t,t.id)),l(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:a(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),l(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){let n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},f=(e,t,n)=>{var r,o;let i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!!(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(i))};f.autoRemove=e=>S(e);let p=(e,t,n)=>{var r;return!!(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};p.autoRemove=e=>S(e);let h=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};h.autoRemove=e=>S(e);let m=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};m.autoRemove=e=>S(e)||!(null!=e&&e.length);let g=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});g.autoRemove=e=>S(e)||!(null!=e&&e.length);let v=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});v.autoRemove=e=>S(e)||!(null!=e&&e.length);let y=(e,t,n)=>e.getValue(t)===n;y.autoRemove=e=>S(e);let b=(e,t,n)=>e.getValue(t)==n;b.autoRemove=e=>S(e);let x=(e,t,n)=>{let[r,o]=n,i=e.getValue(t);return i>=r&&i<=o};x.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){let e=i;i=a,a=e}return[i,a]},x.autoRemove=e=>S(e)||S(e[0])&&S(e[1]);let w={includesString:f,includesStringSensitive:p,equalsString:h,arrIncludes:m,arrIncludesAll:g,arrIncludesSome:v,equals:y,weakEquals:b,inNumberRange:x};function S(e){return null==e||""===e}function k(e,t,n){return!!e&&!!e.autoRemove&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}let E={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!(Array.isArray(n)&&n.every(e=>"number"==typeof e)))return;if(1===n.length)return n[0];let r=Math.floor(n.length/2),o=n.sort((e,t)=>e-t);return n.length%2!=0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},C=()=>({left:[],right:[]}),O={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},j=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),P=null;function N(e){return"touchstart"===e.type}function M(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}let I=()=>({pageIndex:0,pageSize:10}),R=()=>({top:[],bottom:[]}),T=(e,t,n,r,o)=>{var i;let a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=a.subRows)&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(t=>T(e,t.id,n,r,o))};function A(e,t){let n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map(e=>{var t;let a=_(e,n);if(a&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function _(e,t){var n;return null!=(n=t[e.id])&&n}function D(e,t,n){var r;if(!(null!=(r=e.subRows)&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(e=>{if((!i||o)&&(e.getCanSelect()&&(_(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){let n=D(e,t);"all"===n?i=!0:("some"===n&&(i=!0),o=!1)}}),o?"all":!!i&&"some"}let Z=/([0-9]+)/gm;function L(e,t){return e===t?0:e>t?1:-1}function z(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function B(e,t){let n=e.split(Z).filter(Boolean),r=t.split(Z).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),a=[o,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return -1;continue}if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return -1}return n.length-r.length}let F={alphanumeric:(e,t,n)=>B(z(e.getValue(n)).toLowerCase(),z(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>B(z(e.getValue(n)),z(t.getValue(n))),text:(e,t,n)=>L(z(e.getValue(n)).toLowerCase(),z(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>L(z(e.getValue(n)),z(t.getValue(n))),datetime:(e,t,n)=>{let r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>L(e.getValue(n),t.getValue(n))},H=[{createTable:e=>{e.getHeaderGroups=a(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;let l=null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],c=null!=(a=null==o?void 0:o.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[];return u(t,[...l,...n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=o&&o.includes(e.id))),...c],e)},l(e.options,c,"getHeaderGroups")),e.getCenterHeaderGroups=a(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>u(t,n=n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=o&&o.includes(e.id))),e,"center"),l(e.options,c,"getCenterHeaderGroups")),e.getLeftHeaderGroups=a(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;return u(t,null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],e,"left")},l(e.options,c,"getLeftHeaderGroups")),e.getRightHeaderGroups=a(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;return u(t,null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],e,"right")},l(e.options,c,"getRightHeaderGroups")),e.getFooterGroups=a(()=>[e.getHeaderGroups()],e=>[...e].reverse(),l(e.options,c,"getFooterGroups")),e.getLeftFooterGroups=a(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),l(e.options,c,"getLeftFooterGroups")),e.getCenterFooterGroups=a(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),l(e.options,c,"getCenterFooterGroups")),e.getRightFooterGroups=a(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),l(e.options,c,"getRightFooterGroups")),e.getFlatHeaders=a(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),l(e.options,c,"getFlatHeaders")),e.getLeftFlatHeaders=a(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),l(e.options,c,"getLeftFlatHeaders")),e.getCenterFlatHeaders=a(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),l(e.options,c,"getCenterFlatHeaders")),e.getRightFlatHeaders=a(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),l(e.options,c,"getRightFlatHeaders")),e.getCenterLeafHeaders=a(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),l(e.options,c,"getCenterLeafHeaders")),e.getLeftLeafHeaders=a(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),l(e.options,c,"getLeftLeafHeaders")),e.getRightLeafHeaders=a(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),l(e.options,c,"getRightLeafHeaders")),e.getLeafHeaders=a(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,o,i,a,l,c;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(l=null==(c=n[0])?void 0:c.headers)?l:[]].map(e=>e.getLeafHeaders()).flat()},l(e.options,c,"getLeafHeaders"))}},{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:o("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;let o=e.columns;return null==(n=o.length?o.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=a(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),l(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=a(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],l(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(t,n)=>a(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),l(e.options,"debugColumns",t));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=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:o("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=a(e=>[M(t,e)],t=>t.findIndex(t=>t.id===e.id),l(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return(null==(r=M(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;let o=M(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=a(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let o=[];if(null!=e&&e.length){let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(!(null!=t&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return"remove"===n?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}(o,t,n)},l(e.options,"debugTable","_getOrderColumnsFn"))}},{getInitialState:e=>({columnPinning:C(),...e}),getDefaultOptions:e=>({onColumnPinningChange:o("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,o,i,a,l,c;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(l=null==e?void 0:e.left)?l:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(c=null==e?void 0:e.right)?c:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==o?void 0:o.includes(e));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;let o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=a(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},l(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=a(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"})),l(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=a(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"})),l(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?C():null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:C())},e.getIsSomeColumnsPinned=t=>{var n,r,o;let i=e.getState().columnPinning;return t?!!(null==(n=i[t])?void 0:n.length):!!((null==(r=i.left)?void 0:r.length)||(null==(o=i.right)?void 0:o.length))},e.getLeftLeafColumns=a(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),l(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=a(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),l(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=a(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},l(e.options,"debugColumns","getCenterLeafColumns"))}},{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()}}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:o("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?w.includesString:"number"==typeof r?w.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?w.equals:Array.isArray(r)?w.arrIncludes:w.weakEquals},e.getFilterFn=()=>{var n,r;return i(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:w[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{var o,i;let a=e.getFilterFn(),l=null==t?void 0:t.find(t=>t.id===e.id),c=r(n,l?l.value:void 0);if(k(a,c,e))return null!=(o=null==t?void 0:t.filter(t=>t.id!==e.id))?o:[];let s={id:e.id,value:c};return l?null!=(i=null==t?void 0:t.map(t=>t.id===e.id?s:t))?i:[]:null!=t&&t.length?[...t,s]:[s]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var o;return null==(o=r(t,e))?void 0:o.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&k(t.getFilterFn(),e.value,t))})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?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()}},{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()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:o("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;let r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>w.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:r}=e.options;return i(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:w[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:o("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return F.datetime;if("string"==typeof n&&(r=!0,n.split(Z).length>1))return F.alphanumeric}return r?F.text:F.basic},e.getAutoSortDir=()=>{let n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw Error();return i(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:F[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let o=e.getNextSortingOrder(),i=null!=n;t.setSorting(a=>{let l;let c=null==a?void 0:a.find(t=>t.id===e.id),s=null==a?void 0:a.findIndex(t=>t.id===e.id),u=[],d=i?n:"desc"===o;if("toggle"!=(l=null!=a&&a.length&&e.getCanMultiSort()&&r?c?"toggle":"add":null!=a&&a.length&&s!==a.length-1?"replace":c?"toggle":"replace")||i||o||(l="remove"),"add"===l){var f;(u=[...a,{id:e.id,desc:d}]).splice(0,u.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))}else u="toggle"===l?a.map(t=>t.id===e.id?{...t,desc:d}:t):"remove"===l?a.filter(t=>t.id!==e.id):[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;let i=e.getFirstSortDir(),a=e.getIsSorted();return a?(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||!!n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;let r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?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()}},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:o("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?E.sum:"[object Date]"===Object.prototype.toString.call(r)?E.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw Error();return i(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:E[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?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];let r=t.getColumn(n);return null!=r&&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 t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!(null!=(t=n.subRows)&&t.length)}}},{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:o("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(".");t=Math.max(t,n.length)}),t},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;let i=!0===r||!!(null!=r&&r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n=null!=(o=n)?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{var n;let r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!!(null!=(o=e.subRows)&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)n=(r=t.getRow(r.parentId,!0)).getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{...I(),...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:o("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>r(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?I():null!=(n=e.initialState.pagination)?n:I())},e.setPageIndex=t=>{e.setPagination(n=>{let o=r(t,n.pageIndex);return o=Math.max(0,Math.min(o,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:o}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,r(t,e.pageSize)),o=e.pageSize*e.pageIndex;return{...e,pageIndex:Math.floor(o/n),pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var o;let i=r(t,null!=(o=e.options.pageCount)?o:-1);return"number"==typeof i&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=a(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},l(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return -1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+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 t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:R(),...e}),getDefaultOptions:e=>({onRowPinningChange:o("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{let i=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],a=new Set([...o?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],e.id,...i]);t.setRowPinning(e=>{var t,r,o,i,l,c;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter(e=>!(null!=a&&a.has(e))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)]}:"top"===n?{top:[...(null!=(l=null==e?void 0:e.top)?l:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)],bottom:(null!=(c=null==e?void 0:e.bottom)?c:[]).filter(e=>!(null!=a&&a.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=a&&a.has(e))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=a&&a.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==o?void 0:o.includes(e));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;let o=e.getIsPinned();if(!o)return -1;let i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?R():null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:R())},e.getIsSomeRowsPinned=t=>{var n,r,o;let i=e.getState().rowPinning;return t?!!(null==(n=i[t])?void 0:n.length):!!((null==(r=i.top)?void 0:r.length)||(null==(o=i.bottom)?void 0:o.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=a(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),l(e.options,"debugRows","getTopRows")),e.getBottomRows=a(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),l(e.options,"debugRows","getBottomRows")),e.getCenterRows=a(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},l(e.options,"debugRows","getCenterRows"))}},{getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:o("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();let r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):o.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(t=>{T(o,t.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=a(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?A(e,n):{rows:[],flatRows:[],rowsById:{}},l(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=a(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?A(e,n):{rows:[],flatRows:[],rowsById:{}},l(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=a(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?A(e,n):{rows:[],flatRows:[],rowsById:{}},l(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return i;let l={...i};return T(l,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),l})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return _(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return"some"===D(e,n)},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return"all"===D(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},{getDefaultColumnDef:()=>O,getInitialState:e=>({columnSizing:{},columnSizingInfo:j(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:o("columnSizing",e),onColumnSizingInfoChange:o("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;let i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:O.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:O.size),null!=(o=e.columnDef.maxSize)?o:O.maxSize)},e.getStart=a(e=>[e,M(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),l(t.options,"debugColumns","getStart")),e.getAfter=a(e=>[e,M(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),l(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{if(e.subHeaders.length)e.subHeaders.forEach(n);else{var r;t+=null!=(r=e.column.getSize())?r:0}};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o||(null==i.persist||i.persist(),N(i)&&i.touches&&i.touches.length>1))return;let a=e.getSize(),l=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],c=N(i)?Math.round(i.touches[0].clientX):i.clientX,s={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,o;let i="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,l=Math.max(a/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;s[t]=Math.round(100*Math.max(n+n*l,0))/100}),{...e,deltaOffset:a,deltaPercentage:l}}),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing(e=>({...e,...s})))},d=e=>u("move",e),f=e=>{u("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||"undefined"!=typeof document?document:null,h={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",h.moveHandler),null==p||p.removeEventListener("mouseup",h.upHandler),f(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof P)return P;let e=!1;try{let t=()=>{};window.addEventListener("test",t,{get passive(){return e=!0,!1}}),window.removeEventListener("test",t)}catch(t){e=!1}return P=e}()&&{passive:!1};N(i)?(null==p||p.addEventListener("touchmove",m.moveHandler,g),null==p||p.addEventListener("touchend",m.upHandler,g)):(null==p||p.addEventListener("mousemove",h.moveHandler,g),null==p||p.addEventListener("mouseup",h.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:c,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?j():null!=(n=e.initialState.columnSizingInfo)?n:j())},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}}];function q(e){var t,n;let o=[...H,...null!=(t=e._features)?t:[]],i={_features:o},c=i._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(i)),{}),s=e=>i.options.mergeOptions?i.options.mergeOptions(c,e):{...c,...e},u={...null!=(n=e.initialState)?n:{}};i._features.forEach(e=>{var t;u=null!=(t=null==e.getInitialState?void 0:e.getInitialState(u))?t:u});let d=[],f=!1,p={_features:o,options:{...c,...e},initialState:u,_queue:e=>{d.push(e),f||(f=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();f=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{i.setState(i.initialState)},setOptions:e=>{let t=r(e,i.options);i.options=s(t)},getState:()=>i.options.state,setState:e=>{null==i.options.onStateChange||i.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==i.options.getRowId?void 0:i.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?i.getPrePaginationRowModel():i.getRowModel()).rowsById[e];if(!n&&!(n=i.getCoreRowModel().rowsById[e]))throw Error();return n},_getDefaultColumnDef:a(()=>[i.options.defaultColumn],e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...i._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},l(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:a(()=>[i._getColumnDefs()],e=>{let t=function(e,n,r){return void 0===r&&(r=0),e.map(e=>{let o=function(e,t,n,r){var o,i;let c;let s={...e._getDefaultColumnDef(),...t},u=s.accessorKey,d=null!=(o=null!=(i=s.id)?i:u?"function"==typeof String.prototype.replaceAll?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)?o:"string"==typeof s.header?s.header:void 0;if(s.accessorFn?c=s.accessorFn:u&&(c=u.includes(".")?e=>{let t=e;for(let e of u.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[s.accessorKey]),!d)throw Error();let f={id:`${String(d)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:a(()=>[!0],()=>{var e;return[f,...null==(e=f.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},l(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:a(()=>[e._getOrderColumnsFn()],e=>{var t;return null!=(t=f.columns)&&t.length?e(f.columns.flatMap(e=>e.getLeafColumns())):[f]},l(e.options,"debugColumns","column.getLeafColumns"))};for(let t of e._features)null==t.createColumn||t.createColumn(f,e);return f}(i,e,r,n);return o.columns=e.columns?t(e.columns,o,r+1):[],o})};return t(e)},l(e,"debugColumns","getAllColumns")),getAllFlatColumns:a(()=>[i.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),l(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:a(()=>[i.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),l(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:a(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),l(e,"debugColumns","getAllLeafColumns")),getColumn:e=>i._getAllFlatColumnsById()[e]};Object.assign(i,p);for(let e=0;e<i._features.length;e++){let t=i._features[e];null==t||null==t.createTable||t.createTable(i)}return i}function W(){return e=>a(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);let a=[];for(let c=0;c<t.length;c++){let s=d(e,e._getRowId(t[c],c,i),t[c],c,o,void 0,null==i?void 0:i.id);if(n.flatRows.push(s),n.rowsById[s.id]=s,a.push(s),e.options.getSubRows){var l;s.originalSubRows=e.options.getSubRows(t[c],c),null!=(l=s.originalSubRows)&&l.length&&(s.subRows=r(s.originalSubRows,o+1,s))}}return a};return n.rows=r(t),n},l(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function K(){return e=>a(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(e,t,n)=>t.rows.length&&(!0===e||Object.keys(null!=e?e:{}).length)&&n?function(e){let t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t,l(e.options,"debugTable","getExpandedRowModel"))}function V(){return e=>a(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(null!=t&&t.length))return n;let r=e.getState().sorting,o=[],i=r.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),a={};i.forEach(t=>{let n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});let l=e=>{let t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let r=0;r<i.length;r+=1){var n;let o=i[r],l=a[o.id],c=l.sortUndefined,s=null!=(n=null==o?void 0:o.desc)&&n,u=0;if(c){let n=e.getValue(o.id),r=t.getValue(o.id),i=void 0===n,a=void 0===r;if(i||a){if("first"===c)return i?-1:1;if("last"===c)return i?1:-1;u=i&&a?0:i?c:-c}}if(0===u&&(u=l.sortingFn(e,t,o.id)),0!==u)return s&&(u*=-1),l.invertSorting&&(u*=-1),u}return e.index-t.index}),t.forEach(e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=l(e.subRows))}),t};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}},l(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}},61994:function(e,t,n){"use strict";t.Z=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t){if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r)}return o}(e))&&(r&&(r+=" "),r+=t);return r}},55284:function(e,t,n){"use strict";n.d(t,{Z:function(){return i},x:function(){return a}});var r=n(89999),o=n(36967);function i(){var e,t,n=(0,o.Z)().unknown(void 0),a=n.domain,l=n.range,c=0,s=1,u=!1,d=0,f=0,p=.5;function h(){var n=a().length,r=s<c,o=r?s:c,i=r?c:s;e=(i-o)/Math.max(1,n-d+2*f),u&&(e=Math.floor(e)),o+=(i-o-e*(n-d))*p,t=e*(1-d),u&&(o=Math.round(o),t=Math.round(t));var h=(function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=Array(o);++r<o;)i[r]=e+r*n;return i})(n).map(function(t){return o+e*t});return l(r?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(a(e),h()):a()},n.range=function(e){return arguments.length?([c,s]=e,c=+c,s=+s,h()):[c,s]},n.rangeRound=function(e){return[c,s]=e,c=+c,s=+s,u=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(u=!!e,h()):u},n.padding=function(e){return arguments.length?(d=Math.min(1,f=+e),h()):d},n.paddingInner=function(e){return arguments.length?(d=Math.min(1,e),h()):d},n.paddingOuter=function(e){return arguments.length?(f=+e,h()):f},n.align=function(e){return arguments.length?(p=Math.max(0,Math.min(1,e)),h()):p},n.copy=function(){return i(a(),[c,s]).round(u).paddingInner(d).paddingOuter(f).align(p)},r.o.apply(h(),arguments)}function a(){return function e(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return e(n())},t}(i.apply(null,arguments).paddingInner(1))}},89999:function(e,t,n){"use strict";function r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function o(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}n.d(t,{O:function(){return o},o:function(){return r}})},36967:function(e,t,n){"use strict";n.d(t,{Z:function(){return function e(){var t=new r,n=[],o=[],i=l;function c(e){let r=t.get(e);if(void 0===r){if(i!==l)return i;t.set(e,r=n.push(e)-1)}return o[r%o.length]}return c.domain=function(e){if(!arguments.length)return n.slice();for(let o of(n=[],t=new r,e))t.has(o)||t.set(o,n.push(o)-1);return c},c.range=function(e){return arguments.length?(o=Array.from(e),c):o.slice()},c.unknown=function(e){return arguments.length?(i=e,c):i},c.copy=function(){return e(n,o).unknown(i)},a.o.apply(c,arguments),c}},O:function(){return l}});class r extends Map{constructor(e,t=i){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(o(this,e))}has(e){return super.has(o(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function o({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function i(e){return null!==e&&"object"==typeof e?e.valueOf():e}var a=n(89999);let l=Symbol("implicit")},22516:function(e,t,n){"use strict";function r(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}n.d(t,{Z:function(){return r}}),Array.prototype.slice},76115:function(e,t,n){"use strict";function r(e){return function(){return e}}n.d(t,{Z:function(){return r}})},67790:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});let r=Math.PI,o=2*r,i=o-1e-6;function a(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class l{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?a:function(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return a;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,o,i){if(e=+e,t=+t,n=+n,o=+o,(i=+i)<0)throw Error(`negative radius: ${i}`);let a=this._x1,l=this._y1,c=n-e,s=o-t,u=a-e,d=l-t,f=u*u+d*d;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(f>1e-6){if(Math.abs(d*c-s*u)>1e-6&&i){let p=n-a,h=o-l,m=c*c+s*s,g=Math.sqrt(m),v=Math.sqrt(f),y=i*Math.tan((r-Math.acos((m+f-(p*p+h*h))/(2*g*v)))/2),b=y/v,x=y/g;Math.abs(b-1)>1e-6&&this._append`L${e+b*u},${t+b*d}`,this._append`A${i},${i},0,0,${+(d*p>u*h)},${this._x1=e+x*c},${this._y1=t+x*s}`}else this._append`L${this._x1=e},${this._y1=t}`}}arc(e,t,n,a,l,c){if(e=+e,t=+t,c=!!c,(n=+n)<0)throw Error(`negative radius: ${n}`);let s=n*Math.cos(a),u=n*Math.sin(a),d=e+s,f=t+u,p=1^c,h=c?a-l:l-a;null===this._x1?this._append`M${d},${f}`:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-f)>1e-6)&&this._append`L${d},${f}`,n&&(h<0&&(h=h%o+o),h>i?this._append`A${n},${n},0,1,${p},${e-s},${t-u}A${n},${n},0,1,${p},${this._x1=d},${this._y1=f}`:h>1e-6&&this._append`A${n},${n},0,${+(h>=r)},${p},${this._x1=e+n*Math.cos(l)},${this._y1=t+n*Math.sin(l)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function c(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new l(t)}l.prototype},33619:function(e,t,n){"use strict";let r,o,i,a,l,c,s,u,d,f;n.d(t,{ZP:function(){return t8}});var p,h,m,g,v,y,b,x,w,S,k,E,C,O,j,P,N,M,I,R,T,A,_,D,Z,L,z,B,F,H,q,W,K,V,U,G,X,$={};n.r($),n.d($,{APIConnectionError:function(){return er},APIConnectionTimeoutError:function(){return eo},APIError:function(){return et},APIUserAbortError:function(){return en},AuthenticationError:function(){return ea},BadRequestError:function(){return ei},ConflictError:function(){return es},InternalServerError:function(){return ef},NotFoundError:function(){return ec},OpenAIError:function(){return ee},PermissionDeniedError:function(){return el},RateLimitError:function(){return ed},UnprocessableEntityError:function(){return eu}});let Y="4.28.0",Q=!1;class J{constructor(e){this.body=e}get[Symbol.toStringTag](){return"MultipartBody"}}o||function(e,t={auto:!1}){if(Q)throw Error(`you must \`import 'openai/shims/${e.kind}'\` before importing anything else from openai`);if(o)throw Error(`can't \`import 'openai/shims/${e.kind}'\` after \`import 'openai/shims/${o}'\``);Q=t.auto,o=e.kind,i=e.fetch,e.Request,e.Response,e.Headers,a=e.FormData,e.Blob,l=e.File,c=e.ReadableStream,s=e.getMultipartRequestOptions,u=e.getDefaultAgent,d=e.fileFromPath,f=e.isFsReadStream}(function({manuallyImported:e}={}){let t,n,r,o;let i=e?"You may need to use polyfills":`Add one of these imports before your first \`import … from 'openai'\`: +- \`import 'openai/shims/node'\` (if you're running on Node) +- \`import 'openai/shims/web'\` (otherwise) +`;try{t=fetch,n=Request,r=Response,o=Headers}catch(e){throw Error(`this environment is missing the following Web Fetch API type: ${e.message}. ${i}`)}return{kind:"web",fetch:t,Request:n,Response:r,Headers:o,FormData:"undefined"!=typeof FormData?FormData:class{constructor(){throw Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${i}`)}},Blob:"undefined"!=typeof Blob?Blob:class{constructor(){throw Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${i}`)}},File:"undefined"!=typeof File?File:class{constructor(){throw Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${i}`)}},ReadableStream:"undefined"!=typeof ReadableStream?ReadableStream:class{constructor(){throw Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${i}`)}},getMultipartRequestOptions:async(e,t)=>({...t,body:new J(e)}),getDefaultAgent:e=>void 0,fileFromPath:()=>{throw Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads")},isFsReadStream:e=>!1}}(),{auto:!0});class ee extends Error{}class et extends ee{constructor(e,t,n,r){super(`${et.makeMessage(e,t,n)}`),this.status=e,this.headers=r,this.error=t,this.code=t?.code,this.param=t?.param,this.type=t?.type}static makeMessage(e,t,n){let r=t?.message?"string"==typeof t.message?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||"(no status code or body)"}static generate(e,t,n,r){if(!e)return new er({cause:eJ(t)});let o=t?.error;return 400===e?new ei(e,o,n,r):401===e?new ea(e,o,n,r):403===e?new el(e,o,n,r):404===e?new ec(e,o,n,r):409===e?new es(e,o,n,r):422===e?new eu(e,o,n,r):429===e?new ed(e,o,n,r):e>=500?new ef(e,o,n,r):new et(e,o,n,r)}}class en extends et{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0),this.status=void 0}}class er extends et{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),this.status=void 0,t&&(this.cause=t)}}class eo extends er{constructor({message:e}={}){super({message:e??"Request timed out."})}}class ei extends et{constructor(){super(...arguments),this.status=400}}class ea extends et{constructor(){super(...arguments),this.status=401}}class el extends et{constructor(){super(...arguments),this.status=403}}class ec extends et{constructor(){super(...arguments),this.status=404}}class es extends et{constructor(){super(...arguments),this.status=409}}class eu extends et{constructor(){super(...arguments),this.status=422}}class ed extends et{constructor(){super(...arguments),this.status=429}}class ef extends et{}var ep=n(10536).lW;class eh{constructor(e,t){this.iterator=e,this.controller=t}static fromSSEResponse(e,t){let n=!1,r=new em;async function*o(){if(!e.body)throw t.abort(),new ee("Attempted to iterate over a response with no body");let n=new eg;for await(let t of ev(e.body))for(let e of n.decode(t)){let t=r.decode(e);t&&(yield t)}for(let e of n.flush()){let t=r.decode(e);t&&(yield t)}}return new eh(async function*(){if(n)throw Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let e=!1;try{for await(let t of o())if(!e){if(t.data.startsWith("[DONE]")){e=!0;continue}if(null===t.event){let e;try{e=JSON.parse(t.data)}catch(e){throw console.error("Could not parse message into JSON:",t.data),console.error("From chunk:",t.raw),e}if(e&&e.error)throw new et(void 0,e.error,void 0,void 0);yield e}}e=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{e||t.abort()}},t)}static fromReadableStream(e,t){let n=!1;async function*r(){let t=new eg;for await(let n of ev(e))for(let e of t.decode(n))yield e;for(let e of t.flush())yield e}return new eh(async function*(){if(n)throw Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let e=!1;try{for await(let t of r())!e&&t&&(yield JSON.parse(t));e=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{e||t.abort()}},t)}[Symbol.asyncIterator](){return this.iterator()}tee(){let e=[],t=[],n=this.iterator(),r=r=>({next:()=>{if(0===r.length){let r=n.next();e.push(r),t.push(r)}return r.shift()}});return[new eh(()=>r(e),this.controller),new eh(()=>r(t),this.controller)]}toReadableStream(){let e;let t=this,n=new TextEncoder;return new c({async start(){e=t[Symbol.asyncIterator]()},async pull(t){try{let{value:r,done:o}=await e.next();if(o)return t.close();let i=n.encode(JSON.stringify(r)+"\n");t.enqueue(i)}catch(e){t.error(e)}},async cancel(){await e.return?.()}})}}class em{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join("\n"),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(":"))return null;let[t,n,r]=function(e,t){let n=e.indexOf(":");return -1!==n?[e.substring(0,n),":",e.substring(n+t.length)]:[e,"",""]}(e,":");return r.startsWith(" ")&&(r=r.substring(1)),"event"===t?this.event=r:"data"===t&&this.data.push(r),null}}class eg{constructor(){this.buffer=[],this.trailingCR=!1}decode(e){let t=this.decodeText(e);if(this.trailingCR&&(t="\r"+t,this.trailingCR=!1),t.endsWith("\r")&&(this.trailingCR=!0,t=t.slice(0,-1)),!t)return[];let n=eg.NEWLINE_CHARS.has(t[t.length-1]||""),r=t.split(eg.NEWLINE_REGEXP);return 1!==r.length||n?(this.buffer.length>0&&(r=[this.buffer.join("")+r[0],...r.slice(1)],this.buffer=[]),n||(this.buffer=[r.pop()||""]),r):(this.buffer.push(r[0]),[])}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==ep){if(e instanceof ep)return e.toString();if(e instanceof Uint8Array)return ep.from(e).toString();throw new ee(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new ee(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new ee("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];let e=[this.buffer.join("")];return this.buffer=[],this.trailingCR=!1,e}}function ev(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}eg.NEWLINE_CHARS=new Set(["\n","\r","\v","\f","\x1c","\x1d","\x1e","\x85","\u2028","\u2029"]),eg.NEWLINE_REGEXP=/\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;var ey=n(10536).lW;let eb=e=>null!=e&&"object"==typeof e&&"string"==typeof e.url&&"function"==typeof e.blob,ex=e=>null!=e&&"object"==typeof e&&"string"==typeof e.name&&"number"==typeof e.lastModified&&ew(e),ew=e=>null!=e&&"object"==typeof e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.text&&"function"==typeof e.slice&&"function"==typeof e.arrayBuffer,eS=e=>ex(e)||eb(e)||f(e);async function ek(e,t,n={}){var r;if(eb(e=await e)){let r=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()??"unknown_file"),new l([r],t,n)}let o=await eE(e);if(t||(t=(eC((r=e).name)||eC(r.filename)||eC(r.path)?.split(/[\\/]/).pop())??"unknown_file"),!n.type){let e=o[0]?.type;"string"==typeof e&&(n={...n,type:e})}return new l(o,t,n)}async function eE(e){let t=[];if("string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(ew(e))t.push(await e.arrayBuffer());else if(eO(e))for await(let n of e)t.push(n);else throw Error(`Unexpected data type: ${typeof e}; constructor: ${e?.constructor?.name}; props: ${function(e){let t=Object.getOwnPropertyNames(e);return`[${t.map(e=>`"${e}"`).join(", ")}]`}(e)}`);return t}let eC=e=>"string"==typeof e?e:void 0!==ey&&e instanceof ey?String(e):void 0,eO=e=>null!=e&&"object"==typeof e&&"function"==typeof e[Symbol.asyncIterator],ej=e=>e&&"object"==typeof e&&e.body&&"MultipartBody"===e[Symbol.toStringTag],eP=async e=>{let t=await eN(e.body);return s(t,e)},eN=async e=>{let t=new a;return await Promise.all(Object.entries(e||{}).map(([e,n])=>eI(t,e,n))),t},eM=e=>{if(eS(e))return!0;if(Array.isArray(e))return e.some(eM);if(e&&"object"==typeof e){for(let t in e)if(eM(e[t]))return!0}return!1},eI=async(e,t,n)=>{if(void 0!==n){if(null==n)throw TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if("string"==typeof n||"number"==typeof n||"boolean"==typeof n)e.append(t,String(n));else if(eS(n)){let r=await ek(n);e.append(t,r)}else if(Array.isArray(n))await Promise.all(n.map(n=>eI(e,t+"[]",n)));else if("object"==typeof n)await Promise.all(Object.entries(n).map(([n,r])=>eI(e,`${t}[${n}]`,r)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${n} instead`)}};var eR=n(10536).lW,eT=n(40257),eA=function(e,t,n,r,o){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},e_=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};async function eD(e){let{response:t}=e;if(e.options.stream)return(e4("response",t.status,t.url,t.headers,t.body),e.options.__streamClass)?e.options.__streamClass.fromSSEResponse(t,e.controller):eh.fromSSEResponse(t,e.controller);if(204===t.status)return null;if(e.options.__binaryResponse)return t;let n=t.headers.get("content-type");if(n?.includes("application/json")||n?.includes("application/vnd.api+json")){let e=await t.json();return e4("response",t.status,t.url,t.headers,e),e}let r=await t.text();return e4("response",t.status,t.url,t.headers,r),r}class eZ extends Promise{constructor(e,t=eD){super(e=>{e(null)}),this.responsePromise=e,this.parseResponse=t}_thenUnwrap(e){return new eZ(this.responsePromise,async t=>e(await this.parseResponse(t)))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(this.parseResponse)),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}}class eL{constructor({baseURL:e,maxRetries:t=2,timeout:n=6e5,httpAgent:r,fetch:o}){this.baseURL=e,this.maxRetries=eQ("maxRetries",t),this.timeout=eQ("timeout",n),this.httpAgent=r,this.fetch=o??i}authHeaders(e){return{}}defaultHeaders(e){return{Accept:"application/json","Content-Type":"application/json","User-Agent":this.getUserAgent(),...eU(),...this.authHeaders(e)}}validateHeaders(e,t){}defaultIdempotencyKey(){return`stainless-node-retry-${e3()}`}get(e,t){return this.methodRequest("get",e,t)}post(e,t){return this.methodRequest("post",e,t)}patch(e,t){return this.methodRequest("patch",e,t)}put(e,t){return this.methodRequest("put",e,t)}delete(e,t){return this.methodRequest("delete",e,t)}methodRequest(e,t,n){return this.request(Promise.resolve(n).then(n=>({method:e,path:t,...n})))}getAPIList(e,t,n){return this.requestAPIList(t,{method:"get",path:e,...n})}calculateContentLength(e){if("string"==typeof e){if(void 0!==eR)return eR.byteLength(e,"utf8").toString();if("undefined"!=typeof TextEncoder)return new TextEncoder().encode(e).length.toString()}return null}buildRequest(e){let{method:t,path:n,query:r,headers:o={}}=e,i=ej(e.body)?e.body.body:e.body?JSON.stringify(e.body,null,2):null,a=this.calculateContentLength(i),l=this.buildURL(n,r);"timeout"in e&&eQ("timeout",e.timeout);let c=e.timeout??this.timeout,s=e.httpAgent??this.httpAgent??u(l),d=c+1e3;"number"==typeof s?.options?.timeout&&d>(s.options.timeout??0)&&(s.options.timeout=d),this.idempotencyHeader&&"get"!==t&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),o[this.idempotencyHeader]=e.idempotencyKey);let f=this.buildHeaders({options:e,headers:o,contentLength:a});return{req:{method:t,...i&&{body:i},headers:f,...s&&{agent:s},signal:e.signal??null},url:l,timeout:c}}buildHeaders({options:e,headers:t,contentLength:n}){let r={};return n&&(r["content-length"]=n),e6(r,this.defaultHeaders(e)),e6(r,t),ej(e.body)&&"node"!==o&&delete r["content-type"],this.validateHeaders(r,t),r}async prepareOptions(e){}async prepareRequest(e,{url:t,options:n}){}parseHeaders(e){return e?Symbol.iterator in e?Object.fromEntries(Array.from(e).map(e=>[...e])):{...e}:{}}makeStatusError(e,t,n,r){return et.generate(e,t,n,r)}request(e,t=null){return new eZ(this.makeRequest(e,t))}async makeRequest(e,t){let n=await e;null==t&&(t=n.maxRetries??this.maxRetries),await this.prepareOptions(n);let{req:r,url:o,timeout:i}=this.buildRequest(n);if(await this.prepareRequest(r,{url:o,options:n}),e4("request",o,n,r.headers),n.signal?.aborted)throw new en;let a=new AbortController,l=await this.fetchWithTimeout(o,r,i,a).catch(eJ);if(l instanceof Error){if(n.signal?.aborted)throw new en;if(t)return this.retryRequest(n,t);if("AbortError"===l.name)throw new eo;throw new er({cause:l})}let c=eF(l.headers);if(!l.ok){if(t&&this.shouldRetry(l)){let e=`retrying, ${t} attempts remaining`;return e4(`response (error; ${e})`,l.status,o,c),this.retryRequest(n,t,c)}let e=await l.text().catch(e=>eJ(e).message),r=eG(e),i=r?void 0:e,a=t?"(error; no more retries left)":"(error; not retryable)";throw e4(`response (error; ${a})`,l.status,o,c,i),this.makeStatusError(l.status,r,i,c)}return{response:l,options:n,controller:a}}requestAPIList(e,t){return new eB(this,this.makeRequest(t,null),e)}buildURL(e,t){let n=new URL(e$(e)?e:this.baseURL+(this.baseURL.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),r=this.defaultQuery();return e1(r)||(t={...r,...t}),"object"==typeof t&&t&&!Array.isArray(t)&&(n.search=this.stringifyQuery(t)),n.toString()}stringifyQuery(e){return Object.entries(e).filter(([e,t])=>void 0!==t).map(([e,t])=>{if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(null===t)return`${encodeURIComponent(e)}=`;throw new ee(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}async fetchWithTimeout(e,t,n,r){let{signal:o,...i}=t||{};o&&o.addEventListener("abort",()=>r.abort());let a=setTimeout(()=>r.abort(),n);return this.getRequestClient().fetch.call(void 0,e,{signal:r.signal,...i}).finally(()=>{clearTimeout(a)})}getRequestClient(){return{fetch:this.fetch}}shouldRetry(e){let t=e.headers.get("x-should-retry");return"true"===t||"false"!==t&&(408===e.status||409===e.status||429===e.status||e.status>=500)}async retryRequest(e,t,n){let r;let o=n?.["retry-after-ms"];if(o){let e=parseFloat(o);Number.isNaN(e)||(r=e)}let i=n?.["retry-after"];if(i&&!r){let e=parseFloat(i);r=Number.isNaN(e)?Date.parse(i)-Date.now():1e3*e}if(!(r&&0<=r&&r<6e4)){let n=e.maxRetries??this.maxRetries;r=this.calculateDefaultRetryTimeoutMillis(t,n)}return await eY(r),this.makeRequest(e,t-1)}calculateDefaultRetryTimeoutMillis(e,t){return Math.min(.5*Math.pow(2,t-e),8)*(1-.25*Math.random())*1e3}getUserAgent(){return`${this.constructor.name}/JS ${Y}`}}class ez{constructor(e,t,n,r){S.set(this,void 0),eA(this,S,e,"f"),this.options=r,this.response=t,this.body=n}hasNextPage(){return!!this.getPaginatedItems().length&&null!=this.nextPageInfo()}async getNextPage(){let e=this.nextPageInfo();if(!e)throw new ee("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");let t={...this.options};if("params"in e&&"object"==typeof t.query)t.query={...t.query,...e.params};else if("url"in e){for(let[n,r]of[...Object.entries(t.query||{}),...e.url.searchParams.entries()])e.url.searchParams.set(n,r);t.query=void 0,t.path=e.url.toString()}return await e_(this,S,"f").requestAPIList(this.constructor,t)}async *iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async *[(S=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let t of e.getPaginatedItems())yield t}}class eB extends eZ{constructor(e,t,n){super(t,async t=>new n(e,t.response,await eD(t),t.options))}async *[Symbol.asyncIterator](){for await(let e of(await this))yield e}}let eF=e=>new Proxy(Object.fromEntries(e.entries()),{get(e,t){let n=t.toString();return e[n.toLowerCase()]||e[n]}}),eH={method:!0,path:!0,query:!0,body:!0,headers:!0,maxRetries:!0,stream:!0,timeout:!0,httpAgent:!0,signal:!0,idempotencyKey:!0,__binaryResponse:!0,__streamClass:!0},eq=e=>"object"==typeof e&&null!==e&&!e1(e)&&Object.keys(e).every(e=>e2(eH,e)),eW=()=>{if("undefined"!=typeof Deno&&null!=Deno.build)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Y,"X-Stainless-OS":eV(Deno.build.os),"X-Stainless-Arch":eK(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":Deno.version};if("undefined"!=typeof EdgeRuntime)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Y,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":eT.version};if("[object process]"===Object.prototype.toString.call(void 0!==eT?eT:0))return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Y,"X-Stainless-OS":eV(eT.platform),"X-Stainless-Arch":eK(eT.arch),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":eT.version};let e=function(){if("undefined"==typeof navigator||!navigator)return null;for(let{key:e,pattern:t}of[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}]){let n=t.exec(navigator.userAgent);if(n){let t=n[1]||0,r=n[2]||0,o=n[3]||0;return{browser:e,version:`${t}.${r}.${o}`}}}return null}();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Y,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Y,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},eK=e=>"x32"===e?"x32":"x86_64"===e||"x64"===e?"x64":"arm"===e?"arm":"aarch64"===e||"arm64"===e?"arm64":e?`other:${e}`:"unknown",eV=e=>(e=e.toLowerCase()).includes("ios")?"iOS":"android"===e?"Android":"darwin"===e?"MacOS":"win32"===e?"Windows":"freebsd"===e?"FreeBSD":"openbsd"===e?"OpenBSD":"linux"===e?"Linux":e?`Other:${e}`:"Unknown",eU=()=>r??(r=eW()),eG=e=>{try{return JSON.parse(e)}catch(e){return}},eX=RegExp("^(?:[a-z]+:)?//","i"),e$=e=>eX.test(e),eY=e=>new Promise(t=>setTimeout(t,e)),eQ=(e,t)=>{if("number"!=typeof t||!Number.isInteger(t))throw new ee(`${e} must be an integer`);if(t<0)throw new ee(`${e} must be a positive integer`);return t},eJ=e=>e instanceof Error?e:Error(e),e0=e=>void 0!==eT?eT.env?.[e]?.trim()??void 0:"undefined"!=typeof Deno?Deno.env?.get?.(e)?.trim():void 0;function e1(e){if(!e)return!0;for(let t in e)return!1;return!0}function e2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function e6(e,t){for(let n in t){if(!e2(t,n))continue;let r=n.toLowerCase();if(!r)continue;let o=t[n];null===o?delete e[r]:void 0!==o&&(e[r]=o)}}function e4(e,...t){void 0!==eT&&"true"===eT.env.DEBUG&&console.log(`OpenAI:DEBUG:${e}`,...t)}let e3=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),e5=()=>"undefined"!=typeof window&&void 0!==window.document&&"undefined"!=typeof navigator;class e8 extends ez{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[],this.object=n.object}getPaginatedItems(){return this.data??[]}nextPageParams(){return null}nextPageInfo(){return null}}class e7 extends ez{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[]}getPaginatedItems(){return this.data??[]}nextPageParams(){let e=this.nextPageInfo();if(!e)return null;if("params"in e)return e.params;let t=Object.fromEntries(e.url.searchParams);return Object.keys(t).length?t:null}nextPageInfo(){let e=this.getPaginatedItems();if(!e.length)return null;let t=e[e.length-1]?.id;return t?{params:{after:t}}:null}}class e9{constructor(e){this._client=e}}class te extends e9{create(e,t){return this._client.post("/completions",{body:e,...t,stream:e.stream??!1})}}te||(te={});class tt extends e9{create(e,t){return this._client.post("/chat/completions",{body:e,...t,stream:e.stream??!1})}}tt||(tt={});class tn extends e9{constructor(){super(...arguments),this.completions=new tt(this._client)}}(tn||(tn={})).Completions=tt;class tr extends e9{create(e,t){return this._client.post("/embeddings",{body:e,...t})}}tr||(tr={});class to extends e9{create(e,t){return this._client.post("/files",eP({body:e,...t}))}retrieve(e,t){return this._client.get(`/files/${e}`,t)}list(e={},t){return eq(e)?this.list({},e):this._client.getAPIList("/files",ti,{query:e,...t})}del(e,t){return this._client.delete(`/files/${e}`,t)}content(e,t){return this._client.get(`/files/${e}/content`,{...t,__binaryResponse:!0})}retrieveContent(e,t){return this._client.get(`/files/${e}/content`,{...t,headers:{Accept:"application/json",...t?.headers}})}async waitForProcessing(e,{pollInterval:t=5e3,maxWait:n=18e5}={}){let r=new Set(["processed","error","deleted"]),o=Date.now(),i=await this.retrieve(e);for(;!i.status||!r.has(i.status);)if(await eY(t),i=await this.retrieve(e),Date.now()-o>n)throw new eo({message:`Giving up on waiting for file ${e} to finish processing after ${n} milliseconds.`});return i}}class ti extends e8{}(to||(to={})).FileObjectsPage=ti;class ta extends e9{createVariation(e,t){return this._client.post("/images/variations",eP({body:e,...t}))}edit(e,t){return this._client.post("/images/edits",eP({body:e,...t}))}generate(e,t){return this._client.post("/images/generations",{body:e,...t})}}ta||(ta={});class tl extends e9{create(e,t){return this._client.post("/audio/speech",{body:e,...t,__binaryResponse:!0})}}tl||(tl={});class tc extends e9{create(e,t){return this._client.post("/audio/transcriptions",eP({body:e,...t}))}}tc||(tc={});class ts extends e9{create(e,t){return this._client.post("/audio/translations",eP({body:e,...t}))}}ts||(ts={});class tu extends e9{constructor(){super(...arguments),this.transcriptions=new tc(this._client),this.translations=new ts(this._client),this.speech=new tl(this._client)}}(p=tu||(tu={})).Transcriptions=tc,p.Translations=ts,p.Speech=tl;class td extends e9{create(e,t){return this._client.post("/moderations",{body:e,...t})}}td||(td={});class tf extends e9{retrieve(e,t){return this._client.get(`/models/${e}`,t)}list(e){return this._client.getAPIList("/models",tp,e)}del(e,t){return this._client.delete(`/models/${e}`,t)}}class tp extends e8{}(tf||(tf={})).ModelsPage=tp;class th extends e9{create(e,t){return this._client.post("/fine_tuning/jobs",{body:e,...t})}retrieve(e,t){return this._client.get(`/fine_tuning/jobs/${e}`,t)}list(e={},t){return eq(e)?this.list({},e):this._client.getAPIList("/fine_tuning/jobs",tm,{query:e,...t})}cancel(e,t){return this._client.post(`/fine_tuning/jobs/${e}/cancel`,t)}listEvents(e,t={},n){return eq(t)?this.listEvents(e,{},t):this._client.getAPIList(`/fine_tuning/jobs/${e}/events`,tg,{query:t,...n})}}class tm extends e7{}class tg extends e7{}(h=th||(th={})).FineTuningJobsPage=tm,h.FineTuningJobEventsPage=tg;class tv extends e9{constructor(){super(...arguments),this.jobs=new th(this._client)}}(m=tv||(tv={})).Jobs=th,m.FineTuningJobsPage=tm,m.FineTuningJobEventsPage=tg;class ty extends e9{create(e,t,n){return this._client.post(`/assistants/${e}/files`,{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}retrieve(e,t,n){return this._client.get(`/assistants/${e}/files/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}list(e,t={},n){return eq(t)?this.list(e,{},t):this._client.getAPIList(`/assistants/${e}/files`,tb,{query:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}del(e,t,n){return this._client.delete(`/assistants/${e}/files/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}}class tb extends e7{}(ty||(ty={})).AssistantFilesPage=tb;class tx extends e9{constructor(){super(...arguments),this.files=new ty(this._client)}create(e,t){return this._client.post("/assistants",{body:e,...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}retrieve(e,t){return this._client.get(`/assistants/${e}`,{...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}update(e,t,n){return this._client.post(`/assistants/${e}`,{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}list(e={},t){return eq(e)?this.list({},e):this._client.getAPIList("/assistants",tw,{query:e,...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}del(e,t){return this._client.delete(`/assistants/${e}`,{...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}}class tw extends e7{}function tS(e){return"function"==typeof e.parse}(g=tx||(tx={})).AssistantsPage=tw,g.Files=ty,g.AssistantFilesPage=tb;let tk=e=>e?.role==="assistant",tE=e=>e?.role==="function",tC=e=>e?.role==="tool";var tO=function(e,t,n,r,o){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},tj=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class tP{constructor(){k.add(this),this.controller=new AbortController,E.set(this,void 0),C.set(this,()=>{}),O.set(this,()=>{}),j.set(this,void 0),P.set(this,()=>{}),N.set(this,()=>{}),M.set(this,{}),this._chatCompletions=[],this.messages=[],I.set(this,!1),R.set(this,!1),T.set(this,!1),A.set(this,!1),B.set(this,e=>{if(tO(this,R,!0,"f"),e instanceof Error&&"AbortError"===e.name&&(e=new en),e instanceof en)return tO(this,T,!0,"f"),this._emit("abort",e);if(e instanceof ee)return this._emit("error",e);if(e instanceof Error){let t=new ee(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new ee(String(e)))}),tO(this,E,new Promise((e,t)=>{tO(this,C,e,"f"),tO(this,O,t,"f")}),"f"),tO(this,j,new Promise((e,t)=>{tO(this,P,e,"f"),tO(this,N,t,"f")}),"f"),tj(this,E,"f").catch(()=>{}),tj(this,j,"f").catch(()=>{})}_run(e){setTimeout(()=>{e().then(()=>{this._emitFinal(),this._emit("end")},tj(this,B,"f"))},0)}_addChatCompletion(e){this._chatCompletions.push(e),this._emit("chatCompletion",e);let t=e.choices[0]?.message;return t&&this._addMessage(t),e}_addMessage(e,t=!0){if("content"in e||(e.content=null),this.messages.push(e),t){if(this._emit("message",e),(tE(e)||tC(e))&&e.content)this._emit("functionCallResult",e.content);else if(tk(e)&&e.function_call)this._emit("functionCall",e.function_call);else if(tk(e)&&e.tool_calls)for(let t of e.tool_calls)"function"===t.type&&this._emit("functionCall",t.function)}}_connected(){this.ended||(tj(this,C,"f").call(this),this._emit("connect"))}get ended(){return tj(this,I,"f")}get errored(){return tj(this,R,"f")}get aborted(){return tj(this,T,"f")}abort(){this.controller.abort()}on(e,t){return(tj(this,M,"f")[e]||(tj(this,M,"f")[e]=[])).push({listener:t}),this}off(e,t){let n=tj(this,M,"f")[e];if(!n)return this;let r=n.findIndex(e=>e.listener===t);return r>=0&&n.splice(r,1),this}once(e,t){return(tj(this,M,"f")[e]||(tj(this,M,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,n)=>{tO(this,A,!0,"f"),"error"!==e&&this.once("error",n),this.once(e,t)})}async done(){tO(this,A,!0,"f"),await tj(this,j,"f")}async finalChatCompletion(){await this.done();let e=this._chatCompletions[this._chatCompletions.length-1];if(!e)throw new ee("stream ended without producing a ChatCompletion");return e}async finalContent(){return await this.done(),tj(this,k,"m",_).call(this)}async finalMessage(){return await this.done(),tj(this,k,"m",D).call(this)}async finalFunctionCall(){return await this.done(),tj(this,k,"m",Z).call(this)}async finalFunctionCallResult(){return await this.done(),tj(this,k,"m",L).call(this)}async totalUsage(){return await this.done(),tj(this,k,"m",z).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emit(e,...t){if(tj(this,I,"f"))return;"end"===e&&(tO(this,I,!0,"f"),tj(this,P,"f").call(this));let n=tj(this,M,"f")[e];if(n&&(tj(this,M,"f")[e]=n.filter(e=>!e.once),n.forEach(({listener:e})=>e(...t))),"abort"===e){let e=t[0];tj(this,A,"f")||n?.length||Promise.reject(e),tj(this,O,"f").call(this,e),tj(this,N,"f").call(this,e),this._emit("end");return}if("error"===e){let e=t[0];tj(this,A,"f")||n?.length||Promise.reject(e),tj(this,O,"f").call(this,e),tj(this,N,"f").call(this,e),this._emit("end")}}_emitFinal(){let e=this._chatCompletions[this._chatCompletions.length-1];e&&this._emit("finalChatCompletion",e);let t=tj(this,k,"m",D).call(this);t&&this._emit("finalMessage",t);let n=tj(this,k,"m",_).call(this);n&&this._emit("finalContent",n);let r=tj(this,k,"m",Z).call(this);r&&this._emit("finalFunctionCall",r);let o=tj(this,k,"m",L).call(this);null!=o&&this._emit("finalFunctionCallResult",o),this._chatCompletions.some(e=>e.usage)&&this._emit("totalUsage",tj(this,k,"m",z).call(this))}async _createChatCompletion(e,t,n){let r=n?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),tj(this,k,"m",F).call(this,t);let o=await e.create({...t,stream:!1},{...n,signal:this.controller.signal});return this._connected(),this._addChatCompletion(o)}async _runChatCompletion(e,t,n){for(let e of t.messages)this._addMessage(e,!1);return await this._createChatCompletion(e,t,n)}async _runFunctions(e,t,n){let r="function",{function_call:o="auto",stream:i,...a}=t,l="string"!=typeof o&&o?.name,{maxChatCompletions:c=10}=n||{},s={};for(let e of t.functions)s[e.name||e.function.name]=e;let u=t.functions.map(e=>({name:e.name||e.function.name,parameters:e.parameters,description:e.description}));for(let e of t.messages)this._addMessage(e,!1);for(let t=0;t<c;++t){let t;let i=await this._createChatCompletion(e,{...a,function_call:o,functions:u,messages:[...this.messages]},n),c=i.choices[0]?.message;if(!c)throw new ee("missing message in ChatCompletion response");if(!c.function_call)return;let{name:d,arguments:f}=c.function_call,p=s[d];if(p){if(l&&l!==d){let e=`Invalid function_call: ${JSON.stringify(d)}. ${JSON.stringify(l)} requested. Please try again`;this._addMessage({role:r,name:d,content:e});continue}}else{let e=`Invalid function_call: ${JSON.stringify(d)}. Available options are: ${u.map(e=>JSON.stringify(e.name)).join(", ")}. Please try again`;this._addMessage({role:r,name:d,content:e});continue}try{t=tS(p)?await p.parse(f):f}catch(e){this._addMessage({role:r,name:d,content:e instanceof Error?e.message:String(e)});continue}let h=await p.function(t,this),m=tj(this,k,"m",H).call(this,h);if(this._addMessage({role:r,name:d,content:m}),l)return}}async _runTools(e,t,n){let r="tool",{tool_choice:o="auto",stream:i,...a}=t,l="string"!=typeof o&&o?.function?.name,{maxChatCompletions:c=10}=n||{},s={};for(let e of t.tools)"function"===e.type&&(s[e.function.name||e.function.function.name]=e.function);let u="tools"in t?t.tools.map(e=>"function"===e.type?{type:"function",function:{name:e.function.name||e.function.function.name,parameters:e.function.parameters,description:e.function.description}}:e):void 0;for(let e of t.messages)this._addMessage(e,!1);for(let t=0;t<c;++t){let t=await this._createChatCompletion(e,{...a,tool_choice:o,tools:u,messages:[...this.messages]},n),i=t.choices[0]?.message;if(!i)throw new ee("missing message in ChatCompletion response");if(!i.tool_calls)break;for(let e of i.tool_calls){let t;if("function"!==e.type)continue;let n=e.id,{name:o,arguments:i}=e.function,a=s[o];if(a){if(l&&l!==o){let e=`Invalid tool_call: ${JSON.stringify(o)}. ${JSON.stringify(l)} requested. Please try again`;this._addMessage({role:r,tool_call_id:n,content:e});continue}}else{let e=`Invalid tool_call: ${JSON.stringify(o)}. Available options are: ${u.map(e=>JSON.stringify(e.function.name)).join(", ")}. Please try again`;this._addMessage({role:r,tool_call_id:n,content:e});continue}try{t=tS(a)?await a.parse(i):i}catch(t){let e=t instanceof Error?t.message:String(t);this._addMessage({role:r,tool_call_id:n,content:e});continue}let c=await a.function(t,this),d=tj(this,k,"m",H).call(this,c);if(this._addMessage({role:r,tool_call_id:n,content:d}),l)return}}}}E=new WeakMap,C=new WeakMap,O=new WeakMap,j=new WeakMap,P=new WeakMap,N=new WeakMap,M=new WeakMap,I=new WeakMap,R=new WeakMap,T=new WeakMap,A=new WeakMap,B=new WeakMap,k=new WeakSet,_=function(){return tj(this,k,"m",D).call(this).content??null},D=function(){let e=this.messages.length;for(;e-- >0;){let t=this.messages[e];if(tk(t))return{...t,content:t.content??null}}throw new ee("stream ended without producing a ChatCompletionMessage with role=assistant")},Z=function(){for(let e=this.messages.length-1;e>=0;e--){let t=this.messages[e];if(tk(t)&&t?.function_call)return t.function_call;if(tk(t)&&t?.tool_calls?.length)return t.tool_calls.at(-1)?.function}},L=function(){for(let e=this.messages.length-1;e>=0;e--){let t=this.messages[e];if(tE(t)&&null!=t.content||tC(t)&&null!=t.content&&this.messages.some(e=>"assistant"===e.role&&e.tool_calls?.some(e=>"function"===e.type&&e.id===t.tool_call_id)))return t.content}},z=function(){let e={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(let{usage:t}of this._chatCompletions)t&&(e.completion_tokens+=t.completion_tokens,e.prompt_tokens+=t.prompt_tokens,e.total_tokens+=t.total_tokens);return e},F=function(e){if(null!=e.n&&e.n>1)throw new ee("ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.")},H=function(e){return"string"==typeof e?e:void 0===e?"undefined":JSON.stringify(e)};class tN extends tP{static runFunctions(e,t,n){let r=new tN,o={...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"runFunctions"}};return r._run(()=>r._runFunctions(e,t,o)),r}static runTools(e,t,n){let r=new tN,o={...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"runTools"}};return r._run(()=>r._runTools(e,t,o)),r}_addMessage(e){super._addMessage(e),tk(e)&&e.content&&this._emit("content",e.content)}}var tM=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},tI=function(e,t,n,r,o){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n};class tR extends tP{constructor(){super(...arguments),q.add(this),W.set(this,void 0)}get currentChatCompletionSnapshot(){return tM(this,W,"f")}static fromReadableStream(e){let t=new tR;return t._run(()=>t._fromReadableStream(e)),t}static createChatCompletion(e,t,n){let r=new tR;return r._run(()=>r._runChatCompletion(e,{...t,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),r}async _createChatCompletion(e,t,n){let r=n?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),tM(this,q,"m",K).call(this);let o=await e.create({...t,stream:!0},{...n,signal:this.controller.signal});for await(let e of(this._connected(),o))tM(this,q,"m",V).call(this,e);if(o.controller.signal?.aborted)throw new en;return this._addChatCompletion(tM(this,q,"m",U).call(this))}async _fromReadableStream(e,t){let n;let r=t?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),tM(this,q,"m",K).call(this),this._connected();let o=eh.fromReadableStream(e,this.controller);for await(let e of o)n&&n!==e.id&&this._addChatCompletion(tM(this,q,"m",U).call(this)),tM(this,q,"m",V).call(this,e),n=e.id;if(o.controller.signal?.aborted)throw new en;return this._addChatCompletion(tM(this,q,"m",U).call(this))}[(W=new WeakMap,q=new WeakSet,K=function(){this.ended||tI(this,W,void 0,"f")},V=function(e){if(this.ended)return;let t=tM(this,q,"m",G).call(this,e);this._emit("chunk",e,t);let n=e.choices[0]?.delta?.content,r=t.choices[0]?.message;null!=n&&r?.role==="assistant"&&r?.content&&this._emit("content",n,r.content)},U=function(){if(this.ended)throw new ee("stream has ended, this shouldn't happen");let e=tM(this,W,"f");if(!e)throw new ee("request ended without sending any chunks");return tI(this,W,void 0,"f"),function(e){let{id:t,choices:n,created:r,model:o,system_fingerprint:i,...a}=e;return{...a,id:t,choices:n.map(({message:t,finish_reason:n,index:r,logprobs:o,...i})=>{if(!n)throw new ee(`missing finish_reason for choice ${r}`);let{content:a=null,function_call:l,tool_calls:c,...s}=t,u=t.role;if(!u)throw new ee(`missing role for choice ${r}`);if(l){let{arguments:e,name:t}=l;if(null==e)throw new ee(`missing function_call.arguments for choice ${r}`);if(!t)throw new ee(`missing function_call.name for choice ${r}`);return{...i,message:{content:a,function_call:{arguments:e,name:t},role:u},finish_reason:n,index:r,logprobs:o}}return c?{...i,index:r,finish_reason:n,logprobs:o,message:{...s,role:u,content:a,tool_calls:c.map((t,n)=>{let{function:o,type:i,id:a,...l}=t,{arguments:c,name:s,...u}=o||{};if(null==a)throw new ee(`missing choices[${r}].tool_calls[${n}].id +${tT(e)}`);if(null==i)throw new ee(`missing choices[${r}].tool_calls[${n}].type +${tT(e)}`);if(null==s)throw new ee(`missing choices[${r}].tool_calls[${n}].function.name +${tT(e)}`);if(null==c)throw new ee(`missing choices[${r}].tool_calls[${n}].function.arguments +${tT(e)}`);return{...l,id:a,type:i,function:{...u,name:s,arguments:c}}})}}:{...i,message:{...s,content:a,role:u},finish_reason:n,index:r,logprobs:o}}),created:r,model:o,object:"chat.completion",...i?{system_fingerprint:i}:{}}}(e)},G=function(e){var t,n,r;let o=tM(this,W,"f"),{choices:i,...a}=e;for(let{delta:i,finish_reason:l,index:c,logprobs:s=null,...u}of(o?Object.assign(o,a):o=tI(this,W,{...a,choices:[]},"f"),e.choices)){let e=o.choices[c];if(e||(e=o.choices[c]={finish_reason:l,index:c,message:{},logprobs:s,...u}),s){if(e.logprobs){let{content:n,...r}=s;Object.assign(e.logprobs,r),n&&((t=e.logprobs).content??(t.content=[]),e.logprobs.content.push(...n))}else e.logprobs=Object.assign({},s)}if(l&&(e.finish_reason=l),Object.assign(e,u),!i)continue;let{content:a,function_call:d,role:f,tool_calls:p,...h}=i;if(Object.assign(e.message,h),a&&(e.message.content=(e.message.content||"")+a),f&&(e.message.role=f),d&&(e.message.function_call?(d.name&&(e.message.function_call.name=d.name),d.arguments&&((n=e.message.function_call).arguments??(n.arguments=""),e.message.function_call.arguments+=d.arguments)):e.message.function_call=d),p)for(let{index:t,id:n,type:o,function:i,...a}of(e.message.tool_calls||(e.message.tool_calls=[]),p)){let l=(r=e.message.tool_calls)[t]??(r[t]={});Object.assign(l,a),n&&(l.id=n),o&&(l.type=o),i&&(l.function??(l.function={arguments:""})),i?.name&&(l.function.name=i.name),i?.arguments&&(l.function.arguments+=i.arguments)}}return o},Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on("chunk",n=>{let r=t.shift();r?r(n):e.push(n)}),this.on("end",()=>{for(let e of(n=!0,t))e(void 0);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise(e=>t.push(e)).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0})}}toReadableStream(){return new eh(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}function tT(e){return JSON.stringify(e)}class tA extends tR{static fromReadableStream(e){let t=new tA;return t._run(()=>t._fromReadableStream(e)),t}static runFunctions(e,t,n){let r=new tA,o={...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"runFunctions"}};return r._run(()=>r._runFunctions(e,t,o)),r}static runTools(e,t,n){let r=new tA,o={...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"runTools"}};return r._run(()=>r._runTools(e,t,o)),r}}class t_ extends e9{runFunctions(e,t){return e.stream?tA.runFunctions(this._client.chat.completions,e,t):tN.runFunctions(this._client.chat.completions,e,t)}runTools(e,t){return e.stream?tA.runTools(this._client.chat.completions,e,t):tN.runTools(this._client.chat.completions,e,t)}stream(e,t){return tR.createChatCompletion(this._client.chat.completions,e,t)}}class tD extends e9{constructor(){super(...arguments),this.completions=new t_(this._client)}}(tD||(tD={})).Completions=t_;class tZ extends e9{retrieve(e,t,n,r){return this._client.get(`/threads/${e}/messages/${t}/files/${n}`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}list(e,t,n={},r){return eq(n)?this.list(e,t,{},n):this._client.getAPIList(`/threads/${e}/messages/${t}/files`,tL,{query:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}}class tL extends e7{}(tZ||(tZ={})).MessageFilesPage=tL;class tz extends e9{constructor(){super(...arguments),this.files=new tZ(this._client)}create(e,t,n){return this._client.post(`/threads/${e}/messages`,{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}retrieve(e,t,n){return this._client.get(`/threads/${e}/messages/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}update(e,t,n,r){return this._client.post(`/threads/${e}/messages/${t}`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}list(e,t={},n){return eq(t)?this.list(e,{},t):this._client.getAPIList(`/threads/${e}/messages`,tB,{query:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}}class tB extends e7{}(v=tz||(tz={})).ThreadMessagesPage=tB,v.Files=tZ,v.MessageFilesPage=tL;class tF extends e9{retrieve(e,t,n,r){return this._client.get(`/threads/${e}/runs/${t}/steps/${n}`,{...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}list(e,t,n={},r){return eq(n)?this.list(e,t,{},n):this._client.getAPIList(`/threads/${e}/runs/${t}/steps`,tH,{query:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}}class tH extends e7{}(tF||(tF={})).RunStepsPage=tH;class tq extends e9{constructor(){super(...arguments),this.steps=new tF(this._client)}create(e,t,n){return this._client.post(`/threads/${e}/runs`,{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}retrieve(e,t,n){return this._client.get(`/threads/${e}/runs/${t}`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}update(e,t,n,r){return this._client.post(`/threads/${e}/runs/${t}`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}list(e,t={},n){return eq(t)?this.list(e,{},t):this._client.getAPIList(`/threads/${e}/runs`,tW,{query:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}cancel(e,t,n){return this._client.post(`/threads/${e}/runs/${t}/cancel`,{...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}submitToolOutputs(e,t,n,r){return this._client.post(`/threads/${e}/runs/${t}/submit_tool_outputs`,{body:n,...r,headers:{"OpenAI-Beta":"assistants=v1",...r?.headers}})}}class tW extends e7{}(y=tq||(tq={})).RunsPage=tW,y.Steps=tF,y.RunStepsPage=tH;class tK extends e9{constructor(){super(...arguments),this.runs=new tq(this._client),this.messages=new tz(this._client)}create(e={},t){return eq(e)?this.create({},e):this._client.post("/threads",{body:e,...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}retrieve(e,t){return this._client.get(`/threads/${e}`,{...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}update(e,t,n){return this._client.post(`/threads/${e}`,{body:t,...n,headers:{"OpenAI-Beta":"assistants=v1",...n?.headers}})}del(e,t){return this._client.delete(`/threads/${e}`,{...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}createAndRun(e,t){return this._client.post("/threads/runs",{body:e,...t,headers:{"OpenAI-Beta":"assistants=v1",...t?.headers}})}}(b=tK||(tK={})).Runs=tq,b.RunsPage=tW,b.Messages=tz,b.ThreadMessagesPage=tB;class tV extends e9{constructor(){super(...arguments),this.chat=new tD(this._client),this.assistants=new tx(this._client),this.threads=new tK(this._client)}}(x=tV||(tV={})).Chat=tD,x.Assistants=tx,x.AssistantsPage=tw,x.Threads=tK;class tU extends eL{constructor({baseURL:e=e0("OPENAI_BASE_URL"),apiKey:t=e0("OPENAI_API_KEY"),organization:n=e0("OPENAI_ORG_ID")??null,...r}={}){if(void 0===t)throw new ee("The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).");let o={apiKey:t,organization:n,...r,baseURL:e||"https://api.openai.com/v1"};if(!o.dangerouslyAllowBrowser&&e5())throw new ee("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew OpenAI({ apiKey, dangerouslyAllowBrowser: true });\n\nhttps://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety\n");super({baseURL:o.baseURL,timeout:o.timeout??6e5,httpAgent:o.httpAgent,maxRetries:o.maxRetries,fetch:o.fetch}),this.completions=new te(this),this.chat=new tn(this),this.embeddings=new tr(this),this.files=new to(this),this.images=new ta(this),this.audio=new tu(this),this.moderations=new td(this),this.models=new tf(this),this.fineTuning=new tv(this),this.beta=new tV(this),this._options=o,this.apiKey=t,this.organization=n}defaultQuery(){return this._options.defaultQuery}defaultHeaders(e){return{...super.defaultHeaders(e),"OpenAI-Organization":this.organization,...this._options.defaultHeaders}}authHeaders(e){return{Authorization:`Bearer ${this.apiKey}`}}}X=tU,tU.OpenAI=X,tU.OpenAIError=ee,tU.APIError=et,tU.APIConnectionError=er,tU.APIConnectionTimeoutError=eo,tU.APIUserAbortError=en,tU.NotFoundError=ec,tU.ConflictError=es,tU.RateLimitError=ed,tU.BadRequestError=ei,tU.AuthenticationError=ea,tU.InternalServerError=ef,tU.PermissionDeniedError=el,tU.UnprocessableEntityError=eu;let{OpenAIError:tG,APIError:tX,APIConnectionError:t$,APIConnectionTimeoutError:tY,APIUserAbortError:tQ,NotFoundError:tJ,ConflictError:t0,RateLimitError:t1,BadRequestError:t2,AuthenticationError:t6,InternalServerError:t4,PermissionDeniedError:t3,UnprocessableEntityError:t5}=$;(w=tU||(tU={})).toFile=ek,w.fileFromPath=d,w.Page=e8,w.CursorPage=e7,w.Completions=te,w.Chat=tn,w.Embeddings=tr,w.Files=to,w.FileObjectsPage=ti,w.Images=ta,w.Audio=tu,w.Moderations=td,w.Models=tf,w.ModelsPage=tp,w.FineTuning=tv,w.Beta=tV;var t8=tU},243:function(e,t,n){"use strict";n.d(t,{U:function(){return nI}});var r={};n.r(r),n.d(r,{boolean:function(){return g},booleanish:function(){return v},commaOrSpaceSeparated:function(){return S},commaSeparated:function(){return w},number:function(){return b},overloadedBoolean:function(){return y},spaceSeparated:function(){return x}});var o={};n.r(o),n.d(o,{attentionMarkers:function(){return tN},contentInitial:function(){return tk},disable:function(){return tM},document:function(){return tS},flow:function(){return tC},flowInitial:function(){return tE},insideSpan:function(){return tP},string:function(){return tO},text:function(){return tj}});let i=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l={};function c(e,t){return((t||l).jsx?a:i).test(e)}let s=/[ \t\n\f\r]/g;function u(e){return""===e.replace(s,"")}class d{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function f(e,t){let n={},r={},o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new d(n,r,t)}function p(e){return e.toLowerCase()}d.prototype.property={},d.prototype.normal={},d.prototype.space=null;class h{constructor(e,t){this.property=e,this.attribute=t}}h.prototype.space=null,h.prototype.boolean=!1,h.prototype.booleanish=!1,h.prototype.overloadedBoolean=!1,h.prototype.number=!1,h.prototype.commaSeparated=!1,h.prototype.spaceSeparated=!1,h.prototype.commaOrSpaceSeparated=!1,h.prototype.mustUseProperty=!1,h.prototype.defined=!1;let m=0,g=k(),v=k(),y=k(),b=k(),x=k(),w=k(),S=k();function k(){return 2**++m}let E=Object.keys(r);class C extends h{constructor(e,t,n,o){var i,a;let l=-1;if(super(e,t),o&&(this.space=o),"number"==typeof n)for(;++l<E.length;){let e=E[l];i=E[l],(a=(n&r[e])===r[e])&&(this[i]=a)}}}C.prototype.defined=!0;let O={}.hasOwnProperty;function j(e){let t;let n={},r={};for(t in e.properties)if(O.call(e.properties,t)){let o=e.properties[t],i=new C(t,e.transform(e.attributes||{},t),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(i.mustUseProperty=!0),n[t]=i,r[p(t)]=t,r[p(i.attribute)]=t}return new d(n,r,e.space)}let P=j({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),N=j({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function M(e,t){return t in e?e[t]:t}function I(e,t){return M(e,t.toLowerCase())}let R=j({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:I,properties:{xmlns:null,xmlnsXLink:null}}),T=j({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:v,ariaAutoComplete:null,ariaBusy:v,ariaChecked:v,ariaColCount:b,ariaColIndex:b,ariaColSpan:b,ariaControls:x,ariaCurrent:null,ariaDescribedBy:x,ariaDetails:null,ariaDisabled:v,ariaDropEffect:x,ariaErrorMessage:null,ariaExpanded:v,ariaFlowTo:x,ariaGrabbed:v,ariaHasPopup:null,ariaHidden:v,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:x,ariaLevel:b,ariaLive:null,ariaModal:v,ariaMultiLine:v,ariaMultiSelectable:v,ariaOrientation:null,ariaOwns:x,ariaPlaceholder:null,ariaPosInSet:b,ariaPressed:v,ariaReadOnly:v,ariaRelevant:null,ariaRequired:v,ariaRoleDescription:x,ariaRowCount:b,ariaRowIndex:b,ariaRowSpan:b,ariaSelected:v,ariaSetSize:b,ariaSort:null,ariaValueMax:b,ariaValueMin:b,ariaValueNow:b,ariaValueText:null,role:null}}),A=j({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:I,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:w,acceptCharset:x,accessKey:x,action:null,allow:null,allowFullScreen:g,allowPaymentRequest:g,allowUserMedia:g,alt:null,as:null,async:g,autoCapitalize:null,autoComplete:x,autoFocus:g,autoPlay:g,blocking:x,capture:null,charSet:null,checked:g,cite:null,className:x,cols:b,colSpan:null,content:null,contentEditable:v,controls:g,controlsList:x,coords:b|w,crossOrigin:null,data:null,dateTime:null,decoding:null,default:g,defer:g,dir:null,dirName:null,disabled:g,download:y,draggable:v,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:g,formTarget:null,headers:x,height:b,hidden:g,high:b,href:null,hrefLang:null,htmlFor:x,httpEquiv:x,id:null,imageSizes:null,imageSrcSet:null,inert:g,inputMode:null,integrity:null,is:null,isMap:g,itemId:null,itemProp:x,itemRef:x,itemScope:g,itemType:x,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:g,low:b,manifest:null,max:null,maxLength:b,media:null,method:null,min:null,minLength:b,multiple:g,muted:g,name:null,nonce:null,noModule:g,noValidate:g,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:g,optimum:b,pattern:null,ping:x,placeholder:null,playsInline:g,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:g,referrerPolicy:null,rel:x,required:g,reversed:g,rows:b,rowSpan:b,sandbox:x,scope:null,scoped:g,seamless:g,selected:g,shadowRootDelegatesFocus:g,shadowRootMode:null,shape:null,size:b,sizes:null,slot:null,span:b,spellCheck:v,src:null,srcDoc:null,srcLang:null,srcSet:null,start:b,step:null,style:null,tabIndex:b,target:null,title:null,translate:null,type:null,typeMustMatch:g,useMap:null,value:v,width:b,wrap:null,align:null,aLink:null,archive:x,axis:null,background:null,bgColor:null,border:b,borderColor:null,bottomMargin:b,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:g,declare:g,event:null,face:null,frame:null,frameBorder:null,hSpace:b,leftMargin:b,link:null,longDesc:null,lowSrc:null,marginHeight:b,marginWidth:b,noResize:g,noHref:g,noShade:g,noWrap:g,object:null,profile:null,prompt:null,rev:null,rightMargin:b,rules:null,scheme:null,scrolling:v,standby:null,summary:null,text:null,topMargin:b,valueType:null,version:null,vAlign:null,vLink:null,vSpace:b,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:g,disableRemotePlayback:g,prefix:null,property:null,results:b,security:null,unselectable:null}}),_=j({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:M,properties:{about:S,accentHeight:b,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:b,amplitude:b,arabicForm:null,ascent:b,attributeName:null,attributeType:null,azimuth:b,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:b,by:null,calcMode:null,capHeight:b,className:x,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:b,diffuseConstant:b,direction:null,display:null,dur:null,divisor:b,dominantBaseline:null,download:g,dx:null,dy:null,edgeMode:null,editable:null,elevation:b,enableBackground:null,end:null,event:null,exponent:b,externalResourcesRequired:null,fill:null,fillOpacity:b,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:w,g2:w,glyphName:w,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:b,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:b,horizOriginX:b,horizOriginY:b,id:null,ideographic:b,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:b,k:b,k1:b,k2:b,k3:b,k4:b,kernelMatrix:S,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:b,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:b,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:b,overlineThickness:b,paintOrder:null,panose1:null,path:null,pathLength:b,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:x,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:b,pointsAtY:b,pointsAtZ:b,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:S,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:S,rev:S,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:S,requiredFeatures:S,requiredFonts:S,requiredFormats:S,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:b,specularExponent:b,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:b,strikethroughThickness:b,string:null,stroke:null,strokeDashArray:S,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:b,strokeOpacity:b,strokeWidth:null,style:null,surfaceScale:b,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:S,tabIndex:b,tableValues:null,target:null,targetX:b,targetY:b,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:S,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:b,underlineThickness:b,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:b,values:null,vAlphabetic:b,vMathematical:b,vectorEffect:null,vHanging:b,vIdeographic:b,version:null,vertAdvY:b,vertOriginX:b,vertOriginY:b,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:b,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),D=f([N,P,R,T,A],"html"),Z=f([N,P,R,T,_],"svg"),L=/^data[-\w.:]+$/i,z=/-[a-z]/g,B=/[A-Z]/g;function F(e){return"-"+e.toLowerCase()}function H(e){return e.charAt(1).toUpperCase()}let q={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var W=n(52744),K=W.default||W;let V=G("end"),U=G("start");function G(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function X(e){return e&&"object"==typeof e?"position"in e||"type"in e?Y(e.position):"start"in e||"end"in e?Y(e):"line"in e||"column"in e?$(e):"":""}function $(e){return Q(e&&e.line)+":"+Q(e&&e.column)}function Y(e){return $(e&&e.start)+"-"+$(e&&e.end)}function Q(e){return e&&"number"==typeof e?e:1}class J extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t?{place:t}:"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){let e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=X(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}J.prototype.file="",J.prototype.name="",J.prototype.reason="",J.prototype.message="",J.prototype.stack="",J.prototype.column=void 0,J.prototype.line=void 0,J.prototype.ancestors=void 0,J.prototype.cause=void 0,J.prototype.fatal=void 0,J.prototype.place=void 0,J.prototype.ruleId=void 0,J.prototype.source=void 0;let ee={}.hasOwnProperty,et=new Map,en=/[A-Z]/g,er=/-([a-z])/g,eo=new Set(["table","tbody","thead","tfoot","tr"]),ei=new Set(["td","th"]),ea="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function el(e,t,n){return"element"===t.type?function(e,t,n){let r=e.schema,o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=Z,e.schema=o),e.ancestors.push(t);let i=ed(e,t.tagName,!1),a=function(e,t){let n,r;let o={};for(r in t.properties)if("children"!==r&&ee.call(t.properties,r)){let i=function(e,t,n){let r=function(e,t){let n=p(t),r=t,o=h;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&L.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(z,H);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!z.test(e)){let n=e.replace(B,F);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=C}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){let n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){let n={};try{K(t,function(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(er,ep)),n[r]=t})}catch(t){if(!e.ignoreInvalidStyle){let n=new J("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ea+"#cannot-parse-style-attribute",n}}return n}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t;let n={};for(t in e)ee.call(e,t)&&(n[function(e){let t=e.replace(en,eh);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?q[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(i){let[r,a]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof a&&ei.has(t.tagName)?n=a:o[r]=a}}return n&&((o.style||(o.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),o}(e,t),l=eu(e,t);return eo.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&u(e.value):u(e))})),ec(e,a,i,t),es(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ef(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){let r=e.schema,o=r;"svg"===t.name&&"html"===r.space&&(o=Z,e.schema=o),e.ancestors.push(t);let i=null===t.name?e.Fragment:ed(e,t.name,!0),a=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let o=t.expression;o.type;let i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else ef(e,t.position)}else{let o;let i=r.name;if(r.value&&"object"==typeof r.value){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else ef(e,t.position)}else o=null===r.value||r.value;n[i]=o}return n}(e,t),l=eu(e,t);return ec(e,a,i,t),es(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ef(e,t.position)}(e,t):"root"===t.type?function(e,t,n){let r={};return es(r,eu(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?t.value:void 0}function ec(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function es(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eu(e,t){let n=[],r=-1,o=e.passKeys?new Map:et;for(;++r<t.children.length;){let i;let a=t.children[r];if(e.passKeys){let e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){let t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}let l=el(e,a,i);void 0!==l&&n.push(l)}return n}function ed(e,t,n){let r;if(n){if(t.includes(".")){let e;let n=t.split("."),o=-1;for(;++o<n.length;){let t=c(n[o])?{type:"Identifier",name:n[o]}:{type:"Literal",value:n[o]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(o&&"Literal"===t.type),optional:!1}:t}r=e}else r=c(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t}}else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return ee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ef(e)}function ef(e,t){let n=new J("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ea+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ep(e,t){return t.toUpperCase()}function eh(e){return"-"+e.toLowerCase()}let em={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var eg=n(57437);let ev={};function ey(e,t,n){if(e&&"object"==typeof e){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return eb(e.children,t,n)}return Array.isArray(e)?eb(e,t,n):""}function eb(e,t,n){let r=[],o=-1;for(;++o<e.length;)r[o]=ey(e[o],t,n);return r.join("")}function ex(e,t,n,r){let o;let i=e.length,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)(o=Array.from(r)).unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)(o=r.slice(a,a+1e4)).unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ew(e,t){return e.length>0?(ex(e,e.length,0,t),e):t}function eS(e){let t,n,r,o,i,a,l;let c={},s=-1;for(;++s<e.length;){for(;(s in c);)s=c[s];if(t=e[s],s&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[s-1][1].type&&((r=0)<(a=t[1]._tokenizer.events).length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(c,function(e,t){let n,r;let o=e[t][1],i=e[t][2],a=t-1,l=[],c=o._tokenizer||i.parser[o.contentType](o.start),s=c.events,u=[],d={},f=-1,p=o,h=0,m=0,g=[0];for(;p;){for(;e[++a][1]!==p;);l.push(a),!p._tokenizer&&(n=i.sliceStream(p),p.next||n.push(null),r&&c.defineSkip(p.start),p._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(n),p._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=o;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(c.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=l.pop();u.unshift([n,n+t.length-1]),ex(e,n,2,t)}for(f=-1;++f<u.length;)d[h+u[f][0]]=h+u[f][1],h+=u[f][1]-u[f][0]-1;return d}(e,s)),s=c[s],l=!0);else if(t[1]._container){for(r=s,n=void 0;r--;)if("lineEnding"===(o=e[r])[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=r);else break;n&&(t[1].end=Object.assign({},e[n][1].start),(i=e.slice(n,s)).unshift(t),ex(e,n,s-n+1,i))}}return!l}let ek={}.hasOwnProperty,eE=eD(/[A-Za-z]/),eC=eD(/[\dA-Za-z]/),eO=eD(/[#-'*+\--9=?A-Z^-~]/);function ej(e){return null!==e&&(e<32||127===e)}let eP=eD(/\d/),eN=eD(/[\dA-Fa-f]/),eM=eD(/[!-/:-@[-`{-~]/);function eI(e){return null!==e&&e<-2}function eR(e){return null!==e&&(e<0||32===e)}function eT(e){return -2===e||-1===e||32===e}let eA=eD(/\p{P}|\p{S}/u),e_=eD(/\s/);function eD(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eZ(e,t,n,r){let o=r?r-1:Number.POSITIVE_INFINITY,i=0;return function(r){return eT(r)?(e.enter(n),function r(a){return eT(a)&&i++<o?(e.consume(a),r):(e.exit(n),t(a))}(r)):t(r)}}let eL={tokenize:function(e){let t;let n=e.attempt(this.parser.constructs.contentInitial,function(t){if(null===t){e.consume(t);return}return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eZ(e,n,"linePrefix")},function(n){return e.enter("paragraph"),function n(r){let o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eI(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},ez={tokenize:function(e){let t,n,r;let o=this,i=[],a=0;return l;function l(t){if(a<i.length){let n=i[a];return o.containerState=n[1],e.attempt(n[0].continuation,c,s)(t)}return s(t)}function c(e){if(a++,o.containerState._closeFlow){let n;o.containerState._closeFlow=void 0,t&&v();let r=o.events.length,i=r;for(;i--;)if("exit"===o.events[i][0]&&"chunkFlow"===o.events[i][1].type){n=o.events[i][1].end;break}g(a);let l=r;for(;l<o.events.length;)o.events[l][1].end=Object.assign({},n),l++;return ex(o.events,i+1,0,o.events.slice(r)),o.events.length=l,s(e)}return l(e)}function s(n){if(a===i.length){if(!t)return f(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);o.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return o.containerState={},e.check(eB,u,d)(n)}function u(e){return t&&v(),g(a),f(e)}function d(e){return o.parser.lazy[o.now().line]=a!==i.length,r=o.now().offset,h(e)}function f(t){return o.containerState={},e.attempt(eB,p,h)(t)}function p(e){return a++,i.push([o.currentConstruct,o.containerState]),f(e)}function h(r){if(null===r){t&&v(),g(0),e.consume(r);return}return t=t||o.parser.flow(o.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return eI(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,o.interrupt=void 0,l):(e.consume(n),t)}(r)}function m(e,i){let l=o.sliceStream(e);if(i&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),o.parser.lazy[e.start.line]){let e,n,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<r&&(!t.events[i][1].end||t.events[i][1].end.offset>r))return;let l=o.events.length,c=l;for(;c--;)if("exit"===o.events[c][0]&&"chunkFlow"===o.events[c][1].type){if(e){n=o.events[c][1].end;break}e=!0}for(g(a),i=l;i<o.events.length;)o.events[i][1].end=Object.assign({},n),i++;ex(o.events,c+1,0,o.events.slice(l)),o.events.length=i}}function g(t){let n=i.length;for(;n-- >t;){let t=i[n];o.containerState=t[1],t[0].exit.call(o,e)}i.length=t}function v(){t.write([null]),n=void 0,t=void 0,o.containerState._closeFlow=void 0}}},eB={tokenize:function(e,t,n){return eZ(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eF={tokenize:function(e,t,n){return function(t){return eT(t)?eZ(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eI(e)?t(e):n(e)}},partial:!0},eH={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):eI(t)?e.check(eq,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return eS(e),e}},eq={tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eZ(e,o,"linePrefix")};function o(o){if(null===o||eI(o))return n(o);let i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}},partial:!0},eW={tokenize:function(e){let t=this,n=e.attempt(eF,function(r){if(null===r){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,eZ(e,e.attempt(this.parser.constructs.flow,r,e.attempt(eH,r)),"linePrefix")));return n;function r(r){if(null===r){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n}}},eK={resolveAll:eX()},eV=eG("string"),eU=eG("text");function eG(e){return{tokenize:function(t){let n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return c(e)?o(e):a(e)}function a(e){if(null===e){t.consume(e);return}return t.enter("data"),t.consume(e),l}function l(e){return c(e)?(t.exit("data"),o(e)):(t.consume(e),l)}function c(e){if(null===e)return!0;let t=r[e],o=-1;if(t)for(;++o<t.length;){let e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:eX("text"===e?e$:void 0)}}function eX(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function e$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r;let o=e[n-1][1],i=t.sliceStream(o),a=i.length,l=-1,c=0;for(;a--;){let e=i[a];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)r=!0,c++;else if(-1===e);else{a++;break}}if(c){let i={type:n===e.length||r||c<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-c,offset:o.end.offset-c,_index:o.start._index+a,_bufferIndex:a?l:o.start._bufferIndex+l},end:Object.assign({},o.end)};o.end=Object.assign({},i.start),o.start.offset===o.end.offset?Object.assign(o,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}function eY(e,t,n){let r=[],o=-1;for(;++o<e.length;){let i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}let eQ={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(i){return e.enter("thematicBreak"),r=i,function i(a){return a===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),o++,t):(e.exit("thematicBreakSequence"),eT(n)?eZ(e,i,"whitespace")(n):i(n))}(a)):o>=3&&(null===a||eI(a))?(e.exit("thematicBreak"),t(a)):n(a)}(i)}}},eJ={name:"list",tokenize:function(e,t,n){let r=this,o=r.events[r.events.length-1],i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){let o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:eP(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(eQ,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(o){return eP(o)&&++a<10?(e.consume(o),t):(!r.interrupt||a<2)&&(r.containerState.marker?o===r.containerState.marker:41===o||46===o)?(e.exit("listItemValue"),l(o)):n(o)}(t)}return n(t)};function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eF,r.interrupt?n:c,e.attempt(e0,u,s))}function c(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function s(t){return eT(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eF,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eZ(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eT(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(e1,t,o)(n))});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,eZ(e,e.attempt(eJ,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},e0={tokenize:function(e,t,n){let r=this;return eZ(e,function(e){let o=r.events[r.events.length-1];return!eT(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},e1={tokenize:function(e,t,n){let r=this;return eZ(e,function(e){let o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)},partial:!0},e2={name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return eT(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eT(t)?eZ(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(e2,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function e6(e,t,n,r,o,i,a,l,c){let s=c||Number.POSITIVE_INFINITY,u=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||ej(t)?n(t):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||eI(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return!u&&(null===o||41===o||eR(o))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(o)):u<s&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||ej(o)?n(o):(e.consume(o),92===o?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function e4(e,t,n,r,o,i){let a;let l=this,c=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),s};function s(d){return c>999||null===d||91===d||93===d&&!a||94===d&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):eI(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||eI(t)||c++>999?(e.exit("chunkString"),s(t)):(e.consume(t),a||(a=!eT(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}function e3(e,t,n,r,o,i){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,l):n(t)};function l(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),c(n))}function c(t){return t===a?(e.exit(i),l(a)):null===t?n(t):eI(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eZ(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===a||null===t||eI(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:s)}function u(t){return t===a||92===t?(e.consume(t),s):s(t)}}function e5(e,t){let n;return function r(o){return eI(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):eT(o)?eZ(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function e8(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let e7={tokenize:function(e,t,n){return function(t){return eR(t)?e5(e,r)(t):n(t)};function r(t){return e3(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return eT(t)?eZ(e,i,"whitespace")(t):i(t)}function i(e){return null===e||eI(e)?t(e):n(e)}},partial:!0},e9={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eZ(e,o,"linePrefix",5)(t)};function o(t){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?function t(n){return null===n?i(n):eI(n)?e.attempt(te,t,i)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eI(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function i(n){return e.exit("codeIndented"),t(n)}}},te={tokenize:function(e,t,n){let r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):eI(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):eZ(e,i,"linePrefix",5)(t)}function i(e){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):eI(e)?o(e):n(e)}},partial:!0},tt={name:"setextUnderline",tokenize:function(e,t,n){let r;let o=this;return function(t){let a,l=o.events.length;for(;l--;)if("lineEnding"!==o.events[l][1].type&&"linePrefix"!==o.events[l][1].type&&"content"!==o.events[l][1].type){a="paragraph"===o.events[l][1].type;break}return!o.parser.lazy[o.now().line]&&(o.interrupt||a)?(e.enter("setextHeadingLine"),r=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eT(n)?eZ(e,i,"lineSuffix")(n):i(n))}(t)):n(t)};function i(r){return null===r||eI(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);let a={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}},tn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],tr=["pre","script","style","textarea"],to={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eF,t,n)}},partial:!0},ti={tokenize:function(e,t,n){let r=this;return function(t){return eI(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},ta={tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},tl={name:"codeFenced",tokenize:function(e,t,n){let r;let o=this,i={tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),eT(t)?eZ(e,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(o){return o===r?(i++,e.consume(o),t):i>=l?(e.exit("codeFencedFenceSequence"),eT(o)?eZ(e,s,"whitespace")(o):s(o)):n(o)}(t)):n(t)}function s(r){return null===r||eI(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},a=0,l=0;return function(t){return function(t){let i=o.events[o.events.length-1];return a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,r=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(o){return o===r?(l++,e.consume(o),t):l<3?n(o):(e.exit("codeFencedFenceSequence"),eT(o)?eZ(e,c,"whitespace")(o):c(o))}(t)}(t)};function c(i){return null===i||eI(i)?(e.exit("codeFencedFence"),o.interrupt?t(i):e.check(ta,u,h)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(o){return null===o||eI(o)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(o)):eT(o)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eZ(e,s,"whitespace")(o)):96===o&&o===r?n(o):(e.consume(o),t)}(i))}function s(t){return null===t||eI(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(o){return null===o||eI(o)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(o)):96===o&&o===r?n(o):(e.consume(o),t)}(t))}function u(t){return e.attempt(i,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return a>0&&eT(t)?eZ(e,p,"linePrefix",a+1)(t):p(t)}function p(t){return null===t||eI(t)?e.check(ta,u,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eI(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}},concrete:!0},tc=document.createElement("i");function ts(e){let t="&"+e+";";tc.innerHTML=t;let n=tc.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let tu={name:"characterReference",tokenize:function(e,t,n){let r,o;let i=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),r=31,o=eC,s(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,o=eN,s):(e.enter("characterReferenceValue"),r=7,o=eP,s(t))}function s(l){if(59===l&&a){let r=e.exit("characterReferenceValue");return o!==eC||ts(i.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return o(l)&&a++<r?(e.consume(l),s):n(l)}}},td={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eM(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},tf={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eZ(e,t,"linePrefix")}}},tp={name:"labelEnd",tokenize:function(e,t,n){let r,o;let i=this,a=i.events.length;for(;a--;)if(("labelImage"===i.events[a][1].type||"labelLink"===i.events[a][1].type)&&!i.events[a][1]._balanced){r=i.events[a][1];break}return function(t){return r?r._inactive?u(t):(o=i.parser.defined.includes(e8(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(th,s,o?s:u)(t):91===t?e.attempt(tm,s,o?c:u)(t):o?s(t):u(t)}function c(t){return e.attempt(tg,s,u)(t)}function s(e){return t(e)}function u(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,o,i,a=e.length,l=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=a);let c={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[r+l+2][1].end),end:Object.assign({},e[o-2][1].start)};return i=ew(i=[["enter",c,t],["enter",s,t]],e.slice(r+1,r+l+3)),i=ew(i,[["enter",u,t]]),i=ew(i,eY(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),i=ew(i,[["exit",u,t],e[o-2],e[o-1],["exit",s,t]]),i=ew(i,e.slice(o+1)),i=ew(i,[["exit",c,t]]),ex(e,r,e.length,i),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){let n=e[t][1];("labelImage"===n.type||"labelLink"===n.type||"labelEnd"===n.type)&&(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},th={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eR(t)?e5(e,o)(t):o(t)}function o(t){return 41===t?s(t):e6(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return eR(t)?e5(e,l)(t):s(t)}function a(e){return n(e)}function l(t){return 34===t||39===t||40===t?e3(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function c(t){return eR(t)?e5(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tm={tokenize:function(e,t,n){let r=this;return function(t){return e4.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(e8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},tg={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},tv={name:"labelStartImage",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:tp.resolveAll};function ty(e){return null===e||eR(e)||e_(e)?1:eA(e)?2:void 0}let tb={name:"attention",tokenize:function(e,t){let n;let r=this.parser.constructs.attentionMarkers.null,o=this.previous,i=ty(o);return function(a){return n=a,e.enter("attentionSequence"),function a(l){if(l===n)return e.consume(l),a;let c=e.exit("attentionSequence"),s=ty(l),u=!s||2===s&&i||r.includes(l),d=!i||2===i&&s||r.includes(o);return c._open=!!(42===n?u:u&&(i||!d)),c._close=!!(42===n?d:d&&(s||!u)),t(l)}(a)}},resolveAll:function(e,t){let n,r,o,i,a,l,c,s,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d=Object.assign({},e[n][1].end),f=Object.assign({},e[u][1].start);tx(d,-l),tx(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:f},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},a.end)},e[n][1].end=Object.assign({},i.start),e[u][1].start=Object.assign({},a.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=ew(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=ew(c,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),c=ew(c,eY(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=ew(c,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(s=2,c=ew(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):s=0,ex(e,n-1,u-n+3,c),u=n+c.length-s-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function tx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let tw={name:"labelStartLink",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:tp.resolveAll},tS={42:eJ,43:eJ,45:eJ,48:eJ,49:eJ,50:eJ,51:eJ,52:eJ,53:eJ,54:eJ,55:eJ,56:eJ,57:eJ,62:e2},tk={91:{name:"definition",tokenize:function(e,t,n){let r;let o=this;return function(t){return e.enter("definition"),e4.call(o,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function i(t){return(r=e8(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return eR(t)?e5(e,l)(t):l(t)}function l(t){return e6(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(e7,s,s)(t)}function s(t){return eT(t)?eZ(e,u,"whitespace")(t):u(t)}function u(i){return null===i||eI(i)?(e.exit("definition"),o.parser.defined.push(r),t(i)):n(i)}}}},tE={[-2]:e9,[-1]:e9,32:e9},tC={35:{name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(o){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),function o(i){return 35===i&&r++<6?(e.consume(i),o):null===i||eR(i)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eI(r)?(e.exit("atxHeading"),t(r)):eT(r)?eZ(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eR(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(i)):n(i)}(o)}},resolve:function(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[3][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},ex(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},42:eQ,45:[tt,eQ],60:{name:"htmlFlow",tokenize:function(e,t,n){let r,o,i,a,l;let c=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s};function s(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),o=!0,p):63===a?(e.consume(a),r=3,c.interrupt?t:R):eE(a)?(e.consume(a),i=String.fromCharCode(a),h):n(a)}function u(o){return 45===o?(e.consume(o),r=2,d):91===o?(e.consume(o),r=5,a=0,f):eE(o)?(e.consume(o),r=4,c.interrupt?t:R):n(o)}function d(r){return 45===r?(e.consume(r),c.interrupt?t:R):n(r)}function f(r){let o="CDATA[";return r===o.charCodeAt(a++)?(e.consume(r),a===o.length)?c.interrupt?t:E:f:n(r)}function p(t){return eE(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(a){if(null===a||47===a||62===a||eR(a)){let l=47===a,s=i.toLowerCase();return!l&&!o&&tr.includes(s)?(r=1,c.interrupt?t(a):E(a)):tn.includes(i.toLowerCase())?(r=6,l)?(e.consume(a),m):c.interrupt?t(a):E(a):(r=7,c.interrupt&&!c.parser.lazy[c.now().line]?n(a):o?function t(n){return eT(n)?(e.consume(n),t):S(n)}(a):g(a))}return 45===a||eC(a)?(e.consume(a),i+=String.fromCharCode(a),h):n(a)}function m(r){return 62===r?(e.consume(r),c.interrupt?t:E):n(r)}function g(t){return 47===t?(e.consume(t),S):58===t||95===t||eE(t)?(e.consume(t),v):eT(t)?(e.consume(t),g):S(t)}function v(t){return 45===t||46===t||58===t||95===t||eC(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),b):eT(t)?(e.consume(t),y):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):eT(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eR(n)?y(n):(e.consume(n),t)}(t)}function x(t){return t===l?(e.consume(t),l=null,w):null===t||eI(t)?n(t):(e.consume(t),x)}function w(e){return 47===e||62===e||eT(e)?g(e):n(e)}function S(t){return 62===t?(e.consume(t),k):n(t)}function k(t){return null===t||eI(t)?E(t):eT(t)?(e.consume(t),k):n(t)}function E(t){return 45===t&&2===r?(e.consume(t),P):60===t&&1===r?(e.consume(t),N):62===t&&4===r?(e.consume(t),T):63===t&&3===r?(e.consume(t),R):93===t&&5===r?(e.consume(t),I):eI(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(to,A,C)(t)):null===t||eI(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),E)}function C(t){return e.check(ti,O,A)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),j}function j(t){return null===t||eI(t)?C(t):(e.enter("htmlFlowData"),E(t))}function P(t){return 45===t?(e.consume(t),R):E(t)}function N(t){return 47===t?(e.consume(t),i="",M):E(t)}function M(t){if(62===t){let n=i.toLowerCase();return tr.includes(n)?(e.consume(t),T):E(t)}return eE(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),M):E(t)}function I(t){return 93===t?(e.consume(t),R):E(t)}function R(t){return 62===t?(e.consume(t),T):45===t&&2===r?(e.consume(t),R):E(t)}function T(t){return null===t||eI(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),T)}function A(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},61:tt,95:eQ,96:tl,126:tl},tO={38:tu,92:td},tj={[-5]:tf,[-4]:tf,[-3]:tf,33:tv,38:tu,42:tb,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return eE(t)?(e.consume(t),i):l(t)}function i(t){return 43===t||45===t||46===t||eC(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,a):(43===n||45===n||46===n||eC(n))&&r++<32?(e.consume(n),t):(r=0,l(n))}(t)):l(t)}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ej(r)?n(r):(e.consume(r),a)}function l(t){return 64===t?(e.consume(t),c):eO(t)?(e.consume(t),l):n(t)}function c(o){return eC(o)?function o(i){return 46===i?(e.consume(i),r=0,c):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(i){if((45===i||eC(i))&&r++<63){let n=45===i?t:o;return e.consume(i),n}return n(i)}(i)}(o):n(o)}}},{name:"htmlText",tokenize:function(e,t,n){let r,o,i;let a=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),x):63===t?(e.consume(t),y):eE(t)?(e.consume(t),S):n(t)}function c(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),o=0,p):eE(t)?(e.consume(t),v):n(t)}function s(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):eI(t)?(i=u,M(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?N(e):45===e?d(e):u(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),o===r.length?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):eI(t)?(i=h,M(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):h(t)}function v(t){return null===t||62===t?N(t):eI(t)?(i=v,M(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):eI(t)?(i=y,M(t)):(e.consume(t),y)}function b(e){return 62===e?N(e):y(e)}function x(t){return eE(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||eC(t)?(e.consume(t),w):function t(n){return eI(n)?(i=t,M(n)):eT(n)?(e.consume(n),t):N(n)}(t)}function S(t){return 45===t||eC(t)?(e.consume(t),S):47===t||62===t||eR(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),N):58===t||95===t||eE(t)?(e.consume(t),E):eI(t)?(i=k,M(t)):eT(t)?(e.consume(t),k):N(t)}function E(t){return 45===t||46===t||58===t||95===t||eC(t)?(e.consume(t),E):function t(n){return 61===n?(e.consume(n),C):eI(n)?(i=t,M(n)):eT(n)?(e.consume(n),t):k(n)}(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,O):eI(t)?(i=C,M(t)):eT(t)?(e.consume(t),C):(e.consume(t),j)}function O(t){return t===r?(e.consume(t),r=void 0,P):null===t?n(t):eI(t)?(i=O,M(t)):(e.consume(t),O)}function j(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eR(t)?k(t):(e.consume(t),j)}function P(e){return 47===e||62===e||eR(e)?k(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function M(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return eT(t)?eZ(e,R,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):R(t)}function R(t){return e.enter("htmlTextData"),i(t)}}}],91:tw,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eI(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},td],93:tp,95:tb,96:{name:"codeText",tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),i++,t):(e.exit("codeTextSequence"),a(n))}(t)};function a(c){return null===c?n(c):32===c?(e.enter("space"),e.consume(c),e.exit("space"),a):96===c?(o=e.enter("codeTextSequence"),r=0,function n(a){return 96===a?(e.consume(a),r++,n):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(a)):(o.type="codeTextData",l(a))}(c)):eI(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(c))}function l(t){return null===t||32===t||96===t||eI(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}},resolve:function(e){let t,n,r=e.length-4,o=3;if(("lineEnding"===e[3][1].type||"space"===e[o][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}}},tP={null:[tb,eK]},tN={null:[42,95]},tM={null:[]},tI=/[\0\t\n\r]/g;function tR(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let tT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tR(n.slice(t?2:1),t?16:10)}return ts(n)||e}let t_={}.hasOwnProperty;function tD(e){return{line:e.line,column:e.column,offset:e.offset}}function tZ(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+X({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+X({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+X({start:t.start,end:t.end})+") is still open")}function tL(e){let t=this;t.parser=function(n){var r,i;let a,l,c,s;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(v),autolinkProtocol:s,autolinkEmail:s,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:s,characterReference:s,codeFenced:r(p),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:r(p,o),codeText:r(function(){return{type:"inlineCode",value:""}},o),codeTextData:s,data:s,codeFlowValue:s,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,o),htmlFlowData:s,htmlText:r(g,o),htmlTextData:s,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:o,link:r(v),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];if(!t.depth){let n=this.sliceSerialize(e).length;t.depth=n}},autolink:a(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t;let n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tR(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=ts(n);let o=this.stack.pop();o.value+=t,o.position.end=tD(e.end)},codeFenced:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:a(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=e8(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(d),hardBreakTrailing:a(d),htmlFlow:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){let t=e.children;n.children=t}else n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(tT,tA),n.identifier=e8(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tD(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(s.call(this,e),u.call(this,e))},link:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=e8(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};(function e(t,n){let r=-1;for(;++r<n.length;){let o=n[r];Array.isArray(o)?e(t,o):function(e,t){let n;for(n in t)if(t_.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,o)}})(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},a={stack:[r],tokenStack:[],config:t,enter:i,exit:l,buffer:o,resume:c,data:n},s=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?s.push(u):u=function(e,t,n){let r,o,i,a,l=t-1,c=-1,s=!1;for(;++l<=n;){let t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?c++:c--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||c||i||(i=l),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=l;for(o=void 0;a--;){let t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",o=a}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){let o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(l,0,["enter",o,t[2]]),l++,n++,i=void 0,a=!0}}}return e[t][1]._spread=s,n}(e,s.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];t_.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},a),e[u][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||tZ).call(a,void 0,e[0])}for(r.position={start:tD(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tD(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){i.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:"fragment",children:[]})}function i(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:tD(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tZ).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+X({start:e.start,end:e.end})+"): it’s not open");n.position.end=tD(e.end)}function c(){return ey(this.stack.pop(),"boolean"!=typeof ev.includeImageAlt||ev.includeImageAlt,"boolean"!=typeof ev.includeHtml||ev.includeHtml)}function s(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tD(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tD(e.end)}function d(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function v(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!eS(e););return e}((function(e){let t={defined:[],lazy:{},constructs:function(e){let t={},n=-1;for(;++n<e.length;)(function(e,t){let n;for(n in t){let r;let o=(ek.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];if(i)for(r in i){ek.call(o,r)||(o[r]=[]);let e=i[r];(function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ex(e,0,0,r)})(o[r],Array.isArray(e)?e:e?[e]:[])}}})(t,e[n]);return t}([o,...(e||{}).extensions||[]]),content:n(eL),document:n(ez),flow:n(eW),string:n(eV),text:n(eU)};return t;function n(e){return function(n){return function(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),o={},i=[],a=[],l=[],c={consume:function(e){eI(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),s.events.push(["enter",n,s]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=f(),s.events.push(["exit",t,s]),t},attempt:h(function(e,t){m(e,t.from)}),check:h(p),interrupt:h(p,{interrupt:!0})},s={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,o=[];for(;++r<e.length;){let i;let a=e[r];if("string"==typeof a)i=a;else switch(a){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&n)continue;i=" ";break;default:i=String.fromCharCode(a)}n=-2===a,o.push(i)}return o.join("")}(d(e),t)},now:f,defineSkip:function(e){o[e.line]=e.column,g()},write:function(e){return(a=ew(a,e),function(){let e;for(;r._index<a.length;){let n=a[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),u=u(t)}else u=u(n)}}(),null!==a[a.length-1])?[]:(m(t,0),s.events=eY(i,s.events,s),s.events)}},u=t.tokenize.call(s,c);return t.resolveAll&&i.push(t),s;function d(e){return function(e,t){let n;let r=t.start._index,o=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;if(r===i)n=[e[r].slice(o,a)];else{if(n=e.slice(r,i),o>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(o):n.shift()}a>0&&n.push(e[i].slice(0,a))}return n}(a,e)}function f(){let{line:e,column:t,offset:n,_index:o,_bufferIndex:i}=r;return{line:e,column:t,offset:n,_index:o,_bufferIndex:i}}function p(e,t){t.restore()}function h(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){let t=null!==e&&n[e],r=null!==e&&n.null;return h([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(r)?r:r?[r]:[]])(e)};function h(e){return(a=e,u=0,0===e.length)?i:m(e[u])}function m(e){return function(n){return(p=function(){let e=f(),t=s.previous,n=s.currentConstruct,o=s.events.length,i=Array.from(l);return{restore:function(){r=e,s.previous=t,s.currentConstruct=n,s.events.length=o,l=i,g()},from:o}}(),d=e,e.partial||(s.currentConstruct=e),e.name&&s.parser.constructs.disable.null.includes(e.name))?y(n):e.tokenize.call(t?Object.assign(Object.create(s),t):s,c,v,y)(n)}}function v(t){return e(d,p),o}function y(e){return(p.restore(),++u<a.length)?m(a[u]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&ex(s.events,t,s.events.length-t,e.resolve(s.events.slice(t),s)),e.resolveTo&&(s.events=e.resolveTo(s.events,s))}function g(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}(t,e,n)}}})(i).document().write((l=1,c="",s=!0,function(e,t,n){let r,o,i,u,d;let f=[];for(e=c+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),i=0,c="",s&&(65279===e.charCodeAt(0)&&i++,s=void 0);i<e.length;){if(tI.lastIndex=i,u=(r=tI.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(u),!r){c=e.slice(i);break}if(10===d&&i===u&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),i<u&&(f.push(e.slice(i,u)),l+=u-i),d){case 0:f.push(65533),l++;break;case 9:for(o=4*Math.ceil(l/4),f.push(-2);l++<o;)f.push(-1);break;case 10:f.push(-4),l=1;break;default:a=!0,l=1}i=u+1}return n&&(a&&f.push(-5),c&&f.push(c),f.push(null)),f})(n,r,!0))))}}let tz="object"==typeof self?self:globalThis,tB=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);let[i,a]=t[o];switch(i){case 0:case -1:return n(a,o);case 1:{let e=n([],o);for(let t of a)e.push(r(t));return e}case 2:{let e=n({},o);for(let[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{let{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{let e=n(new Map,o);for(let[t,n]of a)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,o);for(let t of a)e.add(r(t));return e}case 7:{let{name:e,message:t}=a;return n(new tz[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new tz[i](a),o)};return r},tF=e=>tB(new Map,e)(0),{toString:tH}={},{keys:tq}=Object,tW=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tH.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},tK=([e,t])=>0===e&&("function"===t||"symbol"===t),tV=(e,t,n,r)=>{let o=(e,t)=>{let o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,l]=tW(r);switch(a){case 0:{let t=r;switch(l){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(l)return o([l,[...r]],r);let e=[],t=o([a,e],r);for(let t of r)e.push(i(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());let n=[],c=o([a,n],r);for(let t of tq(r))(e||!tK(tW(r[t])))&&n.push([i(t),i(r[t])]);return c}case 3:return o([a,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{let t=[],n=o([a,t],r);for(let[n,o]of r)(e||!(tK(tW(n))||tK(tW(o))))&&t.push([i(n),i(o)]);return n}case 6:{let t=[],n=o([a,t],r);for(let n of r)(e||!tK(tW(n)))&&t.push(i(n));return n}}let{message:c}=r;return o([a,{name:l,message:c}],r)};return i},tU=(e,{json:t,lossy:n}={})=>{let r=[];return tV(!(t||n),!!t,new Map,r)(e),r};var tG="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tF(tU(e,t)):structuredClone(e):(e,t)=>tF(tU(e,t));function tX(e){let t=[],n=-1,r=0,o=0;for(;++n<e.length;){let i=e.charCodeAt(n),a="";if(37===i&&eC(e.charCodeAt(n+1))&&eC(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){let t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function t$(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function tY(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let tQ=function(e){if(null==e)return t0;if("function"==typeof e)return tJ(e);if("object"==typeof e)return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=tQ(e[n]);return tJ(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):tJ(function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0});if("string"==typeof e)return tJ(function(t){return t&&t.type===e});throw Error("Expected function, string, or object as test")};function tJ(e){return function(t,n,r){var o;return!!(null!==(o=t)&&"object"==typeof o&&"type"in o&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function t0(){return!0}let t1=[];function t2(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),function(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;let i=tQ(o),a=r?-1:1;(function e(o,l,c){let s=o&&"object"==typeof o?o:{};if("string"==typeof s.type){let e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){var s;let u,d,f,p=t1;if((!t||i(o,l,c[c.length-1]||void 0))&&!1===(p=Array.isArray(s=n(o,c))?s:"number"==typeof s?[!0,s]:null==s?t1:[s])[0])return p;if("children"in o&&o.children&&o.children&&"skip"!==p[0])for(d=(r?o.children.length:-1)+a,f=c.concat(o);d>-1&&d<o.children.length;){if(!1===(u=e(o.children[d],d,f)())[0])return u;d="number"==typeof u[1]?u[1]:d+a}return p}})(e,void 0,[])()}(e,i,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}function t6(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});let a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function t4(e){let t=e.spread;return null==t?e.children.length>1:t}function t3(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}let t5={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o={type:"element",tagName:"pre",properties:{},children:[o=e.applyData(t,o)]},e.patch(t,o),o},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n;let r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=tX(o.toLowerCase()),a=e.footnoteOrder.indexOf(o),l=e.footnoteCounts.get(o);void 0===l?(l=0,e.footnoteOrder.push(o),n=e.footnoteOrder.length):n=a+1,l+=1,e.footnoteCounts.set(o,l);let c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,c);let s={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,s),e.applyData(t,s)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t6(e,t);let o={src:tX(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);let i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){let n={src:tX(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t6(e,t);let o={href:tX(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);let i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){let n={href:tX(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=t4(n[r])}return t}(n):t4(t),i={},a=[];if("boolean"==typeof t.checked){let e;let n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){let e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}let c=r[r.length-1];c&&(o||"element"!==c.type||"p"!==c.tagName)&&a.push({type:"text",value:"\n"});let s={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){let n={},r=e.all(t),o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){let e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),o=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=U(t.children[1]),a=V(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length,l=-1,c=[];for(;++l<a;){let n=t.children[l],r={},a=i?i[l]:void 0;a&&(r.align=a);let s={type:"element",tagName:o,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(n,s)),c.push(s)}let s={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),o=0,i=[];for(;r;)i.push(t3(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(t3(t.slice(o),o>0,!1)),i.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:t8,yaml:t8,definition:t8,footnoteDefinition:t8};function t8(){}let t7={}.hasOwnProperty,t9={};function ne(e,t){e.position&&(t.position=function(e){let t=U(e),n=V(e);if(t&&n)return{start:t,end:n}}(e))}function nt(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&o&&Object.assign(n.properties,tG(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function nn(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function nr(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function no(e,t){let n=function(e,t){let n=t||t9,r=new Map,o=new Map,i={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let o=i.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=nr(o.value)),!Array.isArray(o)&&"element"===o.type)){let e=o.children[0];e&&"text"===e.type&&(e.value=nr(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:nt,definitionById:r,footnoteById:o,footnoteCounts:new Map,footnoteOrder:[],handlers:{...t5,...n.handlers},one:function(e,t){let n=e.type,r=i.handlers[n];if(t7.call(i.handlers,n)&&r)return r(i,e,t);if(i.options.passThrough&&i.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=tG(n);return r.children=i.all(e),r}return tG(e)}return(i.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(t7.call(n,"hProperties")||t7.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(i,e,t)},options:n,patch:ne,wrap:nn};return t2(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),i}(e,t),r=n.one(e,void 0),o=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||t$,r=e.options.footnoteBackLabel||tY,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],c=-1;for(;++c<e.footnoteOrder.length;){let o=e.footnoteById.get(e.footnoteOrder[c]);if(!o)continue;let i=e.all(o),a=String(o.identifier).toUpperCase(),s=tX(a.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(c,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(i,!0)};e.patch(o,h),l.push(h)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...tG(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function ni(e,t){return e&&"run"in e?async function(n,r){let o=no(n,{file:r,...t});await e.run(o,r)}:function(n,r){return no(n,{file:r,...t||e})}}function na(e){if(e)throw e}var nl=n(6500);function nc(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let ns={basename:function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nu(e);let r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,l=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(o=i):(l=-1,o=a));return r===o?o=a:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){let t;if(nu(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){let t;nu(e);let n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){let l=e.codePointAt(n);if(47===l){if(t){o=n+1;break}continue}r<0&&(t=!0,r=n+1),46===l?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1)}return i<0||r<0||0===a||1===a&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)nu(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){nu(e);let t=47===e.codePointAt(0),n=function(e,t){let n,r,o="",i=0,a=-1,l=0,c=-1;for(;++c<=e.length;){if(c<e.length)n=e.codePointAt(c);else if(47===n)break;else n=47;if(47===n){if(a===c-1||1===l);else if(a!==c-1&&2===l){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2)){if(o.length>2){if((r=o.lastIndexOf("/"))!==o.length-1){r<0?(o="",i=0):i=(o=o.slice(0,r)).length-1-o.lastIndexOf("/"),a=c,l=0;continue}}else if(o.length>0){o="",i=0,a=c,l=0;continue}}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,c):o=e.slice(a+1,c),i=c-a-1;a=c,l=0}else 46===n&&l>-1?l++:l=-1}return o}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function nu(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function nd(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let nf=["history","path","basename","stem","extname","dirname"];class np{constructor(e){let t,n;t=e?nd(e)?{path:e}:"string"==typeof e||e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e?{value:e}:e:{},this.cwd="/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nf.length;){let e=nf[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)nf.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ns.basename(this.path):void 0}set basename(e){nm(e,"basename"),nh(e,"basename"),this.path=ns.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ns.dirname(this.path):void 0}set dirname(e){ng(this.basename,"dirname"),this.path=ns.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ns.extname(this.path):void 0}set extname(e){if(nh(e,"extname"),ng(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=ns.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){nd(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!nd(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),nm(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ns.basename(this.path,this.extname):void 0}set stem(e){nm(e,"stem"),nh(e,"stem"),this.path=ns.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new J(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function nh(e,t){if(e&&e.includes(ns.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+ns.sep+"`")}function nm(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function ng(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nv=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};for(let e of(Object.setPrototypeOf(r,t),Object.getOwnPropertyNames(n))){let t=Object.getOwnPropertyDescriptor(n,e);t&&Object.defineProperty(r,e,t)}return r},ny={}.hasOwnProperty;class nb extends nv{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);(function o(i,...a){let l=e[++n],c=-1;if(i){r(i);return}for(;++c<t.length;)(null===a[c]||void 0===a[c])&&(a[c]=t[c]);t=a,l?(function(e,t){let n;return function(...t){let i;let a=e.length>t.length;a&&t.push(r);try{i=e.apply(this,t)}catch(e){if(a&&n)throw e;return r(e)}a||(i&&i.then&&"function"==typeof i.then?i.then(o,r):i instanceof Error?r(i):o(i))};function r(e,...o){n||(n=!0,t(e,...o))}function o(e){r(null,e)}})(l,o)(...a):r(null,...a)})(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new nb,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(nl(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(nk("data",this.frozen),this.namespace[e]=t,this):ny.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nk("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=nO(e),n=this.parser||this.Parser;return nw("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nw("process",this.parser||this.Parser),nS("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){let i=nO(e),a=n.parse(i);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return l(e);let o=n.stringify(t,r);"string"==typeof o||o&&"object"==typeof o&&"byteLength"in o&&"byteOffset"in o?r.value=o:r.result=o,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nw("processSync",this.parser||this.Parser),nS("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,na(e),t=r}),nC("processSync","process",n),t}run(e,t,n){nE(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){let a=nO(t);r.run(e,a,function(t,r,a){let l=r||e;t?i(t):o?o(l):n(void 0,l,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){na(e),n=t,r=!0}),nC("runSync","run",r),n}stringify(e,t){this.freeze();let n=nO(t),r=this.compiler||this.Compiler;return nS("stringify",r),nE(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nk("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else if("object"==typeof e)Array.isArray(e)?i(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function o(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=nl(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)a(e,[]);else if("object"==typeof e){if(Array.isArray(e)){let[t,...n]=e;a(t,n)}else o(e)}else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t,a=n[o][1];nc(a)&&nc(r)&&(r=nl(!0,a,r)),n[o]=[e,r,...i]}}}}let nx=new nb().freeze();function nw(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nS(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function nk(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nE(e){if(!nc(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function nC(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nO(e){return e&&"object"==typeof e&&"message"in e&&"messages"in e?e:new np(e)}let nj=[],nP={allowDangerousHtml:!0},nN=/^(https?|ircs?|mailto|xmpp)$/i,nM=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nI(e){let t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,l=e.rehypePlugins||nj,c=e.remarkPlugins||nj,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...nP}:nP,u=e.skipHtml,d=e.unwrapDisallowed,f=e.urlTransform||nR,p=nx().use(tL).use(c).use(ni,s).use(l),h=new np;for(let t of("string"==typeof r&&(h.value=r),nM))Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);let m=p.parse(h),g=p.runSync(m,h);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),t2(g,function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in em)if(Object.hasOwn(em,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=em[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=f(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return d&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}}),function(e,t){var n,r,o;let i;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=t.jsxDEV,i=function(e,t,r,o){let i=Array.isArray(r.children),l=U(e);return n(t,r,o,i,{columnNumber:l?l.column-1:void 0,fileName:a,lineNumber:l?l.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");r=t.jsx,o=t.jsxs,i=function(e,t,n,i){let a=Array.isArray(n.children)?o:r;return i?a(t,n,i):a(t,n)}}let l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Z:D,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=el(l,e,void 0);return c&&"string"!=typeof c?c:l.create(e,l.Fragment,{children:c||void 0},void 0)}(g,{Fragment:eg.Fragment,components:i,ignoreInvalidStyle:!0,jsx:eg.jsx,jsxs:eg.jsxs,passKeys:!0,passNode:!0})}function nR(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||nN.test(e.slice(0,t))?e:""}},69398:function(e,t,n){"use strict";function r(e,t){if(!e)throw Error("Invariant failed")}n.d(t,{Z:function(){return r}})}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/42-1cbed529ecb084e0.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/42-1cbed529ecb084e0.js new file mode 100644 index 00000000..a453450b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/42-1cbed529ecb084e0.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[42],{31373:function(e,t,n){"use strict";n.d(t,{iN:function(){return g},R_:function(){return f},EV:function(){return m},ez:function(){return d}});var r=n(82082),o=n(96021),i=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function a(e){var t=e.r,n=e.g,o=e.b,i=(0,r.py)(t,n,o);return{h:360*i.h,s:i.s,v:i.v}}function c(e){var t=e.r,n=e.g,o=e.b;return"#".concat((0,r.vq)(t,n,o,!1))}function l(e,t,n){var r;return(r=Math.round(e.h)>=60&&240>=Math.round(e.h)?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function s(e,t,n){var r;return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)))}function u(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function f(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,o.uA)(e),f=5;f>0;f-=1){var d=a(r),p=c((0,o.uA)({h:l(d,f,!0),s:s(d,f,!0),v:u(d,f,!0)}));n.push(p)}n.push(c(r));for(var h=1;h<=4;h+=1){var m=a(r),g=c((0,o.uA)({h:l(m,h),s:s(m,h),v:u(m,h)}));n.push(g)}return"dark"===t.theme?i.map(function(e){var r,i,a,l=e.index,s=e.opacity;return c((r=(0,o.uA)(t.backgroundColor||"#141414"),i=(0,o.uA)(n[l]),a=100*s/100,{r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b}))}):n}var d={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},p={},h={};Object.keys(d).forEach(function(e){p[e]=f(d[e]),p[e].primary=p[e][5],h[e]=f(d[e],{theme:"dark",backgroundColor:"#141414"}),h[e].primary=h[e][5]}),p.red,p.volcano;var m=p.gold;p.orange,p.yellow,p.lime,p.green,p.cyan;var g=p.blue;p.geekblue,p.purple,p.magenta,p.grey,p.grey},352:function(e,t,n){"use strict";n.d(t,{E4:function(){return e_},jG:function(){return P},ks:function(){return H},bf:function(){return I},CI:function(){return eL},fp:function(){return K},xy:function(){return eT}});var r,o,i=n(11993),a=n(26365),c=n(83145),l=n(31686),s=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)},u=n(21717),f=n(2265),d=n.t(f,2);n(6397),n(16671);var p=n(76405),h=n(25049);function m(e){return e.join("%")}var g=function(){function e(t){(0,p.Z)(this,e),(0,i.Z)(this,"instanceId",void 0),(0,i.Z)(this,"cache",new Map),this.instanceId=t}return(0,h.Z)(e,[{key:"get",value:function(e){return this.opGet(m(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(m(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),v="data-token-hash",b="data-css-hash",y="__cssinjs_instance__",x=f.createContext({hashPriority:"low",cache:function(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(b,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[y]=t[y]||e,t[y]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(b,"]"))).forEach(function(t){var n,o=t.getAttribute(b);r[o]?t[y]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[o]=!0})}return new g(e)}(),defaultCache:!0}),w=n(41154),E=n(94981),k=function(){function e(){(0,p.Z)(this,e),(0,i.Z)(this,"cache",void 0),(0,i.Z)(this,"keys",void 0),(0,i.Z)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,h.Z)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach(function(e){if(o){var t;o=null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e)}else o=void 0}),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(e,t){var n=(0,a.Z)(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),i=(0,a.Z)(o,1)[0];this.delete(i)}this.keys.push(t)}var c=this.cache;t.forEach(function(e,o){if(o===t.length-1)c.set(e,{value:[n,r.cacheCallTimes++]});else{var i=c.get(e);i?i.map||(i.map=new Map):c.set(e,{map:new Map}),c=c.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var o=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),o}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();(0,i.Z)(k,"MAX_CACHE_SIZE",20),(0,i.Z)(k,"MAX_CACHE_OFFSET",5);var Z=n(32559),C=0,S=function(){function e(t){(0,p.Z)(this,e),(0,i.Z)(this,"derivatives",void 0),(0,i.Z)(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=C,0===t.length&&(0,Z.Kp)(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),C+=1}return(0,h.Z)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce(function(t,n){return n(e,t)},void 0)}}]),e}(),O=new k;function P(e){var t=Array.isArray(e)?e:[e];return O.has(t)||O.set(t,new S(t)),O.get(t)}var M=new WeakMap,j={},A=new WeakMap;function R(e){var t=A.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof S?t+=r.id:r&&"object"===(0,w.Z)(r)?t+=R(r):t+=r}),A.set(e,t)),t}function F(e,t){return s("".concat(t,"_").concat(R(e)))}var T="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),N="_bAmBoO_",L=void 0,_=(0,E.Z)();function I(e){return"number"==typeof e?"".concat(e,"px"):e}function z(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(a)return e;var c=(0,l.Z)((0,l.Z)({},o),{},(r={},(0,i.Z)(r,v,t),(0,i.Z)(r,b,n),r)),s=Object.keys(c).map(function(e){var t=c[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(s,">").concat(e,"</style>")}var H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},B=function(e,t,n){var r,o={},i={};return Object.entries(e).forEach(function(e){var t=(0,a.Z)(e,2),r=t[0],c=t[1];if(null!=n&&null!==(l=n.preserve)&&void 0!==l&&l[r])i[r]=c;else if(("string"==typeof c||"number"==typeof c)&&!(null!=n&&null!==(s=n.ignore)&&void 0!==s&&s[r])){var l,s,u,f=H(r,null==n?void 0:n.prefix);o[f]="number"!=typeof c||null!=n&&null!==(u=n.unitless)&&void 0!==u&&u[r]?String(c):"".concat(c,"px"),i[r]="var(".concat(f,")")}}),[i,(r={scope:null==n?void 0:n.scope},Object.keys(o).length?".".concat(t).concat(null!=r&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(o).map(function(e){var t=(0,a.Z)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")}).join(""),"}"):"")]},D=n(27380),V=(0,l.Z)({},d).useInsertionEffect,W=V?function(e,t,n){return V(function(){return e(),t()},n)}:function(e,t,n){f.useMemo(e,n),(0,D.Z)(function(){return t(!0)},n)},q=void 0!==(0,l.Z)({},d).useInsertionEffect?function(e){var t=[],n=!1;return f.useEffect(function(){return n=!1,function(){n=!0,t.length&&t.forEach(function(e){return e()})}},e),function(e){n||t.push(e)}}:function(){return function(e){e()}};function G(e,t,n,r,o){var i=f.useContext(x).cache,l=m([e].concat((0,c.Z)(t))),s=q([l]),u=function(e){i.opUpdate(l,function(t){var r=(0,a.Z)(t||[void 0,void 0],2),o=r[0],i=[void 0===o?0:o,r[1]||n()];return e?e(i):i})};f.useMemo(function(){u()},[l]);var d=i.opGet(l)[1];return W(function(){null==o||o(d)},function(e){return u(function(t){var n=(0,a.Z)(t,2),r=n[0],i=n[1];return e&&0===r&&(null==o||o(d)),[r+1,i]}),function(){i.opUpdate(l,function(t){var n=(0,a.Z)(t||[],2),o=n[0],c=void 0===o?0:o,u=n[1];return 0==c-1?(s(function(){(e||!i.opGet(l))&&(null==r||r(u,!1))}),null):[c-1,u]})}},[l]),d}var X={},$=new Map,U=function(e,t,n,r){var o=n.getDerivativeToken(e),i=(0,l.Z)((0,l.Z)({},o),t);return r&&(i=r(i)),i},Y="token";function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,f.useContext)(x),o=r.cache.instanceId,i=r.container,d=n.salt,p=void 0===d?"":d,h=n.override,m=void 0===h?X:h,g=n.formatToken,w=n.getComputedToken,E=n.cssVar,k=function(e,t){for(var n=M,r=0;r<t.length;r+=1){var o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(j)||n.set(j,e()),n.get(j)}(function(){return Object.assign.apply(Object,[{}].concat((0,c.Z)(t)))},t),Z=R(k),C=R(m),S=E?R(E):"";return G(Y,[p,e.id,Z,C,S],function(){var t,n=w?w(k,m,e):U(k,m,e,g),r=(0,l.Z)({},n),o="";if(E){var i=B(n,E.key,{prefix:E.prefix,ignore:E.ignore,unitless:E.unitless,preserve:E.preserve}),c=(0,a.Z)(i,2);n=c[0],o=c[1]}var u=F(n,p);n._tokenKey=u,r._tokenKey=F(r,p);var f=null!==(t=null==E?void 0:E.key)&&void 0!==t?t:u;n._themeKey=f,$.set(f,($.get(f)||0)+1);var d="".concat("css","-").concat(s(u));return n._hashId=d,[n,d,r,o,(null==E?void 0:E.key)||""]},function(e){var t,n,r;t=e[0]._themeKey,$.set(t,($.get(t)||0)-1),r=(n=Array.from($.keys())).filter(function(e){return 0>=($.get(e)||0)}),n.length-r.length>0&&r.forEach(function(e){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(v,'="').concat(e,'"]')).forEach(function(e){if(e[y]===o){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)}}),$.delete(e)})},function(e){var t=(0,a.Z)(e,4),n=t[0],r=t[3];if(E&&r){var c=(0,u.hq)(r,s("css-variables-".concat(n._themeKey)),{mark:b,prepend:"queue",attachTo:i,priority:-999});c[y]=o,c.setAttribute(v,n._themeKey)}})}var Q=n(1119),J={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ee="comm",et="rule",en="decl",er=Math.abs,eo=String.fromCharCode;function ei(e,t,n){return e.replace(t,n)}function ea(e,t){return 0|e.charCodeAt(t)}function ec(e,t,n){return e.slice(t,n)}function el(e){return e.length}function es(e,t){return t.push(e),e}function eu(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function ef(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case en:return e.return=e.return||e.value;case ee:return"";case"@keyframes":return e.return=e.value+"{"+eu(e.children,r)+"}";case et:if(!el(e.value=e.props.join(",")))return""}return el(n=eu(e.children,r))?e.return=e.value+"{"+n+"}":""}var ed=1,ep=1,eh=0,em=0,eg=0,ev="";function eb(e,t,n,r,o,i,a,c){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ed,column:ep,length:a,return:"",siblings:c}}function ey(){return eg=em<eh?ea(ev,em++):0,ep++,10===eg&&(ep=1,ed++),eg}function ex(){return ea(ev,em)}function ew(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eE(e){var t,n;return(t=em-1,n=function e(t){for(;ey();)switch(eg){case t:return em;case 34:case 39:34!==t&&39!==t&&e(eg);break;case 40:41===t&&e(t);break;case 92:ey()}return em}(91===e?e+2:40===e?e+1:e),ec(ev,t,n)).trim()}function ek(e,t,n,r,o,i,a,c,l,s,u,f){for(var d=o-1,p=0===o?i:[""],h=p.length,m=0,g=0,v=0;m<r;++m)for(var b=0,y=ec(e,d+1,d=er(g=a[m])),x=e;b<h;++b)(x=(g>0?p[b]+" "+y:ei(y,/&\f/g,p[b])).trim())&&(l[v++]=x);return eb(e,t,n,0===o?et:c,l,s,u,f)}function eZ(e,t,n,r,o){return eb(e,t,n,en,ec(e,0,r),ec(e,r+1,-1),r,o)}var eC="data-ant-cssinjs-cache-path",eS="_FILE_STYLE__",eO=!0,eP="_multi_value_";function eM(e){var t,n,r;return eu((r=function e(t,n,r,o,i,a,c,l,s){for(var u,f,d,p=0,h=0,m=c,g=0,v=0,b=0,y=1,x=1,w=1,E=0,k="",Z=i,C=a,S=o,O=k;x;)switch(b=E,E=ey()){case 40:if(108!=b&&58==ea(O,m-1)){-1!=(f=O+=ei(eE(E),"&","&\f"),d=er(p?l[p-1]:0),f.indexOf("&\f",d))&&(w=-1);break}case 34:case 39:case 91:O+=eE(E);break;case 9:case 10:case 13:case 32:O+=function(e){for(;eg=ex();)if(eg<33)ey();else break;return ew(e)>2||ew(eg)>3?"":" "}(b);break;case 92:O+=function(e,t){for(var n;--t&&ey()&&!(eg<48)&&!(eg>102)&&(!(eg>57)||!(eg<65))&&(!(eg>70)||!(eg<97)););return n=em+(t<6&&32==ex()&&32==ey()),ec(ev,e,n)}(em-1,7);continue;case 47:switch(ex()){case 42:case 47:es(eb(u=function(e,t){for(;ey();)if(e+eg===57)break;else if(e+eg===84&&47===ex())break;return"/*"+ec(ev,t,em-1)+"*"+eo(47===e?e:ey())}(ey(),em),n,r,ee,eo(eg),ec(u,2,-2),0,s),s);break;default:O+="/"}break;case 123*y:l[p++]=el(O)*w;case 125*y:case 59:case 0:switch(E){case 0:case 125:x=0;case 59+h:-1==w&&(O=ei(O,/\f/g,"")),v>0&&el(O)-m&&es(v>32?eZ(O+";",o,r,m-1,s):eZ(ei(O," ","")+";",o,r,m-2,s),s);break;case 59:O+=";";default:if(es(S=ek(O,n,r,p,h,i,l,k,Z=[],C=[],m,a),a),123===E){if(0===h)e(O,n,S,S,Z,a,m,l,C);else switch(99===g&&110===ea(O,3)?100:g){case 100:case 108:case 109:case 115:e(t,S,S,o&&es(ek(t,S,S,0,0,i,l,k,i,Z=[],m,C),C),i,C,m,l,o?Z:C);break;default:e(O,S,S,S,[""],C,0,l,C)}}}p=h=v=0,y=w=1,k=O="",m=c;break;case 58:m=1+el(O),v=b;default:if(y<1){if(123==E)--y;else if(125==E&&0==y++&&125==(eg=em>0?ea(ev,--em):0,ep--,10===eg&&(ep=1,ed--),eg))continue}switch(O+=eo(E),E*y){case 38:w=h>0?1:(O+="\f",-1);break;case 44:l[p++]=(el(O)-1)*w,w=1;break;case 64:45===ex()&&(O+=eE(ey())),g=ex(),h=m=el(k=O+=function(e){for(;!ew(ex());)ey();return ec(ev,e,em)}(em)),E++;break;case 45:45===b&&2==el(O)&&(y=0)}}return a}("",null,null,null,[""],(n=t=e,ed=ep=1,eh=el(ev=n),em=0,t=[]),0,[0],t),ev="",r),ef).replace(/\{%%%\:[^;];}/g,";")}var ej=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,i=r.injectHash,s=r.parentSelectors,f=n.hashId,d=n.layer,p=(n.path,n.hashPriority),h=n.transformers,m=void 0===h?[]:h;n.linters;var g="",v={};function b(t){var r=t.getName(f);if(!v[r]){var o=e(t.style,n,{root:!1,parentSelectors:s}),i=(0,a.Z)(o,1)[0];v[r]="@keyframes ".concat(t.getName(f)).concat(i)}}if((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach(function(t){Array.isArray(t)?e(t,n):t&&n.push(t)}),n})(Array.isArray(t)?t:[t]).forEach(function(t){var r="string"!=typeof t||o?t:{};if("string"==typeof r)g+="".concat(r,"\n");else if(r._keyframe)b(r);else{var u=m.reduce(function(e,t){var n;return(null==t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e},r);Object.keys(u).forEach(function(t){var r=u[t];if("object"!==(0,w.Z)(r)||!r||"animationName"===t&&r._keyframe||"object"===(0,w.Z)(r)&&r&&("_skip_check_"in r||eP in r)){function d(e,t){var n=e.replace(/[A-Z]/g,function(e){return"-".concat(e.toLowerCase())}),r=t;J[e]||"number"!=typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!=t&&t._keyframe&&(b(t),r=t.getName(f)),g+="".concat(n,":").concat(r,";")}var h,m=null!==(h=null==r?void 0:r.value)&&void 0!==h?h:r;"object"===(0,w.Z)(r)&&null!=r&&r[eP]&&Array.isArray(m)?m.forEach(function(e){d(t,e)}):d(t,m)}else{var y=!1,x=t.trim(),E=!1;(o||i)&&f?x.startsWith("@")?y=!0:x=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r;return e.split(",").map(function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",i=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(i).concat(o).concat(r.slice(i.length))].concat((0,c.Z)(n.slice(1))).join(" ")}).join(",")}(t,f,p):o&&!f&&("&"===x||""===x)&&(x="",E=!0);var k=e(r,n,{root:E,injectHash:y,parentSelectors:[].concat((0,c.Z)(s),[x])}),Z=(0,a.Z)(k,2),C=Z[0],S=Z[1];v=(0,l.Z)((0,l.Z)({},v),S),g+="".concat(x).concat(C)}})}}),o){if(d&&(void 0===L&&(L=function(e,t,n){if((0,E.Z)()){(0,u.hq)(e,T);var r,o,i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",null==t||t(i),document.body.appendChild(i);var a=null===(r=getComputedStyle(i).content)||void 0===r?void 0:r.includes(N);return null===(o=i.parentNode)||void 0===o||o.removeChild(i),(0,u.jL)(T),a}return!1}("@layer ".concat(T," { .").concat(T,' { content: "').concat(N,'"!important; } }'),function(e){e.className=T})),L)){var y=d.split(","),x=y[y.length-1].trim();g="@layer ".concat(x," {").concat(g,"}"),y.length>1&&(g="@layer ".concat(d,"{%%%:%}").concat(g))}}else g="{".concat(g,"}");return[g,v]};function eA(e,t){return s("".concat(e.join("%")).concat(t))}function eR(){return null}var eF="style";function eT(e,t){var n=e.token,o=e.path,l=e.hashId,s=e.layer,d=e.nonce,p=e.clientOnly,h=e.order,m=void 0===h?0:h,g=f.useContext(x),w=g.autoClear,k=(g.mock,g.defaultCache),Z=g.hashPriority,C=g.container,S=g.ssrInline,O=g.transformers,P=g.linters,M=g.cache,j=n._tokenKey,A=[j].concat((0,c.Z)(o)),R=G(eF,A,function(){var e=A.join("|");if(!function(){if(!r&&(r={},(0,E.Z)())){var e,t=document.createElement("div");t.className=eC,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var n=getComputedStyle(t).content||"";(n=n.replace(/^"/,"").replace(/"$/,"")).split(";").forEach(function(e){var t=e.split(":"),n=(0,a.Z)(t,2),o=n[0],i=n[1];r[o]=i});var o=document.querySelector("style[".concat(eC,"]"));o&&(eO=!1,null===(e=o.parentNode)||void 0===e||e.removeChild(o)),document.body.removeChild(t)}}(),r[e]){var n=function(e){var t=r[e],n=null;if(t&&(0,E.Z)()){if(eO)n=eS;else{var o=document.querySelector("style[".concat(b,'="').concat(r[e],'"]'));o?n=o.innerHTML:delete r[e]}}return[n,t]}(e),i=(0,a.Z)(n,2),c=i[0],u=i[1];if(c)return[c,j,u,{},p,m]}var f=ej(t(),{hashId:l,hashPriority:Z,layer:s,path:o.join("-"),transformers:O,linters:P}),d=(0,a.Z)(f,2),h=d[0],g=d[1],v=eM(h),y=eA(A,v);return[v,j,y,g,p,m]},function(e,t){var n=(0,a.Z)(e,3)[2];(t||w)&&_&&(0,u.jL)(n,{mark:b})},function(e){var t=(0,a.Z)(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(_&&n!==eS){var i={mark:b,prepend:"queue",attachTo:C,priority:m},c="function"==typeof d?d():d;c&&(i.csp={nonce:c});var l=(0,u.hq)(n,r,i);l[y]=M.instanceId,l.setAttribute(v,j),Object.keys(o).forEach(function(e){(0,u.hq)(eM(o[e]),"_effect-".concat(e),i)})}}),F=(0,a.Z)(R,3),T=F[0],N=F[1],L=F[2];return function(e){var t,n;return t=S&&!_&&k?f.createElement("style",(0,Q.Z)({},(n={},(0,i.Z)(n,v,N),(0,i.Z)(n,b,L),n),{dangerouslySetInnerHTML:{__html:T}})):f.createElement(eR,null),f.createElement(f.Fragment,null,t,e)}}var eN="cssVar",eL=function(e,t){var n=e.key,r=e.prefix,o=e.unitless,i=e.ignore,l=e.token,s=e.scope,d=void 0===s?"":s,p=(0,f.useContext)(x),h=p.cache.instanceId,m=p.container,g=l._tokenKey,w=[].concat((0,c.Z)(e.path),[n,d,g]);return G(eN,w,function(){var e=B(t(),n,{prefix:r,unitless:o,ignore:i,scope:d}),c=(0,a.Z)(e,2),l=c[0],s=c[1],u=eA(w,s);return[l,s,u,n]},function(e){var t=(0,a.Z)(e,3)[2];_&&(0,u.jL)(t,{mark:b})},function(e){var t=(0,a.Z)(e,3),r=t[1],o=t[2];if(r){var i=(0,u.hq)(r,o,{mark:b,prepend:"queue",attachTo:m,priority:-999});i[y]=h,i.setAttribute(v,n)}})};o={},(0,i.Z)(o,eF,function(e,t,n){var r=(0,a.Z)(e,6),o=r[0],i=r[1],c=r[2],l=r[3],s=r[4],u=r[5],f=(n||{}).plain;if(s)return null;var d=o,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return d=z(o,i,c,p,f),l&&Object.keys(l).forEach(function(e){if(!t[e]){t[e]=!0;var n=eM(l[e]);d+=z(n,i,"_effect-".concat(e),p,f)}}),[u,c,d]}),(0,i.Z)(o,Y,function(e,t,n){var r=(0,a.Z)(e,5),o=r[2],i=r[3],c=r[4],l=(n||{}).plain;if(!i)return null;var s=o._tokenKey,u=z(i,c,s,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l);return[-999,s,u]}),(0,i.Z)(o,eN,function(e,t,n){var r=(0,a.Z)(e,4),o=r[1],i=r[2],c=r[3],l=(n||{}).plain;if(!o)return null;var s=z(o,c,i,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l);return[-999,i,s]});var e_=function(){function e(t,n){(0,p.Z)(this,e),(0,i.Z)(this,"name",void 0),(0,i.Z)(this,"style",void 0),(0,i.Z)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,h.Z)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function eI(e){return e.notSplit=!0,e}eI(["borderTop","borderBottom"]),eI(["borderTop"]),eI(["borderBottom"]),eI(["borderLeft","borderRight"]),eI(["borderLeft"]),eI(["borderRight"])},55015:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(1119),o=n(26365),i=n(11993),a=n(6989),c=n(2265),l=n(36760),s=n.n(l),u=n(31373),f=n(20902),d=n(31686),p=n(41154),h=n(21717),m=n(13211),g=n(32559);function v(e){return"object"===(0,p.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,p.Z)(e.icon)||"function"==typeof e.icon)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];return"class"===n?(t.className=r,delete t.class):(delete t[n],t[n.replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=r),t},{})}function y(e){return(0,u.R_)(e)[0]}function x(e){return e?Array.isArray(e)?e:[e]:[]}var w=function(e){var t=(0,c.useContext)(f.Z),n=t.csp,r=t.prefixCls,o="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(o=o.replace(/anticon/g,r)),(0,c.useEffect)(function(){var t=e.current,r=(0,m.A)(t);(0,h.hq)(o,"@ant-design-icons",{prepend:!0,csp:n,attachTo:r})},[])},E=["icon","className","onClick","style","primaryColor","secondaryColor"],k={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},Z=function(e){var t,n,r=e.icon,o=e.className,i=e.onClick,l=e.style,s=e.primaryColor,u=e.secondaryColor,f=(0,a.Z)(e,E),p=c.useRef(),h=k;if(s&&(h={primaryColor:s,secondaryColor:u||y(s)}),w(p),t=v(r),n="icon should be icon definiton, but got ".concat(r),(0,g.ZP)(t,"[@ant-design/icons] ".concat(n)),!v(r))return null;var m=r;return m&&"function"==typeof m.icon&&(m=(0,d.Z)((0,d.Z)({},m),{},{icon:m.icon(h.primaryColor,h.secondaryColor)})),function e(t,n,r){return r?c.createElement(t.tag,(0,d.Z)((0,d.Z)({key:n},b(t.attrs)),r),(t.children||[]).map(function(r,o){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))})):c.createElement(t.tag,(0,d.Z)({key:n},b(t.attrs)),(t.children||[]).map(function(r,o){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(o))}))}(m.icon,"svg-".concat(m.name),(0,d.Z)((0,d.Z)({className:o,onClick:i,style:l,"data-icon":m.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:p}))};function C(e){var t=x(e),n=(0,o.Z)(t,2),r=n[0],i=n[1];return Z.setTwoToneColors({primaryColor:r,secondaryColor:i})}Z.displayName="IconReact",Z.getTwoToneColors=function(){return(0,d.Z)({},k)},Z.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;k.primaryColor=t,k.secondaryColor=n||y(t),k.calculated=!!n};var S=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];C(u.iN.primary);var O=c.forwardRef(function(e,t){var n,l=e.className,u=e.icon,d=e.spin,p=e.rotate,h=e.tabIndex,m=e.onClick,g=e.twoToneColor,v=(0,a.Z)(e,S),b=c.useContext(f.Z),y=b.prefixCls,w=void 0===y?"anticon":y,E=b.rootClassName,k=s()(E,w,(n={},(0,i.Z)(n,"".concat(w,"-").concat(u.name),!!u.name),(0,i.Z)(n,"".concat(w,"-spin"),!!d||"loading"===u.name),n),l),C=h;void 0===C&&m&&(C=-1);var O=x(g),P=(0,o.Z)(O,2),M=P[0],j=P[1];return c.createElement("span",(0,r.Z)({role:"img","aria-label":u.name},v,{ref:t,tabIndex:C,onClick:m,className:k}),c.createElement(Z,{icon:u,primaryColor:M,secondaryColor:j,style:p?{msTransform:"rotate(".concat(p,"deg)"),transform:"rotate(".concat(p,"deg)")}:void 0}))});O.displayName="AntdIcon",O.getTwoToneColor=function(){var e=Z.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},O.setTwoToneColor=C;var P=O},20902:function(e,t,n){"use strict";var r=(0,n(2265).createContext)({});t.Z=r},8900:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},a=n(55015),c=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},39725:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},a=n(55015),c=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},49638:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},a=n(55015),c=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},54537:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},a=n(55015),c=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},55726:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},a=n(55015),c=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},61935:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},a=n(55015),c=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))})},82082:function(e,t,n){"use strict";n.d(t,{T6:function(){return d},VD:function(){return p},WE:function(){return s},Yt:function(){return h},lC:function(){return i},py:function(){return l},rW:function(){return o},s:function(){return f},ve:function(){return c},vq:function(){return u}});var r=n(58317);function o(e,t,n){return{r:255*(0,r.sh)(e,255),g:255*(0,r.sh)(t,255),b:255*(0,r.sh)(n,255)}}function i(e,t,n){var o=Math.max(e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255)),i=Math.min(e,t,n),a=0,c=0,l=(o+i)/2;if(o===i)c=0,a=0;else{var s=o-i;switch(c=l>.5?s/(2-o-i):s/(o+i),o){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}a/=6}return{h:a,s:c,l:l}}function a(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function c(e,t,n){if(e=(0,r.sh)(e,360),t=(0,r.sh)(t,100),n=(0,r.sh)(n,100),0===t)i=n,c=n,o=n;else{var o,i,c,l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=a(s,l,e+1/3),i=a(s,l,e),c=a(s,l,e-1/3)}return{r:255*o,g:255*i,b:255*c}}function l(e,t,n){var o=Math.max(e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255)),i=Math.min(e,t,n),a=0,c=o-i;if(o===i)a=0;else{switch(o){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4}a/=6}return{h:a,s:0===o?0:c/o,v:o}}function s(e,t,n){e=6*(0,r.sh)(e,360),t=(0,r.sh)(t,100),n=(0,r.sh)(n,100);var o=Math.floor(e),i=e-o,a=n*(1-t),c=n*(1-i*t),l=n*(1-(1-i)*t),s=o%6;return{r:255*[n,c,a,a,l,n][s],g:255*[l,n,n,c,a,a][s],b:255*[a,a,l,n,n,c][s]}}function u(e,t,n,o){var i=[(0,r.FZ)(Math.round(e).toString(16)),(0,r.FZ)(Math.round(t).toString(16)),(0,r.FZ)(Math.round(n).toString(16))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function f(e,t,n,o,i){var a=[(0,r.FZ)(Math.round(e).toString(16)),(0,r.FZ)(Math.round(t).toString(16)),(0,r.FZ)(Math.round(n).toString(16)),(0,r.FZ)(Math.round(255*parseFloat(o)).toString(16))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function d(e){return p(e)/255}function p(e){return parseInt(e,16)}function h(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}},28052:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},96021:function(e,t,n){"use strict";n.d(t,{uA:function(){return a}});var r=n(82082),o=n(28052),i=n(58317);function a(e){var t={r:0,g:0,b:0},n=1,a=null,c=null,l=null,s=!1,d=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(o.R[e])e=o.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=u.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=u.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=u.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=u.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=u.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=u.hex8.exec(e))?{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),a:(0,r.T6)(n[4]),format:t?"name":"hex8"}:(n=u.hex6.exec(e))?{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),format:t?"name":"hex"}:(n=u.hex4.exec(e))?{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),a:(0,r.T6)(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=u.hex3.exec(e))&&{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(f(e.r)&&f(e.g)&&f(e.b)?(t=(0,r.rW)(e.r,e.g,e.b),s=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):f(e.h)&&f(e.s)&&f(e.v)?(a=(0,i.JX)(e.s),c=(0,i.JX)(e.v),t=(0,r.WE)(e.h,a,c),s=!0,d="hsv"):f(e.h)&&f(e.s)&&f(e.l)&&(a=(0,i.JX)(e.s),l=(0,i.JX)(e.l),t=(0,r.ve)(e.h,a,l),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,i.Yq)(n),{ok:s,format:e.format||d,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var c="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),l="[\\s|\\(]+(".concat(c,")[,|\\s]+(").concat(c,")[,|\\s]+(").concat(c,")\\s*\\)?"),s="[\\s|\\(]+(".concat(c,")[,|\\s]+(").concat(c,")[,|\\s]+(").concat(c,")[,|\\s]+(").concat(c,")\\s*\\)?"),u={CSS_UNIT:new RegExp(c),rgb:RegExp("rgb"+l),rgba:RegExp("rgba"+s),hsl:RegExp("hsl"+l),hsla:RegExp("hsla"+s),hsv:RegExp("hsv"+l),hsva:RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function f(e){return!!u.CSS_UNIT.exec(String(e))}},36360:function(e,t,n){"use strict";n.d(t,{C:function(){return c}});var r=n(82082),o=n(28052),i=n(96021),a=n(58317),c=function(){function e(t,n){if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=(0,r.Yt)(t)),this.originalInput=t;var o,a=(0,i.uA)(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(o=n.format)&&void 0!==o?o:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return 128>this.getBrightness()},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return .2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=(0,a.Yq)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=(0,r.py)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=(0,r.py)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),o=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(o,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=(0,r.lC)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=(0,r.lC)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),o=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(o,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),(0,r.vq)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),(0,r.s)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*(0,a.sh)(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*(0,a.sh)(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+(0,r.vq)(this.r,this.g,this.b,!1),t=0,n=Object.entries(o.R);t<n.length;t++){var i=n[t],a=i[0];if(e===i[1])return a}return!1},e.prototype.toString=function(e){var t=!!e;e=null!=e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith("hex")||"name"===e)?"name"===e&&0===this.a?this.toName():this.toRgbString():("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-(t/100*255)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-(t/100*255)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-(t/100*255)))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],c=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+c)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],i=360/t,a=1;a<t;a++)o.push(new e({h:(r+a*i)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}()},58317:function(e,t,n){"use strict";function r(e,t){"string"==typeof(n=e)&&-1!==n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var n,r,o="string"==typeof(r=e)&&-1!==r.indexOf("%");return(e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),1e-6>Math.abs(e-t))?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function o(e){return Math.min(1,Math.max(0,e))}function i(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function a(e){return e<=1?"".concat(100*Number(e),"%"):e}function c(e){return 1===e.length?"0"+e:String(e)}n.d(t,{FZ:function(){return c},JX:function(){return a},V2:function(){return o},Yq:function(){return i},sh:function(){return r}})},28036:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(26365),o=n(2265),i=n(54887),a=n(94981);n(32559);var c=n(28791),l=o.createContext(null),s=n(83145),u=n(27380),f=[],d=n(21717),p=n(3208),h="rc-util-locker-".concat(Date.now()),m=0,g=function(e){return!1!==e&&((0,a.Z)()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},v=o.forwardRef(function(e,t){var n,v,b,y=e.open,x=e.autoLock,w=e.getContainer,E=(e.debug,e.autoDestroy),k=void 0===E||E,Z=e.children,C=o.useState(y),S=(0,r.Z)(C,2),O=S[0],P=S[1],M=O||y;o.useEffect(function(){(k||y)&&P(y)},[y,k]);var j=o.useState(function(){return g(w)}),A=(0,r.Z)(j,2),R=A[0],F=A[1];o.useEffect(function(){var e=g(w);F(null!=e?e:null)});var T=function(e,t){var n=o.useState(function(){return(0,a.Z)()?document.createElement("div"):null}),i=(0,r.Z)(n,1)[0],c=o.useRef(!1),d=o.useContext(l),p=o.useState(f),h=(0,r.Z)(p,2),m=h[0],g=h[1],v=d||(c.current?void 0:function(e){g(function(t){return[e].concat((0,s.Z)(t))})});function b(){i.parentElement||document.body.appendChild(i),c.current=!0}function y(){var e;null===(e=i.parentElement)||void 0===e||e.removeChild(i),c.current=!1}return(0,u.Z)(function(){return e?d?d(b):b():y(),y},[e]),(0,u.Z)(function(){m.length&&(m.forEach(function(e){return e()}),g(f))},[m]),[i,v]}(M&&!R,0),N=(0,r.Z)(T,2),L=N[0],_=N[1],I=null!=R?R:L;n=!!(x&&y&&(0,a.Z)()&&(I===L||I===document.body)),v=o.useState(function(){return m+=1,"".concat(h,"_").concat(m)}),b=(0,r.Z)(v,1)[0],(0,u.Z)(function(){if(n){var e=(0,p.o)(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,d.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),b)}else(0,d.jL)(b);return function(){(0,d.jL)(b)}},[n,b]);var z=null;Z&&(0,c.Yr)(Z)&&t&&(z=Z.ref);var H=(0,c.x1)(z,t);if(!M||!(0,a.Z)()||void 0===R)return null;var B=!1===I,D=Z;return t&&(D=o.cloneElement(Z,{ref:H})),o.createElement(l.Provider,{value:_},B?D:(0,i.createPortal)(D,I))})},97821:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r=n(31686),o=n(26365),i=n(6989),a=n(28036),c=n(36760),l=n.n(c),s=n(31474),u=n(2868),f=n(13211),d=n(58525),p=n(92491),h=n(27380),m=n(79267),g=n(2265),v=n(1119),b=n(47970),y=n(28791);function x(e){var t=e.prefixCls,n=e.align,r=e.arrow,o=e.arrowPos,i=r||{},a=i.className,c=i.content,s=o.x,u=o.y,f=g.useRef();if(!n||!n.points)return null;var d={position:"absolute"};if(!1!==n.autoArrow){var p=n.points[0],h=n.points[1],m=p[0],v=p[1],b=h[0],y=h[1];m!==b&&["t","b"].includes(m)?"t"===m?d.top=0:d.bottom=0:d.top=void 0===u?0:u,v!==y&&["l","r"].includes(v)?"l"===v?d.left=0:d.right=0:d.left=void 0===s?0:s}return g.createElement("div",{ref:f,className:l()("".concat(t,"-arrow"),a),style:d},c)}function w(e){var t=e.prefixCls,n=e.open,r=e.zIndex,o=e.mask,i=e.motion;return o?g.createElement(b.ZP,(0,v.Z)({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(e){var n=e.className;return g.createElement("div",{style:{zIndex:r},className:l()("".concat(t,"-mask"),n)})}):null}var E=g.memo(function(e){return e.children},function(e,t){return t.cache}),k=g.forwardRef(function(e,t){var n=e.popup,i=e.className,a=e.prefixCls,c=e.style,u=e.target,f=e.onVisibleChanged,d=e.open,p=e.keepDom,m=e.fresh,k=e.onClick,Z=e.mask,C=e.arrow,S=e.arrowPos,O=e.align,P=e.motion,M=e.maskMotion,j=e.forceRender,A=e.getPopupContainer,R=e.autoDestroy,F=e.portal,T=e.zIndex,N=e.onMouseEnter,L=e.onMouseLeave,_=e.onPointerEnter,I=e.ready,z=e.offsetX,H=e.offsetY,B=e.offsetR,D=e.offsetB,V=e.onAlign,W=e.onPrepare,q=e.stretch,G=e.targetWidth,X=e.targetHeight,$="function"==typeof n?n():n,U=d||p,Y=(null==A?void 0:A.length)>0,K=g.useState(!A||!Y),Q=(0,o.Z)(K,2),J=Q[0],ee=Q[1];if((0,h.Z)(function(){!J&&Y&&u&&ee(!0)},[J,Y,u]),!J)return null;var et="auto",en={left:"-1000vw",top:"-1000vh",right:et,bottom:et};if(I||!d){var er,eo=O.points,ei=O.dynamicInset||(null===(er=O._experimental)||void 0===er?void 0:er.dynamicInset),ea=ei&&"r"===eo[0][1],ec=ei&&"b"===eo[0][0];ea?(en.right=B,en.left=et):(en.left=z,en.right=et),ec?(en.bottom=D,en.top=et):(en.top=H,en.bottom=et)}var el={};return q&&(q.includes("height")&&X?el.height=X:q.includes("minHeight")&&X&&(el.minHeight=X),q.includes("width")&&G?el.width=G:q.includes("minWidth")&&G&&(el.minWidth=G)),d||(el.pointerEvents="none"),g.createElement(F,{open:j||U,getContainer:A&&function(){return A(u)},autoDestroy:R},g.createElement(w,{prefixCls:a,open:d,zIndex:T,mask:Z,motion:M}),g.createElement(s.Z,{onResize:V,disabled:!d},function(e){return g.createElement(b.ZP,(0,v.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:j,leavedClassName:"".concat(a,"-hidden")},P,{onAppearPrepare:W,onEnterPrepare:W,visible:d,onVisibleChanged:function(e){var t;null==P||null===(t=P.onVisibleChanged)||void 0===t||t.call(P,e),f(e)}}),function(n,o){var s=n.className,u=n.style,f=l()(a,s,i);return g.createElement("div",{ref:(0,y.sQ)(e,t,o),className:f,style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({"--arrow-x":"".concat(S.x||0,"px"),"--arrow-y":"".concat(S.y||0,"px")},en),el),u),{},{boxSizing:"border-box",zIndex:T},c),onMouseEnter:N,onMouseLeave:L,onPointerEnter:_,onClick:k},C&&g.createElement(x,{prefixCls:a,arrow:C,arrowPos:S,align:O}),g.createElement(E,{cache:!d&&!m},$))})}))}),Z=g.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,o=(0,y.Yr)(n),i=g.useCallback(function(e){(0,y.mH)(t,r?r(e):e)},[r]),a=(0,y.x1)(i,n.ref);return o?g.cloneElement(n,{ref:a}):n}),C=g.createContext(null);function S(e){return e?Array.isArray(e)?e:[e]:[]}var O=n(2857);function P(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function M(e){return e.ownerDocument.defaultView}function j(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=M(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some(function(e){return r.includes(e)})&&t.push(n),n=n.parentElement}return t}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function R(e){return A(parseFloat(e),0)}function F(e,t){var n=(0,r.Z)({},e);return(t||[]).forEach(function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=M(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,c=t.borderLeftWidth,l=t.borderRightWidth,s=e.getBoundingClientRect(),u=e.offsetHeight,f=e.clientHeight,d=e.offsetWidth,p=e.clientWidth,h=R(i),m=R(a),g=R(c),v=R(l),b=A(Math.round(s.width/d*1e3)/1e3),y=A(Math.round(s.height/u*1e3)/1e3),x=h*y,w=g*b,E=0,k=0;if("clip"===r){var Z=R(o);E=Z*b,k=Z*y}var C=s.x+w-E,S=s.y+x-k,O=C+s.width+2*E-w-v*b-(d-p-g-v)*b,P=S+s.height+2*k-x-m*y-(u-f-h-m)*y;n.left=Math.max(n.left,C),n.top=Math.max(n.top,S),n.right=Math.min(n.right,O),n.bottom=Math.min(n.bottom,P)}}),n}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?parseFloat(r[1])/100*e:parseFloat(n)}function N(e,t){var n=(0,o.Z)(t||[],2),r=n[0],i=n[1];return[T(e.width,r),T(e.height,i)]}function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function _(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function I(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(e,r){return r===t?n[e]||"c":e}).join("")}var z=n(83145);n(32559);var H=n(53346),B=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"],D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z;return g.forwardRef(function(t,n){var a,c,v,b,y,x,w,E,R,T,D,V,W,q,G,X,$,U=t.prefixCls,Y=void 0===U?"rc-trigger-popup":U,K=t.children,Q=t.action,J=t.showAction,ee=t.hideAction,et=t.popupVisible,en=t.defaultPopupVisible,er=t.onPopupVisibleChange,eo=t.afterPopupVisibleChange,ei=t.mouseEnterDelay,ea=t.mouseLeaveDelay,ec=void 0===ea?.1:ea,el=t.focusDelay,es=t.blurDelay,eu=t.mask,ef=t.maskClosable,ed=t.getPopupContainer,ep=t.forceRender,eh=t.autoDestroy,em=t.destroyPopupOnHide,eg=t.popup,ev=t.popupClassName,eb=t.popupStyle,ey=t.popupPlacement,ex=t.builtinPlacements,ew=void 0===ex?{}:ex,eE=t.popupAlign,ek=t.zIndex,eZ=t.stretch,eC=t.getPopupClassNameFromAlign,eS=t.fresh,eO=t.alignPoint,eP=t.onPopupClick,eM=t.onPopupAlign,ej=t.arrow,eA=t.popupMotion,eR=t.maskMotion,eF=t.popupTransitionName,eT=t.popupAnimation,eN=t.maskTransitionName,eL=t.maskAnimation,e_=t.className,eI=t.getTriggerDOMNode,ez=(0,i.Z)(t,B),eH=g.useState(!1),eB=(0,o.Z)(eH,2),eD=eB[0],eV=eB[1];(0,h.Z)(function(){eV((0,m.Z)())},[]);var eW=g.useRef({}),eq=g.useContext(C),eG=g.useMemo(function(){return{registerSubPopup:function(e,t){eW.current[e]=t,null==eq||eq.registerSubPopup(e,t)}}},[eq]),eX=(0,p.Z)(),e$=g.useState(null),eU=(0,o.Z)(e$,2),eY=eU[0],eK=eU[1],eQ=(0,d.Z)(function(e){(0,u.S)(e)&&eY!==e&&eK(e),null==eq||eq.registerSubPopup(eX,e)}),eJ=g.useState(null),e0=(0,o.Z)(eJ,2),e1=e0[0],e2=e0[1],e5=g.useRef(null),e6=(0,d.Z)(function(e){(0,u.S)(e)&&e1!==e&&(e2(e),e5.current=e)}),e4=g.Children.only(K),e3=(null==e4?void 0:e4.props)||{},e9={},e8=(0,d.Z)(function(e){var t,n;return(null==e1?void 0:e1.contains(e))||(null===(t=(0,f.A)(e1))||void 0===t?void 0:t.host)===e||e===e1||(null==eY?void 0:eY.contains(e))||(null===(n=(0,f.A)(eY))||void 0===n?void 0:n.host)===e||e===eY||Object.values(eW.current).some(function(t){return(null==t?void 0:t.contains(e))||e===t})}),e7=P(Y,eA,eT,eF),te=P(Y,eR,eL,eN),tt=g.useState(en||!1),tn=(0,o.Z)(tt,2),tr=tn[0],to=tn[1],ti=null!=et?et:tr,ta=(0,d.Z)(function(e){void 0===et&&to(e)});(0,h.Z)(function(){to(et||!1)},[et]);var tc=g.useRef(ti);tc.current=ti;var tl=g.useRef([]);tl.current=[];var ts=(0,d.Z)(function(e){var t;ta(e),(null!==(t=tl.current[tl.current.length-1])&&void 0!==t?t:ti)!==e&&(tl.current.push(e),null==er||er(e))}),tu=g.useRef(),tf=function(){clearTimeout(tu.current)},td=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;tf(),0===t?ts(e):tu.current=setTimeout(function(){ts(e)},1e3*t)};g.useEffect(function(){return tf},[]);var tp=g.useState(!1),th=(0,o.Z)(tp,2),tm=th[0],tg=th[1];(0,h.Z)(function(e){(!e||ti)&&tg(!0)},[ti]);var tv=g.useState(null),tb=(0,o.Z)(tv,2),ty=tb[0],tx=tb[1],tw=g.useState([0,0]),tE=(0,o.Z)(tw,2),tk=tE[0],tZ=tE[1],tC=function(e){tZ([e.clientX,e.clientY])},tS=(a=eO?tk:e1,c=g.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:ew[ey]||{}}),b=(v=(0,o.Z)(c,2))[0],y=v[1],x=g.useRef(0),w=g.useMemo(function(){return eY?j(eY):[]},[eY]),E=g.useRef({}),ti||(E.current={}),R=(0,d.Z)(function(){if(eY&&a&&ti){var e,t,n,i,c,l,s,f=eY.ownerDocument,d=M(eY).getComputedStyle(eY),p=d.width,h=d.height,m=d.position,g=eY.style.left,v=eY.style.top,b=eY.style.right,x=eY.style.bottom,k=eY.style.overflow,Z=(0,r.Z)((0,r.Z)({},ew[ey]),eE),C=f.createElement("div");if(null===(e=eY.parentElement)||void 0===e||e.appendChild(C),C.style.left="".concat(eY.offsetLeft,"px"),C.style.top="".concat(eY.offsetTop,"px"),C.style.position=m,C.style.height="".concat(eY.offsetHeight,"px"),C.style.width="".concat(eY.offsetWidth,"px"),eY.style.left="0",eY.style.top="0",eY.style.right="auto",eY.style.bottom="auto",eY.style.overflow="hidden",Array.isArray(a))n={x:a[0],y:a[1],width:0,height:0};else{var S=a.getBoundingClientRect();n={x:S.x,y:S.y,width:S.width,height:S.height}}var P=eY.getBoundingClientRect(),j=f.documentElement,R=j.clientWidth,T=j.clientHeight,z=j.scrollWidth,H=j.scrollHeight,B=j.scrollTop,D=j.scrollLeft,V=P.height,W=P.width,q=n.height,G=n.width,X=Z.htmlRegion,$="visible",U="visibleFirst";"scroll"!==X&&X!==U&&(X=$);var Y=X===U,K=F({left:-D,top:-B,right:z-D,bottom:H-B},w),Q=F({left:0,top:0,right:R,bottom:T},w),J=X===$?Q:K,ee=Y?Q:J;eY.style.left="auto",eY.style.top="auto",eY.style.right="0",eY.style.bottom="0";var et=eY.getBoundingClientRect();eY.style.left=g,eY.style.top=v,eY.style.right=b,eY.style.bottom=x,eY.style.overflow=k,null===(t=eY.parentElement)||void 0===t||t.removeChild(C);var en=A(Math.round(W/parseFloat(p)*1e3)/1e3),er=A(Math.round(V/parseFloat(h)*1e3)/1e3);if(!(0===en||0===er||(0,u.S)(a)&&!(0,O.Z)(a))){var eo=Z.offset,ei=Z.targetOffset,ea=N(P,eo),ec=(0,o.Z)(ea,2),el=ec[0],es=ec[1],eu=N(n,ei),ef=(0,o.Z)(eu,2),ed=ef[0],ep=ef[1];n.x-=ed,n.y-=ep;var eh=Z.points||[],em=(0,o.Z)(eh,2),eg=em[0],ev=L(em[1]),eb=L(eg),ex=_(n,ev),ek=_(P,eb),eZ=(0,r.Z)({},Z),eC=ex.x-ek.x+el,eS=ex.y-ek.y+es,eO=tt(eC,eS),eP=tt(eC,eS,Q),ej=_(n,["t","l"]),eA=_(P,["t","l"]),eR=_(n,["b","r"]),eF=_(P,["b","r"]),eT=Z.overflow||{},eN=eT.adjustX,eL=eT.adjustY,e_=eT.shiftX,eI=eT.shiftY,ez=function(e){return"boolean"==typeof e?e:e>=0};tn();var eH=ez(eL),eB=eb[0]===ev[0];if(eH&&"t"===eb[0]&&(c>ee.bottom||E.current.bt)){var eD=eS;eB?eD-=V-q:eD=ej.y-eF.y-es;var eV=tt(eC,eD),eW=tt(eC,eD,Q);eV>eO||eV===eO&&(!Y||eW>=eP)?(E.current.bt=!0,eS=eD,es=-es,eZ.points=[I(eb,0),I(ev,0)]):E.current.bt=!1}if(eH&&"b"===eb[0]&&(i<ee.top||E.current.tb)){var eq=eS;eB?eq+=V-q:eq=eR.y-eA.y-es;var eG=tt(eC,eq),eX=tt(eC,eq,Q);eG>eO||eG===eO&&(!Y||eX>=eP)?(E.current.tb=!0,eS=eq,es=-es,eZ.points=[I(eb,0),I(ev,0)]):E.current.tb=!1}var e$=ez(eN),eU=eb[1]===ev[1];if(e$&&"l"===eb[1]&&(s>ee.right||E.current.rl)){var eK=eC;eU?eK-=W-G:eK=ej.x-eF.x-el;var eQ=tt(eK,eS),eJ=tt(eK,eS,Q);eQ>eO||eQ===eO&&(!Y||eJ>=eP)?(E.current.rl=!0,eC=eK,el=-el,eZ.points=[I(eb,1),I(ev,1)]):E.current.rl=!1}if(e$&&"r"===eb[1]&&(l<ee.left||E.current.lr)){var e0=eC;eU?e0+=W-G:e0=eR.x-eA.x-el;var e1=tt(e0,eS),e2=tt(e0,eS,Q);e1>eO||e1===eO&&(!Y||e2>=eP)?(E.current.lr=!0,eC=e0,el=-el,eZ.points=[I(eb,1),I(ev,1)]):E.current.lr=!1}tn();var e5=!0===e_?0:e_;"number"==typeof e5&&(l<Q.left&&(eC-=l-Q.left-el,n.x+G<Q.left+e5&&(eC+=n.x-Q.left+G-e5)),s>Q.right&&(eC-=s-Q.right-el,n.x>Q.right-e5&&(eC+=n.x-Q.right+e5)));var e6=!0===eI?0:eI;"number"==typeof e6&&(i<Q.top&&(eS-=i-Q.top-es,n.y+q<Q.top+e6&&(eS+=n.y-Q.top+q-e6)),c>Q.bottom&&(eS-=c-Q.bottom-es,n.y>Q.bottom-e6&&(eS+=n.y-Q.bottom+e6)));var e4=P.x+eC,e3=P.y+eS,e9=n.x,e8=n.y;null==eM||eM(eY,eZ);var e7=et.right-P.x-(eC+P.width),te=et.bottom-P.y-(eS+P.height);y({ready:!0,offsetX:eC/en,offsetY:eS/er,offsetR:e7/en,offsetB:te/er,arrowX:((Math.max(e4,e9)+Math.min(e4+W,e9+G))/2-e4)/en,arrowY:((Math.max(e3,e8)+Math.min(e3+V,e8+q))/2-e3)/er,scaleX:en,scaleY:er,align:eZ})}function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J,r=P.x+e,o=P.y+t,i=Math.max(r,n.left),a=Math.max(o,n.top);return Math.max(0,(Math.min(r+W,n.right)-i)*(Math.min(o+V,n.bottom)-a))}function tn(){c=(i=P.y+eS)+V,s=(l=P.x+eC)+W}}}),T=function(){y(function(e){return(0,r.Z)((0,r.Z)({},e),{},{ready:!1})})},(0,h.Z)(T,[ey]),(0,h.Z)(function(){ti||T()},[ti]),[b.ready,b.offsetX,b.offsetY,b.offsetR,b.offsetB,b.arrowX,b.arrowY,b.scaleX,b.scaleY,b.align,function(){x.current+=1;var e=x.current;Promise.resolve().then(function(){x.current===e&&R()})}]),tO=(0,o.Z)(tS,11),tP=tO[0],tM=tO[1],tj=tO[2],tA=tO[3],tR=tO[4],tF=tO[5],tT=tO[6],tN=tO[7],tL=tO[8],t_=tO[9],tI=tO[10],tz=(D=void 0===Q?"hover":Q,g.useMemo(function(){var e=S(null!=J?J:D),t=S(null!=ee?ee:D),n=new Set(e),r=new Set(t);return eD&&(n.has("hover")&&(n.delete("hover"),n.add("click")),r.has("hover")&&(r.delete("hover"),r.add("click"))),[n,r]},[eD,D,J,ee])),tH=(0,o.Z)(tz,2),tB=tH[0],tD=tH[1],tV=tB.has("click"),tW=tD.has("click")||tD.has("contextMenu"),tq=(0,d.Z)(function(){tm||tI()});V=function(){tc.current&&eO&&tW&&td(!1)},(0,h.Z)(function(){if(ti&&e1&&eY){var e=j(e1),t=j(eY),n=M(eY),r=new Set([n].concat((0,z.Z)(e),(0,z.Z)(t)));function o(){tq(),V()}return r.forEach(function(e){e.addEventListener("scroll",o,{passive:!0})}),n.addEventListener("resize",o,{passive:!0}),tq(),function(){r.forEach(function(e){e.removeEventListener("scroll",o),n.removeEventListener("resize",o)})}}},[ti,e1,eY]),(0,h.Z)(function(){tq()},[tk,ey]),(0,h.Z)(function(){ti&&!(null!=ew&&ew[ey])&&tq()},[JSON.stringify(eE)]);var tG=g.useMemo(function(){var e=function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var c,l=i[a];if(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}(null===(c=e[l])||void 0===c?void 0:c.points,o,r))return"".concat(t,"-placement-").concat(l)}return""}(ew,Y,t_,eO);return l()(e,null==eC?void 0:eC(t_))},[t_,eC,ew,Y,eO]);g.useImperativeHandle(n,function(){return{nativeElement:e5.current,forceAlign:tq}});var tX=g.useState(0),t$=(0,o.Z)(tX,2),tU=t$[0],tY=t$[1],tK=g.useState(0),tQ=(0,o.Z)(tK,2),tJ=tQ[0],t0=tQ[1],t1=function(){if(eZ&&e1){var e=e1.getBoundingClientRect();tY(e.width),t0(e.height)}};function t2(e,t,n,r){e9[e]=function(o){var i;null==r||r(o),td(t,n);for(var a=arguments.length,c=Array(a>1?a-1:0),l=1;l<a;l++)c[l-1]=arguments[l];null===(i=e3[e])||void 0===i||i.call.apply(i,[e3,o].concat(c))}}(0,h.Z)(function(){ty&&(tI(),ty(),tx(null))},[ty]),(tV||tW)&&(e9.onClick=function(e){var t;tc.current&&tW?td(!1):!tc.current&&tV&&(tC(e),td(!0));for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=e3.onClick)||void 0===t||t.call.apply(t,[e3,e].concat(r))}),W=void 0===ef||ef,q=g.useRef(ti),G=g.useRef(!1),q.current!==ti&&(G.current=!0,q.current=ti),g.useEffect(function(){var e=(0,H.Z)(function(){G.current=!1});return function(){H.Z.cancel(e)}},[ti]),g.useEffect(function(){if(tW&&eY&&(!eu||W)){var e=function(){var e=!1;return[function(t){e=e8(t.target)},function(t){var n=t.target;G.current||!q.current||e||e8(n)||td(!1)}]},t=e(),n=(0,o.Z)(t,2),r=n[0],i=n[1],a=e(),c=(0,o.Z)(a,2),l=c[0],s=c[1],u=M(eY);u.addEventListener("mousedown",r,!0),u.addEventListener("click",i,!0),u.addEventListener("contextmenu",i,!0);var d=(0,f.A)(e1);return d&&(d.addEventListener("mousedown",l,!0),d.addEventListener("click",s,!0),d.addEventListener("contextmenu",s,!0)),function(){u.removeEventListener("mousedown",r,!0),u.removeEventListener("click",i,!0),u.removeEventListener("contextmenu",i,!0),d&&(d.removeEventListener("mousedown",l,!0),d.removeEventListener("click",s,!0),d.removeEventListener("contextmenu",s,!0))}}},[tW,e1,eY,eu,W]);var t5=tB.has("hover"),t6=tD.has("hover");t5&&(t2("onMouseEnter",!0,ei,function(e){tC(e)}),t2("onPointerEnter",!0,ei,function(e){tC(e)}),X=function(e){(ti||tm)&&null!=eY&&eY.contains(e.target)&&td(!0,ei)},eO&&(e9.onMouseMove=function(e){var t;null===(t=e3.onMouseMove)||void 0===t||t.call(e3,e)})),t6&&(t2("onMouseLeave",!1,ec),t2("onPointerLeave",!1,ec),$=function(){td(!1,ec)}),tB.has("focus")&&t2("onFocus",!0,el),tD.has("focus")&&t2("onBlur",!1,es),tB.has("contextMenu")&&(e9.onContextMenu=function(e){var t;tc.current&&tD.has("contextMenu")?td(!1):(tC(e),td(!0)),e.preventDefault();for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=e3.onContextMenu)||void 0===t||t.call.apply(t,[e3,e].concat(r))}),e_&&(e9.className=l()(e3.className,e_));var t4=(0,r.Z)((0,r.Z)({},e3),e9),t3={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(function(e){ez[e]&&(t3[e]=function(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=t4[e])||void 0===t||t.call.apply(t,[t4].concat(r)),ez[e].apply(ez,r)})});var t9=g.cloneElement(e4,(0,r.Z)((0,r.Z)({},t4),t3)),t8=ej?(0,r.Z)({},!0!==ej?ej:{}):null;return g.createElement(g.Fragment,null,g.createElement(s.Z,{disabled:!ti,ref:e6,onResize:function(){t1(),tq()}},g.createElement(Z,{getTriggerDOMNode:eI},t9)),g.createElement(C.Provider,{value:eG},g.createElement(k,{portal:e,ref:eQ,prefixCls:Y,popup:eg,className:l()(ev,tG),style:eb,target:e1,onMouseEnter:X,onMouseLeave:$,onPointerEnter:X,zIndex:ek,open:ti,keepDom:tm,fresh:eS,onClick:eP,mask:eu,motion:e7,maskMotion:te,onVisibleChanged:function(e){tg(!1),tI(),null==eo||eo(e)},onPrepare:function(){return new Promise(function(e){t1(),tx(function(){return e})})},forceRender:ep,autoDestroy:eh||em||!1,getPopupContainer:ed,align:t_,arrow:t8,arrowPos:{x:tF,y:tT},ready:tP,offsetX:tM,offsetY:tj,offsetR:tA,offsetB:tR,onAlign:tq,stretch:eZ,targetWidth:tU/tN,targetHeight:tJ/tL})))})}(a.Z)},20831:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(5853),o=n(1526),i=n(2265);let a=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],c=e=>({_s:e,status:a[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),l=e=>e?6:5,s=(e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return l(t)}},u=e=>"object"==typeof e?[e.enter,e.exit]:[e,e],f=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),d=(e,t,n,r,o)=>{clearTimeout(r.current);let i=c(e);t(i),n.current=i,o&&o({current:i})},p=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:a,mountOnEnter:p,unmountOnExit:h,onStateChange:m}={})=>{let[g,v]=(0,i.useState)(()=>c(a?2:l(p))),b=(0,i.useRef)(g),y=(0,i.useRef)(),[x,w]=u(o),E=(0,i.useCallback)(()=>{let e=s(b.current._s,h);e&&d(e,v,b,y,m)},[m,h]),k=(0,i.useCallback)(o=>{let i=e=>{switch(d(e,v,b,y,m),e){case 1:x>=0&&(y.current=setTimeout(E,x));break;case 4:w>=0&&(y.current=setTimeout(E,w));break;case 0:case 3:y.current=f(i,e)}},a=b.current.isEnter;"boolean"!=typeof o&&(o=!a),o?a||i(e?n?0:1:2):a&&i(t?r?3:4:l(h))},[E,m,e,t,n,r,x,w,h]);return(0,i.useEffect)(()=>()=>clearTimeout(y.current),[]),[g,k,E]};var h=n(7084),m=n(65954),g=n(1153);let v=e=>{var t=(0,r._T)(e,[]);return i.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),i.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var b=n(26898);let y={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},x=e=>"light"!==e?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}},w=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,g.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,g.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,g.bM)(t,b.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,g.bM)(t,b.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,g.bM)(t,b.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,g.bM)(t,b.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,g.bM)(t,b.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,g.bM)(t,b.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,g.bM)("transparent").bgColor,hoverBgColor:t?(0,m.q)((0,g.bM)(t,b.K.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?(0,g.bM)(t,b.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,g.bM)(t,b.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,g.bM)(t,b.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,g.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},E=(0,g.fn)("Button"),k=e=>{let{loading:t,iconSize:n,iconPosition:r,Icon:o,needMargin:a,transitionStatus:c}=e,l=a?r===h.zS.Left?(0,m.q)("-ml-1","mr-1.5"):(0,m.q)("-mr-1","ml-1.5"):"",s=(0,m.q)("w-0 h-0"),u={default:s,entering:s,entered:n,exiting:n,exited:s};return t?i.createElement(v,{className:(0,m.q)(E("icon"),"animate-spin shrink-0",l,u.default,u[c]),style:{transition:"width 150ms"}}):i.createElement(o,{className:(0,m.q)(E("icon"),"shrink-0",n,l)})},Z=i.forwardRef((e,t)=>{let{icon:n,iconPosition:a=h.zS.Left,size:c=h.u8.SM,color:l,variant:s="primary",disabled:u,loading:f=!1,loadingText:d,children:v,tooltip:b,className:Z}=e,C=(0,r._T)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),S=f||u,O=void 0!==n||f,P=f&&d,M=!(!v&&!P),j=(0,m.q)(y[c].height,y[c].width),A="light"!==s?(0,m.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",R=w(s,l),F=x(s)[c],{tooltipProps:T,getReferenceProps:N}=(0,o.l)(300),[L,_]=p({timeout:50});return(0,i.useEffect)(()=>{_(f)},[f]),i.createElement("button",Object.assign({ref:(0,g.lq)([t,T.refs.setReference]),className:(0,m.q)(E("root"),"flex-shrink-0 inline-flex justify-center items-center group font-medium outline-none",A,F.paddingX,F.paddingY,F.fontSize,R.textColor,R.bgColor,R.borderColor,R.hoverBorderColor,S?"opacity-50 cursor-not-allowed":(0,m.q)(w(s,l).hoverTextColor,w(s,l).hoverBgColor,w(s,l).hoverBorderColor),Z),disabled:S},N,C),i.createElement(o.Z,Object.assign({text:b},T)),O&&a!==h.zS.Right?i.createElement(k,{loading:f,iconSize:j,iconPosition:a,Icon:n,transitionStatus:L.status,needMargin:M}):null,P||v?i.createElement("span",{className:(0,m.q)(E("text"),"text-tremor-default whitespace-nowrap")},P?d:v):null,O&&a===h.zS.Right?i.createElement(k,{loading:f,iconSize:j,iconPosition:a,Icon:n,transitionStatus:L.status,needMargin:M}):null)});Z.displayName="Button"},12514:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(5853),o=n(2265),i=n(7084),a=n(26898),c=n(65954),l=n(1153);let s=(0,l.fn)("Card"),u=e=>{if(!e)return"";switch(e){case i.zS.Left:return"border-l-4";case i.m.Top:return"border-t-4";case i.zS.Right:return"border-r-4";case i.m.Bottom:return"border-b-4";default:return""}},f=o.forwardRef((e,t)=>{let{decoration:n="",decorationColor:i,children:f,className:d}=e,p=(0,r._T)(e,["decoration","decorationColor","children","className"]);return o.createElement("div",Object.assign({ref:t,className:(0,c.q)(s("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",i?(0,l.bM)(i,a.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",u(n),d)},p),f)});f.displayName="Card"},84264:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(26898),o=n(65954),i=n(1153),a=n(2265);let c=a.forwardRef((e,t)=>{let{color:n,className:c,children:l}=e;return a.createElement("p",{ref:t,className:(0,o.q)("text-tremor-default",n?(0,i.bM)(n,r.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),c)},l)});c.displayName="Text"},96761:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),o=n(26898),i=n(65954),a=n(1153),c=n(2265);let l=c.forwardRef((e,t)=>{let{color:n,children:l,className:s}=e,u=(0,r._T)(e,["color","children","className"]);return c.createElement("p",Object.assign({ref:t,className:(0,i.q)("font-medium text-tremor-title",n?(0,a.bM)(n,o.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",s)},u),l)});l.displayName="Title"},1526:function(e,t,n){"use strict";n.d(t,{Z:function(){return eH},l:function(){return ez}});var r=n(2265),o=n.t(r,2),i=n(54887);function a(e){return s(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function l(e){var t;return null==(t=(s(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function s(e){return e instanceof Node||e instanceof c(e).Node}function u(e){return e instanceof Element||e instanceof c(e).Element}function f(e){return e instanceof HTMLElement||e instanceof c(e).HTMLElement}function d(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function p(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function h(e){let t=g(),n=b(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function m(e){let t=x(e);for(;f(t)&&!v(t);){if(h(t))return t;t=x(t)}return null}function g(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function v(e){return["html","body","#document"].includes(a(e))}function b(e){return c(e).getComputedStyle(e)}function y(e){return u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function x(e){if("html"===a(e))return e;let t=e.assignedSlot||e.parentNode||d(e)&&e.host||l(e);return d(t)?t.host:t}function w(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=x(t);return v(n)?t.ownerDocument?t.ownerDocument.body:t.body:f(n)&&p(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=c(o);return i?t.concat(a,a.visualViewport||[],p(o)?o:[],a.frameElement&&n?w(a.frameElement):[]):t.concat(o,w(o,[],n))}let E=Math.min,k=Math.max,Z=Math.round,C=Math.floor,S=e=>({x:e,y:e}),O={left:"right",right:"left",bottom:"top",top:"bottom"},P={start:"end",end:"start"};function M(e,t){return"function"==typeof e?e(t):e}function j(e){return e.split("-")[0]}function A(e){return e.split("-")[1]}function R(e){return"x"===e?"y":"x"}function F(e){return"y"===e?"height":"width"}function T(e){return["top","bottom"].includes(j(e))?"y":"x"}function N(e){return e.replace(/start|end/g,e=>P[e])}function L(e){return e.replace(/left|right|bottom|top/g,e=>O[e])}function _(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function I(e,t,n){let r,{reference:o,floating:i}=e,a=T(t),c=R(T(t)),l=F(c),s=j(t),u="y"===a,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;switch(s){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(A(t)){case"start":r[c]-=p*(n&&u?-1:1);break;case"end":r[c]+=p*(n&&u?-1:1)}return r}let z=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=I(s,r,l),d=r,p={},h=0;for(let n=0;n<c.length;n++){let{name:i,fn:m}=c[n],{x:g,y:v,data:b,reset:y}=await m({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,f=null!=v?v:f,p={...p,[i]:{...p[i],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(d=y.placement),y.rects&&(s=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:u,y:f}=I(s,d,l)),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};async function H(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:a,elements:c,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=M(t,e),h="number"!=typeof p?{top:0,right:0,bottom:0,left:0,...p}:{top:p,right:p,bottom:p,left:p},m=c[d?"floating"===f?"reference":"floating":f],g=_(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:s,rootBoundary:u,strategy:l})),v="floating"===f?{...a.floating,x:r,y:o}:a.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),y=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=_(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-x.top+h.top)/y.y,bottom:(x.bottom-g.bottom+h.bottom)/y.y,left:(g.left-x.left+h.left)/y.x,right:(x.right-g.right+h.right)/y.x}}async function B(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),a=j(n),c=A(n),l="y"===T(n),s=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=M(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&"number"==typeof h&&(p="end"===c?-1*h:h),l?{x:p*u,y:d*s}:{x:d*s,y:p*u}}function D(e){let t=b(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=f(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Z(n)!==i||Z(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function V(e){return u(e)?e:e.contextElement}function W(e){let t=V(e);if(!f(t))return S(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=D(t),a=(i?Z(n.width):n.width)/r,c=(i?Z(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}let q=S(0);function G(e){let t=c(e);return g()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:q}function X(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),a=V(e),l=S(1);t&&(r?u(r)&&(l=W(r)):l=W(e));let s=(void 0===(o=n)&&(o=!1),r&&(!o||r===c(a))&&o)?G(a):S(0),f=(i.left+s.x)/l.x,d=(i.top+s.y)/l.y,p=i.width/l.x,h=i.height/l.y;if(a){let e=c(a),t=r&&u(r)?c(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=W(n),t=n.getBoundingClientRect(),r=b(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;f*=e.x,d*=e.y,p*=e.x,h*=e.y,f+=o,d+=i,n=c(n).frameElement}}return _({width:p,height:h,x:f,y:d})}let $=[":popover-open",":modal"];function U(e){let t=!1,n=0,r=0;$.forEach(n=>{!function(n){try{t=t||e.matches(n)}catch(e){}}(n)});let o=m(e);if(t&&o){let e=o.getBoundingClientRect();n=e.x,r=e.y}return[t,n,r]}function Y(e){return X(l(e)).left+y(e).scrollLeft}function K(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=c(e),r=l(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;let e=g();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}(e,n);else if("document"===t)r=function(e){let t=l(e),n=y(e),r=e.ownerDocument.body,o=k(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=k(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+Y(e),c=-n.scrollTop;return"rtl"===b(r).direction&&(a+=k(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}(l(e));else if(u(t))r=function(e,t){let n=X(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=f(e)?W(e):S(1),a=e.clientWidth*i.x;return{width:a,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=G(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return _(r)}function Q(e,t){return f(e)&&"fixed"!==b(e).position?t?t(e):e.offsetParent:null}function J(e,t){let n=c(e);if(!f(e))return n;let r=Q(e,t);for(;r&&["table","td","th"].includes(a(r))&&"static"===b(r).position;)r=Q(r,t);return r&&("html"===a(r)||"body"===a(r)&&"static"===b(r).position&&!h(r))?n:r||m(e)||n}let ee=async function(e){let t=this.getOffsetParent||J,n=this.getDimensions;return{reference:function(e,t,n,r){let o=f(t),i=l(t),c="fixed"===n,s=X(e,!0,c,t),u={scrollLeft:0,scrollTop:0},d=S(0);if(o||!o&&!c){if(("body"!==a(t)||p(i))&&(u=y(t)),o){let e=X(t,!0,c,t);d.x=e.x+t.clientLeft,d.y=e.y+t.clientTop}else i&&(d.x=Y(i))}let h=s.left+u.scrollLeft-d.x,m=s.top+u.scrollTop-d.y,[g,v,b]=U(r);return g&&(h+=v,m+=b,o&&(h+=t.clientLeft,m+=t.clientTop)),{x:h,y:m,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}},et={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=l(r),[c]=t?U(t.floating):[!1];if(r===i||c)return n;let s={scrollLeft:0,scrollTop:0},u=S(1),d=S(0),h=f(r);if((h||!h&&"fixed"!==o)&&(("body"!==a(r)||p(i))&&(s=y(r)),f(r))){let e=X(r);u=W(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+d.x,y:n.y*u.y-s.scrollTop*u.y+d.y}},getDocumentElement:l,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?function(e,t){let n=t.get(e);if(n)return n;let r=w(e,[],!1).filter(e=>u(e)&&"body"!==a(e)),o=null,i="fixed"===b(e).position,c=i?x(e):e;for(;u(c)&&!v(c);){let t=b(c),n=h(c);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||p(c)&&!n&&function e(t,n){let r=x(t);return!(r===n||!u(r)||v(r))&&("fixed"===b(r).position||e(r,n))}(e,c))?r=r.filter(e=>e!==c):o=t,c=x(c)}return t.set(e,r),r}(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((e,n)=>{let r=K(t,n,o);return e.top=k(r.top,e.top),e.right=E(r.right,e.right),e.bottom=E(r.bottom,e.bottom),e.left=k(r.left,e.left),e},K(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:J,getElementRects:ee,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=D(e);return{width:t,height:n}},getScale:W,isElement:u,isRTL:function(e){return"rtl"===b(e).direction}};function en(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,f=V(e),d=i||a?[...f?w(f):[],...w(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});let p=f&&s?function(e,t){let n,r=null,o=l(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function a(c,l){void 0===c&&(c=!1),void 0===l&&(l=1),i();let{left:s,top:u,width:f,height:d}=e.getBoundingClientRect();if(c||t(),!f||!d)return;let p=C(u),h=C(o.clientWidth-(s+f)),m={rootMargin:-p+"px "+-h+"px "+-C(o.clientHeight-(u+d))+"px "+-C(s)+"px",threshold:k(0,E(1,l))||1},g=!0;function v(e){let t=e[0].intersectionRatio;if(t!==l){if(!g)return a();t?a(!1,t):n=setTimeout(()=>{a(!1,1e-7)},100)}g=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(f,n):null,h=-1,m=null;c&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===f&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),f&&!u&&m.observe(f),m.observe(t));let g=u?X(e):null;return u&&function t(){let r=X(e);g&&(r.x!==g.x||r.y!==g.y||r.width!==g.width||r.height!==g.height)&&n(),g=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==p||p(),null==(e=m)||e.disconnect(),m=null,u&&cancelAnimationFrame(o)}}let er=(e,t,n)=>{let r=new Map,o={platform:et,...n},i={...o.platform,_c:r};return z(e,t,{...o,platform:i})};var eo="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ei(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!ei(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ei(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ea(e){let t=r.useRef(e);return eo(()=>{t.current=e}),t}var ec="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let el=!1,es=0,eu=()=>"floating-ui-"+es++,ef=o["useId".toString()]||function(){let[e,t]=r.useState(()=>el?eu():void 0);return ec(()=>{null==e&&t(eu())},[]),r.useEffect(()=>{el||(el=!0)},[]),e},ed=r.createContext(null),ep=r.createContext(null),eh=()=>{var e;return(null==(e=r.useContext(ed))?void 0:e.id)||null},em=()=>r.useContext(ep);function eg(e){return(null==e?void 0:e.ownerDocument)||document}function ev(e){return eg(e).defaultView||window}function eb(e){return!!e&&e instanceof ev(e).Element}function ey(e){return!!e&&e instanceof ev(e).HTMLElement}function ex(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ew(e){let t=(0,r.useRef)(e);return ec(()=>{t.current=e}),t}let eE="data-floating-ui-safe-polygon";function ek(e,t,n){return n&&!ex(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let eZ=function(e,t){let{enabled:n=!0,delay:o=0,handleClose:i=null,mouseOnly:a=!1,restMs:c=0,move:l=!0}=void 0===t?{}:t,{open:s,onOpenChange:u,dataRef:f,events:d,elements:{domReference:p,floating:h},refs:m}=e,g=em(),v=eh(),b=ew(i),y=ew(o),x=r.useRef(),w=r.useRef(),E=r.useRef(),k=r.useRef(),Z=r.useRef(!0),C=r.useRef(!1),S=r.useRef(()=>{}),O=r.useCallback(()=>{var e;let t=null==(e=f.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[f]);r.useEffect(()=>{if(n)return d.on("dismiss",e),()=>{d.off("dismiss",e)};function e(){clearTimeout(w.current),clearTimeout(k.current),Z.current=!0}},[n,d]),r.useEffect(()=>{if(!n||!b.current||!s)return;function e(){O()&&u(!1)}let t=eg(h).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[h,s,u,n,b,f,O]);let P=r.useCallback(function(e){void 0===e&&(e=!0);let t=ek(y.current,"close",x.current);t&&!E.current?(clearTimeout(w.current),w.current=setTimeout(()=>u(!1),t)):e&&(clearTimeout(w.current),u(!1))},[y,u]),M=r.useCallback(()=>{S.current(),E.current=void 0},[]),j=r.useCallback(()=>{if(C.current){let e=eg(m.floating.current).body;e.style.pointerEvents="",e.removeAttribute(eE),C.current=!1}},[m]);return r.useEffect(()=>{if(n&&eb(p))return s&&p.addEventListener("mouseleave",i),null==h||h.addEventListener("mouseleave",i),l&&p.addEventListener("mousemove",r,{once:!0}),p.addEventListener("mouseenter",r),p.addEventListener("mouseleave",o),()=>{s&&p.removeEventListener("mouseleave",i),null==h||h.removeEventListener("mouseleave",i),l&&p.removeEventListener("mousemove",r),p.removeEventListener("mouseenter",r),p.removeEventListener("mouseleave",o)};function t(){return!!f.current.openEvent&&["click","mousedown"].includes(f.current.openEvent.type)}function r(e){if(clearTimeout(w.current),Z.current=!1,a&&!ex(x.current)||c>0&&0===ek(y.current,"open"))return;f.current.openEvent=e;let t=ek(y.current,"open",x.current);t?w.current=setTimeout(()=>{u(!0)},t):u(!0)}function o(n){if(t())return;S.current();let r=eg(h);if(clearTimeout(k.current),b.current){s||clearTimeout(w.current),E.current=b.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){j(),M(),P()}});let t=E.current;r.addEventListener("mousemove",t),S.current=()=>{r.removeEventListener("mousemove",t)};return}P()}function i(n){t()||null==b.current||b.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){j(),M(),P()}})(n)}},[p,h,n,e,a,c,l,P,M,j,u,s,g,y,b,f]),ec(()=>{var e,t,r;if(n&&s&&null!=(e=b.current)&&e.__options.blockPointerEvents&&O()){let e=eg(h).body;if(e.setAttribute(eE,""),e.style.pointerEvents="none",C.current=!0,eb(p)&&h){let e=null==g?void 0:null==(t=g.nodesRef.current.find(e=>e.id===v))?void 0:null==(r=t.context)?void 0:r.elements.floating;return e&&(e.style.pointerEvents=""),p.style.pointerEvents="auto",h.style.pointerEvents="auto",()=>{p.style.pointerEvents="",h.style.pointerEvents=""}}}},[n,s,v,h,p,g,b,f,O]),ec(()=>{s||(x.current=void 0,M(),j())},[s,M,j]),r.useEffect(()=>()=>{M(),clearTimeout(w.current),clearTimeout(k.current),j()},[n,M,j]),r.useMemo(()=>{if(!n)return{};function e(e){x.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){s||0===c||(clearTimeout(k.current),k.current=setTimeout(()=>{Z.current||u(!0)},c))}},floating:{onMouseEnter(){clearTimeout(w.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),P(!1)}}}},[d,n,c,s,u,P])};function eC(e,t){if(!e||!t)return!1;let n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&function(e){if("undefined"==typeof ShadowRoot)return!1;let t=ev(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function eS(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})||[],r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})})||[],n=n.concat(r);return n}let eO=o["useInsertionEffect".toString()]||(e=>e());function eP(e){let t=r.useRef(()=>{});return eO(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function eM(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}let ej={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},eA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},eR=function(e){var t,n;return void 0===e&&(e=!0),{escapeKeyBubbles:"boolean"==typeof e?e:null==(t=e.escapeKey)||t,outsidePressBubbles:"boolean"==typeof e?e:null==(n=e.outsidePress)||n}},eF=function(e,t){let{open:n,onOpenChange:o,events:i,nodeId:a,elements:{reference:c,domReference:l,floating:s},dataRef:u}=e,{enabled:f=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:h="pointerdown",referencePress:m=!1,referencePressEvent:g="pointerdown",ancestorScroll:v=!1,bubbles:b=!0}=void 0===t?{}:t,y=em(),x=null!=eh(),E=eP("function"==typeof p?p:()=>!1),k="function"==typeof p?E:p,Z=r.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:S}=eR(b);return r.useEffect(()=>{if(!n||!f)return;function e(e){if("Escape"===e.key){let e=y?eS(y.nodesRef.current,a):[];if(e.length>0){let t=!0;if(e.forEach(e=>{var n;if(null!=(n=e.context)&&n.open&&!e.context.dataRef.current.__escapeKeyBubbles){t=!1;return}}),!t)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1)}}function t(e){var t;let n=Z.current;if(Z.current=!1,n||"function"==typeof k&&!k(e))return;let r="composedPath"in e?e.composedPath()[0]:e.target;if(ey(r)&&s){let t=s.ownerDocument.defaultView||window,n=r.scrollWidth>r.clientWidth,o=r.scrollHeight>r.clientHeight,i=o&&e.offsetX>r.clientWidth;if(o&&"rtl"===t.getComputedStyle(r).direction&&(i=e.offsetX<=r.offsetWidth-r.clientWidth),i||n&&e.offsetY>r.clientHeight)return}let c=y&&eS(y.nodesRef.current,a).some(t=>{var n;return eM(e,null==(n=t.context)?void 0:n.elements.floating)});if(eM(e,s)||eM(e,l)||c)return;let u=y?eS(y.nodesRef.current,a):[];if(u.length>0){let e=!0;if(u.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:function(e){if(0===e.mozInputSource&&e.isTrusted)return!0;let t=/Android/i;return(t.test(function(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||t.test(function(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}(e)||0===(t=e).width&&0===t.height||1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"!==t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail}}),o(!1)}function r(){o(!1)}u.current.__escapeKeyBubbles=C,u.current.__outsidePressBubbles=S;let p=eg(s);d&&p.addEventListener("keydown",e),k&&p.addEventListener(h,t);let m=[];return v&&(eb(l)&&(m=w(l)),eb(s)&&(m=m.concat(w(s))),!eb(c)&&c&&c.contextElement&&(m=m.concat(w(c.contextElement)))),(m=m.filter(e=>{var t;return e!==(null==(t=p.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",r,{passive:!0})}),()=>{d&&p.removeEventListener("keydown",e),k&&p.removeEventListener(h,t),m.forEach(e=>{e.removeEventListener("scroll",r)})}},[u,s,l,c,d,k,h,i,y,a,n,o,v,f,C,S,x]),r.useEffect(()=>{Z.current=!1},[k,h]),r.useMemo(()=>f?{reference:{[ej[g]]:()=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1))}},floating:{[eA[h]]:()=>{Z.current=!0}}}:{},[f,i,m,h,g,o])},eT=function(e,t){let{open:n,onOpenChange:o,dataRef:i,events:a,refs:c,elements:{floating:l,domReference:s}}=e,{enabled:u=!0,keyboardOnly:f=!0}=void 0===t?{}:t,d=r.useRef(""),p=r.useRef(!1),h=r.useRef();return r.useEffect(()=>{if(!u)return;let e=eg(l).defaultView||window;function t(){!n&&ey(s)&&s===function(e){let t=e.activeElement;for(;(null==(n=t)?void 0:null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}(eg(s))&&(p.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}},[l,s,n,u]),r.useEffect(()=>{if(u)return a.on("dismiss",e),()=>{a.off("dismiss",e)};function e(e){("referencePress"===e.type||"escapeKey"===e.type)&&(p.current=!0)}},[a,u]),r.useEffect(()=>()=>{clearTimeout(h.current)},[]),r.useMemo(()=>u?{reference:{onPointerDown(e){let{pointerType:t}=e;d.current=t,p.current=!!(t&&f)},onMouseLeave(){p.current=!1},onFocus(e){var t;p.current||"focus"===e.type&&(null==(t=i.current.openEvent)?void 0:t.type)==="mousedown"&&i.current.openEvent&&eM(i.current.openEvent,s)||(i.current.openEvent=e.nativeEvent,o(!0))},onBlur(e){p.current=!1;let t=e.relatedTarget,n=eb(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");h.current=setTimeout(()=>{eC(c.floating.current,t)||eC(s,t)||n||o(!1)})}}}:{},[u,f,s,c,i,o])},eN=function(e,t){let{open:n}=e,{enabled:o=!0,role:i="dialog"}=void 0===t?{}:t,a=ef(),c=ef();return r.useMemo(()=>{let e={id:a,role:i};return o?"tooltip"===i?{reference:{"aria-describedby":n?a:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":n?a:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:c}},floating:{...e,..."menu"===i&&{"aria-labelledby":c}}}:{}},[o,i,n,a,c])};function eL(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof o){var i;null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];null==(e=r.get(n))||e.forEach(e=>e(...o))}}}else e[n]=o}),e),{})}}let e_=function(e){void 0===e&&(e=[]);let t=e,n=r.useCallback(t=>eL(t,e,"reference"),t),o=r.useCallback(t=>eL(t,e,"floating"),t),i=r.useCallback(t=>eL(t,e,"item"),e.map(e=>null==e?void 0:e.item));return r.useMemo(()=>({getReferenceProps:n,getFloatingProps:o,getItemProps:i}),[n,o,i])};var eI=n(65954);let ez=e=>{var t,n;let[o,a]=(0,r.useState)(!1),[c,l]=(0,r.useState)(),{x:s,y:u,refs:f,strategy:d,context:p}=function(e){void 0===e&&(e={});let{open:t=!1,onOpenChange:n,nodeId:o}=e,a=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,whileElementsMounted:c,open:l}=e,[s,u]=r.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,d]=r.useState(o);ei(f,o)||d(o);let p=r.useRef(null),h=r.useRef(null),m=r.useRef(s),g=ea(c),v=ea(a),[b,y]=r.useState(null),[x,w]=r.useState(null),E=r.useCallback(e=>{p.current!==e&&(p.current=e,y(e))},[]),k=r.useCallback(e=>{h.current!==e&&(h.current=e,w(e))},[]),Z=r.useCallback(()=>{if(!p.current||!h.current)return;let e={placement:t,strategy:n,middleware:f};v.current&&(e.platform=v.current),er(p.current,h.current,e).then(e=>{let t={...e,isPositioned:!0};C.current&&!ei(m.current,t)&&(m.current=t,i.flushSync(()=>{u(t)}))})},[f,t,n,v]);eo(()=>{!1===l&&m.current.isPositioned&&(m.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[l]);let C=r.useRef(!1);eo(()=>(C.current=!0,()=>{C.current=!1}),[]),eo(()=>{if(b&&x){if(g.current)return g.current(b,x,Z);Z()}},[b,x,Z,g]);let S=r.useMemo(()=>({reference:p,floating:h,setReference:E,setFloating:k}),[E,k]),O=r.useMemo(()=>({reference:b,floating:x}),[b,x]);return r.useMemo(()=>({...s,update:Z,refs:S,elements:O,reference:E,floating:k}),[s,Z,S,O,E,k])}(e),c=em(),l=r.useRef(null),s=r.useRef({}),u=r.useState(()=>(function(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}})())[0],[f,d]=r.useState(null),p=r.useCallback(e=>{let t=eb(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a.refs.setReference(t)},[a.refs]),h=r.useCallback(e=>{(eb(e)||null===e)&&(l.current=e,d(e)),(eb(a.refs.reference.current)||null===a.refs.reference.current||null!==e&&!eb(e))&&a.refs.setReference(e)},[a.refs]),m=r.useMemo(()=>({...a.refs,setReference:h,setPositionReference:p,domReference:l}),[a.refs,h,p]),g=r.useMemo(()=>({...a.elements,domReference:f}),[a.elements,f]),v=eP(n),b=r.useMemo(()=>({...a,refs:m,elements:g,dataRef:s,nodeId:o,events:u,open:t,onOpenChange:v}),[a,o,u,t,v,m,g]);return ec(()=>{let e=null==c?void 0:c.nodesRef.current.find(e=>e.id===o);e&&(e.context=b)}),r.useMemo(()=>({...a,context:b,refs:m,reference:h,positionReference:p}),[a,m,b,h,p])}({open:o,onOpenChange:t=>{t&&e?l(setTimeout(()=>{a(t)},e)):(clearTimeout(c),a(t))},placement:"top",whileElementsMounted:en,middleware:[{name:"offset",options:5,async fn(e){var t,n;let{x:r,y:o,placement:i,middlewareData:a}=e,c=await B(e,5);return i===(null==(t=a.offset)?void 0:t.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:r+c.x,y:o+c.y,data:{...c,placement:i}}}},{name:"flip",options:t={fallbackAxisSideDirection:"start"},async fn(e){var n,r,o,i,a;let{placement:c,middlewareData:l,rects:s,initialPlacement:u,platform:f,elements:d}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...y}=M(t,e);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let x=j(c),w=j(u)===u,E=await (null==f.isRTL?void 0:f.isRTL(d.floating)),k=m||(w||!b?[L(u)]:function(e){let t=L(e);return[N(e),t,N(t)]}(u));m||"none"===v||k.push(...function(e,t,n,r){let o=A(e),i=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(j(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(N)))),i}(u,b,v,E));let Z=[u,...k],C=await H(e,y),S=[],O=(null==(r=l.flip)?void 0:r.overflows)||[];if(p&&S.push(C[x]),h){let e=function(e,t,n){void 0===n&&(n=!1);let r=A(e),o=R(T(e)),i=F(o),a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=L(a)),[a,L(a)]}(c,s,E);S.push(C[e[0]],C[e[1]])}if(O=[...O,{placement:c,overflows:S}],!S.every(e=>e<=0)){let e=((null==(o=l.flip)?void 0:o.index)||0)+1,t=Z[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(i=O.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(g){case"bestFit":{let e=null==(a=O.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(n=e);break}case"initialPlacement":n=u}if(c!==n)return{reset:{placement:n}}}return{}}},(void 0===n&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=M(n,e),s={x:t,y:r},u=await H(e,l),f=T(j(o)),d=R(f),p=s[d],h=s[f];if(i){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=p+u[e],r=p-u[t];p=k(n,E(p,r))}if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=h+u[e],r=h-u[t];h=k(n,E(h,r))}let m=c.fn({...e,[d]:p,[f]:h});return{...m,data:{x:m.x-t,y:m.y-r}}}})]}),h=eZ(p,{move:!1}),{getReferenceProps:m,getFloatingProps:g}=e_([h,eT(p),eF(p),eN(p,{role:"tooltip"})]);return{tooltipProps:{open:o,x:s,y:u,refs:f,strategy:d,getFloatingProps:g},getReferenceProps:m}},eH=e=>{let{text:t,open:n,x:o,y:i,refs:a,strategy:c,getFloatingProps:l}=e;return n&&t?r.createElement("div",Object.assign({className:(0,eI.q)("max-w-xs text-sm z-20 rounded-tremor-default opacity-100 px-2.5 py-1","text-white bg-tremor-background-emphasis","text-white dark:bg-dark-tremor-background-subtle"),ref:a.setFloating,style:{position:c,top:null!=i?i:0,left:null!=o?o:0}},l()),t):null};eH.displayName="Tooltip"},7084:function(e,t,n){"use strict";n.d(t,{fr:function(){return o},m:function(){return c},u8:function(){return i},wu:function(){return r},zS:function(){return a}});let r={Increase:"increase",ModerateIncrease:"moderateIncrease",Decrease:"decrease",ModerateDecrease:"moderateDecrease",Unchanged:"unchanged"},o={Slate:"slate",Gray:"gray",Zinc:"zinc",Neutral:"neutral",Stone:"stone",Red:"red",Orange:"orange",Amber:"amber",Yellow:"yellow",Lime:"lime",Green:"green",Emerald:"emerald",Teal:"teal",Cyan:"cyan",Sky:"sky",Blue:"blue",Indigo:"indigo",Violet:"violet",Purple:"purple",Fuchsia:"fuchsia",Pink:"pink",Rose:"rose"},i={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},a={Left:"left",Right:"right"},c={Top:"top",Bottom:"bottom"}},26898:function(e,t,n){"use strict";n.d(t,{K:function(){return o},s:function(){return i}});var r=n(7084);let o={canvasBackground:50,lightBackground:100,background:500,darkBackground:600,darkestBackground:800,lightBorder:200,border:500,darkBorder:700,lightRing:200,ring:300,lightText:400,text:500,darkText:700,darkestText:900,icon:500},i=[r.fr.Blue,r.fr.Cyan,r.fr.Sky,r.fr.Indigo,r.fr.Violet,r.fr.Purple,r.fr.Fuchsia,r.fr.Slate,r.fr.Gray,r.fr.Zinc,r.fr.Neutral,r.fr.Stone,r.fr.Red,r.fr.Orange,r.fr.Amber,r.fr.Yellow,r.fr.Lime,r.fr.Green,r.fr.Emerald,r.fr.Teal,r.fr.Pink,r.fr.Rose]},65954:function(e,t,n){"use strict";n.d(t,{q:function(){return _}});var r=/^\[(.+)\]$/;function o(e,t){var n=e;return t.split("-").forEach(function(e){n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n}var i=/\s+/;function a(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){if("string"==typeof t)return t;for(var n,r="",o=0;o<t.length;o++)t[o]&&(n=e(t[o]))&&(r&&(r+=" "),r+=n);return r}(e))&&(r&&(r+=" "),r+=t);return r}function c(){for(var e,t,n,c=arguments.length,l=Array(c),s=0;s<c;s++)l[s]=arguments[s];var u=function(i){var a=l[0];return t=(e=function(e){var t,n,i,a,c,l,s,u,f,d,p;return{cache:function(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function o(o,i){n.set(o,i),++t>e&&(t=0,r=n,n=new Map)}return{get:function(e){var t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set:function(e,t){n.has(e)?n.set(e,t):o(e,t)}}}(e.cacheSize),splitModifiers:(n=1===(t=e.separator||":").length,i=t[0],a=t.length,function(e){for(var r,o=[],c=0,l=0,s=0;s<e.length;s++){var u=e[s];if(0===c){if(u===i&&(n||e.slice(s,s+a)===t)){o.push(e.slice(l,s)),l=s+a;continue}if("/"===u){r=s;continue}}"["===u?c++:"]"===u&&c--}var f=0===o.length?e:e.substring(l),d=f.startsWith("!"),p=d?f.substring(1):f;return{modifiers:o,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:r&&r>l?r-l:void 0}}),...(u=e.theme,f=e.prefix,d={nextPart:new Map,validators:[]},(p=Object.entries(e.classGroups),f?p.map(function(e){return[e[0],e[1].map(function(e){return"string"==typeof e?f+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(function(e){return[f+e[0],e[1]]})):e})]}):p).forEach(function(e){var t=e[0];(function e(t,n,r,i){t.forEach(function(t){if("string"==typeof t){(""===t?n:o(n,t)).classGroupId=r;return}if("function"==typeof t){if(t.isThemeGetter){e(t(i),n,r,i);return}n.validators.push({validator:t,classGroupId:r});return}Object.entries(t).forEach(function(t){var a=t[0];e(t[1],o(n,a),r,i)})})})(e[1],d,t,u)}),c=e.conflictingClassGroups,s=void 0===(l=e.conflictingClassGroupModifiers)?{}:l,{getClassGroupId:function(e){var t=e.split("-");return""===t[0]&&1!==t.length&&t.shift(),function e(t,n){if(0===t.length)return n.classGroupId;var r=t[0],o=n.nextPart.get(r),i=o?e(t.slice(1),o):void 0;if(i)return i;if(0!==n.validators.length){var a=t.join("-");return n.validators.find(function(e){return(0,e.validator)(a)})?.classGroupId}}(t,d)||function(e){if(r.test(e)){var t=r.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){var n=c[e]||[];return t&&s[e]?[].concat(n,s[e]):n}})}}(l.slice(1).reduce(function(e,t){return t(e)},a()))).cache.get,n=e.cache.set,u=f,f(i)};function f(r){var o,a,c,l,s,u=t(r);if(u)return u;var f=(a=(o=e).splitModifiers,c=o.getClassGroupId,l=o.getConflictingClassGroupIds,s=new Set,r.trim().split(i).map(function(e){var t=a(e),n=t.modifiers,r=t.hasImportantModifier,o=t.baseClassName,i=t.maybePostfixModifierPosition,l=c(i?o.substring(0,i):o),s=!!i;if(!l){if(!i||!(l=c(o)))return{isTailwindClass:!1,originalClassName:e};s=!1}var u=(function(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(e){"["===e[0]?(t.push.apply(t,n.sort().concat([e])),n=[]):n.push(e)}),t.push.apply(t,n.sort()),t})(n).join(":");return{isTailwindClass:!0,modifierId:r?u+"!":u,classGroupId:l,originalClassName:e,hasPostfixModifier:s}}).reverse().filter(function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,r=e.hasPostfixModifier,o=t+n;return!s.has(o)&&(s.add(o),l(n,r).forEach(function(e){return s.add(t+e)}),!0)}).reverse().map(function(e){return e.originalClassName}).join(" "));return n(r,f),f}return function(){return u(a.apply(null,arguments))}}function l(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var s=/^\[(?:([a-z-]+):)?(.+)\]$/i,u=/^\d+\/\d+$/,f=new Set(["px","full","screen"]),d=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,p=/\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$/,h=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function m(e){return w(e)||f.has(e)||u.test(e)||g(e)}function g(e){return P(e,"length",M)}function v(e){return P(e,"size",j)}function b(e){return P(e,"position",j)}function y(e){return P(e,"url",A)}function x(e){return P(e,"number",w)}function w(e){return!Number.isNaN(Number(e))}function E(e){return e.endsWith("%")&&w(e.slice(0,-1))}function k(e){return R(e)||P(e,"number",R)}function Z(e){return s.test(e)}function C(){return!0}function S(e){return d.test(e)}function O(e){return P(e,"",F)}function P(e,t,n){var r=s.exec(e);return!!r&&(r[1]?r[1]===t:n(r[2]))}function M(e){return p.test(e)}function j(){return!1}function A(e){return e.startsWith("url(")}function R(e){return Number.isInteger(Number(e))}function F(e){return h.test(e)}function T(){var e=l("colors"),t=l("spacing"),n=l("blur"),r=l("brightness"),o=l("borderColor"),i=l("borderRadius"),a=l("borderSpacing"),c=l("borderWidth"),s=l("contrast"),u=l("grayscale"),f=l("hueRotate"),d=l("invert"),p=l("gap"),h=l("gradientColorStops"),P=l("gradientColorStopPositions"),M=l("inset"),j=l("margin"),A=l("opacity"),R=l("padding"),F=l("saturate"),T=l("scale"),N=l("sepia"),L=l("skew"),_=l("space"),I=l("translate"),z=function(){return["auto","contain","none"]},H=function(){return["auto","hidden","clip","visible","scroll"]},B=function(){return["auto",Z,t]},D=function(){return[Z,t]},V=function(){return["",m]},W=function(){return["auto",w,Z]},q=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},G=function(){return["solid","dashed","dotted","double","none"]},X=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},$=function(){return["start","end","center","between","around","evenly","stretch"]},U=function(){return["","0",Z]},Y=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},K=function(){return[w,x]},Q=function(){return[w,Z]};return{cacheSize:500,theme:{colors:[C],spacing:[m],blur:["none","",S,Z],brightness:K(),borderColor:[e],borderRadius:["none","","full",S,Z],borderSpacing:D(),borderWidth:V(),contrast:K(),grayscale:U(),hueRotate:Q(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[E,g],inset:B(),margin:B(),opacity:K(),padding:D(),saturate:K(),scale:K(),sepia:U(),skew:Q(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[S]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"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"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(q(),[Z])}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[M]}],"inset-x":[{"inset-x":[M]}],"inset-y":[{"inset-y":[M]}],start:[{start:[M]}],end:[{end:[M]}],top:[{top:[M]}],right:[{right:[M]}],bottom:[{bottom:[M]}],left:[{left:[M]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",k]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",k]}],"grid-cols":[{"grid-cols":[C]}],"col-start-end":[{col:["auto",{span:["full",k]},Z]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[C]}],"row-start-end":[{row:["auto",{span:[k]},Z]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat($())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat($(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat($(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Z,t]}],"min-w":[{"min-w":["min","max","fit",Z,m]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[S]},S,Z]}],h:[{h:[Z,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Z,m]}],"max-h":[{"max-h":[Z,t,"min","max","fit"]}],"font-size":[{text:["base",S,g]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",x]}],"font-family":[{font:[C]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",w,x]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Z,m]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(G(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",m]}],"underline-offset":[{"underline-offset":["auto",Z,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],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",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(q(),[b])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",v]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},y]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[].concat(G(),["hidden"])}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:G()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:[""].concat(G())}],"outline-offset":[{"outline-offset":[Z,m]}],"outline-w":[{outline:[m]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[m]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",S,O]}],"shadow-color":[{shadow:[C]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":X()}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",S,Z]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[F]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"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",Z]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[k,Z]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],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",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[m,x]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},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"],"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"],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-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"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var N=Object.prototype.hasOwnProperty,L=new Set(["string","number","boolean"]);let _=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?c.apply(void 0,[T,e].concat(n)):c.apply(void 0,[function(){return function(e,t){for(var n in t)!function e(t,n,r){if(!N.call(t,n)||L.has(typeof r)||null===r){t[n]=r;return}if(Array.isArray(r)&&Array.isArray(t[n])){t[n]=t[n].concat(r);return}if("object"==typeof r&&"object"==typeof t[n]){if(null===t[n]){t[n]=r;return}for(var o in r)e(t[n],o,r[o])}}(e,n,t[n]);return e}(T(),e)}].concat(n))}({classGroups:{boxShadow:[{shadow:[{tremor:["input","card","dropdown"],"dark-tremor":["input","card","dropdown"]}]}],borderRadius:[{rounded:[{tremor:["small","default","full"],"dark-tremor":["small","default","full"]}]}],fontSize:[{text:[{tremor:["default","title","metric"],"dark-tremor":["default","title","metric"]}]}]}})},1153:function(e,t,n){"use strict";n.d(t,{Cj:function(){return c},bM:function(){return d},NZ:function(){return s},fn:function(){return f},Fo:function(){return a},lq:function(){return u},vP:function(){return l}});var r=n(7084);let o=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],i=e=>o.includes(e),a=(e,t)=>{if(t||e===r.wu.Unchanged)return e;switch(e){case r.wu.Increase:return r.wu.Decrease;case r.wu.ModerateIncrease:return r.wu.ModerateDecrease;case r.wu.Decrease:return r.wu.Increase;case r.wu.ModerateDecrease:return r.wu.ModerateIncrease}return""},c=e=>e.toString(),l=e=>e.reduce((e,t)=>e+t,0),s=(e,t)=>{for(let n=0;n<t.length;n++)if(t[n]===e)return!0;return!1};function u(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function f(e){return t=>"tremor-".concat(e,"-").concat(t)}function d(e,t){let n=i(e);if("white"===e||"black"===e||"transparent"===e||!t||!n){let t=e.includes("#")||e.includes("--")||e.includes("rgb")?"[".concat(e,"]"):e;return{bgColor:"bg-".concat(t),hoverBgColor:"hover:bg-".concat(t),selectBgColor:"ui-selected:bg-".concat(t),textColor:"text-".concat(t),selectTextColor:"ui-selected:text-".concat(t),hoverTextColor:"hover:text-".concat(t),borderColor:"border-".concat(t),selectBorderColor:"ui-selected:border-".concat(t),hoverBorderColor:"hover:border-".concat(t),ringColor:"ring-".concat(t),strokeColor:"stroke-".concat(t),fillColor:"fill-".concat(t)}}return{bgColor:"bg-".concat(e,"-").concat(t),selectBgColor:"ui-selected:bg-".concat(e,"-").concat(t),hoverBgColor:"hover:bg-".concat(e,"-").concat(t),textColor:"text-".concat(e,"-").concat(t),selectTextColor:"ui-selected:text-".concat(e,"-").concat(t),hoverTextColor:"hover:text-".concat(e,"-").concat(t),borderColor:"border-".concat(e,"-").concat(t),selectBorderColor:"ui-selected:border-".concat(e,"-").concat(t),hoverBorderColor:"hover:border-".concat(e,"-").concat(t),ringColor:"ring-".concat(e,"-").concat(t),strokeColor:"stroke-".concat(e,"-").concat(t),fillColor:"fill-".concat(e,"-").concat(t)}}},62236:function(e,t,n){"use strict";n.d(t,{Cn:function(){return s},u6:function(){return a}});var r=n(2265),o=n(29961),i=n(95140);let a=1e3,c={Modal:100,Drawer:100,Popover:100,Popconfirm:100,Tooltip:100,Tour:100},l={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function s(e,t){let[,n]=(0,o.ZP)(),s=r.useContext(i.Z);if(void 0!==t)return[t,t];let u=null!=s?s:0;return e in c?(u+=(s?0:n.zIndexPopupBase)+c[e],u=Math.min(u,n.zIndexPopupBase+a)):u+=l[e],[void 0===s?t:u,u]}},68710:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});let r=()=>({height:0,opacity:0}),o=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},i=e=>({height:e?e.offsetHeight:0}),a=(e,t)=>(null==t?void 0:t.deadline)===!0||"height"===t.propertyName,c=(e,t,n)=>void 0!==n?n:"".concat(e,"-").concat(t);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ant";return{motionName:"".concat(e,"-motion-collapse"),onAppearStart:r,onEnterStart:r,onAppearActive:o,onEnterActive:o,onLeaveStart:i,onLeaveActive:r,onAppearEnd:a,onEnterEnd:a,onLeaveEnd:a,motionDeadline:500}}},92736:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(88260);let o={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},i={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},a=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function c(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:c,offset:l,borderRadius:s,visibleFirst:u}=e,f=t/2,d={};return Object.keys(o).forEach(e=>{let p=Object.assign(Object.assign({},c&&i[e]||o[e]),{offset:[0,0],dynamicInset:!0});switch(d[e]=p,a.has(e)&&(p.autoArrow=!1),e){case"top":case"topLeft":case"topRight":p.offset[1]=-f-l;break;case"bottom":case"bottomLeft":case"bottomRight":p.offset[1]=f+l;break;case"left":case"leftTop":case"leftBottom":p.offset[0]=-f-l;break;case"right":case"rightTop":case"rightBottom":p.offset[0]=f+l}let h=(0,r.wZ)({contentRadius:s,limitVerticalRadius:!0});if(c)switch(e){case"topLeft":case"bottomLeft":p.offset[0]=-h.arrowOffsetHorizontal-f;break;case"topRight":case"bottomRight":p.offset[0]=h.arrowOffsetHorizontal+f;break;case"leftTop":case"rightTop":p.offset[1]=-h.arrowOffsetHorizontal-f;break;case"leftBottom":case"rightBottom":p.offset[1]=h.arrowOffsetHorizontal+f}p.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};let o={};switch(e){case"top":case"bottom":o.shiftX=2*t.arrowOffsetHorizontal+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=2*t.arrowOffsetVertical+n,o.shiftX=!0,o.adjustX=!0}let i=Object.assign(Object.assign({},o),r&&"object"==typeof r?r:{});return i.shiftX||(i.adjustX=!0),i.shiftY||(i.adjustY=!0),i}(e,h,t,n),u&&(p.htmlRegion="visibleFirst")}),d}},19722:function(e,t,n){"use strict";n.d(t,{M2:function(){return a},Tm:function(){return c},l$:function(){return i}});var r,o=n(2265);let{isValidElement:i}=r||(r=n.t(o,2));function a(e){return e&&i(e)&&e.type===o.Fragment}function c(e,t){return i(e)?o.cloneElement(e,"function"==typeof t?t(e.props||{}):t):e}},13613:function(e,t,n){"use strict";n.d(t,{G8:function(){return i},ln:function(){return a}});var r=n(2265);function o(){}n(32559);let i=r.createContext({}),a=()=>{let e=()=>{};return e.deprecated=o,e}},6694:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(36760),o=n.n(r),i=n(28791),a=n(2857),c=n(2265),l=n(71744),s=n(19722),u=n(80669);let f=e=>{let{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:"var(--wave-color, ".concat(n,")"),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s ".concat(e.motionEaseOutCirc),"opacity 2s ".concat(e.motionEaseOutCirc)].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow 0.3s ".concat(e.motionEaseInOut),"opacity 0.35s ".concat(e.motionEaseInOut)].join(",")}}}}};var d=(0,u.ZP)("Wave",e=>[f(e)]),p=n(74126),h=n(53346),m=n(47970),g=n(18404);function v(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&function(e){let t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!t||!t[1]||!t[2]||!t[3]||!(t[1]===t[2]&&t[2]===t[3])}(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}var b=n(34709);function y(e){return Number.isNaN(e)?0:e}let x=e=>{let{className:t,target:n,component:r}=e,i=c.useRef(null),[a,l]=c.useState(null),[s,u]=c.useState([]),[f,d]=c.useState(0),[p,x]=c.useState(0),[w,E]=c.useState(0),[k,Z]=c.useState(0),[C,S]=c.useState(!1),O={left:f,top:p,width:w,height:k,borderRadius:s.map(e=>"".concat(e,"px")).join(" ")};function P(){let e=getComputedStyle(n);l(function(e){let{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return v(t)?t:v(n)?n:v(r)?r:null}(n));let t="static"===e.position,{borderLeftWidth:r,borderTopWidth:o}=e;d(t?n.offsetLeft:y(-parseFloat(r))),x(t?n.offsetTop:y(-parseFloat(o))),E(n.offsetWidth),Z(n.offsetHeight);let{borderTopLeftRadius:i,borderTopRightRadius:a,borderBottomLeftRadius:c,borderBottomRightRadius:s}=e;u([i,a,s,c].map(e=>y(parseFloat(e))))}if(a&&(O["--wave-color"]=a),c.useEffect(()=>{if(n){let e;let t=(0,h.Z)(()=>{P(),S(!0)});return"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(P)).observe(n),()=>{h.Z.cancel(t),null==e||e.disconnect()}}},[]),!C)return null;let M=("Checkbox"===r||"Radio"===r)&&(null==n?void 0:n.classList.contains(b.A));return c.createElement(m.ZP,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{var n;if(t.deadline||"opacity"===t.propertyName){let e=null===(n=i.current)||void 0===n?void 0:n.parentElement;(0,g.v)(e).then(()=>{null==e||e.remove()})}return!1}},e=>{let{className:n}=e;return c.createElement("div",{ref:i,className:o()(t,{"wave-quick":M},n),style:O})})};var w=(e,t)=>{var n;let{component:r}=t;if("Checkbox"===r&&!(null===(n=e.querySelector("input"))||void 0===n?void 0:n.checked))return;let o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",null==e||e.insertBefore(o,null==e?void 0:e.firstChild),(0,g.s)(c.createElement(x,Object.assign({},t,{target:e})),o)},E=n(29961),k=e=>{let{children:t,disabled:n,component:r}=e,{getPrefixCls:u}=(0,c.useContext)(l.E_),f=(0,c.useRef)(null),m=u("wave"),[,g]=d(m),v=function(e,t,n){let{wave:r}=c.useContext(l.E_),[,o,i]=(0,E.ZP)(),a=(0,p.zX)(a=>{let c=e.current;if((null==r?void 0:r.disabled)||!c)return;let l=c.querySelector(".".concat(b.A))||c,{showEffect:s}=r||{};(s||w)(l,{className:t,token:o,component:n,event:a,hashId:i})}),s=c.useRef();return e=>{h.Z.cancel(s.current),s.current=(0,h.Z)(()=>{a(e)})}}(f,o()(m,g),r);if(c.useEffect(()=>{let e=f.current;if(!e||1!==e.nodeType||n)return;let t=t=>{!(0,a.Z)(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")||e.className.includes("-leave")||v(t)};return e.addEventListener("click",t,!0),()=>{e.removeEventListener("click",t,!0)}},[n]),!c.isValidElement(t))return null!=t?t:null;let y=(0,i.Yr)(t)?(0,i.sQ)(t.ref,f):f;return(0,s.Tm)(t,{ref:y})}},34709:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});let r="ant-wave-target"},95140:function(e,t,n){"use strict";let r=n(2265).createContext(void 0);t.Z=r},51248:function(e,t,n){"use strict";n.d(t,{Te:function(){return s},aG:function(){return a},hU:function(){return u},nx:function(){return c}});var r=n(2265),o=n(19722);let i=/^[\u4e00-\u9fa5]{2}$/,a=i.test.bind(i);function c(e){return"danger"===e?{danger:!0}:{type:e}}function l(e){return"string"==typeof e}function s(e){return"text"===e||"link"===e}function u(e,t){let n=!1,i=[];return r.Children.forEach(e,e=>{let t=typeof e,r="string"===t||"number"===t;if(n&&r){let t=i.length-1,n=i[t];i[t]="".concat(n).concat(e)}else i.push(e);n=r}),r.Children.map(i,e=>(function(e,t){if(null==e)return;let n=t?" ":"";return"string"!=typeof e&&"number"!=typeof e&&l(e.type)&&a(e.props.children)?(0,o.Tm)(e,{children:e.props.children.split("").join(n)}):l(e)?a(e)?r.createElement("span",null,e.split("").join(n)):r.createElement("span",null,e):(0,o.M2)(e)?r.createElement("span",null,e):e})(e,t))}},73002:function(e,t,n){"use strict";n.d(t,{ZP:function(){return ei}});var r=n(2265),o=n(36760),i=n.n(o),a=n(18694),c=n(28791),l=n(6694),s=n(71744),u=n(86586),f=n(33759),d=n(65658),p=n(29961),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let m=r.createContext(void 0);var g=n(51248);let v=(0,r.forwardRef)((e,t)=>{let{className:n,style:o,children:a,prefixCls:c}=e,l=i()("".concat(c,"-icon"),n);return r.createElement("span",{ref:t,className:l,style:o},a)});var b=n(61935),y=n(47970);let x=(0,r.forwardRef)((e,t)=>{let{prefixCls:n,className:o,style:a,iconClassName:c}=e,l=i()("".concat(n,"-loading-icon"),o);return r.createElement(v,{prefixCls:n,className:l,style:a,ref:t},r.createElement(b.Z,{className:c}))}),w=()=>({width:0,opacity:0,transform:"scale(0)"}),E=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"});var k=e=>{let{prefixCls:t,loading:n,existIcon:o,className:i,style:a}=e,c=!!n;return o?r.createElement(x,{prefixCls:t,className:i,style:a}):r.createElement(y.ZP,{visible:c,motionName:"".concat(t,"-loading-icon-motion"),motionLeave:c,removeOnLeave:!0,onAppearStart:w,onAppearActive:E,onEnterStart:w,onEnterActive:E,onLeaveStart:E,onLeaveActive:w},(e,n)=>{let{className:o,style:c}=e;return r.createElement(x,{prefixCls:t,className:i,style:Object.assign(Object.assign({},a),c),ref:n,iconClassName:o})})},Z=n(352),C=n(12918),S=n(3104),O=n(80669);let P=(e,t)=>({["> span, > ".concat(e)]:{"&:not(:last-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var M=e=>{let{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{["".concat(t,"-group")]:[{position:"relative",display:"inline-flex",["> span, > ".concat(t)]:{"&:not(:last-child)":{["&, & > ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),["&, & > ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},["".concat(t,"-icon-only")]:{fontSize:n}},P("".concat(t,"-primary"),o),P("".concat(t,"-danger"),i)]}},j=n(1319);let A=e=>{let{paddingInline:t,onlyIconSize:n,paddingBlock:r}=e;return(0,S.TS)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:r,buttonIconOnlyFontSize:n})},R=e=>{var t,n,r,o,i,a;let c=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,l=null!==(n=e.contentFontSizeSM)&&void 0!==n?n:e.fontSize,s=null!==(r=e.contentFontSizeLG)&&void 0!==r?r:e.fontSizeLG,u=null!==(o=e.contentLineHeight)&&void 0!==o?o:(0,j.D)(c),f=null!==(i=e.contentLineHeightSM)&&void 0!==i?i:(0,j.D)(l),d=null!==(a=e.contentLineHeightLG)&&void 0!==a?a:(0,j.D)(s);return{fontWeight:400,defaultShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlTmpOutline),primaryShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlOutline),dangerShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.colorErrorOutline),primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:e.fontSizeLG,onlyIconSizeSM:e.fontSizeLG-2,onlyIconSizeLG:e.fontSizeLG+2,groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textHoverBg:e.colorBgTextHover,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,contentFontSize:c,contentFontSizeSM:l,contentFontSizeLG:s,contentLineHeight:u,contentLineHeightSM:f,contentLineHeightLG:d,paddingBlock:Math.max((e.controlHeight-c*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*f)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-s*d)/2-e.lineWidth,0)}},F=e=>{let{componentCls:t,iconCls:n,fontWeight:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:"".concat((0,Z.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),cursor:"pointer",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},["".concat(t,"-icon")]:{lineHeight:0},["> ".concat(n," + span, > span + ").concat(n)]:{marginInlineStart:e.marginXS},["&:not(".concat(t,"-icon-only) > ").concat(t,"-icon")]:{["&".concat(t,"-loading-icon, &:not(:last-child)")]:{marginInlineEnd:e.marginXS}},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},(0,C.Qy)(e)),["&".concat(t,"-two-chinese-chars::first-letter")]:{letterSpacing:"0.34em"},["&".concat(t,"-two-chinese-chars > *:not(").concat(n,")")]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},["&-icon-only".concat(t,"-compact-item")]:{flex:"none"}}}},T=(e,t,n)=>({["&:not(:disabled):not(".concat(e,"-disabled)")]:{"&:hover":t,"&:active":n}}),N=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),L=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),_=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),I=(e,t,n,r,o,i,a,c)=>({["&".concat(e,"-background-ghost")]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},T(e,Object.assign({background:t},a),Object.assign({background:t},c))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),z=e=>({["&:disabled, &".concat(e.componentCls,"-disabled")]:Object.assign({},_(e))}),H=e=>Object.assign({},z(e)),B=e=>({["&:disabled, &".concat(e.componentCls,"-disabled")]:{cursor:"not-allowed",color:e.colorTextDisabled}}),D=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H(e)),{background:e.defaultBg,borderColor:e.defaultBorderColor,color:e.defaultColor,boxShadow:e.defaultShadow}),T(e.componentCls,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),I(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign(Object.assign({color:e.colorError,borderColor:e.colorError},T(e.componentCls,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),I(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),z(e))}),V=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H(e)),{color:e.primaryColor,background:e.colorPrimary,boxShadow:e.primaryShadow}),T(e.componentCls,{color:e.colorTextLightSolid,background:e.colorPrimaryHover},{color:e.colorTextLightSolid,background:e.colorPrimaryActive})),I(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign(Object.assign({background:e.colorError,boxShadow:e.dangerShadow,color:e.dangerColor},T(e.componentCls,{background:e.colorErrorHover},{background:e.colorErrorActive})),I(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),z(e))}),W=e=>Object.assign(Object.assign({},D(e)),{borderStyle:"dashed"}),q=e=>Object.assign(Object.assign(Object.assign({color:e.colorLink},T(e.componentCls,{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),B(e)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign({color:e.colorError},T(e.componentCls,{color:e.colorErrorHover},{color:e.colorErrorActive})),B(e))}),G=e=>Object.assign(Object.assign(Object.assign({},T(e.componentCls,{color:e.colorText,background:e.textHoverBg},{color:e.colorText,background:e.colorBgTextActive})),B(e)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign({color:e.colorError},B(e)),T(e.componentCls,{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBg}))}),X=e=>{let{componentCls:t}=e;return{["".concat(t,"-default")]:D(e),["".concat(t,"-primary")]:V(e),["".concat(t,"-dashed")]:W(e),["".concat(t,"-link")]:q(e),["".concat(t,"-text")]:G(e),["".concat(t,"-ghost")]:I(e.componentCls,e.ghostBg,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)}},$=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",{componentCls:n,controlHeight:r,fontSize:o,lineHeight:i,borderRadius:a,buttonPaddingHorizontal:c,iconCls:l,buttonPaddingVertical:s}=e,u="".concat(n,"-icon-only");return[{["".concat(n).concat(t)]:{fontSize:o,lineHeight:i,height:r,padding:"".concat((0,Z.bf)(s)," ").concat((0,Z.bf)(c)),borderRadius:a,["&".concat(u)]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,["&".concat(n,"-round")]:{width:"auto"},[l]:{fontSize:e.buttonIconOnlyFontSize}},["&".concat(n,"-loading")]:{opacity:e.opacityLoading,cursor:"default"},["".concat(n,"-loading-icon")]:{transition:"width ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,", opacity ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)}}},{["".concat(n).concat(n,"-circle").concat(t)]:N(e)},{["".concat(n).concat(n,"-round").concat(t)]:L(e)}]},U=e=>$((0,S.TS)(e,{fontSize:e.contentFontSize,lineHeight:e.contentLineHeight})),Y=e=>$((0,S.TS)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,lineHeight:e.contentLineHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:e.paddingBlockSM,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),"".concat(e.componentCls,"-sm")),K=e=>$((0,S.TS)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,lineHeight:e.contentLineHeightLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:e.paddingBlockLG,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),"".concat(e.componentCls,"-lg")),Q=e=>{let{componentCls:t}=e;return{[t]:{["&".concat(t,"-block")]:{width:"100%"}}}};var J=(0,O.I$)("Button",e=>{let t=A(e);return[F(t),Y(t),U(t),K(t),Q(t),X(t),M(t)]},R,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}}),ee=n(17691);let et=e=>{let{componentCls:t,calc:n}=e;return{[t]:{["&-compact-item".concat(t,"-primary")]:{["&:not([disabled]) + ".concat(t,"-compact-item").concat(t,"-primary:not([disabled])")]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:e.lineWidth,height:"calc(100% + ".concat((0,Z.bf)(e.lineWidth)," * 2)"),backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{["&".concat(t,"-primary")]:{["&:not([disabled]) + ".concat(t,"-compact-vertical-item").concat(t,"-primary:not([disabled])")]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:"calc(100% + ".concat((0,Z.bf)(e.lineWidth)," * 2)"),height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}};var en=(0,O.bk)(["Button","compact"],e=>{let t=A(e);return[(0,ee.c)(t),function(e){var t;let n="".concat(e.componentCls,"-compact-vertical");return{[n]:Object.assign(Object.assign({},{["&-item:not(".concat(n,"-last-item)")]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}),(t=e.componentCls,{["&-item:not(".concat(n,"-first-item):not(").concat(n,"-last-item)")]:{borderRadius:0},["&-item".concat(n,"-first-item:not(").concat(n,"-last-item)")]:{["&, &".concat(t,"-sm, &").concat(t,"-lg")]:{borderEndEndRadius:0,borderEndStartRadius:0}},["&-item".concat(n,"-last-item:not(").concat(n,"-first-item)")]:{["&, &".concat(t,"-sm, &").concat(t,"-lg")]:{borderStartStartRadius:0,borderStartEndRadius:0}}}))}}(t),et(t)]},R),er=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let eo=(0,r.forwardRef)((e,t)=>{var n,o;let{loading:p=!1,prefixCls:h,type:b="default",danger:y,shape:x="default",size:w,styles:E,disabled:Z,className:C,rootClassName:S,children:O,icon:P,ghost:M=!1,block:j=!1,htmlType:A="button",classNames:R,style:F={}}=e,T=er(e,["loading","prefixCls","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","ghost","block","htmlType","classNames","style"]),{getPrefixCls:N,autoInsertSpaceInButton:L,direction:_,button:I}=(0,r.useContext)(s.E_),z=N("btn",h),[H,B,D]=J(z),V=(0,r.useContext)(u.Z),W=null!=Z?Z:V,q=(0,r.useContext)(m),G=(0,r.useMemo)(()=>(function(e){if("object"==typeof e&&e){let t=null==e?void 0:e.delay;return{loading:(t=Number.isNaN(t)||"number"!=typeof t?0:t)<=0,delay:t}}return{loading:!!e,delay:0}})(p),[p]),[X,$]=(0,r.useState)(G.loading),[U,Y]=(0,r.useState)(!1),K=(0,r.createRef)(),Q=(0,c.sQ)(t,K),ee=1===r.Children.count(O)&&!P&&!(0,g.Te)(b);(0,r.useEffect)(()=>{let e=null;return G.delay>0?e=setTimeout(()=>{e=null,$(!0)},G.delay):$(G.loading),function(){e&&(clearTimeout(e),e=null)}},[G]),(0,r.useEffect)(()=>{if(!Q||!Q.current||!1===L)return;let e=Q.current.textContent;ee&&(0,g.aG)(e)?U||Y(!0):U&&Y(!1)},[Q]);let et=t=>{let{onClick:n}=e;if(X||W){t.preventDefault();return}null==n||n(t)},eo=!1!==L,{compactSize:ei,compactItemClassnames:ea}=(0,d.ri)(z,_),ec=(0,f.Z)(e=>{var t,n;return null!==(n=null!==(t=null!=w?w:ei)&&void 0!==t?t:q)&&void 0!==n?n:e}),el=ec&&({large:"lg",small:"sm",middle:void 0})[ec]||"",es=X?"loading":P,eu=(0,a.Z)(T,["navigate"]),ef=i()(z,B,D,{["".concat(z,"-").concat(x)]:"default"!==x&&x,["".concat(z,"-").concat(b)]:b,["".concat(z,"-").concat(el)]:el,["".concat(z,"-icon-only")]:!O&&0!==O&&!!es,["".concat(z,"-background-ghost")]:M&&!(0,g.Te)(b),["".concat(z,"-loading")]:X,["".concat(z,"-two-chinese-chars")]:U&&eo&&!X,["".concat(z,"-block")]:j,["".concat(z,"-dangerous")]:!!y,["".concat(z,"-rtl")]:"rtl"===_},ea,C,S,null==I?void 0:I.className),ed=Object.assign(Object.assign({},null==I?void 0:I.style),F),ep=i()(null==R?void 0:R.icon,null===(n=null==I?void 0:I.classNames)||void 0===n?void 0:n.icon),eh=Object.assign(Object.assign({},(null==E?void 0:E.icon)||{}),(null===(o=null==I?void 0:I.styles)||void 0===o?void 0:o.icon)||{}),em=P&&!X?r.createElement(v,{prefixCls:z,className:ep,style:eh},P):r.createElement(k,{existIcon:!!P,prefixCls:z,loading:!!X}),eg=O||0===O?(0,g.hU)(O,ee&&eo):null;if(void 0!==eu.href)return H(r.createElement("a",Object.assign({},eu,{className:i()(ef,{["".concat(z,"-disabled")]:W}),href:W?void 0:eu.href,style:ed,onClick:et,ref:Q,tabIndex:W?-1:0}),em,eg));let ev=r.createElement("button",Object.assign({},T,{type:A,className:ef,style:ed,onClick:et,disabled:W,ref:Q}),em,eg,!!ea&&r.createElement(en,{key:"compact",prefixCls:z}));return(0,g.Te)(b)||(ev=r.createElement(l.Z,{component:"Button",disabled:!!X},ev)),H(ev)});eo.Group=e=>{let{getPrefixCls:t,direction:n}=r.useContext(s.E_),{prefixCls:o,size:a,className:c}=e,l=h(e,["prefixCls","size","className"]),u=t("btn-group",o),[,,f]=(0,p.ZP)(),d="";switch(a){case"large":d="lg";break;case"small":d="sm"}let g=i()(u,{["".concat(u,"-").concat(d)]:d,["".concat(u,"-rtl")]:"rtl"===n},c,f);return r.createElement(m.Provider,{value:a},r.createElement("div",Object.assign({},l,{className:g})))},eo.__ANT_BUTTON=!0;var ei=eo},86586:function(e,t,n){"use strict";n.d(t,{n:function(){return i}});var r=n(2265);let o=r.createContext(!1),i=e=>{let{children:t,disabled:n}=e,i=r.useContext(o);return r.createElement(o.Provider,{value:null!=n?n:i},t)};t.Z=o},59189:function(e,t,n){"use strict";n.d(t,{q:function(){return i}});var r=n(2265);let o=r.createContext(void 0),i=e=>{let{children:t,size:n}=e,i=r.useContext(o);return r.createElement(o.Provider,{value:n||i},t)};t.Z=o},71744:function(e,t,n){"use strict";n.d(t,{E_:function(){return i},oR:function(){return o}});var r=n(2265);let o="anticon",i=r.createContext({getPrefixCls:(e,t)=>t||(e?"ant-".concat(e):"ant"),iconPrefixCls:o}),{Consumer:a}=i},64024:function(e,t,n){"use strict";var r=n(29961);t.Z=e=>{let[,,,,t]=(0,r.ZP)();return t?"".concat(e,"-css-var"):""}},33759:function(e,t,n){"use strict";var r=n(2265),o=n(59189);t.Z=e=>{let t=r.useContext(o.Z);return r.useMemo(()=>e?"string"==typeof e?null!=e?e:t:e instanceof Function?e(t):t:t,[e,t])}},13959:function(e,t,n){"use strict";let r,o,i,a;n.d(t,{ZP:function(){return W},w6:function(){return B}});var c=n(2265),l=n.t(c,2),s=n(352),u=n(20902),f=n(6397),d=n(23789),p=n(13613),h=n(77360),m=n(92246),g=n(91325),v=e=>{let{locale:t={},children:n,_ANT_MARK__:r}=e;c.useEffect(()=>(0,m.f)(t&&t.Modal),[t]);let o=c.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return c.createElement(g.Z.Provider,{value:o},n)},b=n(13823),y=n(37516),x=n(70774),w=n(71744),E=n(31373),k=n(36360),Z=n(94981),C=n(21717);let S="-ant-".concat(Date.now(),"-").concat(Math.random());var O=n(86586),P=n(59189),M=n(16671);let{useId:j}=Object.assign({},l);var A=void 0===j?()=>"":j,R=n(47970),F=n(29961);function T(e){let{children:t}=e,[,n]=(0,F.ZP)(),{motion:r}=n,o=c.useRef(!1);return(o.current=o.current||!1===r,o.current)?c.createElement(R.zt,{motion:r},t):t}var N=()=>null,L=n(36198),_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let I=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"];function z(){return r||"ant"}function H(){return o||w.oR}let B=()=>({getPrefixCls:(e,t)=>t||(e?"".concat(z(),"-").concat(e):z()),getIconPrefixCls:H,getRootPrefixCls:()=>r||z(),getTheme:()=>i,holderRender:a}),D=e=>{let{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:i,form:a,locale:l,componentSize:m,direction:g,space:E,virtual:k,dropdownMatchSelectWidth:Z,popupMatchSelectWidth:C,popupOverflow:S,legacyLocale:j,parentContext:R,iconPrefixCls:F,theme:z,componentDisabled:H,segmented:B,statistic:D,spin:V,calendar:W,carousel:q,cascader:G,collapse:X,typography:$,checkbox:U,descriptions:Y,divider:K,drawer:Q,skeleton:J,steps:ee,image:et,layout:en,list:er,mentions:eo,modal:ei,progress:ea,result:ec,slider:el,breadcrumb:es,menu:eu,pagination:ef,input:ed,empty:ep,badge:eh,radio:em,rate:eg,switch:ev,transfer:eb,avatar:ey,message:ex,tag:ew,table:eE,card:ek,tabs:eZ,timeline:eC,timePicker:eS,upload:eO,notification:eP,tree:eM,colorPicker:ej,datePicker:eA,rangePicker:eR,flex:eF,wave:eT,dropdown:eN,warning:eL}=e,e_=c.useCallback((t,n)=>{let{prefixCls:r}=e;if(n)return n;let o=r||R.getPrefixCls("");return t?"".concat(o,"-").concat(t):o},[R.getPrefixCls,e.prefixCls]),eI=F||R.iconPrefixCls||w.oR,ez=n||R.csp;(0,L.Z)(eI,ez);let eH=function(e,t){(0,p.ln)("ConfigProvider");let n=e||{},r=!1!==n.inherit&&t?t:y.u_,o=A();return(0,f.Z)(()=>{var i,a;if(!e)return t;let c=Object.assign({},r.components);Object.keys(e.components||{}).forEach(t=>{c[t]=Object.assign(Object.assign({},c[t]),e.components[t])});let l="css-var-".concat(o.replace(/:/g,"")),s=(null!==(i=n.cssVar)&&void 0!==i?i:r.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},"object"==typeof r.cssVar?r.cssVar:{}),"object"==typeof n.cssVar?n.cssVar:{}),{key:"object"==typeof n.cssVar&&(null===(a=n.cssVar)||void 0===a?void 0:a.key)||l});return Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:c,cssVar:s})},[n,r],(e,t)=>e.some((e,n)=>{let r=t[n];return!(0,M.Z)(e,r,!0)}))}(z,R.theme),eB={csp:ez,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:l||j,direction:g,space:E,virtual:k,popupMatchSelectWidth:null!=C?C:Z,popupOverflow:S,getPrefixCls:e_,iconPrefixCls:eI,theme:eH,segmented:B,statistic:D,spin:V,calendar:W,carousel:q,cascader:G,collapse:X,typography:$,checkbox:U,descriptions:Y,divider:K,drawer:Q,skeleton:J,steps:ee,image:et,input:ed,layout:en,list:er,mentions:eo,modal:ei,progress:ea,result:ec,slider:el,breadcrumb:es,menu:eu,pagination:ef,empty:ep,badge:eh,radio:em,rate:eg,switch:ev,transfer:eb,avatar:ey,message:ex,tag:ew,table:eE,card:ek,tabs:eZ,timeline:eC,timePicker:eS,upload:eO,notification:eP,tree:eM,colorPicker:ej,datePicker:eA,rangePicker:eR,flex:eF,wave:eT,dropdown:eN,warning:eL},eD=Object.assign({},R);Object.keys(eB).forEach(e=>{void 0!==eB[e]&&(eD[e]=eB[e])}),I.forEach(t=>{let n=e[t];n&&(eD[t]=n)});let eV=(0,f.Z)(()=>eD,eD,(e,t)=>{let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some(n=>e[n]!==t[n])}),eW=c.useMemo(()=>({prefixCls:eI,csp:ez}),[eI,ez]),eq=c.createElement(c.Fragment,null,c.createElement(N,{dropdownMatchSelectWidth:Z}),t),eG=c.useMemo(()=>{var e,t,n,r;return(0,d.T)((null===(e=b.Z.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=eV.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=eV.form)||void 0===r?void 0:r.validateMessages)||{},(null==a?void 0:a.validateMessages)||{})},[eV,null==a?void 0:a.validateMessages]);Object.keys(eG).length>0&&(eq=c.createElement(h.Z.Provider,{value:eG},eq)),l&&(eq=c.createElement(v,{locale:l,_ANT_MARK__:"internalMark"},eq)),(eI||ez)&&(eq=c.createElement(u.Z.Provider,{value:eW},eq)),m&&(eq=c.createElement(P.q,{size:m},eq)),eq=c.createElement(T,null,eq);let eX=c.useMemo(()=>{let e=eH||{},{algorithm:t,token:n,components:r,cssVar:o}=e,i=_(e,["algorithm","token","components","cssVar"]),a=t&&(!Array.isArray(t)||t.length>0)?(0,s.jG)(t):y.uH,c={};Object.entries(r||{}).forEach(e=>{let[t,n]=e,r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=a:(Array.isArray(r.algorithm)||"function"==typeof r.algorithm)&&(r.theme=(0,s.jG)(r.algorithm)),delete r.algorithm),c[t]=r});let l=Object.assign(Object.assign({},x.Z),n);return Object.assign(Object.assign({},i),{theme:a,token:l,components:c,override:Object.assign({override:l},c),cssVar:o})},[eH]);return z&&(eq=c.createElement(y.Mj.Provider,{value:eX},eq)),eV.warning&&(eq=c.createElement(p.G8.Provider,{value:eV.warning},eq)),void 0!==H&&(eq=c.createElement(O.n,{disabled:H},eq)),c.createElement(w.E_.Provider,{value:eV},eq)},V=e=>{let t=c.useContext(w.E_),n=c.useContext(g.Z);return c.createElement(D,Object.assign({parentContext:t,legacyLocale:n},e))};V.ConfigContext=w.E_,V.SizeContext=P.Z,V.config=e=>{let{prefixCls:t,iconPrefixCls:n,theme:c,holderRender:l}=e;void 0!==t&&(r=t),void 0!==n&&(o=n),"holderRender"in e&&(a=l),c&&(Object.keys(c).some(e=>e.endsWith("Color"))?function(e,t){let n=function(e,t){let n={},r=(e,t)=>{let n=e.clone();return(n=(null==t?void 0:t(n))||n).toRgbString()},o=(e,t)=>{let o=new k.C(e),i=(0,E.R_)(o.toRgbString());n["".concat(t,"-color")]=r(o),n["".concat(t,"-color-disabled")]=i[1],n["".concat(t,"-color-hover")]=i[4],n["".concat(t,"-color-active")]=i[6],n["".concat(t,"-color-outline")]=o.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=i[0],n["".concat(t,"-color-deprecated-border")]=i[2]};if(t.primaryColor){o(t.primaryColor,"primary");let e=new k.C(t.primaryColor),i=(0,E.R_)(e.toRgbString());i.forEach((e,t)=>{n["primary-".concat(t+1)]=e}),n["primary-color-deprecated-l-35"]=r(e,e=>e.lighten(35)),n["primary-color-deprecated-l-20"]=r(e,e=>e.lighten(20)),n["primary-color-deprecated-t-20"]=r(e,e=>e.tint(20)),n["primary-color-deprecated-t-50"]=r(e,e=>e.tint(50)),n["primary-color-deprecated-f-12"]=r(e,e=>e.setAlpha(.12*e.getAlpha()));let a=new k.C(i[0]);n["primary-color-active-deprecated-f-30"]=r(a,e=>e.setAlpha(.3*e.getAlpha())),n["primary-color-active-deprecated-d-02"]=r(a,e=>e.darken(2))}t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info");let i=Object.keys(n).map(t=>"--".concat(e,"-").concat(t,": ").concat(n[t],";"));return"\n :root {\n ".concat(i.join("\n"),"\n }\n ").trim()}(e,t);(0,Z.Z)()&&(0,C.hq)(n,"".concat(S,"-dynamic-theme"))}(z(),c):i=c)},V.useConfig=function(){return{componentDisabled:(0,c.useContext)(O.Z),componentSize:(0,c.useContext)(P.Z)}},Object.defineProperty(V,"SizeContext",{get:()=>P.Z});var W=V},39109:function(e,t,n){"use strict";n.d(t,{RV:function(){return l},Rk:function(){return s},Ux:function(){return f},aM:function(){return u},pg:function(){return d},q3:function(){return a},qI:function(){return c}});var r=n(2265),o=n(64834),i=n(18694);let a=r.createContext({labelAlign:"right",vertical:!1,itemRef:()=>{}}),c=r.createContext(null),l=e=>{let t=(0,i.Z)(e,["prefixCls"]);return r.createElement(o.RV,Object.assign({},t))},s=r.createContext({prefixCls:""}),u=r.createContext({}),f=e=>{let{children:t,status:n,override:o}=e,i=(0,r.useContext)(u),a=(0,r.useMemo)(()=>{let e=Object.assign({},i);return o&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e},[n,o,i]);return r.createElement(u.Provider,{value:a},t)},d=(0,r.createContext)(void 0)},77360:function(e,t,n){"use strict";var r=n(2265);t.Z=(0,r.createContext)(void 0)},91325:function(e,t,n){"use strict";let r=(0,n(2265).createContext)(void 0);t.Z=r},13823:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(96257),o={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};let i={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),timePickerLocale:Object.assign({},o)},a="${label} is not a valid ${type}";var c={locale:"en",Pagination:r.Z,DatePicker:i,TimePicker:o,Calendar:i,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty"}}},55274:function(e,t,n){"use strict";var r=n(2265),o=n(91325),i=n(13823);t.Z=(e,t)=>{let n=r.useContext(o.Z);return[r.useMemo(()=>{var r;let o=t||i.Z[e],a=null!==(r=null==n?void 0:n[e])&&void 0!==r?r:{};return Object.assign(Object.assign({},"function"==typeof o?o():o),a||{})},[e,t,n]),r.useMemo(()=>{let e=null==n?void 0:n.locale;return(null==n?void 0:n.exist)&&!e?i.Z.locale:e},[n])]}},41021:function(e,t,n){"use strict";n.d(t,{ZP:function(){return eu}});var r=n(83145),o=n(2265),i=n(18404);let a=o.createContext({});var c=n(71744),l=n(13959),s=n(8900),u=n(39725),f=n(54537),d=n(55726),p=n(61935),h=n(36760),m=n.n(h),g=n(26365),v=n(6989),b=n(31686),y=n(54887),x=n(1119),w=n(11993),E=n(47970),k=n(95814),Z=o.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.className,a=e.duration,c=void 0===a?4.5:a,l=e.eventKey,s=e.content,u=e.closable,f=e.closeIcon,d=e.props,p=e.onClick,h=e.onNoticeClose,v=e.times,b=e.hovering,y=o.useState(!1),E=(0,g.Z)(y,2),Z=E[0],C=E[1],S=b||Z,O=function(){h(l)};o.useEffect(function(){if(!S&&c>0){var e=setTimeout(function(){O()},1e3*c);return function(){clearTimeout(e)}}},[c,S,v]);var P="".concat(n,"-notice");return o.createElement("div",(0,x.Z)({},d,{ref:t,className:m()(P,i,(0,w.Z)({},"".concat(P,"-closable"),u)),style:r,onMouseEnter:function(e){var t;C(!0),null==d||null===(t=d.onMouseEnter)||void 0===t||t.call(d,e)},onMouseLeave:function(e){var t;C(!1),null==d||null===(t=d.onMouseLeave)||void 0===t||t.call(d,e)},onClick:p}),o.createElement("div",{className:"".concat(P,"-content")},s),u&&o.createElement("a",{tabIndex:0,className:"".concat(P,"-close"),onKeyDown:function(e){("Enter"===e.key||"Enter"===e.code||e.keyCode===k.Z.ENTER)&&O()},onClick:function(e){e.preventDefault(),e.stopPropagation(),O()}},void 0===f?"x":f))}),C=o.createContext({}),S=function(e){var t=e.children,n=e.classNames;return o.createElement(C.Provider,{value:{classNames:n}},t)},O=n(41154),P=function(e){var t,n,r,o={offset:8,threshold:3,gap:16};return e&&"object"===(0,O.Z)(e)&&(o.offset=null!==(t=e.offset)&&void 0!==t?t:8,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,o.gap=null!==(r=e.gap)&&void 0!==r?r:16),[!!e,o]},M=["className","style","classNames","styles"],j=function(e){var t,n=e.configList,i=e.placement,a=e.prefixCls,c=e.className,l=e.style,s=e.motion,u=e.onAllNoticeRemoved,f=e.onNoticeClose,d=e.stack,p=(0,o.useContext)(C).classNames,h=(0,o.useRef)({}),y=(0,o.useState)(null),k=(0,g.Z)(y,2),S=k[0],O=k[1],j=(0,o.useState)([]),A=(0,g.Z)(j,2),R=A[0],F=A[1],T=n.map(function(e){return{config:e,key:String(e.key)}}),N=P(d),L=(0,g.Z)(N,2),_=L[0],I=L[1],z=I.offset,H=I.threshold,B=I.gap,D=_&&(R.length>0||T.length<=H),V="function"==typeof s?s(i):s;return(0,o.useEffect)(function(){_&&R.length>1&&F(function(e){return e.filter(function(e){return T.some(function(t){return e===t.key})})})},[R,T,_]),(0,o.useEffect)(function(){var e,t;_&&h.current[null===(e=T[T.length-1])||void 0===e?void 0:e.key]&&O(h.current[null===(t=T[T.length-1])||void 0===t?void 0:t.key])},[T,_]),o.createElement(E.V4,(0,x.Z)({key:i,className:m()(a,"".concat(a,"-").concat(i),null==p?void 0:p.list,c,(t={},(0,w.Z)(t,"".concat(a,"-stack"),!!_),(0,w.Z)(t,"".concat(a,"-stack-expanded"),D),t)),style:l,keys:T,motionAppear:!0},V,{onAllRemoved:function(){u(i)}}),function(e,t){var n=e.config,c=e.className,l=e.style,s=e.index,u=n.key,d=n.times,g=String(u),y=n.className,w=n.style,E=n.classNames,k=n.styles,C=(0,v.Z)(n,M),O=T.findIndex(function(e){return e.key===g}),P={};if(_){var j=T.length-1-(O>-1?O:s-1),A="top"===i||"bottom"===i?"-50%":"0";if(j>0){P.height=D?null===(N=h.current[g])||void 0===N?void 0:N.offsetHeight:null==S?void 0:S.offsetHeight;for(var N,L,I,H,V=0,W=0;W<j;W++)V+=(null===(H=h.current[T[T.length-1-W].key])||void 0===H?void 0:H.offsetHeight)+B;var q=(D?V:j*z)*(i.startsWith("top")?1:-1),G=!D&&null!=S&&S.offsetWidth&&null!==(L=h.current[g])&&void 0!==L&&L.offsetWidth?((null==S?void 0:S.offsetWidth)-2*z*(j<3?j:3))/(null===(I=h.current[g])||void 0===I?void 0:I.offsetWidth):1;P.transform="translate3d(".concat(A,", ").concat(q,"px, 0) scaleX(").concat(G,")")}else P.transform="translate3d(".concat(A,", 0, 0)")}return o.createElement("div",{ref:t,className:m()("".concat(a,"-notice-wrapper"),c,null==E?void 0:E.wrapper),style:(0,b.Z)((0,b.Z)((0,b.Z)({},l),P),null==k?void 0:k.wrapper),onMouseEnter:function(){return F(function(e){return e.includes(g)?e:[].concat((0,r.Z)(e),[g])})},onMouseLeave:function(){return F(function(e){return e.filter(function(e){return e!==g})})}},o.createElement(Z,(0,x.Z)({},C,{ref:function(e){O>-1?h.current[g]=e:delete h.current[g]},prefixCls:a,classNames:E,styles:k,className:m()(y,null==p?void 0:p.notice),style:w,times:d,key:u,eventKey:u,onNoticeClose:f,hovering:_&&R.length>0})))})},A=o.forwardRef(function(e,t){var n=e.prefixCls,i=void 0===n?"rc-notification":n,a=e.container,c=e.motion,l=e.maxCount,s=e.className,u=e.style,f=e.onAllRemoved,d=e.stack,p=e.renderNotifications,h=o.useState([]),m=(0,g.Z)(h,2),v=m[0],x=m[1],w=function(e){var t,n=v.find(function(t){return t.key===e});null==n||null===(t=n.onClose)||void 0===t||t.call(n),x(function(t){return t.filter(function(t){return t.key!==e})})};o.useImperativeHandle(t,function(){return{open:function(e){x(function(t){var n,o=(0,r.Z)(t),i=o.findIndex(function(t){return t.key===e.key}),a=(0,b.Z)({},e);return i>=0?(a.times=((null===(n=t[i])||void 0===n?void 0:n.times)||0)+1,o[i]=a):(a.times=0,o.push(a)),l>0&&o.length>l&&(o=o.slice(-l)),o})},close:function(e){w(e)},destroy:function(){x([])}}});var E=o.useState({}),k=(0,g.Z)(E,2),Z=k[0],C=k[1];o.useEffect(function(){var e={};v.forEach(function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))}),Object.keys(Z).forEach(function(t){e[t]=e[t]||[]}),C(e)},[v]);var S=function(e){C(function(t){var n=(0,b.Z)({},t);return(n[e]||[]).length||delete n[e],n})},O=o.useRef(!1);if(o.useEffect(function(){Object.keys(Z).length>0?O.current=!0:O.current&&(null==f||f(),O.current=!1)},[Z]),!a)return null;var P=Object.keys(Z);return(0,y.createPortal)(o.createElement(o.Fragment,null,P.map(function(e){var t=Z[e],n=o.createElement(j,{key:e,configList:t,placement:e,prefixCls:i,className:null==s?void 0:s(e),style:null==u?void 0:u(e),motion:c,onNoticeClose:w,onAllNoticeRemoved:S,stack:d});return p?p(n,{prefixCls:i,key:e}):n})),a)}),R=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],F=function(){return document.body},T=0,N=n(352),L=n(62236),_=n(12918),I=n(80669),z=n(3104);let H=e=>{let{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:a,colorWarning:c,colorInfo:l,fontSizeLG:s,motionEaseInOutCirc:u,motionDurationSlow:f,marginXS:d,paddingXS:p,borderRadiusLG:h,zIndexPopup:m,contentPadding:g,contentBg:v}=e,b="".concat(t,"-notice"),y=new N.E4("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:p,transform:"translateY(0)",opacity:1}}),x=new N.E4("MessageMoveOut",{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),w={padding:p,textAlign:"center",["".concat(t,"-custom-content > ").concat(n)]:{verticalAlign:"text-bottom",marginInlineEnd:d,fontSize:s},["".concat(b,"-content")]:{display:"inline-block",padding:g,background:v,borderRadius:h,boxShadow:r,pointerEvents:"all"},["".concat(t,"-success > ").concat(n)]:{color:i},["".concat(t,"-error > ").concat(n)]:{color:a},["".concat(t,"-warning > ").concat(n)]:{color:c},["".concat(t,"-info > ").concat(n,",\n ").concat(t,"-loading > ").concat(n)]:{color:l}};return[{[t]:Object.assign(Object.assign({},(0,_.Wf)(e)),{color:o,position:"fixed",top:d,width:"100%",pointerEvents:"none",zIndex:m,["".concat(t,"-move-up")]:{animationFillMode:"forwards"},["\n ".concat(t,"-move-up-appear,\n ").concat(t,"-move-up-enter\n ")]:{animationName:y,animationDuration:f,animationPlayState:"paused",animationTimingFunction:u},["\n ".concat(t,"-move-up-appear").concat(t,"-move-up-appear-active,\n ").concat(t,"-move-up-enter").concat(t,"-move-up-enter-active\n ")]:{animationPlayState:"running"},["".concat(t,"-move-up-leave")]:{animationName:x,animationDuration:f,animationPlayState:"paused",animationTimingFunction:u},["".concat(t,"-move-up-leave").concat(t,"-move-up-leave-active")]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{["".concat(b,"-wrapper")]:Object.assign({},w)}},{["".concat(t,"-notice-pure-panel")]:Object.assign(Object.assign({},w),{padding:0,textAlign:"start"})}]};var B=(0,I.I$)("Message",e=>[H((0,z.TS)(e,{height:150}))],e=>({zIndexPopup:e.zIndexPopupBase+L.u6+10,contentBg:e.colorBgElevated,contentPadding:"".concat((e.controlHeightLG-e.fontSize*e.lineHeight)/2,"px ").concat(e.paddingSM,"px")})),D=n(64024),V=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let W={info:o.createElement(d.Z,null),success:o.createElement(s.Z,null),error:o.createElement(u.Z,null),warning:o.createElement(f.Z,null),loading:o.createElement(p.Z,null)},q=e=>{let{prefixCls:t,type:n,icon:r,children:i}=e;return o.createElement("div",{className:m()("".concat(t,"-custom-content"),"".concat(t,"-").concat(n))},r||W[n],o.createElement("span",null,i))};var G=n(49638),X=n(13613);function $(e){let t;let n=new Promise(n=>{t=e(()=>{n(!0)})}),r=()=>{null==t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var U=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let Y=e=>{let{children:t,prefixCls:n}=e,r=(0,D.Z)(n),[i,a,c]=B(n,r);return i(o.createElement(S,{classNames:{list:m()(a,c,r)}},t))},K=(e,t)=>{let{prefixCls:n,key:r}=t;return o.createElement(Y,{prefixCls:n,key:r},e)},Q=o.forwardRef((e,t)=>{let{top:n,prefixCls:i,getContainer:a,maxCount:l,duration:s=3,rtl:u,transitionName:f,onAllRemoved:d}=e,{getPrefixCls:p,getPopupContainer:h,message:b,direction:y}=o.useContext(c.E_),x=i||p("message"),w=o.createElement("span",{className:"".concat(x,"-close-x")},o.createElement(G.Z,{className:"".concat(x,"-close-icon")})),[E,k]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?F:t,i=e.motion,a=e.prefixCls,c=e.maxCount,l=e.className,s=e.style,u=e.onAllRemoved,f=e.stack,d=e.renderNotifications,p=(0,v.Z)(e,R),h=o.useState(),m=(0,g.Z)(h,2),b=m[0],y=m[1],x=o.useRef(),w=o.createElement(A,{container:b,ref:x,prefixCls:a,motion:i,maxCount:c,className:l,style:s,onAllRemoved:u,stack:f,renderNotifications:d}),E=o.useState([]),k=(0,g.Z)(E,2),Z=k[0],C=k[1],S=o.useMemo(function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){t&&Object.keys(t).forEach(function(n){var r=t[n];void 0!==r&&(e[n]=r)})}),e}(p,e);(null===t.key||void 0===t.key)&&(t.key="rc-notification-".concat(T),T+=1),C(function(e){return[].concat((0,r.Z)(e),[{type:"open",config:t}])})},close:function(e){C(function(t){return[].concat((0,r.Z)(t),[{type:"close",key:e}])})},destroy:function(){C(function(e){return[].concat((0,r.Z)(e),[{type:"destroy"}])})}}},[]);return o.useEffect(function(){y(n())}),o.useEffect(function(){x.current&&Z.length&&(Z.forEach(function(e){switch(e.type){case"open":x.current.open(e.config);break;case"close":x.current.close(e.key);break;case"destroy":x.current.destroy()}}),C(function(e){return e.filter(function(e){return!Z.includes(e)})}))},[Z]),[S,w]}({prefixCls:x,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>m()({["".concat(x,"-rtl")]:null!=u?u:"rtl"===y}),motion:()=>({motionName:null!=f?f:"".concat(x,"-move-up")}),closable:!1,closeIcon:w,duration:s,getContainer:()=>(null==a?void 0:a())||(null==h?void 0:h())||document.body,maxCount:l,onAllRemoved:d,renderNotifications:K});return o.useImperativeHandle(t,()=>Object.assign(Object.assign({},E),{prefixCls:x,message:b})),k}),J=0;function ee(e){let t=o.useRef(null);return(0,X.ln)("Message"),[o.useMemo(()=>{let e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:r,prefixCls:i,message:a}=t.current,c="".concat(i,"-notice"),{content:l,icon:s,type:u,key:f,className:d,style:p,onClose:h}=n,g=U(n,["content","icon","type","key","className","style","onClose"]),v=f;return null==v&&(J+=1,v="antd-message-".concat(J)),$(t=>(r(Object.assign(Object.assign({},g),{key:v,content:o.createElement(q,{prefixCls:i,type:u,icon:s},l),placement:"top",className:m()(u&&"".concat(c,"-").concat(u),d,null==a?void 0:a.className),style:Object.assign(Object.assign({},null==a?void 0:a.style),p),onClose:()=>{null==h||h(),t()}})),()=>{e(v)}))},r={open:n,destroy:n=>{var r;void 0!==n?e(n):null===(r=t.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach(e=>{r[e]=(t,r,o)=>{let i,a,c;return i=t&&"object"==typeof t&&"content"in t?t:{content:t},"function"==typeof r?c=r:(a=r,c=o),n(Object.assign(Object.assign({onClose:c,duration:a},i),{type:e}))}}),r},[]),o.createElement(Q,Object.assign({key:"message-holder"},e,{ref:t}))]}let et=null,en=e=>e(),er=[],eo={};function ei(){let{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=eo,i=(null==e?void 0:e())||document.body;return{getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}let ea=o.forwardRef((e,t)=>{let{messageConfig:n,sync:r}=e,{getPrefixCls:i}=(0,o.useContext)(c.E_),l=eo.prefixCls||i("message"),s=(0,o.useContext)(a),[u,f]=ee(Object.assign(Object.assign(Object.assign({},n),{prefixCls:l}),s.message));return o.useImperativeHandle(t,()=>{let e=Object.assign({},u);return Object.keys(e).forEach(t=>{e[t]=function(){return r(),u[t].apply(u,arguments)}}),{instance:e,sync:r}}),f}),ec=o.forwardRef((e,t)=>{let[n,r]=o.useState(ei),i=()=>{r(ei)};o.useEffect(i,[]);let a=(0,l.w6)(),c=a.getRootPrefixCls(),s=a.getIconPrefixCls(),u=a.getTheme(),f=o.createElement(ea,{ref:t,sync:i,messageConfig:n});return o.createElement(l.ZP,{prefixCls:c,iconPrefixCls:s,theme:u},a.holderRender?a.holderRender(f):f)});function el(){if(!et){let e=document.createDocumentFragment(),t={fragment:e};et=t,en(()=>{(0,i.s)(o.createElement(ec,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,el())})}}),e)});return}et.instance&&(er.forEach(e=>{let{type:t,skipped:n}=e;if(!n)switch(t){case"open":en(()=>{let t=et.instance.open(Object.assign(Object.assign({},eo),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)});break;case"destroy":en(()=>{null==et||et.instance.destroy(e.key)});break;default:en(()=>{var n;let o=(n=et.instance)[t].apply(n,(0,r.Z)(e.args));null==o||o.then(e.resolve),e.setCloseFn(o)})}}),er=[])}let es={open:function(e){let t=$(t=>{let n;let r={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return er.push(r),()=>{n?en(()=>{n()}):r.skipped=!0}});return el(),t},destroy:function(e){er.push({type:"destroy",key:e}),el()},config:function(e){eo=Object.assign(Object.assign({},eo),e),en(()=>{var e;null===(e=null==et?void 0:et.sync)||void 0===e||e.call(et)})},useMessage:function(e){return ee(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{let{prefixCls:t,className:n,type:r,icon:i,content:a}=e,l=V(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:s}=o.useContext(c.E_),u=t||s("message"),f=(0,D.Z)(u),[d,p,h]=B(u,f);return d(o.createElement(Z,Object.assign({},l,{prefixCls:u,className:m()(n,p,"".concat(u,"-notice-pure-panel"),h,f),eventKey:"pure",duration:null,content:o.createElement(q,{prefixCls:u,type:r,icon:i},a)})))}};["success","info","warning","error","loading"].forEach(e=>{es[e]=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){(0,l.w6)();let n=$(n=>{let r;let o={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return er.push(o),()=>{r?en(()=>{r()}):o.skipped=!0}});return el(),n}(e,n)}});var eu=es},92246:function(e,t,n){"use strict";n.d(t,{A:function(){return l},f:function(){return c}});var r=n(13823);let o=Object.assign({},r.Z.Modal),i=[],a=()=>i.reduce((e,t)=>Object.assign(Object.assign({},e),t),r.Z.Modal);function c(e){if(e){let t=Object.assign({},e);return i.push(t),o=a(),()=>{i=i.filter(e=>e!==t),o=a()}}o=Object.assign({},r.Z.Modal)}function l(){return o}},65658:function(e,t,n){"use strict";n.d(t,{BR:function(){return p},ri:function(){return d}});var r=n(36760),o=n.n(r),i=n(45287),a=n(2265),c=n(71744),l=n(33759),s=n(4924),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let f=a.createContext(null),d=(e,t)=>{let n=a.useContext(f),r=a.useMemo(()=>{if(!n)return"";let{compactDirection:r,isFirstItem:i,isLastItem:a}=n,c="vertical"===r?"-vertical-":"-";return o()("".concat(e,"-compact").concat(c,"item"),{["".concat(e,"-compact").concat(c,"first-item")]:i,["".concat(e,"-compact").concat(c,"last-item")]:a,["".concat(e,"-compact").concat(c,"item-rtl")]:"rtl"===t})},[e,t,n]);return{compactSize:null==n?void 0:n.compactSize,compactDirection:null==n?void 0:n.compactDirection,compactItemClassnames:r}},p=e=>{let{children:t}=e;return a.createElement(f.Provider,{value:null},t)},h=e=>{var{children:t}=e,n=u(e,["children"]);return a.createElement(f.Provider,{value:n},t)};t.ZP=e=>{let{getPrefixCls:t,direction:n}=a.useContext(c.E_),{size:r,direction:d,block:p,prefixCls:m,className:g,rootClassName:v,children:b}=e,y=u(e,["size","direction","block","prefixCls","className","rootClassName","children"]),x=(0,l.Z)(e=>null!=r?r:e),w=t("space-compact",m),[E,k]=(0,s.Z)(w),Z=o()(w,k,{["".concat(w,"-rtl")]:"rtl"===n,["".concat(w,"-block")]:p,["".concat(w,"-vertical")]:"vertical"===d},g,v),C=a.useContext(f),S=(0,i.Z)(b),O=a.useMemo(()=>S.map((e,t)=>{let n=e&&e.key||"".concat(w,"-item-").concat(t);return a.createElement(h,{key:n,compactSize:x,compactDirection:d,isFirstItem:0===t&&(!C||(null==C?void 0:C.isFirstItem)),isLastItem:t===S.length-1&&(!C||(null==C?void 0:C.isLastItem))},e)}),[r,S,C]);return 0===S.length?null:E(a.createElement("div",Object.assign({className:Z},y),O))}},4924:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(80669),o=n(3104),i=e=>{let{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}};let a=e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},["".concat(t,"-item:empty")]:{display:"none"}}}},c=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}};var l=(0,r.I$)("Space",e=>{let t=(0,o.TS)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[a(t),c(t),i(t)]},()=>({}),{resetStyle:!1})},17691:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0},{componentCls:n}=e,r="".concat(n,"-compact");return{[r]:Object.assign(Object.assign({},function(e,t,n){let{focusElCls:r,focus:o,borderElCls:i}=n,a=i?"> *":"",c=["hover",o?"focus":null,"active"].filter(Boolean).map(e=>"&:".concat(e," ").concat(a)).join(",");return{["&-item:not(".concat(t,"-last-item)")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[c]:{zIndex:2}},r?{["&".concat(r)]:{zIndex:2}}:{}),{["&[disabled] ".concat(a)]:{zIndex:0}})}}(e,r,t)),function(e,t,n){let{borderElCls:r}=n,o=r?"> ".concat(r):"";return{["&-item:not(".concat(t,"-first-item):not(").concat(t,"-last-item) ").concat(o)]:{borderRadius:0},["&-item:not(".concat(t,"-last-item)").concat(t,"-first-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&-item:not(".concat(t,"-first-item)").concat(t,"-last-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}(n,r,t))}}n.d(t,{c:function(){return r}})},12918:function(e,t,n){"use strict";n.d(t,{Lx:function(){return l},Qy:function(){return f},Ro:function(){return a},Wf:function(){return i},dF:function(){return c},du:function(){return s},oN:function(){return u},vS:function(){return o}});var r=n(352);let o={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},a=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),c=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),l=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),s=(e,t)=>{let{fontFamily:n,fontSize:r}=e,o='[class^="'.concat(t,'"], [class*=" ').concat(t,'"]');return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},u=e=>({outline:"".concat((0,r.bf)(e.lineWidthFocus)," solid ").concat(e.colorPrimaryBorder),outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),f=e=>({"&:focus-visible":Object.assign({},u(e))})},37133:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});let r=e=>({animationDuration:e,animationFillMode:"both"}),o=e=>({animationDuration:e,animationFillMode:"both"}),i=function(e,t,n,i){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],c=a?"&":"";return{["\n ".concat(c).concat(e,"-enter,\n ").concat(c).concat(e,"-appear\n ")]:Object.assign(Object.assign({},r(i)),{animationPlayState:"paused"}),["".concat(c).concat(e,"-leave")]:Object.assign(Object.assign({},o(i)),{animationPlayState:"paused"}),["\n ".concat(c).concat(e,"-enter").concat(e,"-enter-active,\n ").concat(c).concat(e,"-appear").concat(e,"-appear-active\n ")]:{animationName:t,animationPlayState:"running"},["".concat(c).concat(e,"-leave").concat(e,"-leave-active")]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}}},691:function(e,t,n){"use strict";n.d(t,{_y:function(){return m},kr:function(){return i}});var r=n(352),o=n(37133);let i=new r.E4("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),a=new r.E4("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),c=new r.E4("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),l=new r.E4("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),s=new r.E4("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),u=new r.E4("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),f=new r.E4("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),d=new r.E4("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),p=new r.E4("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),h={zoom:{inKeyframes:i,outKeyframes:a},"zoom-big":{inKeyframes:c,outKeyframes:l},"zoom-big-fast":{inKeyframes:c,outKeyframes:l},"zoom-left":{inKeyframes:f,outKeyframes:d},"zoom-right":{inKeyframes:p,outKeyframes:new r.E4("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:s,outKeyframes:u},"zoom-down":{inKeyframes:new r.E4("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new r.E4("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},m=(e,t)=>{let{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:i,outKeyframes:a}=h[t];return[(0,o.R)(r,i,a,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]}},88260:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a},qN:function(){return o},wZ:function(){return i}});var r=n(34442);let o=8;function i(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?o:r}}function a(e,t,n){var o,i,a,c,l,s,u,f;let{componentCls:d,boxShadowPopoverArrow:p,arrowOffsetVertical:h,arrowOffsetHorizontal:m}=e,{arrowDistance:g=0,arrowPlacement:v={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[d]:Object.assign(Object.assign(Object.assign(Object.assign({["".concat(d,"-arrow")]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,r.W)(e,t,p)),{"&:before":{background:t}})]},(o=!!v.top,i={[["&-placement-top > ".concat(d,"-arrow"),"&-placement-topLeft > ".concat(d,"-arrow"),"&-placement-topRight > ".concat(d,"-arrow")].join(",")]:{bottom:g,transform:"translateY(100%) rotate(180deg)"},["&-placement-top > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},["&-placement-topLeft > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:m}},["&-placement-topRight > ".concat(d,"-arrow")]:{right:{_skip_check_:!0,value:m}}},o?i:{})),(a=!!v.bottom,c={[["&-placement-bottom > ".concat(d,"-arrow"),"&-placement-bottomLeft > ".concat(d,"-arrow"),"&-placement-bottomRight > ".concat(d,"-arrow")].join(",")]:{top:g,transform:"translateY(-100%)"},["&-placement-bottom > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},["&-placement-bottomLeft > ".concat(d,"-arrow")]:{left:{_skip_check_:!0,value:m}},["&-placement-bottomRight > ".concat(d,"-arrow")]:{right:{_skip_check_:!0,value:m}}},a?c:{})),(l=!!v.left,s={[["&-placement-left > ".concat(d,"-arrow"),"&-placement-leftTop > ".concat(d,"-arrow"),"&-placement-leftBottom > ".concat(d,"-arrow")].join(",")]:{right:{_skip_check_:!0,value:g},transform:"translateX(100%) rotate(90deg)"},["&-placement-left > ".concat(d,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},["&-placement-leftTop > ".concat(d,"-arrow")]:{top:h},["&-placement-leftBottom > ".concat(d,"-arrow")]:{bottom:h}},l?s:{})),(u=!!v.right,f={[["&-placement-right > ".concat(d,"-arrow"),"&-placement-rightTop > ".concat(d,"-arrow"),"&-placement-rightBottom > ".concat(d,"-arrow")].join(",")]:{left:{_skip_check_:!0,value:g},transform:"translateX(-100%) rotate(-90deg)"},["&-placement-right > ".concat(d,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},["&-placement-rightTop > ".concat(d,"-arrow")]:{top:h},["&-placement-rightBottom > ".concat(d,"-arrow")]:{bottom:h}},u?f:{}))}}},34442:function(e,t,n){"use strict";n.d(t,{W:function(){return i},w:function(){return o}});var r=n(352);function o(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=1*r/Math.sqrt(2),a=o-r*(1-1/Math.sqrt(2)),c=o-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,s=2*o-c,u=2*o-i,f=2*o-0,d=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),p=r*(Math.sqrt(2)-1),h="polygon(".concat(p,"px 100%, 50% ").concat(p,"px, ").concat(2*o-p,"px 100%, ").concat(p,"px 100%)");return{arrowShadowWidth:d,arrowPath:"path('M ".concat(0," ").concat(o," A ").concat(r," ").concat(r," 0 0 0 ").concat(i," ").concat(a," L ").concat(c," ").concat(l," A ").concat(n," ").concat(n," 0 0 1 ").concat(s," ").concat(l," L ").concat(u," ").concat(a," A ").concat(r," ").concat(r," 0 0 0 ").concat(f," ").concat(o," Z')"),arrowPolygon:h}}let i=(e,t,n)=>{let{sizePopupArrow:o,arrowPolygon:i,arrowPath:a,arrowShadowWidth:c,borderRadiusXS:l,calc:s}=e;return{pointerEvents:"none",width:o,height:o,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:o,height:s(o).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:'""'},"&::after":{content:'""',position:"absolute",width:c,height:c,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:"0 0 ".concat((0,r.bf)(l)," 0")},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}}},37516:function(e,t,n){"use strict";n.d(t,{Mj:function(){return b},u_:function(){return v},uH:function(){return g}});var r=n(2265),o=n(352),i=n(31373),a=e=>{let{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}},c=n(70774),l=n(36360),s=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};let u=(e,t)=>new l.C(e).setAlpha(t).toRgbString(),f=(e,t)=>new l.C(e).darken(t).toHexString(),d=e=>{let t=(0,i.R_)(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},p=(e,t)=>{let n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:u(r,.88),colorTextSecondary:u(r,.65),colorTextTertiary:u(r,.45),colorTextQuaternary:u(r,.25),colorFill:u(r,.15),colorFillSecondary:u(r,.06),colorFillTertiary:u(r,.04),colorFillQuaternary:u(r,.02),colorBgLayout:f(n,4),colorBgContainer:f(n,0),colorBgElevated:f(n,0),colorBgSpotlight:u(r,.85),colorBgBlur:"transparent",colorBorder:f(n,15),colorBorderSecondary:f(n,6)}};var h=n(1319),m=e=>{let t=(0,h.Z)(e),n=t.map(e=>e.size),r=t.map(e=>e.lineHeight),o=n[1],i=n[0],a=n[2],c=r[1],l=r[0],s=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:c,lineHeightLG:s,lineHeightSM:l,fontHeight:Math.round(c*o),fontHeightLG:Math.round(s*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};let g=(0,o.jG)(function(e){let t=Object.keys(c.M).map(t=>{let n=(0,i.R_)(e[t]);return Array(10).fill(1).reduce((e,r,o)=>(e["".concat(t,"-").concat(o+1)]=n[o],e["".concat(t).concat(o+1)]=n[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t,{colorSuccess:o,colorWarning:i,colorError:a,colorInfo:c,colorPrimary:s,colorBgBase:u,colorTextBase:f}=e,d=n(s),p=n(o),h=n(i),m=n(a),g=n(c),v=r(u,f),b=n(e.colorLink||e.colorInfo);return Object.assign(Object.assign({},v),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new l.C("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:d,generateNeutralColorPalettes:p})),m(e.fontSize)),function(e){let{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),a(e)),function(e){let{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:"".concat((n+t).toFixed(1),"s"),motionDurationMid:"".concat((n+2*t).toFixed(1),"s"),motionDurationSlow:"".concat((n+3*t).toFixed(1),"s"),lineWidthBold:o+1},s(r))}(e))}),v={token:c.Z,override:{override:c.Z},hashed:!0},b=r.createContext(v)},53454:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},70774:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let r={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o=Object.assign(Object.assign({},r),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});t.Z=o},1319:function(e,t,n){"use strict";function r(e){return(e+8)/e}function o(e){let t=Array(10).fill(null).map((t,n)=>{let r=e*Math.pow(2.71828,(n-1)/5);return 2*Math.floor((n>1?Math.floor(r):Math.ceil(r))/2)});return t[1]=e,t.map(e=>({size:e,lineHeight:r(e)}))}n.d(t,{D:function(){return r},Z:function(){return o}})},29961:function(e,t,n){"use strict";n.d(t,{ZP:function(){return v},ID:function(){return h},NJ:function(){return p}});var r=n(2265),o=n(352),i=n(37516),a=n(70774),c=n(36360);function l(e){return e>=0&&e<=255}var s=function(e,t){let{r:n,g:r,b:o,a:i}=new c.C(e).toRgb();if(i<1)return e;let{r:a,g:s,b:u}=new c.C(t).toRgb();for(let e=.01;e<=1;e+=.01){let t=Math.round((n-a*(1-e))/e),i=Math.round((r-s*(1-e))/e),f=Math.round((o-u*(1-e))/e);if(l(t)&&l(i)&&l(f))return new c.C({r:t,g:i,b:f,a:Math.round(100*e)/100}).toRgbString()}return new c.C({r:n,g:r,b:o,a:1}).toRgbString()},u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function f(e){let{override:t}=e,n=u(e,["override"]),r=Object.assign({},t);Object.keys(a.Z).forEach(e=>{delete r[e]});let o=Object.assign(Object.assign({},n),r);return!1===o.motion&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:s(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:s(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:s(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:4*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:s(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"\n 0 1px 2px -2px ".concat(new c.C("rgba(0, 0, 0, 0.16)").toRgbString(),",\n 0 3px 6px 0 ").concat(new c.C("rgba(0, 0, 0, 0.12)").toRgbString(),",\n 0 5px 12px 4px ").concat(new c.C("rgba(0, 0, 0, 0.09)").toRgbString(),"\n "),boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let p={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0},h={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},m={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},g=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:o}=t,i=d(t,["override"]),a=Object.assign(Object.assign({},r),{override:o});return a=f(a),i&&Object.entries(i).forEach(e=>{let[t,n]=e,{theme:r}=n,o=d(n,["theme"]),i=o;r&&(i=g(Object.assign(Object.assign({},a),o),{override:o},r)),a[t]=i}),a};function v(){let{token:e,hashed:t,theme:n,override:c,cssVar:l}=r.useContext(i.Mj),s="".concat("5.13.2","-").concat(t||""),u=n||i.uH,[d,v,b]=(0,o.fp)(u,[a.Z,e],{salt:s,override:c,getComputedToken:g,formatToken:f,cssVar:l&&{prefix:l.prefix,key:l.key,unitless:p,ignore:h,preserve:m}});return[u,b,t?v:"",d,l]}},80669:function(e,t,n){"use strict";n.d(t,{ZP:function(){return C},I$:function(){return P},bk:function(){return S}});var r=n(2265),o=n(352);n(74126);var i=n(71744),a=n(12918),c=n(29961),l=n(76405),s=n(25049),u=n(37977),f=n(63929),d=n(24995),p=n(15354);let h=(0,s.Z)(function e(){(0,l.Z)(this,e)}),m=function(e){function t(e){var n,r,o;return(0,l.Z)(this,t),r=t,r=(0,d.Z)(r),(n=(0,u.Z)(this,(0,f.Z)()?Reflect.construct(r,[],(0,d.Z)(this).constructor):r.apply(this,o))).result=0,e instanceof t?n.result=e.result:"number"==typeof e&&(n.result=e),n}return(0,p.Z)(t,e),(0,s.Z)(t,[{key:"add",value:function(e){return e instanceof t?this.result+=e.result:"number"==typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof t?this.result-=e.result:"number"==typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof t?this.result*=e.result:"number"==typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof t?this.result/=e.result:"number"==typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),t}(h),g="CALC_UNIT";function v(e){return"number"==typeof e?"".concat(e).concat(g):e}let b=function(e){function t(e){var n,r,o;return(0,l.Z)(this,t),r=t,r=(0,d.Z)(r),(n=(0,u.Z)(this,(0,f.Z)()?Reflect.construct(r,[],(0,d.Z)(this).constructor):r.apply(this,o))).result="",e instanceof t?n.result="(".concat(e.result,")"):"number"==typeof e?n.result=v(e):"string"==typeof e&&(n.result=e),n}return(0,p.Z)(t,e),(0,s.Z)(t,[{key:"add",value:function(e){return e instanceof t?this.result="".concat(this.result," + ").concat(e.getResult()):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," + ").concat(v(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof t?this.result="".concat(this.result," - ").concat(e.getResult()):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," - ").concat(v(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," * ").concat(e.getResult(!0)):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," / ").concat(e.getResult(!0)):("number"==typeof e||"string"==typeof e)&&(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){let{unit:t=!0}=e||{},n=RegExp("".concat(g),"g");return(this.result=this.result.replace(n,t?"px":""),void 0!==this.lowPriority)?"calc(".concat(this.result,")"):this.result}}]),t}(h);var y=e=>{let t="css"===e?b:m;return e=>new t(e)},x=n(3104),w=n(36198);let E=(e,t,n)=>{var r;return"function"==typeof n?n((0,x.TS)(t,null!==(r=t[e])&&void 0!==r?r:{})):null!=n?n:{}},k=(e,t,n,r)=>{let o=Object.assign({},t[e]);if(null==r?void 0:r.deprecatedTokens){let{deprecatedTokens:e}=r;e.forEach(e=>{var t;let[n,r]=e;((null==o?void 0:o[n])||(null==o?void 0:o[r]))&&(null!==(t=o[r])&&void 0!==t||(o[r]=null==o?void 0:o[n]))})}let i=Object.assign(Object.assign({},n),o);return Object.keys(i).forEach(e=>{i[e]===t[e]&&delete i[e]}),i},Z=(e,t)=>"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"));function C(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=Array.isArray(e)?e:[e,e],[u]=s,f=s.join("-");return e=>{let[s,d,p,h,m]=(0,c.ZP)(),{getPrefixCls:g,iconPrefixCls:v,csp:b}=(0,r.useContext)(i.E_),C=g(),S=m?"css":"js",O=y(S),{max:P,min:M}="js"===S?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map(e=>(0,o.bf)(e)).join(","),")")},min:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map(e=>(0,o.bf)(e)).join(","),")")}},j={theme:s,token:h,hashId:p,nonce:()=>null==b?void 0:b.nonce,clientOnly:l.clientOnly,order:l.order||-999};return(0,o.xy)(Object.assign(Object.assign({},j),{clientOnly:!1,path:["Shared",C]}),()=>[{"&":(0,a.Lx)(h)}]),(0,w.Z)(v,b),[(0,o.xy)(Object.assign(Object.assign({},j),{path:[f,e,v]}),()=>{if(!1===l.injectStyle)return[];let{token:r,flush:i}=(0,x.ZP)(h),c=E(u,d,n),s=".".concat(e),f=k(u,d,c,{deprecatedTokens:l.deprecatedTokens});m&&Object.keys(c).forEach(e=>{c[e]="var(".concat((0,o.ks)(e,Z(u,m.prefix)),")")});let g=(0,x.TS)(r,{componentCls:s,prefixCls:e,iconCls:".".concat(v),antCls:".".concat(C),calc:O,max:P,min:M},m?c:f),b=t(g,{hashId:p,prefixCls:e,rootPrefixCls:C,iconPrefixCls:v});return i(u,f),[!1===l.resetStyle?null:(0,a.du)(g,e),b]}),p]}}let S=(e,t,n,r)=>{let o=C(e,t,n,Object.assign({resetStyle:!1,order:-998},r));return e=>{let{prefixCls:t}=e;return o(t),null}},O=(e,t,n)=>{function i(t){return"".concat(e).concat(t.slice(0,1).toUpperCase()).concat(t.slice(1))}let{unitless:a={},injectStyle:l=!0}=null!=n?n:{},s={[i("zIndexPopup")]:!0};Object.keys(a).forEach(e=>{s[i(e)]=a[e]});let u=r=>{let{rootCls:a,cssVar:l}=r,[,u]=(0,c.ZP)();return(0,o.CI)({path:[e],prefix:l.prefix,key:null==l?void 0:l.key,unitless:Object.assign(Object.assign({},c.NJ),s),ignore:c.ID,token:u,scope:a},()=>{let r=E(e,u,t),o=k(e,u,r,{deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(r).forEach(e=>{o[i(e)]=o[e],delete o[e]}),o}),null};return t=>{let[,,,,n]=(0,c.ZP)();return[o=>l&&n?r.createElement(r.Fragment,null,r.createElement(u,{rootCls:t,cssVar:n,component:e}),o):o,null==n?void 0:n.key]}},P=(e,t,n,r)=>{let o=C(e,t,n,r),i=O(Array.isArray(e)?e[0]:e,n,r);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,[,n]=o(e),[r,a]=i(t);return[r,n,a]}}},3104:function(e,t,n){"use strict";n.d(t,{TS:function(){return i}});let r="undefined"!=typeof CSSINJS_STATISTIC,o=!0;function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!r)return Object.assign.apply(Object,[{}].concat(t));o=!1;let i={};return t.forEach(e=>{Object.keys(e).forEach(t=>{Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:()=>e[t]})})}),o=!0,i}let a={};function c(){}t.ZP=e=>{let t;let n=e,i=c;return r&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:(e,n)=>(o&&t.add(n),e[n])}),i=(e,n)=>{var r;a[e]={global:Array.from(t),component:Object.assign(Object.assign({},null===(r=a[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:i}}},36198:function(e,t,n){"use strict";var r=n(352),o=n(12918),i=n(29961);t.Z=(e,t)=>{let[n,a]=(0,i.ZP)();return(0,r.xy)({theme:n,token:a,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce},()=>[{[".".concat(e)]:Object.assign(Object.assign({},(0,o.Ro)()),{[".".concat(e," .").concat(e,"-icon")]:{display:"block"}})}])}},75957:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var r=n(2265),o=n(36760),i=n.n(o),a=n(5769),c=n(50506),l=n(62236),s=n(68710),u=n(92736),f=n(19722),d=n(13613),p=n(95140),h=n(71744),m=n(65658),g=n(29961),v=n(12918),b=n(691),y=n(88260),x=n(53454),w=n(3104),E=n(80669),k=n(352),Z=n(34442);let C=e=>{var t;let{componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:c,controlHeight:l,boxShadowSecondary:s,paddingSM:u,paddingXS:f}=e;return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,v.Wf)(e)),{position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:r,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":i,["".concat(n,"-inner")]:{minWidth:l,minHeight:l,padding:"".concat((0,k.bf)(e.calc(u).div(2).equal())," ").concat((0,k.bf)(f)),color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:s,boxSizing:"border-box"},"&-placement-left,&-placement-leftTop,&-placement-leftBottom,&-placement-right,&-placement-rightTop,&-placement-rightBottom":{["".concat(n,"-inner")]:{borderRadius:e.min(a,y.qN)}},["".concat(n,"-content")]:{position:"relative"}}),(t=(e,t)=>{let{darkColor:r}=t;return{["&".concat(n,"-").concat(e)]:{["".concat(n,"-inner")]:{backgroundColor:r},["".concat(n,"-arrow")]:{"--antd-arrow-background-color":r}}}},x.i.reduce((n,r)=>{let o=e["".concat(r,"1")],i=e["".concat(r,"3")],a=e["".concat(r,"6")],c=e["".concat(r,"7")];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:c}))},{}))),{"&-rtl":{direction:"rtl"}})},(0,y.ZP)(e,"var(--antd-arrow-background-color)"),{["".concat(n,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},S=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},(0,y.wZ)({contentRadius:e.borderRadius,limitVerticalRadius:!0})),(0,Z.w)((0,w.TS)(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)})));function O(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(0,E.I$)("Tooltip",e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e;return[C((0,w.TS)(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),(0,b._y)(e,"zoom-big-fast")]},S,{resetStyle:!1,injectStyle:t})(e)}var P=n(83145);let M=x.i.map(e=>"".concat(e,"-inverse"));function j(e,t){let n=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return t?[].concat((0,P.Z)(M),(0,P.Z)(x.i)).includes(e):x.i.includes(e)}(t),r=i()({["".concat(e,"-").concat(t)]:t&&n}),o={},a={};return t&&!n&&(o.background=t,a["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:a}}var A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let R=r.forwardRef((e,t)=>{var n,o;let{prefixCls:v,openClassName:b,getTooltipContainer:y,overlayClassName:x,color:w,overlayInnerStyle:E,children:k,afterOpenChange:Z,afterVisibleChange:C,destroyTooltipOnHide:S,arrow:P=!0,title:M,overlay:R,builtinPlacements:F,arrowPointAtCenter:T=!1,autoAdjustOverflow:N=!0}=e,L=!!P,[,_]=(0,g.ZP)(),{getPopupContainer:I,getPrefixCls:z,direction:H}=r.useContext(h.E_),B=(0,d.ln)("Tooltip"),D=r.useRef(null),V=()=>{var e;null===(e=D.current)||void 0===e||e.forceAlign()};r.useImperativeHandle(t,()=>({forceAlign:V,forcePopupAlign:()=>{B.deprecated(!1,"forcePopupAlign","forceAlign"),V()}}));let[W,q]=(0,c.Z)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),G=!M&&!R&&0!==M,X=r.useMemo(()=>{var e,t;let n=T;return"object"==typeof P&&(n=null!==(t=null!==(e=P.pointAtCenter)&&void 0!==e?e:P.arrowPointAtCenter)&&void 0!==t?t:T),F||(0,u.Z)({arrowPointAtCenter:n,autoAdjustOverflow:N,arrowWidth:L?_.sizePopupArrow:0,borderRadius:_.borderRadius,offset:_.marginXXS,visibleFirst:!0})},[T,P,F,_]),$=r.useMemo(()=>0===M?M:R||M||"",[R,M]),U=r.createElement(m.BR,null,"function"==typeof $?$():$),{getPopupContainer:Y,placement:K="top",mouseEnterDelay:Q=.1,mouseLeaveDelay:J=.1,overlayStyle:ee,rootClassName:et}=e,en=A(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),er=z("tooltip",v),eo=z(),ei=e["data-popover-inject"],ea=W;"open"in e||"visible"in e||!G||(ea=!1);let ec=(0,f.l$)(k)&&!(0,f.M2)(k)?k:r.createElement("span",null,k),el=ec.props,es=el.className&&"string"!=typeof el.className?el.className:i()(el.className,b||"".concat(er,"-open")),[eu,ef,ed]=O(er,!ei),ep=j(er,w),eh=ep.arrowStyle,em=Object.assign(Object.assign({},E),ep.overlayStyle),eg=i()(x,{["".concat(er,"-rtl")]:"rtl"===H},ep.className,et,ef,ed),[ev,eb]=(0,l.Cn)("Tooltip",en.zIndex),ey=r.createElement(a.Z,Object.assign({},en,{zIndex:ev,showArrow:L,placement:K,mouseEnterDelay:Q,mouseLeaveDelay:J,prefixCls:er,overlayClassName:eg,overlayStyle:Object.assign(Object.assign({},eh),ee),getTooltipContainer:Y||y||I,ref:D,builtinPlacements:X,overlay:U,visible:ea,onVisibleChange:t=>{var n,r;q(!G&&t),G||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!=Z?Z:C,overlayInnerStyle:em,arrowContent:r.createElement("span",{className:"".concat(er,"-arrow-content")}),motion:{motionName:(0,s.m)(eo,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!S}),ea?(0,f.Tm)(ec,{className:es}):ec);return eu(r.createElement(p.Z.Provider,{value:eb},ey))});R._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,className:n,placement:o="top",title:c,color:l,overlayInnerStyle:s}=e,{getPrefixCls:u}=r.useContext(h.E_),f=u("tooltip",t),[d,p,m]=O(f),g=j(f,l),v=g.arrowStyle,b=Object.assign(Object.assign({},s),g.overlayStyle),y=i()(p,m,f,"".concat(f,"-pure"),"".concat(f,"-placement-").concat(o),n,g.className);return d(r.createElement("div",{className:y,style:v},r.createElement("div",{className:"".concat(f,"-arrow")}),r.createElement(a.G,Object.assign({},e,{className:p,prefixCls:f,overlayInnerStyle:b}),c)))};var F=R},99376:function(e,t,n){"use strict";var r=n(35475);n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},40257:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(44227)},44227:function(e){!function(){var t={229:function(e){var t,n,r,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var l=[],s=!1,u=-1;function f(){s&&r&&(s=!1,r.length?l=r.concat(l):u=-1,l.length&&d())}function d(){if(!s){var e=c(f);s=!0;for(var t=l.length;t;){for(r=l,l=[];++u<t;)r&&r[u].run();u=-1,t=l.length}r=null,s=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||s||c(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}},a=!0;try{t[e](i,i.exports,r),a=!1}finally{a&&delete n[e]}return i.exports}r.ab="//";var o=r(229);e.exports=o}()},64834:function(e,t,n){"use strict";n.d(t,{gN:function(){return eg},zb:function(){return E},RV:function(){return eS},aV:function(){return ev},ZM:function(){return k},ZP:function(){return eR},cI:function(){return eZ},qo:function(){return ej}});var r,o=n(2265),i=n(1119),a=n(6989),c=n(73129),l=n(54580),s=n(31686),u=n(83145),f=n(76405),d=n(25049),p=n(63496),h=n(15354),m=n(15900),g=n(11993),v=n(45287),b=n(16671),y=n(32559),x="RC_FORM_INTERNAL_HOOKS",w=function(){(0,y.ZP)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},E=o.createContext({getFieldValue:w,getFieldsValue:w,getFieldError:w,getFieldWarning:w,getFieldsError:w,isFieldsTouched:w,isFieldTouched:w,isFieldValidating:w,isFieldsValidating:w,resetFields:w,setFields:w,setFieldValue:w,setFieldsValue:w,validateFields:w,submit:w,getInternalHooks:function(){return w(),{dispatch:w,initEntityValue:w,registerField:w,useSubscribe:w,setInitialValues:w,destroyForm:w,setCallbacks:w,registerWatch:w,getFields:w,setValidateMessages:w,setPreserve:w,getInitialValue:w}}}),k=o.createContext(null);function Z(e){return null==e?[]:Array.isArray(e)?e:[e]}var C=n(40257);function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function M(e,t,n){return(M=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o}:Reflect.construct.bind()).apply(null,arguments)}function j(e){var t="function"==typeof Map?new Map:void 0;return(j=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return M(e,arguments,O(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)})(e)}var A=/%[sdj%]/g;function R(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function F(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;return"function"==typeof e?e.apply(null,n):"string"==typeof e?e.replace(A,function(e){if("%%"===e)return"%";if(o>=i)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}}):e}function T(e,t){return!!(null==e||"array"===t&&Array.isArray(e)&&!e.length)||("string"===t||"url"===t||"hex"===t||"email"===t||"date"===t||"pattern"===t)&&"string"==typeof e&&!e}function N(e,t,n){var r=0,o=e.length;!function i(a){if(a&&a.length){n(a);return}var c=r;r+=1,c<o?t(e[c],i):n([])}([])}void 0!==C&&C.env;var L=function(e){function t(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,P(t,e),t}(j(Error));function _(e,t){return function(n){var r;return(r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length&&void 0!=n;r++)n=n[t[r]];return n}(t,e.fullFields):t[n.field||e.fullField],n&&void 0!==n.message)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"==typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function I(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"==typeof r&&"object"==typeof e[n]?e[n]=S({},e[n],r):e[n]=r}}return e}var z=function(e,t,n,r,o,i){e.required&&(!n.hasOwnProperty(e.field)||T(t,i||e.type))&&r.push(F(o.messages.required,e.fullField))},H=function(){if(r)return r;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",i=("\n(?:\n(?:"+o+":){7}(?:"+o+"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:"+o+":){6}(?:"+n+"|:"+o+"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:"+o+":){5}(?::"+n+"|(?::"+o+"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:"+o+":){4}(?:(?::"+o+"){0,1}:"+n+"|(?::"+o+"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:"+o+":){3}(?:(?::"+o+"){0,2}:"+n+"|(?::"+o+"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:"+o+":){2}(?:(?::"+o+"){0,3}:"+n+"|(?::"+o+"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:"+o+":){1}(?:(?::"+o+"){0,4}:"+n+"|(?::"+o+"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+o+"){0,5}:"+n+"|(?::"+o+"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),c=RegExp("^"+n+"$"),l=RegExp("^"+i+"$"),s=function(e){return e&&e.exact?a:RegExp("(?:"+t(e)+n+t(e)+")|(?:"+t(e)+i+t(e)+")","g")};return s.v4=function(e){return e&&e.exact?c:RegExp(""+t(e)+n+t(e),"g")},s.v6=function(e){return e&&e.exact?l:RegExp(""+t(e)+i+t(e),"g")},r=RegExp("(?:^"+("(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+s.v4().source+"|")+s.v6().source+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")},B={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},D={integer:function(e){return D.number(e)&&parseInt(e,10)===e},float:function(e){return D.number(e)&&!D.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return new RegExp(e),!0}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!D.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(B.email)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(H())},hex:function(e){return"string"==typeof e&&!!e.match(B.hex)}},V="enum",W={required:z,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(F(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t){z(e,t,n,r,o);return}var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?D[i](t)||r.push(F(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&r.push(F(o.messages.types[i],e.fullField,e.type))},range:function(e,t,n,r,o){var i="number"==typeof e.len,a="number"==typeof e.min,c="number"==typeof e.max,l=t,s=null,u="number"==typeof t,f="string"==typeof t,d=Array.isArray(t);if(u?s="number":f?s="string":d&&(s="array"),!s)return!1;d&&(l=t.length),f&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?l!==e.len&&r.push(F(o.messages[s].len,e.fullField,e.len)):a&&!c&&l<e.min?r.push(F(o.messages[s].min,e.fullField,e.min)):c&&!a&&l>e.max?r.push(F(o.messages[s].max,e.fullField,e.max)):a&&c&&(l<e.min||l>e.max)&&r.push(F(o.messages[s].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e[V]=Array.isArray(e[V])?e[V]:[],-1===e[V].indexOf(t)&&r.push(F(o.messages[V],e.fullField,e[V].join(", ")))},pattern:function(e,t,n,r,o){!e.pattern||(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(F(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"!=typeof e.pattern||new RegExp(e.pattern).test(t)||r.push(F(o.messages.pattern.mismatch,e.fullField,t,e.pattern)))}},q=function(e,t,n,r,o){var i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t,i)&&!e.required)return n();W.required(e,t,r,a,o,i),T(t,i)||W.type(e,t,r,a,o)}n(a)},G={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t,"string")&&!e.required)return n();W.required(e,t,r,i,o,"string"),T(t,"string")||(W.type(e,t,r,i,o),W.range(e,t,r,i,o),W.pattern(e,t,r,i,o),!0===e.whitespace&&W.whitespace(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&W.type(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&(W.type(e,t,r,i,o),W.range(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&W.type(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),T(t)||W.type(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&(W.type(e,t,r,i,o),W.range(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&(W.type(e,t,r,i,o),W.range(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();W.required(e,t,r,i,o,"array"),null!=t&&(W.type(e,t,r,i,o),W.range(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&W.type(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o),void 0!==t&&W.enum(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t,"string")&&!e.required)return n();W.required(e,t,r,i,o),T(t,"string")||W.pattern(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t,"date")&&!e.required)return n();W.required(e,t,r,a,o),!T(t,"date")&&(i=t instanceof Date?t:new Date(t),W.type(e,i,r,a,o),i&&W.range(e,i.getTime(),r,a,o))}n(a)},url:q,hex:q,email:q,required:function(e,t,n,r,o){var i=[],a=Array.isArray(t)?"array":typeof t;W.required(e,t,r,i,o,a),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(T(t)&&!e.required)return n();W.required(e,t,r,i,o)}n(i)}};function X(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var $=X(),U=function(){function e(e){this.rules=null,this._messages=$,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw Error("Rules must be an object");this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})},t.messages=function(e){return e&&(this._messages=I(X(),e)),this._messages},t.validate=function(t,n,r){var o=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var i=t,a=n,c=r;if("function"==typeof a&&(c=a,a={}),!this.rules||0===Object.keys(this.rules).length)return c&&c(null,i),Promise.resolve(i);if(a.messages){var l=this.messages();l===$&&(l=X()),I(l,a.messages),a.messages=l}else a.messages=this.messages();var s={};(a.keys||Object.keys(this.rules)).forEach(function(e){var n=o.rules[e],r=i[e];n.forEach(function(n){var a=n;"function"==typeof a.transform&&(i===t&&(i=S({},i)),r=i[e]=a.transform(r)),(a="function"==typeof a?{validator:a}:S({},a)).validator=o.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=o.getType(a),s[e]=s[e]||[],s[e].push({rule:a,value:r,source:i,field:e}))})});var u={};return function(e,t,n,r,o){if(t.first){var i=new Promise(function(t,i){var a;N((a=[],Object.keys(e).forEach(function(t){a.push.apply(a,e[t]||[])}),a),n,function(e){return r(e),e.length?i(new L(e,R(e))):t(o)})});return i.catch(function(e){return e}),i}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],c=Object.keys(e),l=c.length,s=0,u=[],f=new Promise(function(t,i){var f=function(e){if(u.push.apply(u,e),++s===l)return r(u),u.length?i(new L(u,R(u))):t(o)};c.length||(r(u),t(o)),c.forEach(function(t){var r=e[t];-1!==a.indexOf(t)?N(r,n,f):function(e,t,n){var r=[],o=0,i=e.length;function a(e){r.push.apply(r,e||[]),++o===i&&n(r)}e.forEach(function(e){t(e,a)})}(r,n,f)})});return f.catch(function(e){return e}),f}(s,a,function(t,n){var r,o=t.rule,c=("object"===o.type||"array"===o.type)&&("object"==typeof o.fields||"object"==typeof o.defaultField);function l(e,t){return S({},t,{fullField:o.fullField+"."+e,fullFields:o.fullFields?[].concat(o.fullFields,[e]):[e]})}function s(r){void 0===r&&(r=[]);var s=Array.isArray(r)?r:[r];!a.suppressWarning&&s.length&&e.warning("async-validator:",s),s.length&&void 0!==o.message&&(s=[].concat(o.message));var f=s.map(_(o,i));if(a.first&&f.length)return u[o.field]=1,n(f);if(c){if(o.required&&!t.value)return void 0!==o.message?f=[].concat(o.message).map(_(o,i)):a.error&&(f=[a.error(o,F(a.messages.required,o.field))]),n(f);var d={};o.defaultField&&Object.keys(t.value).map(function(e){d[e]=o.defaultField});var p={};Object.keys(d=S({},d,t.rule.fields)).forEach(function(e){var t=d[e],n=Array.isArray(t)?t:[t];p[e]=n.map(l.bind(null,e))});var h=new e(p);h.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),h.validate(t.value,t.rule.options||a,function(e){var t=[];f&&f.length&&t.push.apply(t,f),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)})}else n(f)}if(c=c&&(o.required||!o.required&&t.value),o.field=t.field,o.asyncValidator)r=o.asyncValidator(o,t.value,s,t.source,a);else if(o.validator){try{r=o.validator(o,t.value,s,t.source,a)}catch(e){null==console.error||console.error(e),a.suppressValidatorError||setTimeout(function(){throw e},0),s(e.message)}!0===r?s():!1===r?s("function"==typeof o.message?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):r instanceof Array?s(r):r instanceof Error&&s(r.message)}r&&r.then&&r.then(function(){return s()},function(e){return s(e)})},function(e){!function(e){for(var t=[],n={},r=0;r<e.length;r++)!function(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,e)}else t.push(e)}(e[r]);t.length?(n=R(t),c(t,n)):c(null,i)}(e)},i)},t.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!G.hasOwnProperty(e.type))throw Error(F("Unknown rule type %s",e.type));return e.type||"string"},t.getValidationMethod=function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return(-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0])?G.required:G[this.getType(e)]||void 0},e}();U.register=function(e,t){if("function"!=typeof t)throw Error("Cannot register a validator by type, validator is not a function");G[e]=t},U.warning=function(){},U.messages=$,U.validators=G;var Y="'${name}' is not a valid ${type}",K={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Y,method:Y,array:Y,object:Y,number:Y,date:Y,boolean:Y,integer:Y,float:Y,regexp:Y,email:Y,url:Y,hex:Y},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Q=n(23789),J="CODE_LOGIC_ERROR";function ee(e,t,n,r,o){return et.apply(this,arguments)}function et(){return(et=(0,l.Z)((0,c.Z)().mark(function e(t,n,r,i,a){var l,f,d,p,h,m,v,b,y;return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=(0,s.Z)({},r),delete l.ruleIndex,U.warning=function(){},l.validator&&(f=l.validator,l.validator=function(){try{return f.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(J)}}),d=null,l&&"array"===l.type&&l.defaultField&&(d=l.defaultField,delete l.defaultField),p=new U((0,g.Z)({},t,[l])),h=(0,Q.T)(K,i.validateMessages),p.messages(h),m=[],e.prev=10,e.next=13,Promise.resolve(p.validate((0,g.Z)({},t,n),(0,s.Z)({},i)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(m=e.t0.errors.map(function(e,t){var n=e.message,r=n===J?h.default:n;return o.isValidElement(r)?o.cloneElement(r,{key:"error_".concat(t)}):r}));case 18:if(!(!m.length&&d)){e.next=23;break}return e.next=21,Promise.all(n.map(function(e,n){return ee("".concat(t,".").concat(n),e,d,i,a)}));case 21:return v=e.sent,e.abrupt("return",v.reduce(function(e,t){return[].concat((0,u.Z)(e),(0,u.Z)(t))},[]));case 23:return b=(0,s.Z)((0,s.Z)({},r),{},{name:t,enum:(r.enum||[]).join(", ")},a),y=m.map(function(e){return"string"==typeof e?function(e,t){return e.replace(/\$\{\w+\}/g,function(e){return t[e.slice(2,-1)]})}(e,b):e}),e.abrupt("return",y);case 26:case"end":return e.stop()}},e,null,[[10,15]])}))).apply(this,arguments)}function en(){return(en=(0,l.Z)((0,c.Z)().mark(function e(t){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then(function(e){var t;return(t=[]).concat.apply(t,(0,u.Z)(e))}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function er(){return(er=(0,l.Z)((0,c.Z)().mark(function e(t){var n;return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise(function(e){t.forEach(function(r){r.then(function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])})})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var eo=n(41154),ei=n(16847);function ea(e){return Z(e)}function ec(e,t){var n={};return t.forEach(function(t){var r=(0,ei.Z)(e,t);n=(0,Q.Z)(n,t,r)}),n}function el(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some(function(e){return es(t,e,n)})}function es(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!e&&!!t&&(!!n||e.length===t.length)&&t.every(function(t,n){return e[n]===t})}function eu(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,eo.Z)(t.target)&&e in t.target?t.target[e]:t}function ef(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat((0,u.Z)(e.slice(0,n)),[o],(0,u.Z)(e.slice(n,t)),(0,u.Z)(e.slice(t+1,r))):i<0?[].concat((0,u.Z)(e.slice(0,t)),(0,u.Z)(e.slice(t+1,n+1)),[o],(0,u.Z)(e.slice(n+1,r))):e}var ed=["name"],ep=[];function eh(e,t,n,r,o,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var em=function(e){(0,h.Z)(n,e);var t=(0,m.Z)(n);function n(e){var r;return(0,f.Z)(this,n),r=t.call(this,e),(0,g.Z)((0,p.Z)(r),"state",{resetCount:0}),(0,g.Z)((0,p.Z)(r),"cancelRegisterFunc",null),(0,g.Z)((0,p.Z)(r),"mounted",!1),(0,g.Z)((0,p.Z)(r),"touched",!1),(0,g.Z)((0,p.Z)(r),"dirty",!1),(0,g.Z)((0,p.Z)(r),"validatePromise",void 0),(0,g.Z)((0,p.Z)(r),"prevValidating",void 0),(0,g.Z)((0,p.Z)(r),"errors",ep),(0,g.Z)((0,p.Z)(r),"warnings",ep),(0,g.Z)((0,p.Z)(r),"cancelRegister",function(){var e=r.props,t=e.preserve,n=e.isListField,o=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,ea(o)),r.cancelRegisterFunc=null}),(0,g.Z)((0,p.Z)(r),"getNamePath",function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat((0,u.Z)(void 0===n?[]:n),(0,u.Z)(t)):[]}),(0,g.Z)((0,p.Z)(r),"getRules",function(){var e=r.props,t=e.rules,n=e.fieldContext;return(void 0===t?[]:t).map(function(e){return"function"==typeof e?e(n):e})}),(0,g.Z)((0,p.Z)(r),"refresh",function(){r.mounted&&r.setState(function(e){return{resetCount:e.resetCount+1}})}),(0,g.Z)((0,p.Z)(r),"metaCache",null),(0,g.Z)((0,p.Z)(r),"triggerMetaEvent",function(e){var t=r.props.onMetaChange;if(t){var n=(0,s.Z)((0,s.Z)({},r.getMeta()),{},{destroy:e});(0,b.Z)(r.metaCache,n)||t(n),r.metaCache=n}else r.metaCache=null}),(0,g.Z)((0,p.Z)(r),"onStoreChange",function(e,t,n){var o=r.props,i=o.shouldUpdate,a=o.dependencies,c=void 0===a?[]:a,l=o.onReset,s=n.store,u=r.getNamePath(),f=r.getValue(e),d=r.getValue(s),p=t&&el(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&f!==d&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=ep,r.warnings=ep,r.triggerMetaEvent()),n.type){case"reset":if(!t||p){r.touched=!1,r.dirty=!1,r.validatePromise=void 0,r.errors=ep,r.warnings=ep,r.triggerMetaEvent(),null==l||l(),r.refresh();return}break;case"remove":if(i){r.reRender();return}break;case"setField":var h=n.data;if(p){"touched"in h&&(r.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(r.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(r.errors=h.errors||ep),"warnings"in h&&(r.warnings=h.warnings||ep),r.dirty=!0,r.triggerMetaEvent(),r.reRender();return}if("value"in h&&el(t,u,!0)||i&&!u.length&&eh(i,e,s,f,d,n)){r.reRender();return}break;case"dependenciesUpdate":if(c.map(ea).some(function(e){return el(n.relatedFields,e)})){r.reRender();return}break;default:if(p||(!c.length||u.length||i)&&eh(i,e,s,f,d,n)){r.reRender();return}}!0===i&&r.reRender()}),(0,g.Z)((0,p.Z)(r),"validateRules",function(e){var t=r.getNamePath(),n=r.getValue(),o=e||{},i=o.triggerName,a=o.validateOnly,f=Promise.resolve().then((0,l.Z)((0,c.Z)().mark(function o(){var a,d,p,h,m,g,v;return(0,c.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r.mounted){o.next=2;break}return o.abrupt("return",[]);case 2:if(p=void 0!==(d=(a=r.props).validateFirst)&&d,h=a.messageVariables,m=a.validateDebounce,g=r.getRules(),i&&(g=g.filter(function(e){return e}).filter(function(e){var t=e.validateTrigger;return!t||Z(t).includes(i)})),!(m&&i)){o.next=10;break}return o.next=8,new Promise(function(e){setTimeout(e,m)});case 8:if(!(r.validatePromise!==f)){o.next=10;break}return o.abrupt("return",[]);case 10:return(v=function(e,t,n,r,o,i){var a,u,f=e.join("."),d=n.map(function(e,t){var n=e.validator,r=(0,s.Z)((0,s.Z)({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,i=n(e,t,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then(function(){(0,y.ZP)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)})});o=i&&"function"==typeof i.then&&"function"==typeof i.catch,(0,y.ZP)(o,"`callback` is deprecated. Please return a promise instead."),o&&i.then(function(){r()}).catch(function(e){r(e||" ")})}),r}).sort(function(e,t){var n=e.warningOnly,r=e.ruleIndex,o=t.warningOnly,i=t.ruleIndex;return!!n==!!o?r-i:n?1:-1});if(!0===o)u=new Promise((a=(0,l.Z)((0,c.Z)().mark(function e(n,o){var a,l,s;return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a<d.length)){e.next=12;break}return l=d[a],e.next=5,ee(f,t,l,r,i);case 5:if(!(s=e.sent).length){e.next=9;break}return o([{errors:s,rule:l}]),e.abrupt("return");case 9:a+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}},e)})),function(e,t){return a.apply(this,arguments)}));else{var p=d.map(function(e){return ee(f,t,e,r,i).then(function(t){return{errors:t,rule:e}})});u=(o?function(e){return er.apply(this,arguments)}(p):function(e){return en.apply(this,arguments)}(p)).then(function(e){return Promise.reject(e)})}return u.catch(function(e){return e}),u}(t,n,g,e,p,h)).catch(function(e){return e}).then(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ep;if(r.validatePromise===f){r.validatePromise=null;var t,n=[],o=[];null===(t=e.forEach)||void 0===t||t.call(e,function(e){var t=e.rule.warningOnly,r=e.errors,i=void 0===r?ep:r;t?o.push.apply(o,(0,u.Z)(i)):n.push.apply(n,(0,u.Z)(i))}),r.errors=n,r.warnings=o,r.triggerMetaEvent(),r.reRender()}}),o.abrupt("return",v);case 13:case"end":return o.stop()}},o)})));return void 0!==a&&a||(r.validatePromise=f,r.dirty=!0,r.errors=ep,r.warnings=ep,r.triggerMetaEvent(),r.reRender()),f}),(0,g.Z)((0,p.Z)(r),"isFieldValidating",function(){return!!r.validatePromise}),(0,g.Z)((0,p.Z)(r),"isFieldTouched",function(){return r.touched}),(0,g.Z)((0,p.Z)(r),"isFieldDirty",function(){return!!r.dirty||void 0!==r.props.initialValue||void 0!==(0,r.props.fieldContext.getInternalHooks(x).getInitialValue)(r.getNamePath())}),(0,g.Z)((0,p.Z)(r),"getErrors",function(){return r.errors}),(0,g.Z)((0,p.Z)(r),"getWarnings",function(){return r.warnings}),(0,g.Z)((0,p.Z)(r),"isListField",function(){return r.props.isListField}),(0,g.Z)((0,p.Z)(r),"isList",function(){return r.props.isList}),(0,g.Z)((0,p.Z)(r),"isPreserve",function(){return r.props.preserve}),(0,g.Z)((0,p.Z)(r),"getMeta",function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath(),validated:null===r.validatePromise}}),(0,g.Z)((0,p.Z)(r),"getOnlyChild",function(e){if("function"==typeof e){var t=r.getMeta();return(0,s.Z)((0,s.Z)({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=(0,v.Z)(e);return 1===n.length&&o.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}}),(0,g.Z)((0,p.Z)(r),"getValue",function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return(0,ei.Z)(e||t(!0),n)}),(0,g.Z)((0,p.Z)(r),"getControlled",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.trigger,o=t.validateTrigger,i=t.getValueFromEvent,a=t.normalize,c=t.valuePropName,l=t.getValueProps,u=t.fieldContext,f=void 0!==o?o:u.validateTrigger,d=r.getNamePath(),p=u.getInternalHooks,h=u.getFieldsValue,m=p(x).dispatch,v=r.getValue(),b=l||function(e){return(0,g.Z)({},c,e)},y=e[n],w=(0,s.Z)((0,s.Z)({},e),b(v));return w[n]=function(){r.touched=!0,r.dirty=!0,r.triggerMetaEvent();for(var e,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e=i?i.apply(void 0,n):eu.apply(void 0,[c].concat(n)),a&&(e=a(e,v,h(!0))),m({type:"updateValue",namePath:d,value:e}),y&&y.apply(void 0,n)},Z(f||[]).forEach(function(e){var t=w[e];w[e]=function(){t&&t.apply(void 0,arguments);var n=r.props.rules;n&&n.length&&m({type:"validateField",namePath:d,triggerName:e})}}),w}),e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(x).initEntityValue)((0,p.Z)(r)),r}return(0,d.Z)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(x).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,r=this.getOnlyChild(n),i=r.child;return r.isFunction?e=i:o.isValidElement(i)?e=o.cloneElement(i,this.getControlled(i.props)):((0,y.ZP)(!i,"`children` of Field is not validate ReactElement."),e=i),o.createElement(o.Fragment,{key:t},e)}}]),n}(o.Component);(0,g.Z)(em,"contextType",E),(0,g.Z)(em,"defaultProps",{trigger:"onChange",valuePropName:"value"});var eg=function(e){var t=e.name,n=(0,a.Z)(e,ed),r=o.useContext(E),c=o.useContext(k),l=void 0!==t?ea(t):void 0,s="keep";return n.isListField||(s="_".concat((l||[]).join("_"))),o.createElement(em,(0,i.Z)({key:s,name:l,isListField:!!c},n,{fieldContext:r}))},ev=function(e){var t=e.name,n=e.initialValue,r=e.children,i=e.rules,a=e.validateTrigger,c=e.isListField,l=o.useContext(E),f=o.useContext(k),d=o.useRef({keys:[],id:0}).current,p=o.useMemo(function(){var e=ea(l.prefixName)||[];return[].concat((0,u.Z)(e),(0,u.Z)(ea(t)))},[l.prefixName,t]),h=o.useMemo(function(){return(0,s.Z)((0,s.Z)({},l),{},{prefixName:p})},[l,p]),m=o.useMemo(function(){return{getKey:function(e){var t=p.length,n=e[t];return[d.keys[n],e.slice(t+1)]}}},[p]);return"function"!=typeof r?((0,y.ZP)(!1,"Form.List only accepts function as children."),null):o.createElement(k.Provider,{value:m},o.createElement(E.Provider,{value:h},o.createElement(eg,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:a,initialValue:n,isList:!0,isListField:null!=c?c:!!f},function(e,t){var n=e.value,o=e.onChange,i=l.getFieldValue,a=function(){return i(p||[])||[]},c=(void 0===n?[]:n)||[];return Array.isArray(c)||(c=[]),r(c.map(function(e,t){var n=d.keys[t];return void 0===n&&(d.keys[t]=d.id,n=d.keys[t],d.id+=1),{name:t,key:n,isListField:!0}}),{add:function(e,t){var n=a();t>=0&&t<=n.length?(d.keys=[].concat((0,u.Z)(d.keys.slice(0,t)),[d.id],(0,u.Z)(d.keys.slice(t))),o([].concat((0,u.Z)(n.slice(0,t)),[e],(0,u.Z)(n.slice(t))))):(d.keys=[].concat((0,u.Z)(d.keys),[d.id]),o([].concat((0,u.Z)(n),[e]))),d.id+=1},remove:function(e){var t=a(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(d.keys=d.keys.filter(function(e,t){return!n.has(t)}),o(t.filter(function(e,t){return!n.has(t)})))},move:function(e,t){if(e!==t){var n=a();e<0||e>=n.length||t<0||t>=n.length||(d.keys=ef(d.keys,e,t),o(ef(n,e,t)))}}},t)})))},eb=n(26365),ey="__@field_split__";function ex(e){return e.map(function(e){return"".concat((0,eo.Z)(e),":").concat(e)}).join(ey)}var ew=function(){function e(){(0,f.Z)(this,e),(0,g.Z)(this,"kvs",new Map)}return(0,d.Z)(e,[{key:"set",value:function(e,t){this.kvs.set(ex(e),t)}},{key:"get",value:function(e){return this.kvs.get(ex(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(ex(e))}},{key:"map",value:function(e){return(0,u.Z)(this.kvs.entries()).map(function(t){var n=(0,eb.Z)(t,2),r=n[0],o=n[1];return e({key:r.split(ey).map(function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,eb.Z)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o}),value:o})})}},{key:"toJSON",value:function(){var e={};return this.map(function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null}),e}}]),e}(),eE=["name"],ek=(0,d.Z)(function e(t){var n=this;(0,f.Z)(this,e),(0,g.Z)(this,"formHooked",!1),(0,g.Z)(this,"forceRootUpdate",void 0),(0,g.Z)(this,"subscribable",!0),(0,g.Z)(this,"store",{}),(0,g.Z)(this,"fieldEntities",[]),(0,g.Z)(this,"initialValues",{}),(0,g.Z)(this,"callbacks",{}),(0,g.Z)(this,"validateMessages",null),(0,g.Z)(this,"preserve",null),(0,g.Z)(this,"lastValidatePromise",null),(0,g.Z)(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),(0,g.Z)(this,"getInternalHooks",function(e){return e===x?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,y.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),(0,g.Z)(this,"useSubscribe",function(e){n.subscribable=e}),(0,g.Z)(this,"prevWithoutPreserves",null),(0,g.Z)(this,"setInitialValues",function(e,t){if(n.initialValues=e||{},t){var r,o=(0,Q.T)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map(function(t){var n=t.key;o=(0,Q.Z)(o,n,(0,ei.Z)(e,n))}),n.prevWithoutPreserves=null,n.updateStore(o)}}),(0,g.Z)(this,"destroyForm",function(){var e=new ew;n.getFieldEntities(!0).forEach(function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)}),n.prevWithoutPreserves=e}),(0,g.Z)(this,"getInitialValue",function(e){var t=(0,ei.Z)(n.initialValues,e);return e.length?(0,Q.T)(t):t}),(0,g.Z)(this,"setCallbacks",function(e){n.callbacks=e}),(0,g.Z)(this,"setValidateMessages",function(e){n.validateMessages=e}),(0,g.Z)(this,"setPreserve",function(e){n.preserve=e}),(0,g.Z)(this,"watchList",[]),(0,g.Z)(this,"registerWatch",function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter(function(t){return t!==e})}}),(0,g.Z)(this,"notifyWatch",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach(function(n){n(t,r,e)})}}),(0,g.Z)(this,"timeoutId",null),(0,g.Z)(this,"warningUnhooked",function(){}),(0,g.Z)(this,"updateStore",function(e){n.store=e}),(0,g.Z)(this,"getFieldEntities",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter(function(e){return e.getNamePath().length}):n.fieldEntities}),(0,g.Z)(this,"getFieldsMap",function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new ew;return n.getFieldEntities(e).forEach(function(e){var n=e.getNamePath();t.set(n,e)}),t}),(0,g.Z)(this,"getFieldEntitiesForNamePathList",function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map(function(e){var n=ea(e);return t.get(n)||{INVALIDATE_NAME_PATH:ea(e)}})}),(0,g.Z)(this,"getFieldsValue",function(e,t){if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===(0,eo.Z)(e)&&(i=e.strict,o=e.filter),!0===r&&!o)return n.store;var r,o,i,a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),c=[];return a.forEach(function(e){var t,n,a,l="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(i){if(null!==(a=e.isList)&&void 0!==a&&a.call(e))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(o){var s="getMeta"in e?e.getMeta():null;o(s)&&c.push(l)}else c.push(l)}),ec(n.store,c.map(ea))}),(0,g.Z)(this,"getFieldValue",function(e){n.warningUnhooked();var t=ea(e);return(0,ei.Z)(n.store,t)}),(0,g.Z)(this,"getFieldsError",function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map(function(t,n){return!t||"INVALIDATE_NAME_PATH"in t?{name:ea(e[n]),errors:[],warnings:[]}:{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}})}),(0,g.Z)(this,"getFieldError",function(e){n.warningUnhooked();var t=ea(e);return n.getFieldsError([t])[0].errors}),(0,g.Z)(this,"getFieldWarning",function(e){n.warningUnhooked();var t=ea(e);return n.getFieldsError([t])[0].warnings}),(0,g.Z)(this,"isFieldsTouched",function(){n.warningUnhooked();for(var e,t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=r[0],a=r[1],c=!1;0===r.length?e=null:1===r.length?Array.isArray(i)?(e=i.map(ea),c=!1):(e=null,c=i):(e=i.map(ea),c=a);var l=n.getFieldEntities(!0),s=function(e){return e.isFieldTouched()};if(!e)return c?l.every(s):l.some(s);var f=new ew;e.forEach(function(e){f.set(e,[])}),l.forEach(function(t){var n=t.getNamePath();e.forEach(function(e){e.every(function(e,t){return n[t]===e})&&f.update(e,function(e){return[].concat((0,u.Z)(e),[t])})})});var d=function(e){return e.some(s)},p=f.map(function(e){return e.value});return c?p.every(d):p.some(d)}),(0,g.Z)(this,"isFieldTouched",function(e){return n.warningUnhooked(),n.isFieldsTouched([e])}),(0,g.Z)(this,"isFieldsValidating",function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some(function(e){return e.isFieldValidating()});var r=e.map(ea);return t.some(function(e){return el(r,e.getNamePath())&&e.isFieldValidating()})}),(0,g.Z)(this,"isFieldValidating",function(e){return n.warningUnhooked(),n.isFieldsValidating([e])}),(0,g.Z)(this,"resetWithFieldInitialValue",function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new ew,o=n.getFieldEntities(!0);o.forEach(function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var o=r.get(n)||new Set;o.add({entity:e,value:t}),r.set(n,o)}}),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach(function(t){var n,o=r.get(t);o&&(n=e).push.apply(n,(0,u.Z)((0,u.Z)(o).map(function(e){return e.entity})))})):e=o,function(e){e.forEach(function(e){if(void 0!==e.props.initialValue){var o=e.getNamePath();if(void 0!==n.getInitialValue(o))(0,y.ZP)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var i=r.get(o);if(i&&i.size>1)(0,y.ZP)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var a=n.getFieldValue(o);e.isListField()||t.skipExist&&void 0!==a||n.updateStore((0,Q.Z)(n.store,o,(0,u.Z)(i)[0].value))}}}})}(e)}),(0,g.Z)(this,"resetFields",function(e){n.warningUnhooked();var t=n.store;if(!e){n.updateStore((0,Q.T)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),n.notifyWatch();return}var r=e.map(ea);r.forEach(function(e){var t=n.getInitialValue(e);n.updateStore((0,Q.Z)(n.store,e,t))}),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)}),(0,g.Z)(this,"setFields",function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach(function(e){var o=e.name,i=(0,a.Z)(e,eE),c=ea(o);r.push(c),"value"in i&&n.updateStore((0,Q.Z)(n.store,c,i.value)),n.notifyObservers(t,[c],{type:"setField",data:e})}),n.notifyWatch(r)}),(0,g.Z)(this,"getFields",function(){return n.getFieldEntities(!0).map(function(e){var t=e.getNamePath(),r=e.getMeta(),o=(0,s.Z)((0,s.Z)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o})}),(0,g.Z)(this,"initEntityValue",function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,ei.Z)(n.store,r)&&n.updateStore((0,Q.Z)(n.store,r,t))}}),(0,g.Z)(this,"isMergedPreserve",function(e){var t=void 0!==e?e:n.preserve;return null==t||t}),(0,g.Z)(this,"registerField",function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(t){return t!==e}),!n.isMergedPreserve(o)&&(!r||i.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every(function(e){return!es(e.getNamePath(),t)})){var c=n.store;n.updateStore((0,Q.Z)(c,t,a,!0)),n.notifyObservers(c,[t],{type:"remove"}),n.triggerDependenciesUpdate(c,t)}}n.notifyWatch([t])}}),(0,g.Z)(this,"dispatch",function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,i=e.triggerName;n.validateFields([o],{triggerName:i})}}),(0,g.Z)(this,"notifyObservers",function(e,t,r){if(n.subscribable){var o=(0,s.Z)((0,s.Z)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(n){(0,n.onStoreChange)(e,t,o)})}else n.forceRootUpdate()}),(0,g.Z)(this,"triggerDependenciesUpdate",function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,u.Z)(r))}),r}),(0,g.Z)(this,"updateValue",function(e,t){var r=ea(e),o=n.store;n.updateStore((0,Q.Z)(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var i=n.triggerDependenciesUpdate(o,r),a=n.callbacks.onValuesChange;a&&a(ec(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat((0,u.Z)(i)))}),(0,g.Z)(this,"setFieldsValue",function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,Q.T)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),(0,g.Z)(this,"setFieldValue",function(e,t){n.setFields([{name:e,value:t}])}),(0,g.Z)(this,"getDependencyChildrenFields",function(e){var t=new Set,r=[],o=new ew;return n.getFieldEntities().forEach(function(e){(e.props.dependencies||[]).forEach(function(t){var n=ea(t);o.update(n,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t})})}),function e(n){(o.get(n)||new Set).forEach(function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}})}(e),r}),(0,g.Z)(this,"triggerOnFieldsChange",function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var i=new ew;t.forEach(function(e){var t=e.name,n=e.errors;i.set(t,n)}),o.forEach(function(e){e.errors=i.get(e.name)||e.errors})}var a=o.filter(function(t){return el(e,t.name)});a.length&&r(a,o)}}),(0,g.Z)(this,"validateFields",function(e,t){n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(a=e,c=t):c=e;var r,o,i,a,c,l=!!a,f=l?a.map(ea):[],d=[],p=String(Date.now()),h=new Set,m=c||{},g=m.recursive,v=m.dirty;n.getFieldEntities(!0).forEach(function(e){if(l||f.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!v||e.isFieldDirty())){var t=e.getNamePath();if(h.add(t.join(p)),!l||el(f,t,g)){var r=e.validateRules((0,s.Z)({validateMessages:(0,s.Z)((0,s.Z)({},K),n.validateMessages)},c));d.push(r.then(function(){return{name:t,errors:[],warnings:[]}}).catch(function(e){var n,r=[],o=[];return(null===(n=e.forEach)||void 0===n||n.call(e,function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,(0,u.Z)(n)):r.push.apply(r,(0,u.Z)(n))}),r.length)?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}}))}}});var b=(r=!1,o=d.length,i=[],d.length?new Promise(function(e,t){d.forEach(function(n,a){n.catch(function(e){return r=!0,e}).then(function(n){o-=1,i[a]=n,o>0||(r&&t(i),e(i))})})}):Promise.resolve([]));n.lastValidatePromise=b,b.catch(function(e){return e}).then(function(e){var t=e.map(function(e){return e.name});n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)});var y=b.then(function(){return n.lastValidatePromise===b?Promise.resolve(n.getFieldsValue(f)):Promise.reject([])}).catch(function(e){var t=e.filter(function(e){return e&&e.errors.length});return Promise.reject({values:n.getFieldsValue(f),errorFields:t,outOfDate:n.lastValidatePromise!==b})});y.catch(function(e){return e});var x=f.filter(function(e){return h.has(e.join(p))});return n.triggerOnFieldsChange(x),y}),(0,g.Z)(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}}).catch(function(e){var t=n.callbacks.onFinishFailed;t&&t(e)})}),this.forceRootUpdate=t}),eZ=function(e){var t=o.useRef(),n=o.useState({}),r=(0,eb.Z)(n,2)[1];if(!t.current){if(e)t.current=e;else{var i=new ek(function(){r({})});t.current=i.getForm()}}return[t.current]},eC=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),eS=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,i=e.children,a=o.useContext(eC),c=o.useRef({});return o.createElement(eC.Provider,{value:(0,s.Z)((0,s.Z)({},a),{},{validateMessages:(0,s.Z)((0,s.Z)({},a.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:c.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:c.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(c.current=(0,s.Z)((0,s.Z)({},c.current),{},(0,g.Z)({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=(0,s.Z)({},c.current);delete t[e],c.current=t,a.unregisterForm(e)}})},i)},eO=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];function eP(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var eM=function(){},ej=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],a=void 0===i?{}:i,c=a&&a._init?{form:a}:a,l=c.form,s=(0,o.useState)(),u=(0,eb.Z)(s,2),f=u[0],d=u[1],p=(0,o.useMemo)(function(){return eP(f)},[f]),h=(0,o.useRef)(p);h.current=p;var m=(0,o.useContext)(E),g=l||m,v=g&&g._init,b=ea(r),y=(0,o.useRef)(b);return y.current=b,eM(b),(0,o.useEffect)(function(){if(v){var e=g.getFieldsValue,t=(0,g.getInternalHooks)(x).registerWatch,n=function(e,t){var n=c.preserve?t:e;return"function"==typeof r?r(n):(0,ei.Z)(n,y.current)},o=t(function(e,t){var r=n(e,t),o=eP(r);h.current!==o&&(h.current=o,d(r))}),i=n(e(),e(!0));return f!==i&&d(i),o}},[v]),f},eA=o.forwardRef(function(e,t){var n,r=e.name,c=e.initialValues,l=e.fields,f=e.form,d=e.preserve,p=e.children,h=e.component,m=void 0===h?"form":h,g=e.validateMessages,v=e.validateTrigger,b=void 0===v?"onChange":v,y=e.onValuesChange,w=e.onFieldsChange,Z=e.onFinish,C=e.onFinishFailed,S=(0,a.Z)(e,eO),O=o.useContext(eC),P=eZ(f),M=(0,eb.Z)(P,1)[0],j=M.getInternalHooks(x),A=j.useSubscribe,R=j.setInitialValues,F=j.setCallbacks,T=j.setValidateMessages,N=j.setPreserve,L=j.destroyForm;o.useImperativeHandle(t,function(){return M}),o.useEffect(function(){return O.registerForm(r,M),function(){O.unregisterForm(r)}},[O,M,r]),T((0,s.Z)((0,s.Z)({},O.validateMessages),g)),F({onValuesChange:y,onFieldsChange:function(e){if(O.triggerFormChange(r,e),w){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];w.apply(void 0,[e].concat(n))}},onFinish:function(e){O.triggerFormFinish(r,e),Z&&Z(e)},onFinishFailed:C}),N(d);var _=o.useRef(null);R(c,!_.current),_.current||(_.current=!0),o.useEffect(function(){return L},[]);var I="function"==typeof p;n=I?p(M.getFieldsValue(!0),M):p,A(!I);var z=o.useRef();o.useEffect(function(){!function(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||"object"!==(0,eo.Z)(e)||"object"!==(0,eo.Z)(t))return!1;var n=new Set([].concat(Object.keys(e),Object.keys(t)));return(0,u.Z)(n).every(function(n){var r=e[n],o=t[n];return"function"==typeof r&&"function"==typeof o||r===o})}(z.current||[],l||[])&&M.setFields(l||[]),z.current=l},[l,M]);var H=o.useMemo(function(){return(0,s.Z)((0,s.Z)({},M),{},{validateTrigger:b})},[M,b]),B=o.createElement(k.Provider,{value:null},o.createElement(E.Provider,{value:H},n));return!1===m?B:o.createElement(m,(0,i.Z)({},S,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),M.submit()},onReset:function(e){var t;e.preventDefault(),M.resetFields(),null===(t=S.onReset)||void 0===t||t.call(S,e)}}),B)});eA.FormProvider=eS,eA.Field=eg,eA.List=ev,eA.useForm=eZ,eA.useWatch=ej;var eR=eA},47970:function(e,t,n){"use strict";n.d(t,{V4:function(){return ep},zt:function(){return x},ZP:function(){return eh}});var r,o,i,a,c,l=n(11993),s=n(31686),u=n(26365),f=n(41154),d=n(36760),p=n.n(d),h=n(2868),m=n(28791),g=n(2265),v=n(6989),b=["children"],y=g.createContext({});function x(e){var t=e.children,n=(0,v.Z)(e,b);return g.createElement(y.Provider,{value:n},t)}var w=n(76405),E=n(25049),k=n(15354),Z=n(15900),C=function(e){(0,k.Z)(n,e);var t=(0,Z.Z)(n);function n(){return(0,w.Z)(this,n),t.apply(this,arguments)}return(0,E.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(g.Component),S=n(69819),O="none",P="appear",M="enter",j="leave",A="none",R="prepare",F="start",T="active",N="prepared",L=n(94981);function _(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var I=(r=(0,L.Z)(),o="undefined"!=typeof window?window:{},i={animationend:_("Animation","AnimationEnd"),transitionend:_("Transition","TransitionEnd")},!r||("AnimationEvent"in o||delete i.animationend.animation,"TransitionEvent"in o||delete i.transitionend.transition),i),z={};(0,L.Z)()&&(z=document.createElement("div").style);var H={};function B(e){if(H[e])return H[e];var t=I[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in z)return H[e]=t[i],H[e]}return""}var D=B("animationend"),V=B("transitionend"),W=!!(D&&V),q=D||"animationend",G=V||"transitionend";function X(e,t){return e?"object"===(0,f.Z)(e)?e[t.replace(/-\w/g,function(e){return e[1].toUpperCase()})]:"".concat(e,"-").concat(t):null}var $=function(e){var t=(0,g.useRef)(),n=(0,g.useRef)(e);n.current=e;var r=g.useCallback(function(e){n.current(e)},[]);function o(e){e&&(e.removeEventListener(G,r),e.removeEventListener(q,r))}return g.useEffect(function(){return function(){o(t.current)}},[]),[function(e){t.current&&t.current!==e&&o(t.current),e&&e!==t.current&&(e.addEventListener(G,r),e.addEventListener(q,r),t.current=e)},o]},U=(0,L.Z)()?g.useLayoutEffect:g.useEffect,Y=n(53346),K=function(){var e=g.useRef(null);function t(){Y.Z.cancel(e.current)}return g.useEffect(function(){return function(){t()}},[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=(0,Y.Z)(function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)});e.current=i},t]},Q=[R,F,T,"end"],J=[R,N];function ee(e){return e===T||"end"===e}var et=function(e,t,n){var r=(0,S.Z)(A),o=(0,u.Z)(r,2),i=o[0],a=o[1],c=K(),l=(0,u.Z)(c,2),s=l[0],f=l[1],d=t?J:Q;return U(function(){if(i!==A&&"end"!==i){var e=d.indexOf(i),t=d[e+1],r=n(i);!1===r?a(t,!0):t&&s(function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)})}},[e,i]),g.useEffect(function(){return function(){f()}},[]),[function(){a(R,!0)},i]},en=(a=W,"object"===(0,f.Z)(W)&&(a=W.transitionSupport),(c=g.forwardRef(function(e,t){var n=e.visible,r=void 0===n||n,o=e.removeOnLeave,i=void 0===o||o,c=e.forceRender,f=e.children,d=e.motionName,v=e.leavedClassName,b=e.eventProps,x=g.useContext(y).motion,w=!!(e.motionName&&a&&!1!==x),E=(0,g.useRef)(),k=(0,g.useRef)(),Z=function(e,t,n,r){var o=r.motionEnter,i=void 0===o||o,a=r.motionAppear,c=void 0===a||a,f=r.motionLeave,d=void 0===f||f,p=r.motionDeadline,h=r.motionLeaveImmediately,m=r.onAppearPrepare,v=r.onEnterPrepare,b=r.onLeavePrepare,y=r.onAppearStart,x=r.onEnterStart,w=r.onLeaveStart,E=r.onAppearActive,k=r.onEnterActive,Z=r.onLeaveActive,C=r.onAppearEnd,A=r.onEnterEnd,L=r.onLeaveEnd,_=r.onVisibleChanged,I=(0,S.Z)(),z=(0,u.Z)(I,2),H=z[0],B=z[1],D=(0,S.Z)(O),V=(0,u.Z)(D,2),W=V[0],q=V[1],G=(0,S.Z)(null),X=(0,u.Z)(G,2),Y=X[0],K=X[1],Q=(0,g.useRef)(!1),J=(0,g.useRef)(null),en=(0,g.useRef)(!1);function er(){q(O,!0),K(null,!0)}function eo(e){var t,r=n();if(!e||e.deadline||e.target===r){var o=en.current;W===P&&o?t=null==C?void 0:C(r,e):W===M&&o?t=null==A?void 0:A(r,e):W===j&&o&&(t=null==L?void 0:L(r,e)),W!==O&&o&&!1!==t&&er()}}var ei=$(eo),ea=(0,u.Z)(ei,1)[0],ec=function(e){var t,n,r;switch(e){case P:return t={},(0,l.Z)(t,R,m),(0,l.Z)(t,F,y),(0,l.Z)(t,T,E),t;case M:return n={},(0,l.Z)(n,R,v),(0,l.Z)(n,F,x),(0,l.Z)(n,T,k),n;case j:return r={},(0,l.Z)(r,R,b),(0,l.Z)(r,F,w),(0,l.Z)(r,T,Z),r;default:return{}}},el=g.useMemo(function(){return ec(W)},[W]),es=et(W,!e,function(e){if(e===R){var t,r=el[R];return!!r&&r(n())}return ed in el&&K((null===(t=el[ed])||void 0===t?void 0:t.call(el,n(),null))||null),ed===T&&(ea(n()),p>0&&(clearTimeout(J.current),J.current=setTimeout(function(){eo({deadline:!0})},p))),ed===N&&er(),!0}),eu=(0,u.Z)(es,2),ef=eu[0],ed=eu[1],ep=ee(ed);en.current=ep,U(function(){B(t);var n,r=Q.current;Q.current=!0,!r&&t&&c&&(n=P),r&&t&&i&&(n=M),(r&&!t&&d||!r&&h&&!t&&d)&&(n=j);var o=ec(n);n&&(e||o[R])?(q(n),ef()):q(O)},[t]),(0,g.useEffect)(function(){(W!==P||c)&&(W!==M||i)&&(W!==j||d)||q(O)},[c,i,d]),(0,g.useEffect)(function(){return function(){Q.current=!1,clearTimeout(J.current)}},[]);var eh=g.useRef(!1);(0,g.useEffect)(function(){H&&(eh.current=!0),void 0!==H&&W===O&&((eh.current||H)&&(null==_||_(H)),eh.current=!0)},[H,W]);var em=Y;return el[R]&&ed===F&&(em=(0,s.Z)({transition:"none"},em)),[W,ed,em,null!=H?H:t]}(w,r,function(){try{return E.current instanceof HTMLElement?E.current:(0,h.Z)(k.current)}catch(e){return null}},e),A=(0,u.Z)(Z,4),L=A[0],_=A[1],I=A[2],z=A[3],H=g.useRef(z);z&&(H.current=!0);var B=g.useCallback(function(e){E.current=e,(0,m.mH)(t,e)},[t]),D=(0,s.Z)((0,s.Z)({},b),{},{visible:r});if(f){if(L===O)V=z?f((0,s.Z)({},D),B):!i&&H.current&&v?f((0,s.Z)((0,s.Z)({},D),{},{className:v}),B):!c&&(i||v)?null:f((0,s.Z)((0,s.Z)({},D),{},{style:{display:"none"}}),B);else{_===R?q="prepare":ee(_)?q="active":_===F&&(q="start");var V,W,q,G=X(d,"".concat(L,"-").concat(q));V=f((0,s.Z)((0,s.Z)({},D),{},{className:p()(X(d,L),(W={},(0,l.Z)(W,G,G&&q),(0,l.Z)(W,d,"string"==typeof d),W)),style:I}),B)}}else V=null;return g.isValidElement(V)&&(0,m.Yr)(V)&&!V.ref&&(V=g.cloneElement(V,{ref:B})),g.createElement(C,{ref:k},V)})).displayName="CSSMotion",c),er=n(1119),eo=n(63496),ei="keep",ea="remove",ec="removed";function el(e){var t;return t=e&&"object"===(0,f.Z)(e)&&"key"in e?e:{key:e},(0,s.Z)((0,s.Z)({},t),{},{key:String(t.key)})}function es(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(el)}var eu=["component","children","onVisibleChanged","onAllRemoved"],ef=["status"],ed=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"],ep=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:en,n=function(e){(0,k.Z)(r,e);var n=(0,Z.Z)(r);function r(){var e;(0,w.Z)(this,r);for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];return e=n.call.apply(n,[this].concat(o)),(0,l.Z)((0,eo.Z)(e),"state",{keyEntities:[]}),(0,l.Z)((0,eo.Z)(e),"removeKey",function(t){var n=e.state.keyEntities.map(function(e){return e.key!==t?e:(0,s.Z)((0,s.Z)({},e),{},{status:ec})});return e.setState({keyEntities:n}),n.filter(function(e){return e.status!==ec}).length}),e}return(0,E.Z)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,o=r.component,i=r.children,a=r.onVisibleChanged,c=r.onAllRemoved,l=(0,v.Z)(r,eu),u=o||g.Fragment,f={};return ed.forEach(function(e){f[e]=l[e],delete l[e]}),delete l.keys,g.createElement(u,l,n.map(function(n,r){var o=n.status,l=(0,v.Z)(n,ef);return g.createElement(t,(0,er.Z)({},f,{key:l.key,visible:"add"===o||o===ei,eventProps:l,onVisibleChanged:function(t){null==a||a(t,{key:l.key}),!t&&0===e.removeKey(l.key)&&c&&c()}}),function(e,t){return i((0,s.Z)((0,s.Z)({},e),{},{index:r}),t)})}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities;return{keyEntities:(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=es(e),a=es(t);i.forEach(function(e){for(var t=!1,i=r;i<o;i+=1){var c=a[i];if(c.key===e.key){r<i&&(n=n.concat(a.slice(r,i).map(function(e){return(0,s.Z)((0,s.Z)({},e),{},{status:"add"})})),r=i),n.push((0,s.Z)((0,s.Z)({},c),{},{status:ei})),r+=1,t=!0;break}}t||n.push((0,s.Z)((0,s.Z)({},e),{},{status:ea}))}),r<o&&(n=n.concat(a.slice(r).map(function(e){return(0,s.Z)((0,s.Z)({},e),{},{status:"add"})})));var c={};return n.forEach(function(e){var t=e.key;c[t]=(c[t]||0)+1}),Object.keys(c).filter(function(e){return c[e]>1}).forEach(function(e){(n=n.filter(function(t){var n=t.key,r=t.status;return n!==e||r!==ea})).forEach(function(t){t.key===e&&(t.status=ei)})}),n})(r,es(n)).filter(function(e){var t=r.find(function(t){var n=t.key;return e.key===n});return!t||t.status!==ec||e.status!==ea})}}}]),r}(g.Component);return(0,l.Z)(n,"defaultProps",{component:"div"}),n}(W),eh=en},96257:function(e,t){"use strict";t.Z={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},31474:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(1119),o=n(2265),i=n(45287);n(32559);var a=n(31686),c=n(41154),l=n(2868),s=n(28791),u=o.createContext(null),f=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),d="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,p=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),h="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(p):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},m=["top","right","bottom","left","width","height","size","weight"],g="undefined"!=typeof MutationObserver,v=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&c()}function a(){h(i)}function c(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(a,20);o=e}return c}(this.refresh.bind(this),0)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){d&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),g?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){d&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;m.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),b=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},y=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||p},x=Z(0,0,0,0);function w(e){return parseFloat(e)||0}function E(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+w(e["border-"+n+"-width"])},0)}var k="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof y(e).SVGGraphicsElement}:function(e){return e instanceof y(e).SVGElement&&"function"==typeof e.getBBox};function Z(e,t,n,r){return{x:e,y:t,width:n,height:r}}var C=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Z(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!d)return x;if(k(e)){var t;return Z(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return x;var r=y(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=w(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,c=w(r.width),l=w(r.height);if("border-box"===r.boxSizing&&(Math.round(c+i)!==t&&(c-=E(r,"left","right")+i),Math.round(l+a)!==n&&(l-=E(r,"top","bottom")+a)),e!==y(e).document.documentElement){var s=Math.round(c+i)-t,u=Math.round(l+a)-n;1!==Math.abs(s)&&(c-=s),1!==Math.abs(u)&&(l-=u)}return Z(o.left,o.top,c,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),S=function(e,t){var n,r,o,i,a,c=(n=t.x,r=t.y,o=t.width,i=t.height,b(a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:o,height:i,top:r,right:n+o,bottom:i+r,left:n}),a);b(this,{target:e,contentRect:c})},O=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new f,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof y(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new C(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof y(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new S(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),P="undefined"!=typeof WeakMap?new WeakMap:new f,M=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new O(t,v.getInstance(),this);P.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){M.prototype[e]=function(){var t;return(t=P.get(this))[e].apply(t,arguments)}});var j=void 0!==p.ResizeObserver?p.ResizeObserver:M,A=new Map,R=new j(function(e){e.forEach(function(e){var t,n=e.target;null===(t=A.get(n))||void 0===t||t.forEach(function(e){return e(n)})})}),F=n(76405),T=n(25049),N=n(15354),L=n(15900),_=function(e){(0,N.Z)(n,e);var t=(0,L.Z)(n);function n(){return(0,F.Z)(this,n),t.apply(this,arguments)}return(0,T.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(o.Component),I=o.forwardRef(function(e,t){var n=e.children,r=e.disabled,i=o.useRef(null),f=o.useRef(null),d=o.useContext(u),p="function"==typeof n,h=p?n(i):n,m=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),g=!p&&o.isValidElement(h)&&(0,s.Yr)(h),v=g?h.ref:null,b=(0,s.x1)(v,i),y=function(){var e;return(0,l.Z)(i.current)||(i.current&&"object"===(0,c.Z)(i.current)?(0,l.Z)(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||(0,l.Z)(f.current)};o.useImperativeHandle(t,function(){return y()});var x=o.useRef(e);x.current=e;var w=o.useCallback(function(e){var t=x.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,c=o.height,l=e.offsetWidth,s=e.offsetHeight,u=Math.floor(i),f=Math.floor(c);if(m.current.width!==u||m.current.height!==f||m.current.offsetWidth!==l||m.current.offsetHeight!==s){var p={width:u,height:f,offsetWidth:l,offsetHeight:s};m.current=p;var h=(0,a.Z)((0,a.Z)({},p),{},{offsetWidth:l===Math.round(i)?i:l,offsetHeight:s===Math.round(c)?c:s});null==d||d(h,e,r),n&&Promise.resolve().then(function(){n(h,e)})}},[]);return o.useEffect(function(){var e=y();return e&&!r&&(A.has(e)||(A.set(e,new Set),R.observe(e)),A.get(e).add(w)),function(){A.has(e)&&(A.get(e).delete(w),A.get(e).size||(R.unobserve(e),A.delete(e)))}},[i.current,r]),o.createElement(_,{ref:f},g?o.cloneElement(h,{ref:b}):h)}),z=o.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:(0,i.Z)(n)).map(function(n,i){var a=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(i);return o.createElement(I,(0,r.Z)({},e,{key:a,ref:0===i?t:void 0}),n)})});z.Collection=function(e){var t=e.children,n=e.onBatchResize,r=o.useRef(0),i=o.useRef([]),a=o.useContext(u),c=o.useCallback(function(e,t,o){r.current+=1;var c=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then(function(){c===r.current&&(null==n||n(i.current),i.current=[])}),null==a||a(e,t,o)},[n,a]);return o.createElement(u.Provider,{value:c},t)};var H=z},5769:function(e,t,n){"use strict";n.d(t,{G:function(){return a},Z:function(){return g}});var r=n(36760),o=n.n(r),i=n(2265);function a(e){var t=e.children,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle,c=e.className,l=e.style;return i.createElement("div",{className:o()("".concat(n,"-content"),c),style:l},i.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:a},"function"==typeof t?t():t))}var c=n(1119),l=n(31686),s=n(6989),u=n(97821),f={shiftX:64,adjustY:1},d={adjustX:1,shiftY:!0},p=[0,0],h={left:{points:["cr","cl"],overflow:d,offset:[-4,0],targetOffset:p},right:{points:["cl","cr"],overflow:d,offset:[4,0],targetOffset:p},top:{points:["bc","tc"],overflow:f,offset:[0,-4],targetOffset:p},bottom:{points:["tc","bc"],overflow:f,offset:[0,4],targetOffset:p},topLeft:{points:["bl","tl"],overflow:f,offset:[0,-4],targetOffset:p},leftTop:{points:["tr","tl"],overflow:d,offset:[-4,0],targetOffset:p},topRight:{points:["br","tr"],overflow:f,offset:[0,-4],targetOffset:p},rightTop:{points:["tl","tr"],overflow:d,offset:[4,0],targetOffset:p},bottomRight:{points:["tr","br"],overflow:f,offset:[0,4],targetOffset:p},rightBottom:{points:["bl","br"],overflow:d,offset:[4,0],targetOffset:p},bottomLeft:{points:["tl","bl"],overflow:f,offset:[0,4],targetOffset:p},leftBottom:{points:["br","bl"],overflow:d,offset:[-4,0],targetOffset:p}},m=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],g=(0,i.forwardRef)(function(e,t){var n=e.overlayClassName,r=e.trigger,o=e.mouseEnterDelay,f=e.mouseLeaveDelay,d=e.overlayStyle,p=e.prefixCls,g=void 0===p?"rc-tooltip":p,v=e.children,b=e.onVisibleChange,y=e.afterVisibleChange,x=e.transitionName,w=e.animation,E=e.motion,k=e.placement,Z=e.align,C=e.destroyTooltipOnHide,S=e.defaultVisible,O=e.getTooltipContainer,P=e.overlayInnerStyle,M=(e.arrowContent,e.overlay),j=e.id,A=e.showArrow,R=(0,s.Z)(e,m),F=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,function(){return F.current});var T=(0,l.Z)({},R);return"visible"in e&&(T.popupVisible=e.visible),i.createElement(u.Z,(0,c.Z)({popupClassName:n,prefixCls:g,popup:function(){return i.createElement(a,{key:"content",prefixCls:g,id:j,overlayInnerStyle:P},M)},action:void 0===r?["hover"]:r,builtinPlacements:h,popupPlacement:void 0===k?"right":k,ref:F,popupAlign:void 0===Z?{}:Z,getPopupContainer:O,onPopupVisibleChange:b,afterPopupVisibleChange:y,popupTransitionName:x,popupAnimation:w,popupMotion:E,defaultPopupVisible:S,autoDestroy:void 0!==C&&C,mouseLeaveDelay:void 0===f?.1:f,popupStyle:d,mouseEnterDelay:void 0===o?0:o,arrow:void 0===A||A},T),v)})},45287:function(e,t,n){"use strict";n.d(t,{Z:function(){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[];return r.Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?i=i.concat(e(t)):(0,o.isFragment)(t)&&t.props?i=i.concat(e(t.props.children,n)):i.push(t))}),i}}});var r=n(2265),o=n(93754)},94981:function(e,t,n){"use strict";function r(){return!!("undefined"!=typeof window&&window.document&&window.document.createElement)}n.d(t,{Z:function(){return r}})},2161:function(e,t,n){"use strict";function r(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,{Z:function(){return r}})},21717:function(e,t,n){"use strict";n.d(t,{hq:function(){return h},jL:function(){return p}});var r=n(94981),o=n(2161),i="data-rc-order",a="data-rc-priority",c=new Map;function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):"rc-util-key"}function s(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function u(e){return Array.from((c.get(e)||e).children).filter(function(e){return"STYLE"===e.tagName})}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,r.Z)())return null;var n=t.csp,o=t.prepend,c=t.priority,l=void 0===c?0:c,f="queue"===o?"prependQueue":o?"prepend":"append",d="prependQueue"===f,p=document.createElement("style");p.setAttribute(i,f),d&&l&&p.setAttribute(a,"".concat(l)),null!=n&&n.nonce&&(p.nonce=null==n?void 0:n.nonce),p.innerHTML=e;var h=s(t),m=h.firstChild;if(o){if(d){var g=u(h).filter(function(e){return!!["prepend","prependQueue"].includes(e.getAttribute(i))&&l>=Number(e.getAttribute(a)||0)});if(g.length)return h.insertBefore(p,g[g.length-1].nextSibling),p}h.insertBefore(p,m)}else h.appendChild(p);return p}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(s(t)).find(function(n){return n.getAttribute(l(t))===e})}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d(e,t);n&&s(t).removeChild(n)}function h(e,t){var n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=c.get(e);if(!n||!(0,o.Z)(document,n)){var r=f("",t),i=r.parentNode;c.set(e,i),e.removeChild(r)}}(s(a),a);var u=d(t,a);if(u)return null!==(n=a.csp)&&void 0!==n&&n.nonce&&u.nonce!==(null===(r=a.csp)||void 0===r?void 0:r.nonce)&&(u.nonce=null===(i=a.csp)||void 0===i?void 0:i.nonce),u.innerHTML!==e&&(u.innerHTML=e),u;var p=f(e,a);return p.setAttribute(l(a),t),p}},2868:function(e,t,n){"use strict";n.d(t,{S:function(){return i},Z:function(){return a}});var r=n(2265),o=n(54887);function i(e){return e instanceof HTMLElement||e instanceof SVGElement}function a(e){return i(e)?e:e instanceof r.Component?o.findDOMNode(e):null}},2857:function(e,t){"use strict";t.Z=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}},13211:function(e,t,n){"use strict";function r(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function o(e){return r(e) instanceof ShadowRoot?r(e):null}n.d(t,{A:function(){return o}})},95814:function(e,t){"use strict";var n={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=n.F1&&t<=n.F12)return!1;switch(t){case n.ALT:case n.CAPS_LOCK:case n.CONTEXT_MENU:case n.CTRL:case n.DOWN:case n.END:case n.ESC:case n.HOME:case n.INSERT:case n.LEFT:case n.MAC_FF_META:case n.META:case n.NUMLOCK:case n.NUM_CENTER:case n.PAGE_DOWN:case n.PAGE_UP:case n.PAUSE:case n.PRINT_SCREEN:case n.RIGHT:case n.SHIFT:case n.UP:case n.WIN_KEY:case n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=n.ZERO&&e<=n.NINE||e>=n.NUM_ZERO&&e<=n.NUM_MULTIPLY||e>=n.A&&e<=n.Z||-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case n.SPACE:case n.QUESTION_MARK:case n.NUM_PLUS:case n.NUM_MINUS:case n.NUM_PERIOD:case n.NUM_DIVISION:case n.SEMICOLON:case n.DASH:case n.EQUALS:case n.COMMA:case n.PERIOD:case n.SLASH:case n.APOSTROPHE:case n.SINGLE_QUOTE:case n.OPEN_SQUARE_BRACKET:case n.BACKSLASH:case n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=n},18404:function(e,t,n){"use strict";n.d(t,{s:function(){return g},v:function(){return b}});var r,o,i=n(73129),a=n(54580),c=n(41154),l=n(31686),s=n(54887),u=(0,l.Z)({},r||(r=n.t(s,2))),f=u.version,d=u.render,p=u.unmountComponentAtNode;try{Number((f||"").split(".")[0])>=18&&(o=u.createRoot)}catch(e){}function h(e){var t=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,c.Z)(t)&&(t.usingClientEntryPoint=e)}var m="__rc_react_root__";function g(e,t){if(o){var n;h(!0),n=t[m]||o(t),h(!1),n.render(e),t[m]=n;return}d(e,t)}function v(){return(v=(0,a.Z)((0,i.Z)().mark(function e(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then(function(){var e;null===(e=t[m])||void 0===e||e.unmount(),delete t[m]}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=(0,a.Z)((0,i.Z)().mark(function e(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(void 0!==o)){e.next=2;break}return e.abrupt("return",function(e){return v.apply(this,arguments)}(t));case 2:p(t);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}},3208:function(e,t,n){"use strict";var r;function o(e){if("undefined"==typeof document)return 0;if(e||void 0===r){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;i===a&&(a=n.clientWidth),document.body.removeChild(n),r=i-a}return r}function i(e){var t=e.match(/^(.*)px$/),n=Number(null==t?void 0:t[1]);return Number.isNaN(n)?o():n}function a(e){if("undefined"==typeof document||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:i(n),height:i(r)}}n.d(t,{Z:function(){return o},o:function(){return a}})},58525:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2265);function o(e){var t=r.useRef();return t.current=e,r.useCallback(function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))},[])}},92491:function(e,t,n){"use strict";var r,o=n(26365),i=n(31686),a=n(2265),c=0,l=(0,i.Z)({},r||(r=n.t(a,2))).useId;t.Z=l?function(e){var t=l();return e||t}:function(e){var t=a.useState("ssr-id"),n=(0,o.Z)(t,2),r=n[0],i=n[1];return(a.useEffect(function(){var e=c;c+=1,i("rc_unique_".concat(e))},[]),e)?e:r}},27380:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(2265),o=(0,n(94981).Z)()?r.useLayoutEffect:r.useEffect,i=function(e,t){var n=r.useRef(!0);o(function(){return e(n.current)},t),o(function(){return n.current=!1,function(){n.current=!0}},[])},a=function(e,t){i(function(t){if(!t)return e()},t)};t.Z=i},6397:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2265);function o(e,t,n){var o=r.useRef({});return(!("value"in o.current)||n(o.current.condition,t))&&(o.current.value=e(),o.current.condition=t),o.current.value}},50506:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(26365),o=n(58525),i=n(27380),a=n(69819);function c(e){return void 0!==e}function l(e,t){var n=t||{},l=n.defaultValue,s=n.value,u=n.onChange,f=n.postState,d=(0,a.Z)(function(){return c(s)?s:c(l)?"function"==typeof l?l():l:"function"==typeof e?e():e}),p=(0,r.Z)(d,2),h=p[0],m=p[1],g=void 0!==s?s:h,v=f?f(g):g,b=(0,o.Z)(u),y=(0,a.Z)([g]),x=(0,r.Z)(y,2),w=x[0],E=x[1];return(0,i.o)(function(){var e=w[0];h!==e&&b(h,e)},[w]),(0,i.o)(function(){c(s)||m(s)},[s]),[v,(0,o.Z)(function(e,t){m(e,t),E([g],t)})]}},69819:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(26365),o=n(2265);function i(e){var t=o.useRef(!1),n=o.useState(e),i=(0,r.Z)(n,2),a=i[0],c=i[1];return o.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]),[a,function(e,n){n&&t.current||c(e)}]}},74126:function(e,t,n){"use strict";n.d(t,{t4:function(){return o.t4},x1:function(){return o.x1},zX:function(){return r.Z}});var r=n(58525);n(50506);var o=n(28791);n(23789),n(32559)},16671:function(e,t,n){"use strict";var r=n(41154),o=n(32559);t.Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,o.ZP)(!l,"Warning: There may be circular references"),l)return!1;if(t===a)return!0;if(n&&c>1)return!1;i.add(t);var s=c+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var u=0;u<t.length;u++)if(!e(t[u],a[u],s))return!1;return!0}if(t&&a&&"object"===(0,r.Z)(t)&&"object"===(0,r.Z)(a)){var f=Object.keys(t);return f.length===Object.keys(a).length&&f.every(function(n){return e(t[n],a[n],s)})}return!1}(e,t)}},79267:function(e,t){"use strict";t.Z=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}},18694:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31686);function o(e,t){var n=(0,r.Z)({},e);return Array.isArray(t)&&t.forEach(function(e){delete n[e]}),n}},53346:function(e,t){"use strict";var n=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(n=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var o=0,i=new Map,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=o+=1;return!function t(o){if(0===o)i.delete(r),e();else{var a=n(function(){t(o-1)});i.set(r,a)}}(t),r};a.cancel=function(e){var t=i.get(e);return i.delete(e),r(t)},t.Z=a},28791:function(e,t,n){"use strict";n.d(t,{Yr:function(){return u},mH:function(){return c},sQ:function(){return l},t4:function(){return f},x1:function(){return s}});var r=n(41154),o=n(2265),i=n(93754),a=n(6397);function c(e,t){"function"==typeof e?e(t):"object"===(0,r.Z)(e)&&e&&"current"in e&&(e.current=t)}function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(function(e){return e});return r.length<=1?r[0]:function(e){t.forEach(function(t){c(t,e)})}}function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.Z)(function(){return l.apply(void 0,t)},t,function(e,t){return e.length!==t.length||e.every(function(e,n){return e!==t[n]})})}function u(e){var t,n,r=(0,i.isMemo)(e)?e.type.type:e.type;return("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&!!t.render)&&("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&!!n.render)}function f(e){return!(!(0,o.isValidElement)(e)||(0,i.isFragment)(e))&&u(e)}},16847:function(e,t,n){"use strict";function r(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}n.d(t,{Z:function(){return r}})},23789:function(e,t,n){"use strict";n.d(t,{T:function(){return f},Z:function(){return l}});var r=n(41154),o=n(31686),i=n(83145),a=n(87099),c=n(16847);function l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!(0,c.Z)(e,t.slice(0,-1))?e:function e(t,n,r,c){if(!n.length)return r;var l,s=(0,a.Z)(n),u=s[0],f=s.slice(1);return l=t||"number"!=typeof u?Array.isArray(t)?(0,i.Z)(t):(0,o.Z)({},t):[],c&&void 0===r&&1===f.length?delete l[u][f[0]]:l[u]=e(l[u],f,r,c),l}(e,t,n,r)}function s(e){return Array.isArray(e)?[]:{}}var u="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;function f(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=s(t[0]);return t.forEach(function(e){!function t(n,a){var f=new Set(a),d=(0,c.Z)(e,n),p=Array.isArray(d);if(p||"object"===(0,r.Z)(d)&&null!==d&&Object.getPrototypeOf(d)===Object.prototype){if(!f.has(d)){f.add(d);var h=(0,c.Z)(o,n);p?o=l(o,n,[]):h&&"object"===(0,r.Z)(h)||(o=l(o,n,s(d))),u(d).forEach(function(e){t([].concat((0,i.Z)(n),[e]),f)})}}else o=l(o,n,d)}([])}),o}},32559:function(e,t,n){"use strict";n.d(t,{Kp:function(){return i}});var r={},o=[];function i(e,t){}function a(e,t){}function c(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function l(e,t){c(i,e,t)}l.preMessage=function(e){o.push(e)},l.resetWarned=function(){r={}},l.noteOnce=function(e,t){c(a,e,t)},t.ZP=l},24940:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy");function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case f:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case u:case h:case p:case c:return e;default:return t}}case r:return t}}}Symbol.for("react.offscreen"),Symbol.for("react.module.reference"),t.isFragment=function(e){return m(e)===o},t.isMemo=function(e){return m(e)===p}},93754:function(e,t,n){"use strict";e.exports=n(24940)},36760:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}(n)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0!==(n=(function(){return o}).apply(t,[]))&&(e.exports=n)}()},96240:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},75996:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return r}})},63496:function(e,t,n){"use strict";function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},54580:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,l,"next",e)}function l(e){r(a,o,i,c,l,"throw",e)}c(void 0)})}}n.d(t,{Z:function(){return o}})},76405:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},25049:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(73882);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},15900:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(24995),o=n(63929),i=n(37977);function a(e){var t=(0,o.Z)();return function(){var n,o=(0,r.Z)(e);return n=t?Reflect.construct(o,arguments,(0,r.Z)(this).constructor):o.apply(this,arguments),(0,i.Z)(this,n)}}},11993:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(73882);function o(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1119:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Z:function(){return r}})},24995:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,{Z:function(){return r}})},15354:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}n.d(t,{Z:function(){return o}})},63929:function(e,t,n){"use strict";function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}n.d(t,{Z:function(){return r}})},45908:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:function(){return r}})},56905:function(e,t,n){"use strict";function r(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return r}})},31686:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(11993);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},6989:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:function(){return r}})},37977:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(41154),o=n(63496);function i(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},73129:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(41154);function o(){o=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(t,n,r,o){var i,c,l=Object.create((n&&n.prototype instanceof b?n:b).prototype);return a(l,"_invoke",{value:(i=new M(o||[]),c=h,function(n,o){if(c===m)throw Error("Generator is already running");if(c===g){if("throw"===n)throw o;return{value:e,done:!0}}for(i.method=n,i.arg=o;;){var a=i.delegate;if(a){var l=function t(n,r){var o=r.method,i=n.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&n.iterator.return&&(r.method="return",r.arg=e,t(n,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+o+"' method")),v;var a=p(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var c=a.arg;return c?c.done?(r[n.resultName]=c.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):c:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,v)}(a,i);if(l){if(l===v)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(c===h)throw c=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);c=m;var s=p(t,r,i);if("normal"===s.type){if(c=i.done?g:"suspendedYield",s.arg===v)continue;return{value:s.arg,done:i.done}}"throw"===s.type&&(c=g,i.method="throw",i.arg=s.arg)}})}),l}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",m="executing",g="completed",v={};function b(){}function y(){}function x(){}var w={};f(w,l,function(){return this});var E=Object.getPrototypeOf,k=E&&E(E(j([])));k&&k!==n&&i.call(k,l)&&(w=k);var Z=x.prototype=b.prototype=Object.create(w);function C(e){["next","throw","return"].forEach(function(t){f(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){var n;a(this,"_invoke",{value:function(o,a){function c(){return new t(function(n,c){!function n(o,a,c,l){var s=p(e[o],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==(0,r.Z)(f)&&i.call(f,"__await")?t.resolve(f.__await).then(function(e){n("next",e,c,l)},function(e){n("throw",e,c,l)}):t.resolve(f).then(function(e){u.value=e,c(u)},function(e){return n("throw",e,c,l)})}l(s.arg)}(o,a,n,c)})}return n=n?n.then(c,c):c()}})}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(i.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw TypeError((0,r.Z)(t)+" is not iterable")}return y.prototype=x,a(Z,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:y,configurable:!0}),y.displayName=f(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,f(e,u,"GeneratorFunction")),e.prototype=Object.create(Z),e},t.awrap=function(e){return{__await:e}},C(S.prototype),f(S.prototype,s,function(){return this}),t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new S(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},C(Z),f(Z,u,"Generator"),f(Z,l,function(){return this}),f(Z,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=j,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:j(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}},26365:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(75996),o=n(29062),i=n(56905);function a(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||(0,o.Z)(e,t)||(0,i.Z)()}},87099:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(75996),o=n(45908),i=n(29062),a=n(56905);function c(e){return(0,r.Z)(e)||(0,o.Z)(e)||(0,i.Z)(e)||(0,a.Z)()}},83145:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(96240),o=n(45908),i=n(29062);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,o.Z)(e)||(0,i.Z)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},73882:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(41154);function o(e){var t=function(e,t){if("object"!=(0,r.Z)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=(0,r.Z)(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.Z)(t)?t:String(t)}},41154:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{Z:function(){return r}})},29062:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(96240);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return(0,r.Z)(e,t)}}},5853:function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}n.d(t,{_T:function(){return r}}),"function"==typeof SuppressedError&&SuppressedError}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/699-2a1c30f260f44c15.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/699-2a1c30f260f44c15.js new file mode 100644 index 00000000..4c53500a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/699-2a1c30f260f44c15.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[699],{92699:function(e,n,t){t.d(n,{Z:function(){return k}});var s=t(57437),l=t(2265),o=t(99376),r=t(19250),a=t(20831),i=t(12514),c=t(12485),d=t(18135),m=t(35242),p=t(29706),u=t(77991),x=t(84264),h=t(96761),_=t(23639),g=t(77565),j=t(75957),y=t(51369),b=t(17906),k=e=>{var n;let{accessToken:t,publicPage:k,premiumUser:f}=e,[Z,v]=(0,l.useState)(!1),[w,N]=(0,l.useState)(null),[S,M]=(0,l.useState)(!1),[A,I]=(0,l.useState)(!1),[O,P]=(0,l.useState)(null),C=(0,o.useRouter)();(0,l.useEffect)(()=>{t&&(async()=>{try{let e=await (0,r.kn)(t);console.log("ModelHubData:",e),N(e.data),(0,r.E9)(t,"enable_public_model_hub").then(e=>{console.log("data: ".concat(JSON.stringify(e))),!0==e.field_value&&v(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}})()},[t,k]);let U=e=>{P(e),M(!0)},T=async()=>{t&&(0,r.jA)(t,"enable_public_model_hub",!0).then(e=>{I(!0)})},z=()=>{M(!1),I(!1),P(null)},H=()=>{M(!1),I(!1),P(null)},E=e=>{navigator.clipboard.writeText(e)};return(0,s.jsxs)("div",{children:[k&&Z||!1==k?(0,s.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,s.jsx)("div",{className:"relative w-full"}),(0,s.jsxs)("div",{className:"flex ".concat(k?"justify-between":"items-center"),children:[(0,s.jsx)(h.Z,{className:"ml-8 text-center ",children:"Model Hub"}),!1==k?f?(0,s.jsx)(a.Z,{className:"ml-4",onClick:()=>T(),children:"✨ Make Public"}):(0,s.jsx)(a.Z,{className:"ml-4",children:(0,s.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"✨ Make Public"})}):(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("p",{children:"Filter by key:"}),(0,s.jsx)(x.Z,{className:"bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center",children:"/ui/model_hub?key=<YOUR_KEY>"})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 pr-8",children:w&&w.map(e=>(0,s.jsxs)(i.Z,{className:"mt-5 mx-8",children:[(0,s.jsxs)("pre",{className:"flex justify-between",children:[(0,s.jsx)(h.Z,{className:"text-wrap",children:e.model_group}),(0,s.jsx)(j.Z,{title:e.model_group,children:(0,s.jsx)(_.Z,{onClick:()=>E(e.model_group),style:{cursor:"pointer",marginRight:"10px"}})})]}),(0,s.jsxs)("div",{className:"my-5",children:[(0,s.jsxs)(x.Z,{children:["Max Input Tokens:"," ",(null==e?void 0:e.max_input_tokens)?null==e?void 0:e.max_input_tokens:"Unknown"]}),(0,s.jsxs)(x.Z,{children:["Max Output Tokens:"," ",(null==e?void 0:e.max_output_tokens)?null==e?void 0:e.max_output_tokens:"Unknown"]}),(0,s.jsxs)(x.Z,{children:["Input Cost Per 1M Tokens (USD):"," ",(null==e?void 0:e.input_cost_per_token)?"$".concat((1e6*e.input_cost_per_token).toFixed(2)):"Unknown"]}),(0,s.jsxs)(x.Z,{children:["Output Cost Per 1M Tokens (USD):"," ",(null==e?void 0:e.output_cost_per_token)?"$".concat((1e6*e.output_cost_per_token).toFixed(2)):"Unknown"]})]}),(0,s.jsx)("div",{style:{marginTop:"auto",textAlign:"right"},children:(0,s.jsxs)("a",{href:"#",onClick:()=>U(e),style:{color:"#1890ff",fontSize:"smaller"},children:["View more ",(0,s.jsx)(g.Z,{})]})})]},e.model_group))})]}):(0,s.jsxs)(i.Z,{className:"mx-auto max-w-xl mt-10",children:[(0,s.jsx)(x.Z,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,s.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,s.jsx)(y.Z,{title:"Public Model Hub",width:600,visible:A,footer:null,onOk:z,onCancel:H,children:(0,s.jsxs)("div",{className:"pt-5 pb-5",children:[(0,s.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,s.jsx)(x.Z,{className:"text-base mr-2",children:"Shareable Link:"}),(0,s.jsx)(x.Z,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:"<proxy_base_url>/ui/model_hub?key=<YOUR_API_KEY>"})]}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(a.Z,{onClick:()=>{C.replace("/model_hub?key=".concat(t))},children:"See Page"})})]})}),(0,s.jsx)(y.Z,{title:O&&O.model_group?O.model_group:"Unknown Model",width:800,visible:S,footer:null,onOk:z,onCancel:H,children:O&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-4",children:(0,s.jsx)("strong",{children:"Model Information & Usage"})}),(0,s.jsxs)(d.Z,{children:[(0,s.jsxs)(m.Z,{children:[(0,s.jsx)(c.Z,{children:"Model Information"}),(0,s.jsx)(c.Z,{children:"OpenAI Python SDK"}),(0,s.jsx)(c.Z,{children:"Supported OpenAI Params"}),(0,s.jsx)(c.Z,{children:"LlamaIndex"}),(0,s.jsx)(c.Z,{children:"Langchain Py"})]}),(0,s.jsxs)(u.Z,{children:[(0,s.jsx)(p.Z,{children:(0,s.jsxs)(x.Z,{children:[(0,s.jsx)("strong",{children:"Model Group:"}),(0,s.jsx)("pre",{children:JSON.stringify(O,null,2)})]})}),(0,s.jsx)(p.Z,{children:(0,s.jsx)(b.Z,{language:"python",children:'\nimport openai\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="http://0.0.0.0:4000" # LiteLLM Proxy is OpenAI compatible, Read More: https://docs.litellm.ai/docs/proxy/user_keys\n)\n\nresponse = client.chat.completions.create(\n model="'.concat(O.model_group,'", # model to send to the proxy\n messages = [\n {\n "role": "user",\n "content": "this is a test request, write a short poem"\n }\n ]\n)\n\nprint(response)\n ')})}),(0,s.jsx)(p.Z,{children:(0,s.jsx)(b.Z,{language:"python",children:"".concat(null===(n=O.supported_openai_params)||void 0===n?void 0:n.map(e=>"".concat(e,"\n")).join(""))})}),(0,s.jsx)(p.Z,{children:(0,s.jsx)(b.Z,{language:"python",children:'\nimport os, dotenv\n\nfrom llama_index.llms import AzureOpenAI\nfrom llama_index.embeddings import AzureOpenAIEmbedding\nfrom llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n\nllm = AzureOpenAI(\n engine="'.concat(O.model_group,'", # model_name on litellm proxy\n temperature=0.0,\n azure_endpoint="http://0.0.0.0:4000", # litellm proxy endpoint\n api_key="sk-1234", # litellm proxy API Key\n api_version="2023-07-01-preview",\n)\n\nembed_model = AzureOpenAIEmbedding(\n deployment_name="azure-embedding-model",\n azure_endpoint="http://0.0.0.0:4000",\n api_key="sk-1234",\n api_version="2023-07-01-preview",\n)\n\n\ndocuments = SimpleDirectoryReader("llama_index_data").load_data()\nservice_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model)\nindex = VectorStoreIndex.from_documents(documents, service_context=service_context)\n\nquery_engine = index.as_query_engine()\nresponse = query_engine.query("What did the author do growing up?")\nprint(response)\n\n ')})}),(0,s.jsx)(p.Z,{children:(0,s.jsx)(b.Z,{language:"python",children:'\nfrom langchain.chat_models import ChatOpenAI\nfrom langchain.prompts.chat import (\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n SystemMessagePromptTemplate,\n)\nfrom langchain.schema import HumanMessage, SystemMessage\n\nchat = ChatOpenAI(\n openai_api_base="http://0.0.0.0:4000",\n model = "'.concat(O.model_group,'",\n temperature=0.1\n)\n\nmessages = [\n SystemMessage(\n content="You are a helpful assistant that im using to make a test request to."\n ),\n HumanMessage(\n content="test from litellm. tell me why it\'s amazing in 1 sentence"\n ),\n]\nresponse = chat(messages)\n\nprint(response)\n\n ')})})]})]})]})})]})}}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/899-9af4feaf6f21839c.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/899-9af4feaf6f21839c.js new file mode 100644 index 00000000..103c197b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/899-9af4feaf6f21839c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[899],{69262:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(5853),o=n(2265);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"}))},l=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z"}))},c=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457ZM14.7577 16.1718L13.2937 14.7078C12.902 14.8952 12.4634 15.0002 12.0003 15.0002C10.3434 15.0002 9.00026 13.657 9.00026 12.0002C9.00026 11.537 9.10522 11.0984 9.29263 10.7067L7.82866 9.24277C7.30514 10.0332 7.00026 10.9811 7.00026 12.0002C7.00026 14.7616 9.23884 17.0002 12.0003 17.0002C13.0193 17.0002 13.9672 16.6953 14.7577 16.1718ZM7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925L16.947 12.7327C16.9821 12.4936 17.0003 12.249 17.0003 12.0002C17.0003 9.23873 14.7617 7.00016 12.0003 7.00016C11.7514 7.00016 11.5068 7.01833 11.2677 7.05343L7.97446 3.76015Z"}))};var i=n(96398),s=n(65954),d=n(1153);let u=o.forwardRef((e,t)=>{let{value:n,defaultValue:u,type:m,placeholder:p="Type...",icon:f,error:g=!1,errorMessage:h,disabled:b=!1,stepper:v,makeInputClassName:y,className:x,onChange:w,onValueChange:C,autoFocus:E}=e,k=(0,r._T)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus"]),[O,j]=(0,o.useState)(E||!1),[S,M]=(0,o.useState)(!1),I=(0,o.useCallback)(()=>M(!S),[S,M]),N=(0,o.useRef)(null),Z=(0,i.Uh)(n||u);return o.useEffect(()=>{let e=()=>j(!0),t=()=>j(!1),n=N.current;return n&&(n.addEventListener("focus",e),n.addEventListener("blur",t),E&&n.focus()),()=>{n&&(n.removeEventListener("focus",e),n.removeEventListener("blur",t))}},[E]),o.createElement(o.Fragment,null,o.createElement("div",{className:(0,s.q)(y("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100 border","shadow-tremor-input","dark:shadow-dark-tremor-input",(0,i.um)(Z,b,g),O&&(0,s.q)("ring-2","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),x)},f?o.createElement(f,{className:(0,s.q)(y("icon"),"shrink-0 h-5 w-5 ml-2.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}):null,o.createElement("input",Object.assign({ref:(0,d.lq)([N,t]),defaultValue:u,value:n,type:S?"text":m,className:(0,s.q)(y("input"),"w-full focus:outline-none focus:ring-0 border-none bg-transparent text-tremor-default rounded-tremor-default transition duration-100 py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",f?"pl-2":"pl-3",g?"pr-3":"pr-4",b?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content"),placeholder:p,disabled:b,"data-testid":"base-input",onChange:e=>{null==w||w(e),null==C||C(e.target.value)}},k)),"password"!==m||b?null:o.createElement("button",{className:(0,s.q)(y("toggleButton"),"mr-2"),type:"button",onClick:()=>I(),"aria-label":S?"Hide password":"Show Password"},S?o.createElement(c,{className:(0,s.q)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0}):o.createElement(l,{className:(0,s.q)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0})),g?o.createElement(a,{className:(0,s.q)(y("errorIcon"),"text-red-500 shrink-0 w-5 h-5 mr-2.5")}):null,null!=v?v:null),g&&h?o.createElement("p",{className:(0,s.q)(y("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});u.displayName="BaseInput"},49566:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(5853),o=n(2265);n(65954);var a=n(1153),l=n(69262);let c=(0,a.fn)("TextInput"),i=o.forwardRef((e,t)=>{let{type:n="text"}=e,a=(0,r._T)(e,["type"]);return o.createElement(l.Z,Object.assign({ref:t,type:n,makeInputClassName:c},a))});i.displayName="TextInput"},96398:function(e,t,n){n.d(t,{Uh:function(){return s},n0:function(){return c},qg:function(){return a},sl:function(){return l},um:function(){return i}});var r=n(65954),o=n(2265);let a=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(a).join(""):"object"==typeof e&&e?a(e.props.children):void 0;function l(e){let t=new Map;return o.Children.map(e,e=>{var n;t.set(e.props.value,null!==(n=a(e))&&void 0!==n?n:e.props.value)}),t}function c(e,t){return o.Children.map(t,t=>{var n;if((null!==(n=a(t))&&void 0!==n?n:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,r.q)(t?"bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle":"bg-tremor-background dark:bg-dark-tremor-background",!t&&"hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted",e?"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis":"text-tremor-content dark:text-dark-tremor-content",t&&"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",n&&"text-red-500",n?"border-red-500":"border-tremor-border dark:border-dark-tremor-border")};function s(e){return null!=e&&""!==e}},49804:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(5853),o=n(65954),a=n(1153),l=n(2265),c=n(9496);let i=(0,a.fn)("Col"),s=l.forwardRef((e,t)=>{let{numColSpan:n=1,numColSpanSm:a,numColSpanMd:s,numColSpanLg:d,children:u,className:m}=e,p=(0,r._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.createElement("div",Object.assign({ref:t,className:(0,o.q)(i("root"),(()=>{let e=f(n,c.PT),t=f(a,c.SP),r=f(s,c.VS),l=f(d,c._w);return(0,o.q)(e,t,r,l)})(),m)},p),u)});s.displayName="Col"},67101:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(5853),o=n(65954),a=n(1153),l=n(2265),c=n(9496);let i=(0,a.fn)("Grid"),s=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",d=l.forwardRef((e,t)=>{let{numItems:n=1,numItemsSm:a,numItemsMd:d,numItemsLg:u,children:m,className:p}=e,f=(0,r._T)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),g=s(n,c._m),h=s(a,c.LH),b=s(d,c.l5),v=s(u,c.N4),y=(0,o.q)(g,h,b,v);return l.createElement("div",Object.assign({ref:t,className:(0,o.q)(i("root"),"grid",y,p)},f),m)});d.displayName="Grid"},9496:function(e,t,n){n.d(t,{LH:function(){return o},N4:function(){return l},PT:function(){return c},SP:function(){return i},VS:function(){return s},_m:function(){return r},_w:function(){return d},l5:function(){return a}});let r={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},l={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},c={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},i={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},s={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},d={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},94789:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(5853),o=n(2265),a=n(26898),l=n(65954),c=n(1153);let i=(0,c.fn)("Callout"),s=o.forwardRef((e,t)=>{let{title:n,icon:s,color:d,className:u,children:m}=e,p=(0,r._T)(e,["title","icon","color","className","children"]);return o.createElement("div",Object.assign({ref:t,className:(0,l.q)(i("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,l.q)((0,c.bM)(d,a.K.background).bgColor,(0,c.bM)(d,a.K.darkBorder).borderColor,(0,c.bM)(d,a.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},p),o.createElement("div",{className:(0,l.q)(i("header"),"flex items-start")},s?o.createElement(s,{className:(0,l.q)(i("icon"),"flex-none h-5 w-5 mr-1.5")}):null,o.createElement("h4",{className:(0,l.q)(i("title"),"font-semibold")},n)),o.createElement("p",{className:(0,l.q)(i("body"),"overflow-y-auto",m?"mt-2":"")},m))});s.displayName="Callout"},6543:function(e,t,n){n.d(t,{ZP:function(){return i},c4:function(){return a}});var r=n(2265),o=n(29961);let a=["xxl","xl","lg","md","sm","xs"],l=e=>({xs:"(max-width: ".concat(e.screenXSMax,"px)"),sm:"(min-width: ".concat(e.screenSM,"px)"),md:"(min-width: ".concat(e.screenMD,"px)"),lg:"(min-width: ".concat(e.screenLG,"px)"),xl:"(min-width: ".concat(e.screenXL,"px)"),xxl:"(min-width: ".concat(e.screenXXL,"px)")}),c=e=>{let t=[].concat(a).reverse();return t.forEach((n,r)=>{let o=n.toUpperCase(),a="screen".concat(o,"Min"),l="screen".concat(o);if(!(e[a]<=e[l]))throw Error("".concat(a,"<=").concat(l," fails : !(").concat(e[a],"<=").concat(e[l],")"));if(r<t.length-1){let n="screen".concat(o,"Max");if(!(e[l]<=e[n]))throw Error("".concat(l,"<=").concat(n," fails : !(").concat(e[l],"<=").concat(e[n],")"));let a=t[r+1].toUpperCase(),c="screen".concat(a,"Min");if(!(e[n]<=e[c]))throw Error("".concat(n,"<=").concat(c," fails : !(").concat(e[n],"<=").concat(e[c],")"))}}),e};function i(){let[,e]=(0,o.ZP)(),t=l(c(e));return r.useMemo(()=>{let e=new Map,n=-1,r={};return{matchHandlers:{},dispatch:t=>(r=t,e.forEach(e=>e(r)),e.size>=1),subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},unregister(){Object.keys(t).forEach(e=>{let n=t[e],r=this.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)}),e.clear()},register(){Object.keys(t).forEach(e=>{let n=t[e],o=t=>{let{matches:n}=t;this.dispatch(Object.assign(Object.assign({},r),{[e]:n}))},a=window.matchMedia(n);a.addListener(o),this.matchHandlers[n]={mql:a,listener:o},o(a)})},responsiveMap:t}},[e])}},14605:function(e,t,n){var r=n(83145),o=n(36760),a=n.n(o),l=n(47970),c=n(2265),i=n(68710),s=n(39109),d=n(4064),u=n(47713),m=n(64024);let p=[];function f(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{key:"string"==typeof e?e:"".concat(t,"-").concat(r),error:e,errorStatus:n}}t.Z=e=>{let{help:t,helpStatus:n,errors:o=p,warnings:g=p,className:h,fieldId:b,onVisibleChanged:v}=e,{prefixCls:y}=c.useContext(s.Rk),x="".concat(y,"-item-explain"),w=(0,m.Z)(y),[C,E,k]=(0,u.ZP)(y,w),O=(0,c.useMemo)(()=>(0,i.Z)(y),[y]),j=(0,d.Z)(o),S=(0,d.Z)(g),M=c.useMemo(()=>null!=t?[f(t,"help",n)]:[].concat((0,r.Z)(j.map((e,t)=>f(e,"error","error",t))),(0,r.Z)(S.map((e,t)=>f(e,"warning","warning",t)))),[t,n,j,S]),I={};return b&&(I.id="".concat(b,"_help")),C(c.createElement(l.ZP,{motionDeadline:O.motionDeadline,motionName:"".concat(y,"-show-help"),visible:!!M.length,onVisibleChanged:v},e=>{let{className:t,style:n}=e;return c.createElement("div",Object.assign({},I,{className:a()(x,t,k,w,h,E),style:n,role:"alert"}),c.createElement(l.V4,Object.assign({keys:M},(0,i.Z)(y),{motionName:"".concat(y,"-show-help-item"),component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:o,style:l}=e;return c.createElement("div",{key:t,className:a()(o,{["".concat(x,"-").concat(r)]:r}),style:l},n)}))}))}},86582:function(e,t,n){n.d(t,{Z:function(){return Y}});var r=n(83145),o=n(2265),a=n(36760),l=n.n(a),c=n(64834),i=n(69819),s=n(28791),d=n(19722),u=n(13613),m=n(71744),p=n(64024),f=n(39109),g=n(45287);let h=()=>{let{status:e,errors:t=[],warnings:n=[]}=(0,o.useContext)(f.aM);return{status:e,errors:t,warnings:n}};h.Context=f.aM;var b=n(53346),v=n(47713),y=n(13861),x=n(2857),w=n(27380),C=n(18694),E=n(10295),k=n(54998),O=n(14605),j=n(80669);let S=e=>{let{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{["".concat(t,"-control")]:{display:"flex"}}}};var M=(0,j.bk)(["Form","item-item"],(e,t)=>{let{rootPrefixCls:n}=t;return[S((0,v.B4)(e,n))]}),I=e=>{let{prefixCls:t,status:n,wrapperCol:r,children:a,errors:c,warnings:i,_internalItemRender:s,extra:d,help:u,fieldId:m,marginBottom:p,onErrorVisibleChanged:g}=e,h="".concat(t,"-item"),b=o.useContext(f.q3),v=r||b.wrapperCol||{},y=l()("".concat(h,"-control"),v.className),x=o.useMemo(()=>Object.assign({},b),[b]);delete x.labelCol,delete x.wrapperCol;let w=o.createElement("div",{className:"".concat(h,"-control-input")},o.createElement("div",{className:"".concat(h,"-control-input-content")},a)),C=o.useMemo(()=>({prefixCls:t,status:n}),[t,n]),E=null!==p||c.length||i.length?o.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},o.createElement(f.Rk.Provider,{value:C},o.createElement(O.Z,{fieldId:m,errors:c,warnings:i,help:u,helpStatus:n,className:"".concat(h,"-explain-connected"),onVisibleChanged:g})),!!p&&o.createElement("div",{style:{width:0,height:p}})):null,j={};m&&(j.id="".concat(m,"_extra"));let S=d?o.createElement("div",Object.assign({},j,{className:"".concat(h,"-extra")}),d):null,I=s&&"pro_table_render"===s.mark&&s.render?s.render(e,{input:w,errorList:E,extra:S}):o.createElement(o.Fragment,null,w,E,S);return o.createElement(f.q3.Provider,{value:x},o.createElement(k.Z,Object.assign({},v,{className:y}),I),o.createElement(M,{prefixCls:t}))},N=n(1119),Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},q=n(55015),F=o.forwardRef(function(e,t){return o.createElement(q.Z,(0,N.Z)({},e,{ref:t,icon:Z}))}),P=n(13823),L=n(55274),R=n(75957),_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},T=e=>{var t;let{prefixCls:n,label:r,htmlFor:a,labelCol:c,labelAlign:i,colon:s,required:d,requiredMark:u,tooltip:m}=e,[p]=(0,L.Z)("Form"),{vertical:g,labelAlign:h,labelCol:b,labelWrap:v,colon:y}=o.useContext(f.q3);if(!r)return null;let x=c||b||{},w="".concat(n,"-item-label"),C=l()(w,"left"===(i||h)&&"".concat(w,"-left"),x.className,{["".concat(w,"-wrap")]:!!v}),E=r,O=!0===s||!1!==y&&!1!==s;O&&!g&&"string"==typeof r&&""!==r.trim()&&(E=r.replace(/[:|:]\s*$/,""));let j=m?"object"!=typeof m||o.isValidElement(m)?{title:m}:m:null;if(j){let{icon:e=o.createElement(F,null)}=j,t=_(j,["icon"]),r=o.createElement(R.Z,Object.assign({},t),o.cloneElement(e,{className:"".concat(n,"-item-tooltip"),title:"",onClick:e=>{e.preventDefault()},tabIndex:null}));E=o.createElement(o.Fragment,null,E,r)}let S="optional"===u,M="function"==typeof u;M?E=u(E,{required:!!d}):S&&!d&&(E=o.createElement(o.Fragment,null,E,o.createElement("span",{className:"".concat(n,"-item-optional"),title:""},(null==p?void 0:p.optional)||(null===(t=P.Z.Form)||void 0===t?void 0:t.optional))));let I=l()({["".concat(n,"-item-required")]:d,["".concat(n,"-item-required-mark-optional")]:S||M,["".concat(n,"-item-no-colon")]:!O});return o.createElement(k.Z,Object.assign({},x,{className:C}),o.createElement("label",{htmlFor:a,className:I,title:"string"==typeof r?r:""},E))},H=n(4064),W=n(8900),V=n(39725),z=n(54537),D=n(61935);let A={success:W.Z,warning:z.Z,error:V.Z,validating:D.Z};function B(e){let{children:t,errors:n,warnings:r,hasFeedback:a,validateStatus:c,prefixCls:i,meta:s,noStyle:d}=e,u="".concat(i,"-item"),{feedbackIcons:m}=o.useContext(f.q3),p=(0,y.lR)(n,r,s,null,!!a,c),{isFormItemInput:g,status:h,hasFeedback:b,feedbackIcon:v}=o.useContext(f.aM),x=o.useMemo(()=>{var e;let t;if(a){let c=!0!==a&&a.icons||m,i=p&&(null===(e=null==c?void 0:c({status:p,errors:n,warnings:r}))||void 0===e?void 0:e[p]),s=p&&A[p];t=!1!==i&&s?o.createElement("span",{className:l()("".concat(u,"-feedback-icon"),"".concat(u,"-feedback-icon-").concat(p))},i||o.createElement(s,null)):null}let c={status:p||"",errors:n,warnings:r,hasFeedback:!!a,feedbackIcon:t,isFormItemInput:!0};return d&&(c.status=(null!=p?p:h)||"",c.isFormItemInput=g,c.hasFeedback=!!(null!=a?a:b),c.feedbackIcon=void 0!==a?c.feedbackIcon:v),c},[p,a,d,g,h]);return o.createElement(f.aM.Provider,{value:x},t)}var X=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function G(e){let{prefixCls:t,className:n,rootClassName:r,style:a,help:c,errors:i,warnings:s,validateStatus:d,meta:u,hasFeedback:m,hidden:p,children:g,fieldId:h,required:b,isRequired:v,onSubItemMetaChange:k}=e,O=X(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),j="".concat(t,"-item"),{requiredMark:S}=o.useContext(f.q3),M=o.useRef(null),N=(0,H.Z)(i),Z=(0,H.Z)(s),q=null!=c,F=!!(q||i.length||s.length),P=!!M.current&&(0,x.Z)(M.current),[L,R]=o.useState(null);(0,w.Z)(()=>{F&&M.current&&R(parseInt(getComputedStyle(M.current).marginBottom,10))},[F,P]);let _=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?N:u.errors,n=e?Z:u.warnings;return(0,y.lR)(t,n,u,"",!!m,d)}(),W=l()(j,n,r,{["".concat(j,"-with-help")]:q||N.length||Z.length,["".concat(j,"-has-feedback")]:_&&m,["".concat(j,"-has-success")]:"success"===_,["".concat(j,"-has-warning")]:"warning"===_,["".concat(j,"-has-error")]:"error"===_,["".concat(j,"-is-validating")]:"validating"===_,["".concat(j,"-hidden")]:p});return o.createElement("div",{className:W,style:a,ref:M},o.createElement(E.Z,Object.assign({className:"".concat(j,"-row")},(0,C.Z)(O,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),o.createElement(T,Object.assign({htmlFor:h},e,{requiredMark:S,required:null!=b?b:v,prefixCls:t})),o.createElement(I,Object.assign({},e,u,{errors:N,warnings:Z,prefixCls:t,status:_,help:c,marginBottom:L,onErrorVisibleChanged:e=>{e||R(null)}}),o.createElement(f.qI.Provider,{value:k},o.createElement(B,{prefixCls:t,meta:u,errors:u.errors,warnings:u.warnings,hasFeedback:m,validateStatus:_},g)))),!!L&&o.createElement("div",{className:"".concat(j,"-margin-offset"),style:{marginBottom:-L}}))}let $=o.memo(e=>{let{children:t}=e;return t},(e,t)=>(function(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],o=t[n];return r===o||"function"==typeof r||"function"==typeof o})})(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((e,n)=>e===t.childProps[n]));function U(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}let K=function(e){let{name:t,noStyle:n,className:a,dependencies:h,prefixCls:x,shouldUpdate:w,rules:C,children:E,required:k,label:O,messageVariables:j,trigger:S="onChange",validateTrigger:M,hidden:I,help:N}=e,{getPrefixCls:Z}=o.useContext(m.E_),{name:q}=o.useContext(f.q3),F=function(e){if("function"==typeof e)return e;let t=(0,g.Z)(e);return t.length<=1?t[0]:t}(E),P="function"==typeof F,L=o.useContext(f.qI),{validateTrigger:R}=o.useContext(c.zb),_=void 0!==M?M:R,T=null!=t,H=Z("form",x),W=(0,p.Z)(H),[V,z,D]=(0,v.ZP)(H,W);(0,u.ln)("Form.Item");let A=o.useContext(c.ZM),X=o.useRef(),[K,Y]=function(e){let[t,n]=o.useState(e),r=(0,o.useRef)(null),a=(0,o.useRef)([]),l=(0,o.useRef)(!1);return o.useEffect(()=>(l.current=!1,()=>{l.current=!0,b.Z.cancel(r.current),r.current=null}),[]),[t,function(e){l.current||(null===r.current&&(a.current=[],r.current=(0,b.Z)(()=>{r.current=null,n(e=>{let t=e;return a.current.forEach(e=>{t=e(t)}),t})})),a.current.push(e))}]}({}),[J,Q]=(0,i.Z)(()=>U()),ee=(e,t)=>{Y(n=>{let o=Object.assign({},n),a=[].concat((0,r.Z)(e.name.slice(0,-1)),(0,r.Z)(t)).join("__SPLIT__");return e.destroy?delete o[a]:o[a]=e,o})},[et,en]=o.useMemo(()=>{let e=(0,r.Z)(J.errors),t=(0,r.Z)(J.warnings);return Object.values(K).forEach(n=>{e.push.apply(e,(0,r.Z)(n.errors||[])),t.push.apply(t,(0,r.Z)(n.warnings||[]))}),[e,t]},[K,J.errors,J.warnings]),er=function(){let{itemRef:e}=o.useContext(f.q3),t=o.useRef({});return function(n,r){let o=r&&"object"==typeof r&&r.ref,a=n.join("_");return(t.current.name!==a||t.current.originRef!==o)&&(t.current.name=a,t.current.originRef=o,t.current.ref=(0,s.sQ)(e(n),o)),t.current.ref}}();function eo(t,r,c){return n&&!I?o.createElement(B,{prefixCls:H,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:J,errors:et,warnings:en,noStyle:!0},t):o.createElement(G,Object.assign({key:"row"},e,{className:l()(a,D,W,z),prefixCls:H,fieldId:r,isRequired:c,errors:et,warnings:en,meta:J,onSubItemMetaChange:ee}),t)}if(!T&&!P&&!h)return V(eo(F));let ea={};return"string"==typeof O?ea.label=O:t&&(ea.label=String(t)),j&&(ea=Object.assign(Object.assign({},ea),j)),V(o.createElement(c.gN,Object.assign({},e,{messageVariables:ea,trigger:S,validateTrigger:_,onMetaChange:e=>{let t=null==A?void 0:A.getKey(e.name);if(Q(e.destroy?U():e,!0),n&&!1!==N&&L){let n=e.name;if(e.destroy)n=X.current||n;else if(void 0!==t){let[e,o]=t;n=[e].concat((0,r.Z)(o)),X.current=n}L(e,n)}}}),(n,a,l)=>{let c=(0,y.qo)(t).length&&a?a.name:[],i=(0,y.dD)(c,q),u=void 0!==k?k:!!(C&&C.some(e=>{if(e&&"object"==typeof e&&e.required&&!e.warningOnly)return!0;if("function"==typeof e){let t=e(l);return t&&t.required&&!t.warningOnly}return!1})),m=Object.assign({},n),p=null;if(Array.isArray(F)&&T)p=F;else if(P&&(!(w||h)||T));else if(!h||P||T){if((0,d.l$)(F)){let t=Object.assign(Object.assign({},F.props),m);if(t.id||(t.id=i),N||et.length>0||en.length>0||e.extra){let n=[];(N||et.length>0)&&n.push("".concat(i,"_help")),e.extra&&n.push("".concat(i,"_extra")),t["aria-describedby"]=n.join(" ")}et.length>0&&(t["aria-invalid"]="true"),u&&(t["aria-required"]="true"),(0,s.Yr)(F)&&(t.ref=er(c,F)),new Set([].concat((0,r.Z)((0,y.qo)(S)),(0,r.Z)((0,y.qo)(_)))).forEach(e=>{t[e]=function(){for(var t,n,r,o=arguments.length,a=Array(o),l=0;l<o;l++)a[l]=arguments[l];null===(t=m[e])||void 0===t||t.call.apply(t,[m].concat(a)),null===(r=(n=F.props)[e])||void 0===r||r.call.apply(r,[n].concat(a))}});let n=[t["aria-required"],t["aria-invalid"],t["aria-describedby"]];p=o.createElement($,{control:m,update:F,childProps:n},(0,d.Tm)(F,t))}else p=P&&(w||h)&&!T?F(l):F}return eo(p,i,u)}))};K.useStatus=h;var Y=K},4064:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(2265);function o(e){let[t,n]=r.useState(e);return r.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}},13634:function(e,t,n){n.d(t,{Z:function(){return N}});var r=n(14605),o=n(2265),a=n(36760),l=n.n(a),c=n(64834),i=n(71744),s=n(86586),d=n(64024),u=n(33759),m=n(59189),p=n(39109);let f=e=>"object"==typeof e&&null!=e&&1===e.nodeType,g=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,h=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return g(n.overflowY,t)||g(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},b=(e,t,n,r,o,a,l,c)=>a<e&&l>t||a>e&&l<t?0:a<=e&&c<=n||l>=t&&c>=n?a-e-r:l>t&&c<n||a<e&&c>n?l-t+o:0,v=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},y=(e,t)=>{var n,r,o,a;if("undefined"==typeof document)return[];let{scrollMode:l,block:c,inline:i,boundary:s,skipOverflowHiddenElements:d}=t,u="function"==typeof s?s:e=>e!==s;if(!f(e))throw TypeError("Invalid target");let m=document.scrollingElement||document.documentElement,p=[],g=e;for(;f(g)&&u(g);){if((g=v(g))===m){p.push(g);break}null!=g&&g===document.body&&h(g)&&!h(document.documentElement)||null!=g&&h(g,d)&&p.push(g)}let y=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,x=null!=(a=null==(o=window.visualViewport)?void 0:o.height)?a:innerHeight,{scrollX:w,scrollY:C}=window,{height:E,width:k,top:O,right:j,bottom:S,left:M}=e.getBoundingClientRect(),{top:I,right:N,bottom:Z,left:q}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),F="start"===c||"nearest"===c?O-I:"end"===c?S+Z:O+E/2-I+Z,P="center"===i?M+k/2-q+N:"end"===i?j+N:M-q,L=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:o,right:a,bottom:s,left:d}=t.getBoundingClientRect();if("if-needed"===l&&O>=0&&M>=0&&S<=x&&j<=y&&O>=o&&S<=s&&M>=d&&j<=a)break;let u=getComputedStyle(t),f=parseInt(u.borderLeftWidth,10),g=parseInt(u.borderTopWidth,10),h=parseInt(u.borderRightWidth,10),v=parseInt(u.borderBottomWidth,10),I=0,N=0,Z="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-h:0,q="offsetHeight"in t?t.offsetHeight-t.clientHeight-g-v:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,_="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(m===t)I="start"===c?F:"end"===c?F-x:"nearest"===c?b(C,C+x,x,g,v,C+F,C+F+E,E):F-x/2,N="start"===i?P:"center"===i?P-y/2:"end"===i?P-y:b(w,w+y,y,f,h,w+P,w+P+k,k),I=Math.max(0,I+C),N=Math.max(0,N+w);else{I="start"===c?F-o-g:"end"===c?F-s+v+q:"nearest"===c?b(o,s,n,g,v+q,F,F+E,E):F-(o+n/2)+q/2,N="start"===i?P-d-f:"center"===i?P-(d+r/2)+Z/2:"end"===i?P-a+h+Z:b(d,a,r,f,h+Z,P,P+k,k);let{scrollLeft:e,scrollTop:l}=t;I=0===_?0:Math.max(0,Math.min(l+I/_,t.scrollHeight-n/_+q)),N=0===R?0:Math.max(0,Math.min(e+N/R,t.scrollWidth-r/R+Z)),F+=l-I,P+=e-N}L.push({el:t,top:I,left:N})}return L},x=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};var w=n(13861);function C(e){return(0,w.qo)(e).join("_")}function E(e){let[t]=(0,c.cI)(),n=o.useRef({}),r=o.useMemo(()=>null!=e?e:Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:e=>t=>{let r=C(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,w.qo)(e),o=(0,w.dD)(n,r.__INTERNAL__.name),a=o?document.getElementById(o):null;a&&function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(y(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:o,top:a,left:l}of y(e,x(t))){let e=a-n.top+n.bottom,t=l-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(a,Object.assign({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:e=>{let t=C(e);return n.current[t]}}),[e,t]);return[r]}var k=n(47713),O=n(77360),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let S=o.forwardRef((e,t)=>{let n=o.useContext(s.Z),{getPrefixCls:r,direction:a,form:f}=o.useContext(i.E_),{prefixCls:g,className:h,rootClassName:b,size:v,disabled:y=n,form:x,colon:w,labelAlign:C,labelWrap:S,labelCol:M,wrapperCol:I,hideRequiredMark:N,layout:Z="horizontal",scrollToFirstError:q,requiredMark:F,onFinishFailed:P,name:L,style:R,feedbackIcons:_,variant:T}=e,H=j(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),W=(0,u.Z)(v),V=o.useContext(O.Z),z=(0,o.useMemo)(()=>void 0!==F?F:!N&&(!f||void 0===f.requiredMark||f.requiredMark),[N,F,f]),D=null!=w?w:null==f?void 0:f.colon,A=r("form",g),B=(0,d.Z)(A),[X,G,$]=(0,k.ZP)(A,B),U=l()(A,"".concat(A,"-").concat(Z),{["".concat(A,"-hide-required-mark")]:!1===z,["".concat(A,"-rtl")]:"rtl"===a,["".concat(A,"-").concat(W)]:W},$,B,G,null==f?void 0:f.className,h,b),[K]=E(x),{__INTERNAL__:Y}=K;Y.name=L;let J=(0,o.useMemo)(()=>({name:L,labelAlign:C,labelCol:M,labelWrap:S,wrapperCol:I,vertical:"vertical"===Z,colon:D,requiredMark:z,itemRef:Y.itemRef,form:K,feedbackIcons:_}),[L,C,M,I,Z,D,z,K,_]);o.useImperativeHandle(t,()=>K);let Q=(e,t)=>{if(e){let n={block:"nearest"};"object"==typeof e&&(n=e),K.scrollToField(t,n)}};return X(o.createElement(p.pg.Provider,{value:T},o.createElement(s.n,{disabled:y},o.createElement(m.Z.Provider,{value:W},o.createElement(p.RV,{validateMessages:V},o.createElement(p.q3.Provider,{value:J},o.createElement(c.ZP,Object.assign({id:L},H,{name:L,onFinishFailed:e=>{if(null==P||P(e),e.errorFields.length){let t=e.errorFields[0].name;if(void 0!==q){Q(q,t);return}f&&void 0!==f.scrollToFirstError&&Q(f.scrollToFirstError,t)}},form:K,style:Object.assign(Object.assign({},null==f?void 0:f.style),R),className:U}))))))))});var M=n(86582),I=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};S.Item=M.Z,S.List=e=>{var{prefixCls:t,children:n}=e,r=I(e,["prefixCls","children"]);let{getPrefixCls:a}=o.useContext(i.E_),l=a("form",t),s=o.useMemo(()=>({prefixCls:l,status:"error"}),[l]);return o.createElement(c.aV,Object.assign({},r),(e,t,r)=>o.createElement(p.Rk.Provider,{value:s},n(e.map(e=>Object.assign(Object.assign({},e),{fieldKey:e.key})),t,{errors:r.errors,warnings:r.warnings})))},S.ErrorList=r.Z,S.useForm=E,S.useFormInstance=function(){let{form:e}=(0,o.useContext)(p.q3);return e},S.useWatch=c.qo,S.Provider=p.RV,S.create=()=>{};var N=S},47713:function(e,t,n){n.d(t,{ZP:function(){return x},B4:function(){return y}});var r=n(352),o=n(12918),a=n(691),l=n(63074),c=n(3104),i=n(80669),s=e=>{let{componentCls:t}=e,n="".concat(t,"-show-help"),r="".concat(t,"-show-help-item");return{[n]:{transition:"opacity ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:"height ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,",\n opacity ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,",\n transform ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut," !important"),["&".concat(r,"-appear, &").concat(r,"-enter")]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},["&".concat(r,"-leave-active")]:{transform:"translateY(-5px)"}}}}};let d=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:"".concat((0,r.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:"0 0 0 ".concat((0,r.bf)(e.controlOutlineWidth)," ").concat(e.controlOutline)},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),u=(e,t)=>{let{formItemCls:n}=e;return{[n]:{["".concat(n,"-label > label")]:{height:t},["".concat(n,"-control-input")]:{minHeight:t}}}},m=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},(0,o.Wf)(e)),d(e)),{["".concat(t,"-text")]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},u(e,e.controlHeightSM)),"&-large":Object.assign({},u(e,e.controlHeightLG))})}},p=e=>{let{formItemCls:t,iconCls:n,componentCls:r,rootPrefixCls:l,labelRequiredMarkColor:c,labelColor:i,labelFontSize:s,labelHeight:d,labelColonMarginInlineStart:u,labelColonMarginInlineEnd:m,itemMarginBottom:p}=e;return{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{marginBottom:p,verticalAlign:"top","&-with-help":{transition:"none"},["&-hidden,\n &-hidden.".concat(l,"-row")]:{display:"none"},"&-has-warning":{["".concat(t,"-split")]:{color:e.colorError}},"&-has-error":{["".concat(t,"-split")]:{color:e.colorWarning}},["".concat(t,"-label")]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:d,color:i,fontSize:s,["> ".concat(n)]:{fontSize:e.fontSize,verticalAlign:"top"},["&".concat(t,"-required:not(").concat(t,"-required-mark-optional)::before")]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:c,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',["".concat(r,"-hide-required-mark &")]:{display:"none"}},["".concat(t,"-optional")]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,["".concat(r,"-hide-required-mark &")]:{display:"none"}},["".concat(t,"-tooltip")]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:u,marginInlineEnd:m},["&".concat(t,"-no-colon::after")]:{content:'"\\a0"'}}},["".concat(t,"-control")]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,["&:first-child:not([class^=\"'".concat(l,"-col-'\"]):not([class*=\"' ").concat(l,"-col-'\"])")]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:"color ".concat(e.motionDurationMid," ").concat(e.motionEaseOut)},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},["&-with-help ".concat(t,"-explain")]:{height:"auto",opacity:1},["".concat(t,"-feedback-icon")]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:a.kr,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},f=e=>{let{componentCls:t,formItemCls:n}=e;return{["".concat(t,"-horizontal")]:{["".concat(n,"-label")]:{flexGrow:0},["".concat(n,"-control")]:{flex:"1 1 0",minWidth:0},["".concat(n,"-label[class$='-24'], ").concat(n,"-label[class*='-24 ']")]:{["& + ".concat(n,"-control")]:{minWidth:"unset"}}}}},g=e=>{let{componentCls:t,formItemCls:n}=e;return{["".concat(t,"-inline")]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",marginInlineEnd:e.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},["> ".concat(n,"-label,\n > ").concat(n,"-control")]:{display:"inline-block",verticalAlign:"top"},["> ".concat(n,"-label")]:{flex:"none"},["".concat(t,"-text")]:{display:"inline-block"},["".concat(n,"-has-feedback")]:{display:"inline-block"}}}}},h=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),b=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{["".concat(n," ").concat(n,"-label")]:h(e),["".concat(t,":not(").concat(t,"-inline)")]:{[n]:{flexWrap:"wrap",["".concat(n,"-label, ").concat(n,"-control")]:{['&:not([class*=" '.concat(r,'-col-xs"])')]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},v=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{["".concat(t,"-vertical")]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},["".concat(t,"-item-control")]:{width:"100%"}}},["".concat(t,"-vertical ").concat(n,"-label,\n .").concat(o,"-col-24").concat(n,"-label,\n .").concat(o,"-col-xl-24").concat(n,"-label")]:h(e),["@media (max-width: ".concat((0,r.bf)(e.screenXSMax),")")]:[b(e),{[t]:{[".".concat(o,"-col-xs-24").concat(n,"-label")]:h(e)}}],["@media (max-width: ".concat((0,r.bf)(e.screenSMMax),")")]:{[t]:{[".".concat(o,"-col-sm-24").concat(n,"-label")]:h(e)}},["@media (max-width: ".concat((0,r.bf)(e.screenMDMax),")")]:{[t]:{[".".concat(o,"-col-md-24").concat(n,"-label")]:h(e)}},["@media (max-width: ".concat((0,r.bf)(e.screenLGMax),")")]:{[t]:{[".".concat(o,"-col-lg-24").concat(n,"-label")]:h(e)}}}},y=(e,t)=>(0,c.TS)(e,{formItemCls:"".concat(e.componentCls,"-item"),rootPrefixCls:t});var x=(0,i.I$)("Form",(e,t)=>{let{rootPrefixCls:n}=t,r=y(e,n);return[m(r),p(r),s(r),f(r),g(r),v(r),(0,l.Z)(r),a.kr]},e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:"0 0 ".concat(e.paddingXS,"px"),verticalLabelMargin:0}),{order:-1e3})},13861:function(e,t,n){n.d(t,{dD:function(){return a},lR:function(){return l},qo:function(){return o}});let r=["parentNode"];function o(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function a(e,t){if(!e.length)return;let n=e.join("_");return t?"".concat(t,"_").concat(n):r.includes(n)?"".concat("form_item","_").concat(n):n}function l(e,t,n,r,o,a){let l=r;return void 0!==a?l=a:n.validating?l="validating":e.length?l="error":t.length?l="warning":(n.touched||o&&n.validated)&&(l="success"),l}},62807:function(e,t,n){let r=(0,n(2265).createContext)({});t.Z=r},54998:function(e,t,n){var r=n(2265),o=n(36760),a=n.n(o),l=n(71744),c=n(62807),i=n(96776),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let d=["xs","sm","md","lg","xl","xxl"],u=r.forwardRef((e,t)=>{let{getPrefixCls:n,direction:o}=r.useContext(l.E_),{gutter:u,wrap:m}=r.useContext(c.Z),{prefixCls:p,span:f,order:g,offset:h,push:b,pull:v,className:y,children:x,flex:w,style:C}=e,E=s(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),k=n("col",p),[O,j,S]=(0,i.cG)(k),M={};d.forEach(t=>{let n={},r=e[t];"number"==typeof r?n.span=r:"object"==typeof r&&(n=r||{}),delete E[t],M=Object.assign(Object.assign({},M),{["".concat(k,"-").concat(t,"-").concat(n.span)]:void 0!==n.span,["".concat(k,"-").concat(t,"-order-").concat(n.order)]:n.order||0===n.order,["".concat(k,"-").concat(t,"-offset-").concat(n.offset)]:n.offset||0===n.offset,["".concat(k,"-").concat(t,"-push-").concat(n.push)]:n.push||0===n.push,["".concat(k,"-").concat(t,"-pull-").concat(n.pull)]:n.pull||0===n.pull,["".concat(k,"-").concat(t,"-flex-").concat(n.flex)]:n.flex||"auto"===n.flex,["".concat(k,"-rtl")]:"rtl"===o})});let I=a()(k,{["".concat(k,"-").concat(f)]:void 0!==f,["".concat(k,"-order-").concat(g)]:g,["".concat(k,"-offset-").concat(h)]:h,["".concat(k,"-push-").concat(b)]:b,["".concat(k,"-pull-").concat(v)]:v},y,M,j,S),N={};if(u&&u[0]>0){let e=u[0]/2;N.paddingLeft=e,N.paddingRight=e}return w&&(N.flex="number"==typeof w?"".concat(w," ").concat(w," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(w)?"0 0 ".concat(w):w,!1!==m||N.minWidth||(N.minWidth=0)),O(r.createElement("div",Object.assign({},E,{style:Object.assign(Object.assign({},N),C),className:I,ref:t}),x))});t.Z=u},10295:function(e,t,n){var r=n(2265),o=n(36760),a=n.n(o),l=n(6543),c=n(71744),i=n(62807),s=n(96776),d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function u(e,t){let[n,o]=r.useState("string"==typeof e?e:""),a=()=>{if("string"==typeof e&&o(e),"object"==typeof e)for(let n=0;n<l.c4.length;n++){let r=l.c4[n];if(!t[r])continue;let a=e[r];if(void 0!==a){o(a);return}}};return r.useEffect(()=>{a()},[JSON.stringify(e),t]),n}let m=r.forwardRef((e,t)=>{let{prefixCls:n,justify:o,align:m,className:p,style:f,children:g,gutter:h=0,wrap:b}=e,v=d(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:y,direction:x}=r.useContext(c.E_),[w,C]=r.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),[E,k]=r.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),O=u(m,E),j=u(o,E),S=r.useRef(h),M=(0,l.ZP)();r.useEffect(()=>{let e=M.subscribe(e=>{k(e);let t=S.current||0;(!Array.isArray(t)&&"object"==typeof t||Array.isArray(t)&&("object"==typeof t[0]||"object"==typeof t[1]))&&C(e)});return()=>M.unsubscribe(e)},[]);let I=y("row",n),[N,Z,q]=(0,s.VM)(I),F=(()=>{let e=[void 0,void 0];return(Array.isArray(h)?h:[h,void 0]).forEach((t,n)=>{if("object"==typeof t)for(let r=0;r<l.c4.length;r++){let o=l.c4[r];if(w[o]&&void 0!==t[o]){e[n]=t[o];break}}else e[n]=t}),e})(),P=a()(I,{["".concat(I,"-no-wrap")]:!1===b,["".concat(I,"-").concat(j)]:j,["".concat(I,"-").concat(O)]:O,["".concat(I,"-rtl")]:"rtl"===x},p,Z,q),L={},R=null!=F[0]&&F[0]>0?-(F[0]/2):void 0;R&&(L.marginLeft=R,L.marginRight=R),[,L.rowGap]=F;let[_,T]=F,H=r.useMemo(()=>({gutter:[_,T],wrap:b}),[_,T,b]);return N(r.createElement(i.Z.Provider,{value:H},r.createElement("div",Object.assign({},v,{className:P,style:Object.assign(Object.assign({},L),f),ref:t}),g)))});t.Z=m},96776:function(e,t,n){n.d(t,{VM:function(){return d},cG:function(){return u}});var r=n(352),o=n(80669),a=n(3104);let l=e=>{let{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},c=(e,t)=>{let{componentCls:n,gridColumns:r}=e,o={};for(let e=r;e>=0;e--)0===e?(o["".concat(n).concat(t,"-").concat(e)]={display:"none"},o["".concat(n,"-push-").concat(e)]={insetInlineStart:"auto"},o["".concat(n,"-pull-").concat(e)]={insetInlineEnd:"auto"},o["".concat(n).concat(t,"-push-").concat(e)]={insetInlineStart:"auto"},o["".concat(n).concat(t,"-pull-").concat(e)]={insetInlineEnd:"auto"},o["".concat(n).concat(t,"-offset-").concat(e)]={marginInlineStart:0},o["".concat(n).concat(t,"-order-").concat(e)]={order:0}):(o["".concat(n).concat(t,"-").concat(e)]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:"0 0 ".concat(e/r*100,"%"),maxWidth:"".concat(e/r*100,"%")}],o["".concat(n).concat(t,"-push-").concat(e)]={insetInlineStart:"".concat(e/r*100,"%")},o["".concat(n).concat(t,"-pull-").concat(e)]={insetInlineEnd:"".concat(e/r*100,"%")},o["".concat(n).concat(t,"-offset-").concat(e)]={marginInlineStart:"".concat(e/r*100,"%")},o["".concat(n).concat(t,"-order-").concat(e)]={order:e});return o},i=(e,t)=>c(e,t),s=(e,t,n)=>({["@media (min-width: ".concat((0,r.bf)(t),")")]:Object.assign({},i(e,n))}),d=(0,o.I$)("Grid",e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},()=>({})),u=(0,o.I$)("Grid",e=>{let t=(0,a.TS)(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[l(t),i(t,""),i(t,"-xs"),Object.keys(n).map(e=>s(t,n[e],e)).reduce((e,t)=>Object.assign(Object.assign({},e),t),{})]},()=>({}))},63074:function(e,t){t.Z=e=>({[e.componentCls]:{["".concat(e.antCls,"-motion-collapse-legacy")]:{overflow:"hidden","&-active":{transition:"height ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut,",\n opacity ").concat(e.motionDurationMid," ").concat(e.motionEaseInOut," !important")}},["".concat(e.antCls,"-motion-collapse")]:{overflow:"hidden",transition:"height ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut,",\n opacity ").concat(e.motionDurationMid," ").concat(e.motionEaseInOut," !important")}}})},14474:function(e,t,n){n.d(t,{o:function(){return o}});class r extends Error{}function o(e,t){let n;if("string"!=typeof e)throw new r("Invalid token specified: must be a string");t||(t={});let o=!0===t.header?0:1,a=e.split(".")[o];if("string"!=typeof a)throw new r(`Invalid token specified: missing part #${o+1}`);try{n=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;return n=t,decodeURIComponent(atob(n).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(t)}}(a)}catch(e){throw new r(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new r(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}r.prototype.name="InvalidTokenError"}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/_not-found/page-8311f948357d161e.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/_not-found/page-8311f948357d161e.js new file mode 100644 index 00000000..e8b4dff4 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/_not-found/page-8311f948357d161e.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{67589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(83634)}])},83634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(47043);let i=n(57437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=67589)}),_N_E=e.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/layout-af8319e6c59a08da.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/layout-af8319e6c59a08da.js new file mode 100644 index 00000000..fe5a1eb7 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/layout-af8319e6c59a08da.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{6580:function(n,e,t){Promise.resolve().then(t.t.bind(t,39974,23)),Promise.resolve().then(t.t.bind(t,2778,23))},2778:function(){},39974:function(n){n.exports={style:{fontFamily:"'__Inter_cf7686', '__Inter_Fallback_cf7686'",fontStyle:"normal"},className:"__className_cf7686"}}},function(n){n.O(0,[919,986,971,117,744],function(){return n(n.s=6580)}),_N_E=n.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/model_hub/page-068a441595bd0fc3.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/model_hub/page-068a441595bd0fc3.js new file mode 100644 index 00000000..2e0176bd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/model_hub/page-068a441595bd0fc3.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[418],{11790:function(e,n,u){Promise.resolve().then(u.bind(u,52829))},52829:function(e,n,u){"use strict";u.r(n),u.d(n,{default:function(){return f}});var t=u(57437),s=u(2265),r=u(99376),c=u(92699);function f(){let e=(0,r.useSearchParams)().get("key"),[n,u]=(0,s.useState)(null);return(0,s.useEffect)(()=>{e&&u(e)},[e]),(0,t.jsx)(c.Z,{accessToken:n,publicPage:!0,premiumUser:!1})}}},function(e){e.O(0,[42,261,250,699,971,117,744],function(){return e(e.s=11790)}),_N_E=e.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/onboarding/page-1ffe69692e4b2037.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/onboarding/page-1ffe69692e4b2037.js new file mode 100644 index 00000000..de6e9a48 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/onboarding/page-1ffe69692e4b2037.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[461],{32922:function(e,t,n){Promise.resolve().then(n.bind(n,12011))},12011:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return S}});var s=n(57437),o=n(2265),a=n(99376),i=n(20831),c=n(94789),l=n(12514),r=n(49804),u=n(67101),d=n(84264),m=n(49566),h=n(96761),x=n(84566),p=n(19250),f=n(14474),k=n(13634),j=n(73002),g=n(3914);function S(){let[e]=k.Z.useForm(),t=(0,a.useSearchParams)();(0,g.e)("token");let n=t.get("invitation_id"),[S,_]=(0,o.useState)(null),[w,Z]=(0,o.useState)(""),[N,b]=(0,o.useState)(""),[T,v]=(0,o.useState)(null),[y,E]=(0,o.useState)(""),[C,U]=(0,o.useState)("");return(0,o.useEffect)(()=>{n&&(0,p.W_)(n).then(e=>{let t=e.login_url;console.log("login_url:",t),E(t);let n=e.token,s=(0,f.o)(n);U(n),console.log("decoded:",s),_(s.key),console.log("decoded user email:",s.user_email),b(s.user_email),v(s.user_id)})},[n]),(0,s.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,s.jsxs)(l.Z,{children:[(0,s.jsx)(h.Z,{className:"text-sm mb-5 text-center",children:"\uD83D\uDE85 LiteLLM"}),(0,s.jsx)(h.Z,{className:"text-xl",children:"Sign up"}),(0,s.jsx)(d.Z,{children:"Claim your user account to login to Admin UI."}),(0,s.jsx)(c.Z,{className:"mt-4",title:"SSO",icon:x.GH$,color:"sky",children:(0,s.jsxs)(u.Z,{numItems:2,className:"flex justify-between items-center",children:[(0,s.jsx)(r.Z,{children:"SSO is under the Enterprise Tirer."}),(0,s.jsx)(r.Z,{children:(0,s.jsx)(i.Z,{variant:"primary",className:"mb-2",children:(0,s.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})})})]})}),(0,s.jsxs)(k.Z,{className:"mt-10 mb-5 mx-auto",layout:"vertical",onFinish:e=>{console.log("in handle submit. accessToken:",S,"token:",C,"formValues:",e),S&&C&&(e.user_email=N,T&&n&&(0,p.m_)(S,n,T,e.password).then(e=>{var t;let n="/ui/";n+="?userID="+((null===(t=e.data)||void 0===t?void 0:t.user_id)||e.user_id),document.cookie="token="+C,console.log("redirecting to:",n),window.location.href=n}))},children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k.Z.Item,{label:"Email Address",name:"user_email",children:(0,s.jsx)(m.Z,{type:"email",disabled:!0,value:N,defaultValue:N,className:"max-w-md"})}),(0,s.jsx)(k.Z.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"Create a password for your account",children:(0,s.jsx)(m.Z,{placeholder:"",type:"password",className:"max-w-md"})})]}),(0,s.jsx)("div",{className:"mt-10",children:(0,s.jsx)(j.ZP,{htmlType:"submit",children:"Sign Up"})})]})]})})}},3914:function(e,t,n){"use strict";function s(){let e=window.location.hostname,t=["Lax","Strict","None"];["/","/ui"].forEach(n=>{document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(n,";"),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(n,"; domain=").concat(e,";"),t.forEach(t=>{let s="None"===t?" Secure;":"";document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(n,"; SameSite=").concat(t,";").concat(s),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(n,"; domain=").concat(e,"; SameSite=").concat(t,";").concat(s)})}),console.log("After clearing cookies:",document.cookie)}function o(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));return t?t.split("=")[1]:null}n.d(t,{b:function(){return s},e:function(){return o}})}},function(e){e.O(0,[665,42,899,250,971,117,744],function(){return e(e.s=32922)}),_N_E=e.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/page-75d771fb848b47a8.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/page-75d771fb848b47a8.js new file mode 100644 index 00000000..168f04f0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/app/page-75d771fb848b47a8.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{1900:function(e,l,s){Promise.resolve().then(s.bind(s,14164))},12011:function(e,l,s){"use strict";s.r(l),s.d(l,{default:function(){return y}});var t=s(57437),a=s(2265),r=s(99376),i=s(20831),n=s(94789),o=s(12514),d=s(49804),c=s(67101),m=s(84264),u=s(49566),h=s(96761),x=s(84566),p=s(19250),g=s(14474),j=s(13634),f=s(73002),_=s(3914);function y(){let[e]=j.Z.useForm(),l=(0,r.useSearchParams)();(0,_.e)("token");let s=l.get("invitation_id"),[y,v]=(0,a.useState)(null),[b,Z]=(0,a.useState)(""),[N,w]=(0,a.useState)(""),[k,S]=(0,a.useState)(null),[C,I]=(0,a.useState)(""),[A,E]=(0,a.useState)("");return(0,a.useEffect)(()=>{s&&(0,p.W_)(s).then(e=>{let l=e.login_url;console.log("login_url:",l),I(l);let s=e.token,t=(0,g.o)(s);E(s),console.log("decoded:",t),v(t.key),console.log("decoded user email:",t.user_email),w(t.user_email),S(t.user_id)})},[s]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(o.Z,{children:[(0,t.jsx)(h.Z,{className:"text-sm mb-5 text-center",children:"\uD83D\uDE85 LiteLLM"}),(0,t.jsx)(h.Z,{className:"text-xl",children:"Sign up"}),(0,t.jsx)(m.Z,{children:"Claim your user account to login to Admin UI."}),(0,t.jsx)(n.Z,{className:"mt-4",title:"SSO",icon:x.GH$,color:"sky",children:(0,t.jsxs)(c.Z,{numItems:2,className:"flex justify-between items-center",children:[(0,t.jsx)(d.Z,{children:"SSO is under the Enterprise Tirer."}),(0,t.jsx)(d.Z,{children:(0,t.jsx)(i.Z,{variant:"primary",className:"mb-2",children:(0,t.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})})})]})}),(0,t.jsxs)(j.Z,{className:"mt-10 mb-5 mx-auto",layout:"vertical",onFinish:e=>{console.log("in handle submit. accessToken:",y,"token:",A,"formValues:",e),y&&A&&(e.user_email=N,k&&s&&(0,p.m_)(y,s,k,e.password).then(e=>{var l;let s="/ui/";s+="?userID="+((null===(l=e.data)||void 0===l?void 0:l.user_id)||e.user_id),document.cookie="token="+A,console.log("redirecting to:",s),window.location.href=s}))},children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.Z.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(u.Z,{type:"email",disabled:!0,value:N,defaultValue:N,className:"max-w-md"})}),(0,t.jsx)(j.Z.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"Create a password for your account",children:(0,t.jsx)(u.Z,{placeholder:"",type:"password",className:"max-w-md"})})]}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(f.ZP,{htmlType:"submit",children:"Sign Up"})})]})]})})}},14164:function(e,l,s){"use strict";s.r(l),s.d(l,{default:function(){return tA}});var t,a,r=s(57437),i=s(2265),n=s(99376),o=s(14474),d=s(90946),c=s(29827),m=s(27648),u=s(80795),h=s(15883),x=s(40428),p=s(3914),g=s(19250);let j=async e=>{if(!e)return null;try{return await (0,g.g)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var f=e=>{let{userID:l,userEmail:s,userRole:t,premiumUser:a,proxySettings:n,setProxySettings:o,accessToken:d}=e,[c,g]=(0,i.useState)("");(0,i.useEffect)(()=>{(async()=>{if(d){let e=await j(d);console.log("response from fetchProxySettings",e),e&&o(e)}})()},[d]),(0,i.useEffect)(()=>{g((null==n?void 0:n.PROXY_LOGOUT_URL)||"")},[n]);let f=[{key:"1",label:(0,r.jsxs)("div",{className:"py-1",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:["Role: ",t]}),(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:["Email: ",s||"Unknown"]}),(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:[(0,r.jsx)(h.Z,{})," ",l]}),(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:["Premium User: ",String(a)]})]})},{key:"2",label:(0,r.jsxs)("p",{className:"text-sm hover:text-gray-900",onClick:()=>{(0,p.b)(),window.location.href=c},children:[(0,r.jsx)(x.Z,{})," Logout"]})}];return(0,r.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,r.jsx)("div",{className:"w-full",children:(0,r.jsxs)("div",{className:"flex items-center h-12 px-4",children:[(0,r.jsx)("div",{className:"flex items-center flex-shrink-0",children:(0,r.jsx)(m.default,{href:"/",className:"flex items-center",children:(0,r.jsx)("img",{src:"/get_image",alt:"LiteLLM Brand",className:"h-8 w-auto"})})}),(0,r.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),(0,r.jsx)(u.Z,{menu:{items:f,style:{padding:"4px",marginTop:"4px"}},children:(0,r.jsxs)("button",{className:"inline-flex items-center text-[13px] text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,r.jsx)("svg",{className:"ml-1 w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})};let _=async(e,l,s,t,a)=>{let r;r="Admin"!=s&&"Admin Viewer"!=s?await (0,g.It)(e,(null==t?void 0:t.organization_id)||null,l):await (0,g.It)(e,(null==t?void 0:t.organization_id)||null),console.log("givenTeams: ".concat(r)),a(r)};var y=s(49804),v=s(67101),b=s(20831),Z=s(49566),N=s(87452),w=s(88829),k=s(72208),S=s(84264),C=s(96761),I=s(29233),A=s(52787),E=s(13634),P=s(41021),O=s(51369),T=s(29967),L=s(73002),M=s(20577),D=s(56632);let F=async(e,l,s)=>{try{if(null===e||null===l)return;if(null!==s){let t=(await (0,g.So)(s,e,l,!0)).data.map(e=>e.id),a=[],r=[];return t.forEach(e=>{e.endsWith("/*")?a.push(e):r.push(e)}),[...a,...r]}}catch(e){console.error("Error fetching user models:",e)}},R=e=>{if(e.endsWith("/*")){let l=e.replace("/*","");return"All ".concat(l," models")}return e},U=(e,l)=>{let s=[],t=[];return console.log("teamModels",e),console.log("allModels",l),e.forEach(e=>{if(e.endsWith("/*")){let a=e.replace("/*",""),r=l.filter(e=>e.startsWith(a+"/"));t.push(...r),s.push(e)}else t.push(e)}),[...s,...t].filter((e,l,s)=>s.indexOf(e)===l)};var z=s(15424),V=s(75957);let q=(e,l)=>["metadata","config","enforced_params","aliases"].includes(e)||"json"===l.format,K=e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch(e){return!1}},B=(e,l,s)=>{let t={max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"}[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[s]||"Text input";return q(e,l)?"".concat(t,"\nMust be valid JSON format"):l.enum?"Select from available options\nAllowed values: ".concat(l.enum.join(", ")):t};var H=e=>{let{schemaComponent:l,excludedFields:s=[],form:t,overrideLabels:a={},overrideTooltips:n={},customValidation:o={},defaultValues:d={}}=e,[c,m]=(0,i.useState)(null),[u,h]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{try{let e=(await (0,g.lP)()).components.schemas[l];if(!e)throw Error('Schema component "'.concat(l,'" not found'));m(e);let a={};Object.keys(e.properties).filter(e=>!s.includes(e)&&void 0!==d[e]).forEach(e=>{a[e]=d[e]}),t.setFieldsValue(a)}catch(e){console.error("Schema fetch error:",e),h(e instanceof Error?e.message:"Failed to fetch schema")}})()},[l,t,s]);let x=e=>{if(e.type)return e.type;if(e.anyOf){let l=e.anyOf.map(e=>e.type);if(l.includes("number")||l.includes("integer"))return"number";l.includes("string")}return"string"},p=(e,l)=>{var s;let t;let i=x(l),m=null==c?void 0:null===(s=c.required)||void 0===s?void 0:s.includes(e),u=a[e]||l.title||e,h=n[e]||l.description,p=[];m&&p.push({required:!0,message:"".concat(u," is required")}),o[e]&&p.push({validator:o[e]}),q(e,l)&&p.push({validator:async(e,l)=>{if(l&&!K(l))throw Error("Please enter valid JSON")}});let g=h?(0,r.jsxs)("span",{children:[u," ",(0,r.jsx)(V.Z,{title:h,children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}):u;return t=q(e,l)?(0,r.jsx)(D.Z.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):l.enum?(0,r.jsx)(A.default,{children:l.enum.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:e},e))}):"number"===i||"integer"===i?(0,r.jsx)(M.Z,{style:{width:"100%"},precision:"integer"===i?0:void 0}):"duration"===e?(0,r.jsx)(Z.Z,{placeholder:"eg: 30s, 30h, 30d"}):(0,r.jsx)(Z.Z,{placeholder:h||""}),(0,r.jsx)(E.Z.Item,{label:g,name:e,className:"mt-8",rules:p,initialValue:d[e],help:(0,r.jsx)("div",{className:"text-xs text-gray-500",children:B(e,l,i)}),children:t},e)};return u?(0,r.jsxs)("div",{className:"text-red-500",children:["Error: ",u]}):(null==c?void 0:c.properties)?(0,r.jsx)("div",{children:Object.entries(c.properties).filter(e=>{let[l]=e;return!s.includes(l)}).map(e=>{let[l,s]=e;return p(l,s)})}):null},J=e=>{let{teams:l,value:s,onChange:t}=e;return(0,r.jsx)(A.default,{showSearch:!0,placeholder:"Search or select a team",value:s,onChange:t,filterOption:(e,l)=>{var s,t,a;return!!l&&((null===(a=l.children)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:null===(s=t.props)||void 0===s?void 0:s.children)||"").toLowerCase().includes(e.toLowerCase())},optionFilterProp:"children",children:null==l?void 0:l.map(e=>(0,r.jsxs)(A.default.Option,{value:e.team_id,children:[(0,r.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,r.jsxs)("span",{className:"text-gray-500",children:["(",e.team_id,")"]})]},e.team_id))})},W=s(57365),G=s(93192);function Y(e){let{isInvitationLinkModalVisible:l,setIsInvitationLinkModalVisible:s,baseUrl:t,invitationLinkData:a}=e,{Title:i,Paragraph:n}=G.default,o=()=>(null==a?void 0:a.has_user_setup_sso)?new URL("/ui",t).toString():new URL("/ui?invitation_id=".concat(null==a?void 0:a.id),t).toString();return(0,r.jsxs)(O.Z,{title:"Invitation Link",visible:l,width:800,footer:null,onOk:()=>{s(!1)},onCancel:()=>{s(!1)},children:[(0,r.jsx)(n,{children:"Copy and send the generated link to onboard this user to the proxy."}),(0,r.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,r.jsx)(S.Z,{className:"text-base",children:"User ID"}),(0,r.jsx)(S.Z,{children:null==a?void 0:a.user_id})]}),(0,r.jsxs)("div",{className:"flex justify-between pt-5 pb-2",children:[(0,r.jsx)(S.Z,{children:"Invitation Link"}),(0,r.jsx)(S.Z,{children:(0,r.jsx)(S.Z,{children:o()})})]}),(0,r.jsx)("div",{className:"flex justify-end mt-5",children:(0,r.jsx)(I.CopyToClipboard,{text:o(),onCopy:()=>P.ZP.success("Copied!"),children:(0,r.jsx)(b.Z,{variant:"primary",children:"Copy invitation link"})})})]})}var $=s(30967),X=s(28181),Q=s(73879),ee=s(3632),el=s(15452),es=s.n(el),et=s(71157),ea=s(44643),er=e=>{let{accessToken:l,teams:s,possibleUIRoles:t,onUsersCreated:a}=e,[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)(!1),[h,x]=(0,i.useState)(null),[p,j]=(0,i.useState)(null),[f,_]=(0,i.useState)("http://localhost:4000");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,g.g)(l);j(e)}catch(e){console.error("Error fetching UI settings:",e)}})(),_(new URL("/",window.location.href).toString())},[l]);let y=async()=>{u(!0);let e=d.map(e=>({...e,status:"pending"}));c(e);let s=!1;for(let a=0;a<e.length;a++){var t,r,i;let n=e[a];try{let e={...n};e.teams&&"string"==typeof e.teams&&(e.teams=e.teams.split(",").map(e=>e.trim())),e.models&&"string"==typeof e.models&&(e.models=e.models.split(",").map(e=>e.trim())),e.max_budget&&""!==e.max_budget.toString().trim()&&(e.max_budget=parseFloat(e.max_budget.toString()));let r=await (0,g.Ov)(l,null,e);if(console.log("Full response:",r),r&&(r.key||r.user_id)){s=!0,console.log("Success case triggered");let e=(null===(t=r.data)||void 0===t?void 0:t.user_id)||r.user_id;try{if(null==p?void 0:p.SSO_ENABLED){let e=new URL("/ui",f).toString();c(l=>l.map((l,s)=>s===a?{...l,status:"success",key:r.key||r.user_id,invitation_link:e}:l))}else{let s=await (0,g.XO)(l,e),t=new URL("/ui?invitation_id=".concat(s.id),f).toString();c(e=>e.map((e,l)=>l===a?{...e,status:"success",key:r.key||r.user_id,invitation_link:t}:e))}}catch(e){console.error("Error creating invitation:",e),c(e=>e.map((e,l)=>l===a?{...e,status:"success",key:r.key||r.user_id,error:"User created but failed to generate invitation link"}:e))}}else{console.log("Error case triggered");let e=(null==r?void 0:r.error)||"Failed to create user";console.log("Error message:",e),c(l=>l.map((l,s)=>s===a?{...l,status:"failed",error:e}:l))}}catch(l){console.error("Caught error:",l);let e=(null==l?void 0:null===(i=l.response)||void 0===i?void 0:null===(r=i.data)||void 0===r?void 0:r.error)||(null==l?void 0:l.message)||String(l);c(l=>l.map((l,s)=>s===a?{...l,status:"failed",error:e}:l))}}u(!1),s&&a&&a()};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Z,{className:"mx-auto mb-0",onClick:()=>o(!0),children:"+ Bulk Invite Users"}),(0,r.jsx)(O.Z,{title:"Bulk Invite Users",visible:n,width:800,onCancel:()=>o(!1),bodyStyle:{maxHeight:"70vh",overflow:"auto"},footer:null,children:(0,r.jsx)("div",{className:"flex flex-col",children:0===d.length?(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"1"}),(0,r.jsx)("h3",{className:"text-lg font-medium",children:"Download and fill the template"})]}),(0,r.jsxs)("div",{className:"ml-11 mb-6",children:[(0,r.jsx)("p",{className:"mb-4",children:"Add multiple users at once by following these steps:"}),(0,r.jsxs)("ol",{className:"list-decimal list-inside space-y-2 ml-2 mb-4",children:[(0,r.jsx)("li",{children:"Download our CSV template"}),(0,r.jsx)("li",{children:"Add your users' information to the spreadsheet"}),(0,r.jsx)("li",{children:"Save the file and upload it here"}),(0,r.jsx)("li",{children:"After creation, download the results file containing the API keys for each user"})]}),(0,r.jsxs)("div",{className:"bg-gray-50 p-4 rounded-md border border-gray-200 mb-4",children:[(0,r.jsx)("h4",{className:"font-medium mb-2",children:"Template Column Names"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:"user_email"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:"User's email address (required)"})]})]}),(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500 mt-1.5 mr-2 flex-shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:"user_role"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:'User\'s role (one of: "proxy_admin", "proxy_admin_view_only", "internal_user", "internal_user_view_only")'})]})]}),(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:"teams"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated team IDs (e.g., "team-1,team-2")'})]})]}),(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:"max_budget"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:'Maximum budget as a number (e.g., "100")'})]})]}),(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:"budget_duration"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:'Budget reset period (e.g., "30d", "1mo")'})]})]}),(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-300 mt-1.5 mr-2 flex-shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:"models"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:'Comma-separated allowed models (e.g., "gpt-3.5-turbo,gpt-4")'})]})]})]})]}),(0,r.jsxs)(b.Z,{onClick:()=>{let e=new Blob([es().unparse([["user_email","user_role","teams","max_budget","budget_duration","models"],["user@example.com","internal_user","team-id-1,team-id-2","100","30d","gpt-3.5-turbo,gpt-4"]])],{type:"text/csv"}),l=window.URL.createObjectURL(e),s=document.createElement("a");s.href=l,s.download="bulk_users_template.csv",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(l)},size:"lg",className:"w-full md:w-auto",children:[(0,r.jsx)(Q.Z,{className:"mr-2"})," Download CSV Template"]})]}),(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"2"}),(0,r.jsx)("h3",{className:"text-lg font-medium",children:"Upload your completed CSV"})]}),(0,r.jsx)("div",{className:"ml-11",children:(0,r.jsx)($.Z,{beforeUpload:e=>(x(null),es().parse(e,{complete:e=>{let l=e.data[0],s=["user_email","user_role"].filter(e=>!l.includes(e));if(s.length>0){x("Your CSV is missing these required columns: ".concat(s.join(", "))),c([]);return}try{let s=e.data.slice(1).map((e,s)=>{var t,a,r,i,n,o;let d={user_email:(null===(t=e[l.indexOf("user_email")])||void 0===t?void 0:t.trim())||"",user_role:(null===(a=e[l.indexOf("user_role")])||void 0===a?void 0:a.trim())||"",teams:null===(r=e[l.indexOf("teams")])||void 0===r?void 0:r.trim(),max_budget:null===(i=e[l.indexOf("max_budget")])||void 0===i?void 0:i.trim(),budget_duration:null===(n=e[l.indexOf("budget_duration")])||void 0===n?void 0:n.trim(),models:null===(o=e[l.indexOf("models")])||void 0===o?void 0:o.trim(),rowNumber:s+2,isValid:!0,error:""},c=[];d.user_email||c.push("Email is required"),d.user_role||c.push("Role is required"),d.user_email&&!d.user_email.includes("@")&&c.push("Invalid email format");let m=["proxy_admin","proxy_admin_view_only","internal_user","internal_user_view_only"];return d.user_role&&!m.includes(d.user_role)&&c.push("Invalid role. Must be one of: ".concat(m.join(", "))),d.max_budget&&isNaN(parseFloat(d.max_budget.toString()))&&c.push("Max budget must be a number"),c.length>0&&(d.isValid=!1,d.error=c.join(", ")),d}),t=s.filter(e=>e.isValid);c(s),0===t.length?x("No valid users found in the CSV. Please check the errors below."):t.length<s.length?x("Found ".concat(s.length-t.length," row(s) with errors. Please correct them before proceeding.")):P.ZP.success("Successfully parsed ".concat(t.length," users"))}catch(l){let e=l instanceof Error?l.message:"Unknown error";x("Error parsing CSV: ".concat(e)),c([])}},error:e=>{x("Failed to parse CSV file: ".concat(e.message)),c([])},header:!1}),!1),accept:".csv",maxCount:1,showUploadList:!1,children:(0,r.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-blue-500 transition-colors cursor-pointer",children:[(0,r.jsx)(ee.Z,{className:"text-3xl text-gray-400 mb-2"}),(0,r.jsx)("p",{className:"mb-1",children:"Drag and drop your CSV file here"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"or"}),(0,r.jsx)(b.Z,{size:"sm",children:"Browse files"})]})})})]}):(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3",children:"3"}),(0,r.jsx)("h3",{className:"text-lg font-medium",children:d.some(e=>"success"===e.status||"failed"===e.status)?"User Creation Results":"Review and create users"})]}),h&&(0,r.jsx)("div",{className:"ml-11 mb-4 p-4 bg-red-50 border border-red-200 rounded-md",children:(0,r.jsx)(S.Z,{className:"text-red-600 font-medium",children:h})}),(0,r.jsxs)("div",{className:"ml-11",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,r.jsx)("div",{className:"flex items-center",children:d.some(e=>"success"===e.status||"failed"===e.status)?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(S.Z,{className:"text-lg font-medium mr-3",children:"Creation Summary"}),(0,r.jsxs)(S.Z,{className:"text-sm bg-green-100 text-green-800 px-2 py-1 rounded mr-2",children:[d.filter(e=>"success"===e.status).length," Successful"]}),d.some(e=>"failed"===e.status)&&(0,r.jsxs)(S.Z,{className:"text-sm bg-red-100 text-red-800 px-2 py-1 rounded",children:[d.filter(e=>"failed"===e.status).length," Failed"]})]}):(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(S.Z,{className:"text-lg font-medium mr-3",children:"User Preview"}),(0,r.jsxs)(S.Z,{className:"text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded",children:[d.filter(e=>e.isValid).length," of ",d.length," users valid"]})]})}),!d.some(e=>"success"===e.status||"failed"===e.status)&&(0,r.jsxs)("div",{className:"flex space-x-3",children:[(0,r.jsx)(b.Z,{onClick:()=>{c([]),x(null)},variant:"secondary",children:"Back"}),(0,r.jsx)(b.Z,{onClick:y,disabled:0===d.filter(e=>e.isValid).length||m,children:m?"Creating...":"Create ".concat(d.filter(e=>e.isValid).length," Users")})]})]}),d.some(e=>"success"===e.status)&&(0,r.jsx)("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsx)("div",{className:"mr-3 mt-1",children:(0,r.jsx)(ea.Z,{className:"h-5 w-5 text-blue-500"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium text-blue-800",children:"User creation complete"}),(0,r.jsxs)(S.Z,{className:"block text-sm text-blue-700 mt-1",children:[(0,r.jsx)("span",{className:"font-medium",children:"Next step:"})," Download the credentials file containing API keys and invitation links. Users will need these API keys to make LLM requests through LiteLLM."]})]})]})}),(0,r.jsx)(X.Z,{dataSource:d,columns:[{title:"Row",dataIndex:"rowNumber",key:"rowNumber",width:80},{title:"Email",dataIndex:"user_email",key:"user_email"},{title:"Role",dataIndex:"user_role",key:"user_role"},{title:"Teams",dataIndex:"teams",key:"teams"},{title:"Budget",dataIndex:"max_budget",key:"max_budget"},{title:"Status",key:"status",render:(e,l)=>l.isValid?l.status&&"pending"!==l.status?"success"===l.status?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(ea.Z,{className:"h-5 w-5 text-green-500 mr-2"}),(0,r.jsx)("span",{className:"text-green-500",children:"Success"})]}),l.invitation_link&&(0,r.jsx)("div",{className:"mt-1",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"text-xs text-gray-500 truncate max-w-[150px]",children:l.invitation_link}),(0,r.jsx)(I.CopyToClipboard,{text:l.invitation_link,onCopy:()=>P.ZP.success("Invitation link copied!"),children:(0,r.jsx)("button",{className:"ml-1 text-blue-500 text-xs hover:text-blue-700",children:"Copy"})})]})})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(et.Z,{className:"h-5 w-5 text-red-500 mr-2"}),(0,r.jsx)("span",{className:"text-red-500",children:"Failed"})]}),l.error&&(0,r.jsx)("span",{className:"text-sm text-red-500 ml-7",children:JSON.stringify(l.error)})]}):(0,r.jsx)("span",{className:"text-gray-500",children:"Pending"}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(et.Z,{className:"h-5 w-5 text-red-500 mr-2"}),(0,r.jsx)("span",{className:"text-red-500",children:"Invalid"})]}),l.error&&(0,r.jsx)("span",{className:"text-sm text-red-500 ml-7",children:l.error})]})}],size:"small",pagination:{pageSize:5},scroll:{y:300},rowClassName:e=>e.isValid?"":"bg-red-50"}),!d.some(e=>"success"===e.status||"failed"===e.status)&&(0,r.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,r.jsx)(b.Z,{onClick:()=>{c([]),x(null)},variant:"secondary",className:"mr-3",children:"Back"}),(0,r.jsx)(b.Z,{onClick:y,disabled:0===d.filter(e=>e.isValid).length||m,children:m?"Creating...":"Create ".concat(d.filter(e=>e.isValid).length," Users")})]}),d.some(e=>"success"===e.status||"failed"===e.status)&&(0,r.jsxs)("div",{className:"flex justify-end mt-4",children:[(0,r.jsx)(b.Z,{onClick:()=>{c([]),x(null)},variant:"secondary",className:"mr-3",children:"Start New Bulk Import"}),(0,r.jsxs)(b.Z,{onClick:()=>{let e=d.map(e=>({user_email:e.user_email,user_role:e.user_role,status:e.status,key:e.key||"",invitation_link:e.invitation_link||"",error:e.error||""})),l=new Blob([es().unparse(e)],{type:"text/csv"}),s=window.URL.createObjectURL(l),t=document.createElement("a");t.href=s,t.download="bulk_users_results.csv",document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(s)},variant:"primary",className:"flex items-center",children:[(0,r.jsx)(Q.Z,{className:"mr-2"})," Download User Credentials"]})]})]})]})})})]})};let{Option:ei}=A.default;var en=e=>{let{userID:l,accessToken:s,teams:t,possibleUIRoles:a,onUserCreated:o,isEmbedded:d=!1}=e,[c,m]=(0,i.useState)(null),[u]=E.Z.useForm(),[h,x]=(0,i.useState)(!1),[p,j]=(0,i.useState)(null),[f,_]=(0,i.useState)([]),[y,v]=(0,i.useState)(!1),[I,T]=(0,i.useState)(null),M=(0,n.useRouter)(),[F,U]=(0,i.useState)("http://localhost:4000");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,g.So)(s,l,"any"),t=[];for(let l=0;l<e.data.length;l++){let s=e.data[l];t.push(s.id)}console.log("Model data response:",e.data),console.log("Available models:",t),_(t);let a=await (0,g.g)(s);console.log("uiSettingsResponse:",a),m(a)}catch(e){console.error("Error fetching model data:",e)}})()},[]),(0,i.useEffect)(()=>{M&&U(new URL("/",window.location.href).toString())},[M]);let q=async e=>{var t,a,r;try{P.ZP.info("Making API Call"),d||x(!0),e.models&&0!==e.models.length||(e.models=["no-default-models"]),console.log("formValues in create user:",e);let a=await (0,g.Ov)(s,null,e);console.log("user create Response:",a),j(a.key);let r=(null===(t=a.data)||void 0===t?void 0:t.user_id)||a.user_id;if(o&&d){o(r),u.resetFields();return}if(null==c?void 0:c.SSO_ENABLED){let e={id:crypto.randomUUID(),user_id:r,is_accepted:!1,accepted_at:null,expires_at:new Date(Date.now()+6048e5),created_at:new Date,created_by:l,updated_at:new Date,updated_by:l,has_user_setup_sso:!0};T(e),v(!0)}else(0,g.XO)(s,r).then(e=>{e.has_user_setup_sso=!1,T(e),v(!0)});P.ZP.success("API user Created"),u.resetFields(),localStorage.removeItem("userData"+l)}catch(l){let e=(null===(r=l.response)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.detail)||(null==l?void 0:l.message)||"Error creating the user";P.ZP.error(e),console.error("Error creating the user:",l)}};return d?(0,r.jsxs)(E.Z,{form:u,onFinish:q,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsx)(E.Z.Item,{label:"User Email",name:"user_email",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:"User Role",name:"user_role",children:(0,r.jsx)(A.default,{children:a&&Object.entries(a).map(e=>{let[l,{ui_label:s,description:t}]=e;return(0,r.jsx)(W.Z,{value:l,title:s,children:(0,r.jsxs)("div",{className:"flex",children:[s," ",(0,r.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:t})]})},l)})})}),(0,r.jsx)(E.Z.Item,{label:"Team ID",name:"team_id",children:(0,r.jsx)(A.default,{placeholder:"Select Team ID",style:{width:"100%"},children:t?t.map(e=>(0,r.jsx)(ei,{value:e.team_id,children:e.team_alias},e.team_id)):(0,r.jsx)(ei,{value:null,children:"Default Team"},"default")})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",children:(0,r.jsx)(D.Z.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Create User"})})]}):(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(b.Z,{className:"mx-auto mb-0",onClick:()=>x(!0),children:"+ Invite User"}),(0,r.jsx)(er,{accessToken:s,teams:t,possibleUIRoles:a}),(0,r.jsxs)(O.Z,{title:"Invite User",visible:h,width:800,footer:null,onOk:()=>{x(!1),u.resetFields()},onCancel:()=>{x(!1),j(null),u.resetFields()},children:[(0,r.jsx)(S.Z,{className:"mb-1",children:"Create a User who can own keys"}),(0,r.jsxs)(E.Z,{form:u,onFinish:q,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsx)(E.Z.Item,{label:"User Email",name:"user_email",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Global Proxy Role"," ",(0,r.jsx)(V.Z,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,r.jsx)(z.Z,{})})]}),name:"user_role",children:(0,r.jsx)(A.default,{children:a&&Object.entries(a).map(e=>{let[l,{ui_label:s,description:t}]=e;return(0,r.jsx)(W.Z,{value:l,title:s,children:(0,r.jsxs)("div",{className:"flex",children:[s," ",(0,r.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:t})]})},l)})})}),(0,r.jsx)(E.Z.Item,{label:"Team ID",className:"gap-2",name:"team_id",help:"If selected, user will be added as a 'user' role to the team.",children:(0,r.jsx)(A.default,{placeholder:"Select Team ID",style:{width:"100%"},children:t?t.map(e=>(0,r.jsx)(ei,{value:e.team_id,children:e.team_alias},e.team_id)):(0,r.jsx)(ei,{value:null,children:"Default Team"},"default")})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",children:(0,r.jsx)(D.Z.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,r.jsxs)(N.Z,{children:[(0,r.jsx)(k.Z,{children:(0,r.jsx)(C.Z,{children:"Personal Key Creation"})}),(0,r.jsx)(w.Z,{children:(0,r.jsx)(E.Z.Item,{className:"gap-2",label:(0,r.jsxs)("span",{children:["Models"," ",(0,r.jsx)(V.Z,{title:"Models user has access to, outside of team scope.",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"models",help:"Models user has access to, outside of team scope.",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,r.jsx)(A.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),f.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:R(e)},e))]})})})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Create User"})})]})]}),p&&(0,r.jsx)(Y,{isInvitationLinkModalVisible:y,setIsInvitationLinkModalVisible:v,baseUrl:F,invitationLinkData:I})]})},eo=s(7310),ed=s.n(eo);let ec=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],em=["Internal User","Internal Viewer"],eu=["Internal User","Admin"],{Option:eh}=A.default,ex=e=>e?({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set";var ep=e=>{let{value:l,onChange:s,className:t="",style:a={}}=e;return(0,r.jsxs)(A.default,{style:{width:"100%",...a},value:l||void 0,onChange:s,className:t,placeholder:"n/a",children:[(0,r.jsx)(eh,{value:"24h",children:"daily"}),(0,r.jsx)(eh,{value:"7d",children:"weekly"}),(0,r.jsx)(eh,{value:"30d",children:"monthly"})]})};let{Option:eg}=A.default,ej=e=>{let l=[];if(console.log("data:",JSON.stringify(e)),e)for(let s of e)s.metadata&&s.metadata.tags&&l.push(...s.metadata.tags);let s=Array.from(new Set(l)).map(e=>({value:e,label:e}));return console.log("uniqueTags:",s),s},ef=async(e,l,s,t)=>{try{if(null===e||null===l)return[];if(null!==s){let a=(await (0,g.So)(s,e,l,!0,t)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},e_=async(e,l,s,t)=>{try{if(null===e||null===l)return;if(null!==s){let a=(await (0,g.So)(s,e,l)).data.map(e=>e.id);console.log("available_model_names:",a),t(a)}}catch(e){console.error("Error fetching user models:",e)}};var ey=e=>{let{userID:l,team:s,teams:t,userRole:a,accessToken:n,data:o,setData:d}=e,[c]=E.Z.useForm(),[m,u]=(0,i.useState)(!1),[h,x]=(0,i.useState)(null),[p,j]=(0,i.useState)(null),[f,_]=(0,i.useState)([]),[F,U]=(0,i.useState)([]),[q,K]=(0,i.useState)("you"),[B,W]=(0,i.useState)(ej(o)),[G,Y]=(0,i.useState)([]),[$,X]=(0,i.useState)(s),[Q,ee]=(0,i.useState)(!1),[el,es]=(0,i.useState)(null),[et,ea]=(0,i.useState)({}),[er,ei]=(0,i.useState)([]),[eo,ec]=(0,i.useState)(!1),em=()=>{u(!1),c.resetFields()},eh=()=>{u(!1),x(null),c.resetFields()};(0,i.useEffect)(()=>{l&&a&&n&&e_(l,a,n,_)},[n,l,a]),(0,i.useEffect)(()=>{(async()=>{try{let e=(await (0,g.t3)(n)).guardrails.map(e=>e.guardrail_name);Y(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[n]),(0,i.useEffect)(()=>{(async()=>{try{if(n){let e=sessionStorage.getItem("possibleUserRoles");if(e)ea(JSON.parse(e));else{let e=await (0,g.lg)(n);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),ea(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[n]);let ex=async e=>{try{var s,t,a;let r=null!==(s=null==e?void 0:e.key_alias)&&void 0!==s?s:"",i=null!==(t=null==e?void 0:e.team_id)&&void 0!==t?t:null;if((null!==(a=null==o?void 0:o.filter(e=>e.team_id===i).map(e=>e.key_alias))&&void 0!==a?a:[]).includes(r))throw Error("Key alias ".concat(r," already exists for team with ID ").concat(i,", please provide another key alias"));if(P.ZP.info("Making API Call"),u(!0),"you"===q&&(e.user_id=l),"service_account"===q){let l={};try{l=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}l.service_account_id=e.key_alias,e.metadata=JSON.stringify(l)}let m=await (0,g.wX)(n,l,e);console.log("key create Response:",m),d(e=>e?[...e,m]:[m]),window.addNewKeyToList&&window.addNewKeyToList(m),x(m.key),j(m.soft_budget),P.ZP.success("API Key Created"),c.resetFields(),localStorage.removeItem("userData"+l)}catch(e){console.log("error in create key:",e),P.ZP.error("Error creating the key: ".concat(e))}};(0,i.useEffect)(()=>{l&&a&&n&&$&&ef(l,a,n,$.team_id).then(e=>{U(Array.from(new Set([...$.models,...e])))}),c.setFieldValue("models",[])},[$]);let ey=async e=>{if(!e){ei([]);return}ec(!0);try{let l=new URLSearchParams;if(l.append("user_email",e),null==n)return;let s=(await (0,g.u5)(n,l)).map(e=>({label:"".concat(e.user_email," (").concat(e.user_id,")"),value:e.user_id,user:e}));ei(s)}catch(e){console.error("Error fetching users:",e),P.ZP.error("Failed to search for users")}finally{ec(!1)}},ev=(0,i.useCallback)(ed()(e=>ey(e),300),[n]),eb=(e,l)=>{let s=l.user;c.setFieldsValue({user_id:s.user_id})};return(0,r.jsxs)("div",{children:[a&&eu.includes(a)&&(0,r.jsx)(b.Z,{className:"mx-auto",onClick:()=>u(!0),children:"+ Create New Key"}),(0,r.jsx)(O.Z,{visible:m,width:1e3,footer:null,onOk:em,onCancel:eh,children:(0,r.jsxs)(E.Z,{form:c,onFinish:ex,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)(C.Z,{className:"mb-4",children:"Key Ownership"}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Owned By"," ",(0,r.jsx)(V.Z,{title:"Select who will own this API key",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,r.jsxs)(T.ZP.Group,{onChange:e=>K(e.target.value),value:q,children:[(0,r.jsx)(T.ZP,{value:"you",children:"You"}),(0,r.jsx)(T.ZP,{value:"service_account",children:"Service Account"}),"Admin"===a&&(0,r.jsx)(T.ZP,{value:"another_user",children:"Another User"})]})}),"another_user"===q&&(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["User ID"," ",(0,r.jsx)(V.Z,{title:"The user who will own this key and be responsible for its usage",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===q,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,r.jsx)(A.default,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{ev(e)},onSelect:(e,l)=>eb(e,l),options:er,loading:eo,allowClear:!0,style:{width:"100%"},notFoundContent:eo?"Searching...":"No users found"}),(0,r.jsx)(L.ZP,{onClick:()=>ee(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,r.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Team"," ",(0,r.jsx)(V.Z,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:s?s.team_id:null,className:"mt-4",children:(0,r.jsx)(J,{teams:t,onChange:e=>{X((null==t?void 0:t.find(l=>l.team_id===e))||null)}})})]}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)(C.Z,{className:"mb-4",children:"Key Details"}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["you"===q||"another_user"===q?"Key Name":"Service Account ID"," ",(0,r.jsx)(V.Z,{title:"you"===q||"another_user"===q?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:"Please input a ".concat("you"===q?"key name":"service account ID")}],help:"required",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Models"," ",(0,r.jsx)(V.Z,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[{required:!0,message:"Please select a model"}],help:"required",className:"mt-4",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},onChange:e=>{e.includes("all-team-models")&&c.setFieldsValue({models:["all-team-models"]})},children:[(0,r.jsx)(eg,{value:"all-team-models",children:"All Team Models"},"all-team-models"),F.map(e=>(0,r.jsx)(eg,{value:e,children:R(e)},e))]})})]}),(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsxs)(N.Z,{className:"mt-4 mb-4",children:[(0,r.jsx)(k.Z,{children:(0,r.jsx)(C.Z,{className:"m-0",children:"Optional Settings"})}),(0,r.jsxs)(w.Z,{children:[(0,r.jsx)(E.Z.Item,{className:"mt-4",label:(0,r.jsxs)("span",{children:["Max Budget (USD)"," ",(0,r.jsx)(V.Z,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:"Budget cannot exceed team max budget: $".concat((null==s?void 0:s.max_budget)!==null&&(null==s?void 0:s.max_budget)!==void 0?null==s?void 0:s.max_budget:"unlimited"),rules:[{validator:async(e,l)=>{if(l&&s&&null!==s.max_budget&&l>s.max_budget)throw Error("Budget cannot exceed team max budget: $".concat(s.max_budget))}}],children:(0,r.jsx)(M.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{className:"mt-4",label:(0,r.jsxs)("span",{children:["Reset Budget"," ",(0,r.jsx)(V.Z,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:"Team Reset Budget: ".concat((null==s?void 0:s.budget_duration)!==null&&(null==s?void 0:s.budget_duration)!==void 0?null==s?void 0:s.budget_duration:"None"),children:(0,r.jsx)(ep,{onChange:e=>c.setFieldValue("budget_duration",e)})}),(0,r.jsx)(E.Z.Item,{className:"mt-4",label:(0,r.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,r.jsx)(V.Z,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:"TPM cannot exceed team TPM limit: ".concat((null==s?void 0:s.tpm_limit)!==null&&(null==s?void 0:s.tpm_limit)!==void 0?null==s?void 0:s.tpm_limit:"unlimited"),rules:[{validator:async(e,l)=>{if(l&&s&&null!==s.tpm_limit&&l>s.tpm_limit)throw Error("TPM limit cannot exceed team TPM limit: ".concat(s.tpm_limit))}}],children:(0,r.jsx)(M.Z,{step:1,width:400})}),(0,r.jsx)(E.Z.Item,{className:"mt-4",label:(0,r.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,r.jsx)(V.Z,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:"RPM cannot exceed team RPM limit: ".concat((null==s?void 0:s.rpm_limit)!==null&&(null==s?void 0:s.rpm_limit)!==void 0?null==s?void 0:s.rpm_limit:"unlimited"),rules:[{validator:async(e,l)=>{if(l&&s&&null!==s.rpm_limit&&l>s.rpm_limit)throw Error("RPM limit cannot exceed team RPM limit: ".concat(s.rpm_limit))}}],children:(0,r.jsx)(M.Z,{step:1,width:400})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Expire Key"," ",(0,r.jsx)(V.Z,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days)",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"duration",className:"mt-4",children:(0,r.jsx)(Z.Z,{placeholder:"e.g., 30d"})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Guardrails"," ",(0,r.jsx)(V.Z,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails or enter new ones",children:(0,r.jsx)(A.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:G.map(e=>({value:e,label:e}))})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Metadata"," ",(0,r.jsx)(V.Z,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,r.jsx)(D.Z.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Tags"," ",(0,r.jsx)(V.Z,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,r.jsx)(A.default,{mode:"tags",style:{width:"100%"},placeholder:"Enter tags",tokenSeparators:[","],options:B})}),(0,r.jsxs)(N.Z,{className:"mt-4 mb-4",children:[(0,r.jsx)(k.Z,{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("b",{children:"Advanced Settings"}),(0,r.jsx)(V.Z,{title:(0,r.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,r.jsx)("a",{href:g.H2?"".concat(g.H2,"/#/key%20management/generate_key_fn_key_generate_post"):"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,r.jsx)(z.Z,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,r.jsx)(w.Z,{children:(0,r.jsx)(H,{schemaComponent:"GenerateKeyRequest",form:c,excludedFields:["key_alias","team_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit"]})})]})]})]})}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Create Key"})})]})}),Q&&(0,r.jsx)(O.Z,{title:"Create New User",visible:Q,onCancel:()=>ee(!1),footer:null,width:800,children:(0,r.jsx)(en,{userID:l,accessToken:n,teams:t,possibleUIRoles:et,onUserCreated:e=>{es(e),c.setFieldsValue({user_id:e}),ee(!1)},isEmbedded:!0})}),h&&(0,r.jsx)(O.Z,{visible:m,onOk:em,onCancel:eh,footer:null,children:(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 w-full",children:[(0,r.jsx)(C.Z,{children:"Save your Key"}),(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)("p",{children:["Please save this secret key somewhere safe and accessible. For security reasons, ",(0,r.jsx)("b",{children:"you will not be able to view it again"})," ","through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,r.jsx)(y.Z,{numColSpan:1,children:null!=h?(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"mt-3",children:"API Key:"}),(0,r.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,r.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal"},children:h})}),(0,r.jsx)(I.CopyToClipboard,{text:h,onCopy:()=>{P.ZP.success("API Key copied to clipboard")},children:(0,r.jsx)(b.Z,{className:"mt-3",children:"Copy API Key"})})]}):(0,r.jsx)(S.Z,{children:"Key being created, this might take 30s"})})]})})]})},ev=s(7366),eb=e=>{let{selectedTeam:l,currentOrg:s,accessToken:t,currentPage:a=1}=e,[r,n]=(0,i.useState)({keys:[],total_count:0,current_page:1,total_pages:0}),[o,d]=(0,i.useState)(!0),[c,m]=(0,i.useState)(null),u=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(console.log("calling fetchKeys"),!t){console.log("accessToken",t);return}d(!0);let a=await (0,g.OD)(t,(null==s?void 0:s.organization_id)||null,(null==l?void 0:l.team_id)||"",e.page||1,50);console.log("data",a),n(a),m(null)}catch(e){m(e instanceof Error?e:Error("An error occurred"))}finally{d(!1)}};return(0,i.useEffect)(()=>{u(),console.log("selectedTeam",l,"currentOrg",s,"accessToken",t)},[l,s,t]),{keys:r.keys,isLoading:o,error:c,pagination:{currentPage:r.current_page,totalPages:r.total_pages,totalCount:r.total_count},refresh:u,setKeys:e=>{n(l=>{let s="function"==typeof e?e(l.keys):e;return{...l,keys:s}})}}},eZ=s(71594),eN=s(24525),ew=s(21626),ek=s(97214),eS=s(28241),eC=s(58834),eI=s(69552),eA=s(71876);function eE(e){let{data:l=[],columns:s,getRowCanExpand:t,renderSubComponent:a,isLoading:n=!1,expandedRequestId:o,onRowExpand:d}=e,c=(0,eZ.b7)({data:l,columns:s,getRowCanExpand:t,getCoreRowModel:(0,eN.sC)(),getExpandedRowModel:(0,eN.rV)(),state:{expanded:o?l.reduce((e,l,s)=>(l.request_id===o&&(e[s]=!0),e),{}):{}},onExpandedChange:e=>{if(!d)return;let s=o?l.reduce((e,l,s)=>(l.request_id===o&&(e[s]=!0),e),{}):{},t="function"==typeof e?e(s):e;if(0===Object.keys(t).length){d(null);return}let a=Object.keys(t)[0],r=void 0!==a?l[parseInt(a)]:null;d(r?r.request_id:null)}});return(0,r.jsx)("div",{className:"rounded-lg custom-border",children:(0,r.jsxs)(ew.Z,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,r.jsx)(eC.Z,{children:c.getHeaderGroups().map(e=>(0,r.jsx)(eA.Z,{children:e.headers.map(e=>(0,r.jsx)(eI.Z,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,eZ.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,r.jsx)(ek.Z,{children:n?(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:s.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:"\uD83D\uDE85 Loading logs..."})})})}):c.getRowModel().rows.length>0?c.getRowModel().rows.map(e=>(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(eA.Z,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(eS.Z,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,eZ.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:e.getVisibleCells().length,children:a({row:e})})})]},e.id)):(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:s.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:"No logs found"})})})})})]})})}var eP=s(27281),eO=s(41649),eT=s(12514),eL=s(12485),eM=s(18135),eD=s(35242),eF=s(29706),eR=s(77991),eU=s(10900),ez=s(23628),eV=s(74998);function eq(e){var l,s;let{keyData:t,onCancel:a,onSubmit:n,teams:o,accessToken:d,userID:c,userRole:m}=e,[u]=E.Z.useForm(),[h,x]=(0,i.useState)([]),p=null==o?void 0:o.find(e=>e.team_id===t.team_id),[j,f]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(c&&m&&d)try{if(null===t.team_id){let e=(await (0,g.So)(d,c,m)).data.map(e=>e.id);f(e)}else if(null==p?void 0:p.team_id){let e=await ef(c,m,d,p.team_id);f(Array.from(new Set([...p.models,...e])))}}catch(e){console.error("Error fetching models:",e)}})()},[c,m,d,p,t.team_id]);let _={...t,budget_duration:(s=t.budget_duration)&&({"24h":"daily","7d":"weekly","30d":"monthly"})[s]||null,metadata:t.metadata?JSON.stringify(t.metadata,null,2):"",guardrails:(null===(l=t.metadata)||void 0===l?void 0:l.guardrails)||[]};return(0,r.jsxs)(E.Z,{form:u,onFinish:n,initialValues:_,layout:"vertical",children:[(0,r.jsx)(E.Z.Item,{label:"Key Alias",name:"key_alias",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"Models",name:"models",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[j.length>0&&(0,r.jsx)(A.default.Option,{value:"all-team-models",children:"All Team Models"}),j.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:e},e))]})}),(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"daily",children:"Daily"}),(0,r.jsx)(A.default.Option,{value:"weekly",children:"Weekly"}),(0,r.jsx)(A.default.Option,{value:"monthly",children:"Monthly"})]})}),(0,r.jsx)(E.Z.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,r.jsx)(M.Z,{style:{width:"100%"},min:0})}),(0,r.jsx)(E.Z.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,r.jsx)(M.Z,{style:{width:"100%"},min:0})}),(0,r.jsx)(E.Z.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,r.jsx)(M.Z,{style:{width:"100%"},min:0})}),(0,r.jsx)(E.Z.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,r.jsx)(D.Z.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,r.jsx)(E.Z.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,r.jsx)(D.Z.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,r.jsx)(E.Z.Item,{label:"Guardrails",name:"guardrails",children:(0,r.jsx)(A.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails"})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",children:(0,r.jsx)(D.Z.TextArea,{rows:10})}),(0,r.jsx)(E.Z.Item,{name:"token",hidden:!0,children:(0,r.jsx)(D.Z,{})}),(0,r.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,r.jsx)(b.Z,{variant:"light",onClick:a,children:"Cancel"}),(0,r.jsx)(b.Z,{children:"Save Changes"})]})]})}function eK(e){let{selectedToken:l,visible:s,onClose:t,accessToken:a}=e,[n]=E.Z.useForm(),[o,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(null),[u,h]=(0,i.useState)(null),[x,p]=(0,i.useState)(!1);(0,i.useEffect)(()=>{s&&l&&n.setFieldsValue({key_alias:l.key_alias,max_budget:l.max_budget,tpm_limit:l.tpm_limit,rpm_limit:l.rpm_limit,duration:l.duration||""})},[s,l,n]),(0,i.useEffect)(()=>{s||(d(null),p(!1),n.resetFields())},[s,n]),(0,i.useEffect)(()=>{(null==c?void 0:c.duration)?h((e=>{if(!e)return null;try{let l;let s=new Date;if(e.endsWith("s"))l=(0,ev.Z)(s,{seconds:parseInt(e)});else if(e.endsWith("h"))l=(0,ev.Z)(s,{hours:parseInt(e)});else if(e.endsWith("d"))l=(0,ev.Z)(s,{days:parseInt(e)});else throw Error("Invalid duration format");return l.toLocaleString()}catch(e){return null}})(c.duration)):h(null)},[null==c?void 0:c.duration]);let j=async()=>{if(l&&a){p(!0);try{let e=await n.validateFields(),s=await (0,g.s0)(a,l.token,e);d(s.key),P.ZP.success("API Key regenerated successfully")}catch(e){console.error("Error regenerating key:",e),P.ZP.error("Failed to regenerate API Key"),p(!1)}}},f=()=>{d(null),p(!1),n.resetFields(),t()};return(0,r.jsx)(O.Z,{title:"Regenerate API Key",open:s,onCancel:f,footer:o?[(0,r.jsx)(b.Z,{onClick:f,children:"Close"},"close")]:[(0,r.jsx)(b.Z,{onClick:f,className:"mr-2",children:"Cancel"},"cancel"),(0,r.jsx)(b.Z,{onClick:j,disabled:x,children:x?"Regenerating...":"Regenerate"},"regenerate")],children:o?(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 w-full",children:[(0,r.jsx)(C.Z,{children:"Regenerated Key"}),(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons, ",(0,r.jsx)("b",{children:"you will not be able to view it again"})," ","through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,r.jsxs)(y.Z,{numColSpan:1,children:[(0,r.jsx)(S.Z,{className:"mt-3",children:"Key Alias:"}),(0,r.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,r.jsx)("pre",{className:"break-words whitespace-normal",children:(null==l?void 0:l.key_alias)||"No alias set"})}),(0,r.jsx)(S.Z,{className:"mt-3",children:"New API Key:"}),(0,r.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,r.jsx)("pre",{className:"break-words whitespace-normal",children:o})}),(0,r.jsx)(I.CopyToClipboard,{text:o,onCopy:()=>P.ZP.success("API Key copied to clipboard"),children:(0,r.jsx)(b.Z,{className:"mt-3",children:"Copy API Key"})})]})]}):(0,r.jsxs)(E.Z,{form:n,layout:"vertical",onValuesChange:e=>{"duration"in e&&m(l=>({...l,duration:e.duration}))},children:[(0,r.jsx)(E.Z.Item,{name:"key_alias",label:"Key Alias",children:(0,r.jsx)(Z.Z,{disabled:!0})}),(0,r.jsx)(E.Z.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,r.jsx)(M.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,r.jsx)(M.Z,{style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,r.jsx)(M.Z,{style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",(null==l?void 0:l.expires)?new Date(l.expires).toLocaleString():"Never"]}),u&&(0,r.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",u]})]})})}function eB(e){var l,s;let{keyId:t,onClose:a,keyData:n,accessToken:o,userID:d,userRole:c,teams:m}=e,[u,h]=(0,i.useState)(!1),[x]=E.Z.useForm(),[p,j]=(0,i.useState)(!1),[f,_]=(0,i.useState)(!1);if(!n)return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)(b.Z,{icon:eU.Z,variant:"light",onClick:a,className:"mb-4",children:"Back to Keys"}),(0,r.jsx)(S.Z,{children:"Key not found"})]});let y=async e=>{try{var l,s;if(!o)return;let t=e.token;if(e.key=t,e.metadata&&"string"==typeof e.metadata)try{let s=JSON.parse(e.metadata);e.metadata={...s,...(null===(l=e.guardrails)||void 0===l?void 0:l.length)>0?{guardrails:e.guardrails}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),P.ZP.error("Invalid metadata JSON");return}else e.metadata={...e.metadata||{},...(null===(s=e.guardrails)||void 0===s?void 0:s.length)>0?{guardrails:e.guardrails}:{}};e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]),await (0,g.Nc)(o,e),P.ZP.success("Key updated successfully"),h(!1)}catch(e){P.ZP.error("Failed to update key"),console.error("Error updating key:",e)}},Z=async()=>{try{if(!o)return;await (0,g.I1)(o,n.token),P.ZP.success("Key deleted successfully"),a()}catch(e){console.error("Error deleting the key:",e),P.ZP.error("Failed to delete key")}};return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(b.Z,{icon:eU.Z,variant:"light",onClick:a,className:"mb-4",children:"Back to Keys"}),(0,r.jsx)(C.Z,{children:n.key_alias||"API Key"}),(0,r.jsx)(S.Z,{className:"text-gray-500 font-mono",children:n.token})]}),c&&eu.includes(c)&&(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(b.Z,{icon:ez.Z,variant:"secondary",onClick:()=>_(!0),className:"flex items-center",children:"Regenerate Key"}),(0,r.jsx)(b.Z,{icon:eV.Z,variant:"secondary",onClick:()=>j(!0),className:"flex items-center",children:"Delete Key"})]})]}),(0,r.jsx)(eK,{selectedToken:n,visible:f,onClose:()=>_(!1),accessToken:o}),p&&(0,r.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,r.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,r.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,r.jsx)("div",{className:"sm:flex sm:items-start",children:(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Key"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this key?"})})]})})}),(0,r.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,r.jsx)(b.Z,{onClick:Z,color:"red",className:"ml-2",children:"Delete"}),(0,r.jsx)(b.Z,{onClick:()=>j(!1),children:"Cancel"})]})]})]})}),(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{className:"mb-4",children:[(0,r.jsx)(eL.Z,{children:"Overview"}),(0,r.jsx)(eL.Z,{children:"Settings"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Spend"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(C.Z,{children:["$",Number(n.spend).toFixed(4)]}),(0,r.jsxs)(S.Z,{children:["of ",null!==n.max_budget?"$".concat(n.max_budget):"Unlimited"]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Rate Limits"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(S.Z,{children:["TPM: ",null!==n.tpm_limit?n.tpm_limit:"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["RPM: ",null!==n.rpm_limit?n.rpm_limit:"Unlimited"]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Models"}),(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:n.models&&n.models.length>0?n.models.map((e,l)=>(0,r.jsx)(eO.Z,{color:"red",children:e},l)):(0,r.jsx)(S.Z,{children:"No models specified"})})]})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(C.Z,{children:"Key Settings"}),!u&&c&&eu.includes(c)&&(0,r.jsx)(b.Z,{variant:"light",onClick:()=>h(!0),children:"Edit Settings"})]}),u?(0,r.jsx)(eq,{keyData:n,onCancel:()=>h(!1),onSubmit:y,teams:m,accessToken:o,userID:d,userRole:c}):(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Key ID"}),(0,r.jsx)(S.Z,{className:"font-mono",children:n.token})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Key Alias"}),(0,r.jsx)(S.Z,{children:n.key_alias||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Secret Key"}),(0,r.jsx)(S.Z,{className:"font-mono",children:n.key_name})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Team ID"}),(0,r.jsx)(S.Z,{children:n.team_id||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Organization"}),(0,r.jsx)(S.Z,{children:n.organization_id||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Created"}),(0,r.jsx)(S.Z,{children:new Date(n.created_at).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Expires"}),(0,r.jsx)(S.Z,{children:n.expires?new Date(n.expires).toLocaleString():"Never"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Spend"}),(0,r.jsxs)(S.Z,{children:["$",Number(n.spend).toFixed(4)," USD"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Budget"}),(0,r.jsx)(S.Z,{children:null!==n.max_budget?"$".concat(n.max_budget," USD"):"Unlimited"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Models"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:n.models&&n.models.length>0?n.models.map((e,l)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},l)):(0,r.jsx)(S.Z,{children:"No models specified"})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Rate Limits"}),(0,r.jsxs)(S.Z,{children:["TPM: ",null!==n.tpm_limit?n.tpm_limit:"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["RPM: ",null!==n.rpm_limit?n.rpm_limit:"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["Max Parallel Requests: ",null!==n.max_parallel_requests?n.max_parallel_requests:"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["Model TPM Limits: ",(null===(l=n.metadata)||void 0===l?void 0:l.model_tpm_limit)?JSON.stringify(n.metadata.model_tpm_limit):"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["Model RPM Limits: ",(null===(s=n.metadata)||void 0===s?void 0:s.model_rpm_limit)?JSON.stringify(n.metadata.model_rpm_limit):"Unlimited"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Metadata"}),(0,r.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(n.metadata,null,2)})]})]})]})})]})]})]})}var eH=s(87908),eJ=s(82422),eW=s(2356),eG=s(44633),eY=s(86462),e$=s(3837),eX=e=>{var l;let{options:s,onApplyFilters:t,onResetFilters:a,initialValues:n={},buttonLabel:o="Filter"}=e,[d,c]=(0,i.useState)(!1),[m,h]=(0,i.useState)((null===(l=s[0])||void 0===l?void 0:l.name)||""),[x,p]=(0,i.useState)(n),[g,j]=(0,i.useState)(n),[f,_]=(0,i.useState)(!1),[y,v]=(0,i.useState)([]),[Z,N]=(0,i.useState)(!1),[w,k]=(0,i.useState)(""),S=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e=e=>{let l=e.target;!S.current||S.current.contains(l)||l.closest(".ant-dropdown")||l.closest(".ant-select-dropdown")||c(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{s.length>0&&s[0].isSearchable&&s[0].searchFn&&C(s[0])},[]);let C=async e=>{if(e.isSearchable&&e.searchFn){N(!0);try{let l=await e.searchFn("");v(l)}catch(e){console.error("Error loading initial options:",e),v([])}finally{N(!1)}}};(0,i.useEffect)(()=>{d&&(null==M?void 0:M.isSearchable)&&(null==M?void 0:M.searchFn)&&C(M)},[d,m]);let I=e=>{h(e),_(!1);let l=s.find(l=>l.name===e);(null==l?void 0:l.isSearchable)&&(null==l?void 0:l.searchFn)?C(l):v([])},E=(0,i.useCallback)(ed()(async(e,l)=>{if(l.isSearchable&&l.searchFn){N(!0);try{let s=await l.searchFn(e);v(s)}catch(e){console.error("Error searching:",e),v([])}finally{N(!1)}}},300),[]),P=e=>{j(l=>({...l,[m]:e}))},O=()=>{let e={};s.forEach(l=>{e[l.name]=""}),j(e)},T=s.map(e=>({key:e.name,label:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[m===e.name&&(0,r.jsx)(eJ.Z,{className:"h-4 w-4 text-blue-600"}),e.label||e.name]})})),M=s.find(e=>e.name===m);return(0,r.jsxs)("div",{className:"relative",ref:S,children:[(0,r.jsx)(b.Z,{icon:eW.Z,onClick:()=>c(!d),variant:"secondary",size:"xs",className:"flex items-center pr-2",children:o}),d&&(0,r.jsx)(eT.Z,{className:"absolute left-0 mt-2 w-[500px] z-50 border border-gray-200 shadow-lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium",children:"Where"}),(0,r.jsx)(u.Z,{menu:{items:T,onClick:e=>{let{key:l}=e;return I(l)},style:{minWidth:"200px"}},onOpenChange:_,open:f,trigger:["click"],children:(0,r.jsxs)(L.ZP,{className:"min-w-40 text-left flex justify-between items-center",children:[(null==M?void 0:M.label)||m,f?(0,r.jsx)(eG.Z,{className:"h-4 w-4"}):(0,r.jsx)(eY.Z,{className:"h-4 w-4"})]})}),(null==M?void 0:M.isSearchable)?(0,r.jsx)(A.default,{showSearch:!0,placeholder:"Search ".concat(M.label||m,"..."),value:g[m]||void 0,onChange:e=>P(e),onSearch:e=>{k(e),E(e,M)},onInputKeyDown:e=>{"Enter"===e.key&&w&&(P(w),e.preventDefault())},filterOption:!1,className:"flex-1 w-full max-w-full truncate min-w-100",loading:Z,options:y,allowClear:!0,notFoundContent:Z?(0,r.jsx)(eH.Z,{size:"small"}):(0,r.jsx)("div",{className:"p-2",children:w&&(0,r.jsxs)(L.ZP,{type:"link",className:"p-0 mt-1",onClick:()=>{P(w);let e=document.activeElement;e&&e.blur()},children:["Use “",w,"” as filter value"]})})}):(0,r.jsx)(D.Z,{placeholder:"Enter value...",value:g[m]||"",onChange:e=>P(e.target.value),className:"px-3 py-1.5 border rounded-md text-sm flex-1 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",suffix:g[m]?(0,r.jsx)(e$.Z,{className:"h-4 w-4 cursor-pointer text-gray-400 hover:text-gray-500",onClick:e=>{e.stopPropagation(),P("")}}):null})]}),(0,r.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,r.jsx)(L.ZP,{onClick:()=>{O(),a(),c(!1)},children:"Reset"}),(0,r.jsx)(L.ZP,{onClick:()=>{p(g),t(g),c(!1)},children:"Apply Filters"})]})]})})]})};let eQ=async(e,l)=>{if(!e)return[];try{let s=[],t=1,a=!0;for(;a;){let r=await (0,g.It)(e,l||null,null);s=[...s,...r.teams],t<r.total_pages?t++:a=!1}return s}catch(e){return console.error("Error fetching all teams:",e),[]}},e0=async e=>{if(!e)return[];try{let l=[],s=1,t=!0;for(;t;){let a=await (0,g.r6)(e);l=[...l,...a.organizations],s<a.total_pages?s++:t=!1}return l}catch(e){return console.error("Error fetching all organizations:",e),[]}};function e1(e){let{keys:l,isLoading:s=!1,pagination:t,onPageChange:a,pageSize:n=50,teams:o,selectedTeam:d,setSelectedTeam:c,accessToken:m,userID:u,userRole:h,organizations:x,setCurrentOrg:p,refresh:j}=e,[f,_]=(0,i.useState)(null),[y,v]=(0,i.useState)([]),{filters:Z,filteredKeys:N,allKeyAliases:w,allTeams:k,allOrganizations:S,handleFilterChange:C,handleFilterReset:I}=function(e){let{keys:l,teams:s,organizations:t,accessToken:a,setSelectedTeam:r,setCurrentOrg:n}=e,[o,d]=(0,i.useState)({"Team ID":"","Organization ID":""}),[c,m]=(0,i.useState)([]),[u,h]=(0,i.useState)(s||[]),[x,p]=(0,i.useState)(t||[]),[g,j]=(0,i.useState)(l);return(0,i.useEffect)(()=>{if(!l){j([]);return}let e=[...l];o["Team ID"]&&(e=e.filter(e=>e.team_id===o["Team ID"])),o["Organization ID"]&&(e=e.filter(e=>e.organization_id===o["Organization ID"])),j(e)},[l,o]),(0,i.useEffect)(()=>{let e=async()=>{let e=await eQ(a);e.length>0&&h(e);let l=await e0(a);l.length>0&&p(l)};a&&e()},[a]),(0,i.useEffect)(()=>{s&&s.length>0&&h(e=>e.length<s.length?s:e)},[s]),(0,i.useEffect)(()=>{t&&t.length>0&&p(e=>e.length<t.length?t:e)},[t]),{filters:o,filteredKeys:g,allKeyAliases:c,allTeams:u,allOrganizations:x,handleFilterChange:e=>{if(d({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||""}),e["Team ID"]){let l=null==u?void 0:u.find(l=>l.team_id===e["Team ID"]);l&&r(l)}if(e["Organization ID"]){let l=null==x?void 0:x.find(l=>l.organization_id===e["Organization ID"]);l&&n(l)}},handleFilterReset:()=>{d({"Team ID":"","Organization ID":""}),r(null),n(null)}}}({keys:l,teams:o,organizations:x,accessToken:m,setSelectedTeam:c,setCurrentOrg:p});(0,i.useEffect)(()=>{if(m){let e=l.map(e=>e.user_id).filter(e=>null!==e);(async()=>{v((await (0,g.Of)(m,e,1,100)).users)})()}},[m,l]),(0,i.useEffect)(()=>{if(j){let e=()=>{j()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[j]);let A=[{id:"expander",header:()=>null,cell:e=>{let{row:l}=e;return l.getCanExpand()?(0,r.jsx)("button",{onClick:l.getToggleExpandedHandler(),style:{cursor:"pointer"},children:l.getIsExpanded()?"▼":"▶"}):null}},{header:"Key ID",accessorKey:"token",cell:e=>(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(V.Z,{title:e.getValue(),children:(0,r.jsx)(b.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>_(e.getValue()),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})})})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>{let l=e.getValue();return(0,r.jsx)(V.Z,{title:l,children:l?l.length>20?"".concat(l.slice(0,20),"..."):l:"-"})}},{header:"Secret Key",accessorKey:"key_name",cell:e=>(0,r.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{header:"Team Alias",accessorKey:"team_id",cell:e=>{let{row:l,getValue:s}=e,t=s(),a=null==k?void 0:k.find(e=>e.team_id===t);return(null==a?void 0:a.team_alias)||"Unknown"}},{header:"Team ID",accessorKey:"team_id",cell:e=>(0,r.jsx)(V.Z,{title:e.getValue(),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})},{header:"Organization ID",accessorKey:"organization_id",cell:e=>e.getValue()?e.renderValue():"-"},{header:"User Email",accessorKey:"user_id",cell:e=>{let l=e.getValue(),s=y.find(e=>e.user_id===l);return(null==s?void 0:s.user_email)?s.user_email:"-"}},{header:"User ID",accessorKey:"user_id",cell:e=>{let l=e.getValue();return l?(0,r.jsx)(V.Z,{title:l,children:(0,r.jsxs)("span",{children:[l.slice(0,7),"..."]})}):"-"}},{header:"Created At",accessorKey:"created_at",cell:e=>{let l=e.getValue();return l?new Date(l).toLocaleDateString():"-"}},{header:"Created By",accessorKey:"created_by",cell:e=>e.getValue()||"Unknown"},{header:"Expires",accessorKey:"expires",cell:e=>{let l=e.getValue();return l?new Date(l).toLocaleDateString():"Never"}},{header:"Spend (USD)",accessorKey:"spend",cell:e=>Number(e.getValue()).toFixed(4)},{header:"Budget (USD)",accessorKey:"max_budget",cell:e=>null!==e.getValue()&&void 0!==e.getValue()?e.getValue():"Unlimited"},{header:"Budget Reset",accessorKey:"budget_reset_at",cell:e=>{let l=e.getValue();return l?new Date(l).toLocaleString():"Never"}},{header:"Models",accessorKey:"models",cell:e=>{let l=e.getValue();return(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:l&&l.length>0?l.map((e,l)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},l)):"-"})}},{header:"Rate Limits",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{children:["TPM: ",null!==s.tpm_limit?s.tpm_limit:"Unlimited"]}),(0,r.jsxs)("div",{children:["RPM: ",null!==s.rpm_limit?s.rpm_limit:"Unlimited"]})]})}}];return(0,r.jsx)("div",{className:"w-full h-full overflow-hidden",children:f?(0,r.jsx)(eB,{keyId:f,onClose:()=>_(null),keyData:l.find(e=>e.token===f),accessToken:m,userID:u,userRole:h,teams:k}):(0,r.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between w-full mb-2",children:[(0,r.jsx)(eX,{options:[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>k&&0!==k.length?k.filter(l=>l.team_id.toLowerCase().includes(e.toLowerCase())||l.team_alias&&l.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:"".concat(e.team_alias||e.team_id," (").concat(e.team_id,")"),value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>S&&0!==S.length?S.filter(l=>{var s,t;return null!==(t=null===(s=l.organization_id)||void 0===s?void 0:s.toLowerCase().includes(e.toLowerCase()))&&void 0!==t&&t}).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:"".concat(e.organization_id||"Unknown"," (").concat(e.organization_id,")"),value:e.organization_id})):[]}],onApplyFilters:C,initialValues:Z,onResetFilters:I}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",s?"...":"".concat((t.currentPage-1)*n+1," - ").concat(Math.min(t.currentPage*n,t.totalCount))," of ",s?"...":t.totalCount," results"]}),(0,r.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",s?"...":t.currentPage," of ",s?"...":t.totalPages]}),(0,r.jsx)("button",{onClick:()=>a(t.currentPage-1),disabled:s||1===t.currentPage,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,r.jsx)("button",{onClick:()=>a(t.currentPage+1),disabled:s||t.currentPage===t.totalPages,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]}),(0,r.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,r.jsx)(eE,{columns:A.filter(e=>"expander"!==e.id),data:N,isLoading:s,getRowCanExpand:()=>!1,renderSubComponent:()=>(0,r.jsx)(r.Fragment,{})})})]})})}console.log=function(){};var e2=e=>{let{userID:l,userRole:s,accessToken:t,selectedTeam:a,setSelectedTeam:n,data:o,setData:d,teams:c,premiumUser:m,currentOrg:u,organizations:h,setCurrentOrg:x}=e,[p,j]=(0,i.useState)(!1),[f,_]=(0,i.useState)(!1),[N,w]=(0,i.useState)(null),[k,A]=(0,i.useState)(null),[T,L]=(0,i.useState)(null),[D,R]=(0,i.useState)((null==a?void 0:a.team_id)||""),[U,z]=(0,i.useState)("");(0,i.useEffect)(()=>{R((null==a?void 0:a.team_id)||"")},[a]);let{keys:V,isLoading:q,error:K,pagination:B,refresh:H,setKeys:J}=eb({selectedTeam:a,currentOrg:u,accessToken:t});window.refreshKeysList=H,window.addNewKeyToList=e=>{J(l=>[e,...l])};let[W,G]=(0,i.useState)(!1),[Y,$]=(0,i.useState)(!1),[X,Q]=(0,i.useState)(null),[ee,el]=(0,i.useState)([]),es=new Set,[et,ea]=(0,i.useState)(!1),[er,ei]=(0,i.useState)(!1),[en,eo]=(0,i.useState)(null),[ed,ec]=(0,i.useState)(null),[em]=E.Z.useForm(),[eu,eh]=(0,i.useState)(null),[ex,ep]=(0,i.useState)(es),[eg,ej]=(0,i.useState)([]);(0,i.useEffect)(()=>{console.log("in calculateNewExpiryTime for selectedToken",X),(null==ed?void 0:ed.duration)?eh((e=>{if(!e)return null;try{let l;let s=new Date;if(e.endsWith("s"))l=(0,ev.Z)(s,{seconds:parseInt(e)});else if(e.endsWith("h"))l=(0,ev.Z)(s,{hours:parseInt(e)});else if(e.endsWith("d"))l=(0,ev.Z)(s,{days:parseInt(e)});else throw Error("Invalid duration format");return l.toLocaleString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0})}catch(e){return null}})(ed.duration)):eh(null),console.log("calculateNewExpiryTime:",eu)},[X,null==ed?void 0:ed.duration]),(0,i.useEffect)(()=>{(async()=>{try{if(null===l||null===s||null===t)return;let e=await F(l,s,t);e&&el(e)}catch(e){console.error("Error fetching user models:",e)}})()},[t,l,s]),(0,i.useEffect)(()=>{if(c){let e=new Set;c.forEach((l,s)=>{let t=l.team_id;e.add(t)}),ep(e)}},[c]);let ef=async()=>{if(null!=N&&null!=o){try{await (0,g.I1)(t,N);let e=o.filter(e=>e.token!==N);d(e)}catch(e){console.error("Error deleting the key:",e)}_(!1),w(null)}},e_=(e,l)=>{ec(s=>({...s,[e]:l}))},ey=async()=>{if(!m){P.ZP.error("Regenerate API Key is an Enterprise feature. Please upgrade to use this feature.");return}if(null!=X)try{let e=await em.validateFields(),l=await (0,g.s0)(t,X.token,e);if(eo(l.key),o){let s=o.map(s=>s.token===(null==X?void 0:X.token)?{...s,key_name:l.key_name,...e}:s);d(s)}ei(!1),em.resetFields(),P.ZP.success("API Key regenerated successfully")}catch(e){console.error("Error regenerating key:",e),P.ZP.error("Failed to regenerate API Key")}};return(0,r.jsxs)("div",{children:[(0,r.jsx)(e1,{keys:V,isLoading:q,pagination:B,onPageChange:e=>{H({page:e})},pageSize:100,teams:c,selectedTeam:a,setSelectedTeam:n,accessToken:t,userID:l,userRole:s,organizations:h,setCurrentOrg:x,refresh:H}),f&&(0,r.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,r.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,r.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,r.jsx)("div",{className:"sm:flex sm:items-start",children:(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Key"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this key ?"})})]})})}),(0,r.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,r.jsx)(b.Z,{onClick:ef,color:"red",className:"ml-2",children:"Delete"}),(0,r.jsx)(b.Z,{onClick:()=>{_(!1),w(null)},children:"Cancel"})]})]})]})}),(0,r.jsx)(O.Z,{title:"Regenerate API Key",visible:er,onCancel:()=>{ei(!1),em.resetFields()},footer:[(0,r.jsx)(b.Z,{onClick:()=>{ei(!1),em.resetFields()},className:"mr-2",children:"Cancel"},"cancel"),(0,r.jsx)(b.Z,{onClick:ey,disabled:!m,children:m?"Regenerate":"Upgrade to Regenerate"},"regenerate")],children:m?(0,r.jsxs)(E.Z,{form:em,layout:"vertical",onValuesChange:(e,l)=>{"duration"in e&&e_("duration",e.duration)},children:[(0,r.jsx)(E.Z.Item,{name:"key_alias",label:"Key Alias",children:(0,r.jsx)(Z.Z,{disabled:!0})}),(0,r.jsx)(E.Z.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,r.jsx)(M.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,r.jsx)(M.Z,{style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,r.jsx)(M.Z,{style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry:"," ",(null==X?void 0:X.expires)!=null?new Date(X.expires).toLocaleString():"Never"]}),eu&&(0,r.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",eu]})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:"Upgrade to use this feature"}),(0,r.jsx)(b.Z,{variant:"primary",className:"mb-2",children:(0,r.jsx)("a",{href:"https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat",target:"_blank",children:"Get Free Trial"})})]})}),en&&(0,r.jsx)(O.Z,{visible:!!en,onCancel:()=>eo(null),footer:[(0,r.jsx)(b.Z,{onClick:()=>eo(null),children:"Close"},"close")],children:(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 w-full",children:[(0,r.jsx)(C.Z,{children:"Regenerated Key"}),(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons, ",(0,r.jsx)("b",{children:"you will not be able to view it again"})," ","through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,r.jsxs)(y.Z,{numColSpan:1,children:[(0,r.jsx)(S.Z,{className:"mt-3",children:"Key Alias:"}),(0,r.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,r.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal"},children:(null==X?void 0:X.key_alias)||"No alias set"})}),(0,r.jsx)(S.Z,{className:"mt-3",children:"New API Key:"}),(0,r.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,r.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal"},children:en})}),(0,r.jsx)(I.CopyToClipboard,{text:en,onCopy:()=>P.ZP.success("API Key copied to clipboard"),children:(0,r.jsx)(b.Z,{className:"mt-3",children:"Copy API Key"})})]})]})})]})},e4=s(12011);console.log=function(){},console.log("isLocal:",!1);var e5=e=>{let{userID:l,userRole:s,teams:t,keys:a,setUserRole:d,userEmail:c,setUserEmail:m,setTeams:u,setKeys:h,premiumUser:x,organizations:j}=e,[f,b]=(0,i.useState)(null),[Z,N]=(0,i.useState)(null),w=(0,n.useSearchParams)(),k=function(e){console.log("COOKIES",document.cookie);let l=document.cookie.split("; ").find(l=>l.startsWith(e+"="));return l?l.split("=")[1]:null}("token"),S=w.get("invitation_id"),[C,I]=(0,i.useState)(null),[A,E]=(0,i.useState)(null),[P,O]=(0,i.useState)([]),[T,L]=(0,i.useState)(null),[M,D]=(0,i.useState)(null);if(window.addEventListener("beforeunload",function(){sessionStorage.clear()}),(0,i.useEffect)(()=>{if(k){let e=(0,o.o)(k);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),I(e.key),e.user_role){let l=function(e){if(!e)return"Undefined Role";switch(console.log("Received user role: ".concat(e)),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",l),d(l)}else console.log("User role not defined");e.user_email?m(e.user_email):console.log("User Email is not set ".concat(e))}}if(l&&C&&s&&!a&&!f){let e=sessionStorage.getItem("userModels"+l);e?O(JSON.parse(e)):(console.log("currentOrg: ".concat(JSON.stringify(Z))),(async()=>{try{let e=await (0,g.g)(C);L(e);let t=await (0,g.Br)(C,l,s,!1,null,null);b(t.user_info),console.log("userSpendData: ".concat(JSON.stringify(f))),(null==t?void 0:t.teams[0].keys)?h(t.keys.concat(t.teams.filter(e=>"Admin"===s||e.user_id===l).flatMap(e=>e.keys))):h(t.keys),sessionStorage.setItem("userData"+l,JSON.stringify(t.keys)),sessionStorage.setItem("userSpendData"+l,JSON.stringify(t.user_info));let a=(await (0,g.So)(C,l,s)).data.map(e=>e.id);console.log("available_model_names:",a),O(a),console.log("userModels:",P),sessionStorage.setItem("userModels"+l,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e)}})(),_(C,l,s,Z,u))}},[l,k,C,a,s]),(0,i.useEffect)(()=>{console.log("currentOrg: ".concat(JSON.stringify(Z),", accessToken: ").concat(C,", userID: ").concat(l,", userRole: ").concat(s)),C&&(console.log("fetching teams"),_(C,l,s,Z,u))},[Z]),(0,i.useEffect)(()=>{if(null!==a&&null!=M&&null!==M.team_id){let e=0;for(let l of(console.log("keys: ".concat(JSON.stringify(a))),a))M.hasOwnProperty("team_id")&&null!==l.team_id&&l.team_id===M.team_id&&(e+=l.spend);console.log("sum: ".concat(e)),E(e)}else if(null!==a){let e=0;for(let l of a)e+=l.spend;E(e)}},[M]),null!=S)return(0,r.jsx)(e4.default,{});if(null==l||null==k){console.log("All cookies before redirect:",document.cookie),(0,p.b)();let e="/sso/key/generate";return console.log("Full URL:",e),window.location.href=e,null}if(null==C)return null;if(null==s&&d("App Owner"),s&&"Admin Viewer"==s){let{Title:e,Paragraph:l}=G.default;return(0,r.jsxs)("div",{children:[(0,r.jsx)(e,{level:1,children:"Access Denied"}),(0,r.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",M),console.log("All cookies after redirect:",document.cookie),(0,r.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,r.jsx)(v.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,r.jsxs)(y.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,r.jsx)(ey,{userID:l,team:M,teams:t,userRole:s,accessToken:C,data:a,setData:h},M?M.team_id:null),(0,r.jsx)(e2,{userID:l,userRole:s,accessToken:C,selectedTeam:M||null,setSelectedTeam:D,data:a,setData:h,premiumUser:x,teams:t,currentOrg:Z,setCurrentOrg:N,organizations:j})]})})})},e3=s(97765);(t=a||(a={})).OpenAI="OpenAI",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.Anthropic="Anthropic",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.Google_AI_Studio="Google AI Studio",t.Bedrock="Amazon Bedrock",t.Groq="Groq",t.MistralAI="Mistral AI",t.Deepseek="Deepseek",t.Cohere="Cohere",t.Databricks="Databricks",t.Ollama="Ollama",t.xAI="xAI",t.AssemblyAI="AssemblyAI",t.Cerebras="Cerebras",t.Sambanova="Sambanova",t.Perplexity="Perplexity",t.TogetherAI="TogetherAI",t.Openrouter="Openrouter",t.FireworksAI="Fireworks AI";let e6={OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MistralAI:"mistral",Cohere:"cohere_chat",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"togetherai",Openrouter:"openrouter",FireworksAI:"fireworks_ai"},e8={OpenAI:"https://artificialanalysis.ai/img/logos/openai_small.svg","OpenAI Text Completion":"https://artificialanalysis.ai/img/logos/openai_small.svg","OpenAI-Compatible Text Completion Models (Together AI, etc.)":"https://artificialanalysis.ai/img/logos/openai_small.svg","OpenAI-Compatible Endpoints (Together AI, etc.)":"https://artificialanalysis.ai/img/logos/openai_small.svg",Azure:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg","Azure AI Foundry (Studio)":"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",Anthropic:"https://artificialanalysis.ai/img/logos/anthropic_small.svg","Google AI Studio":"https://artificialanalysis.ai/img/logos/google_small.svg","Amazon Bedrock":"https://artificialanalysis.ai/img/logos/aws_small.png",Groq:"https://artificialanalysis.ai/img/logos/groq_small.png","Mistral AI":"https://artificialanalysis.ai/img/logos/mistral_small.png",Cohere:"https://artificialanalysis.ai/img/logos/cohere_small.png","Vertex AI (Anthropic, Gemini, etc.)":"https://artificialanalysis.ai/img/logos/google_small.svg",Databricks:"https://artificialanalysis.ai/img/logos/databricks_small.png",Ollama:"https://artificialanalysis.ai/img/logos/ollama_small.svg",xAI:"https://artificialanalysis.ai/img/logos/xai_small.svg",Deepseek:"https://artificialanalysis.ai/img/logos/deepseek_small.jpg",AssemblyAI:"https://artificialanalysis.ai/img/logos/assemblyai_small.png",Cerebras:"https://artificialanalysis.ai/img/logos/cerebras_small.png",Sambanova:"https://artificialanalysis.ai/img/logos/sambanova_small.webp",Perplexity:"https://artificialanalysis.ai/img/logos/perplexity_small.png",TogetherAI:"https://artificialanalysis.ai/img/logos/togetherai_small.svg",Openrouter:"https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://openrouter.ai/chat&size=256","Fireworks AI":"https://artificialanalysis.ai/img/logos/fireworks_small_revised.png"},e7=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:e8[e],displayName:e}}let l=Object.keys(e6).find(l=>e6[l].toLowerCase()===e.toLowerCase());if(!l)return{logo:"",displayName:e};let s=a[l];return{logo:e8[s],displayName:s}},e9=e=>"Vertex AI (Anthropic, Gemini, etc.)"===e?"gemini-pro":"Anthropic"==e||"Amazon Bedrock"==e?"claude-3-opus":"Google AI Studio"==e?"gemini-pro":"Azure AI Foundry (Studio)"==e?"azure_ai/command-r-plus":"Azure"==e?"azure/my-deployment":"gpt-3.5-turbo",le=(e,l)=>{console.log("Provider key: ".concat(e));let s=e6[e];console.log("Provider mapped to: ".concat(s));let t=[];return e&&"object"==typeof l&&(Object.entries(l).forEach(e=>{let[l,a]=e;null!==a&&"object"==typeof a&&"litellm_provider"in a&&(a.litellm_provider===s||a.litellm_provider.includes(s))&&t.push(l)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(l).forEach(e=>{let[l,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&"cohere"===s.litellm_provider&&t.push(l)}))),t},ll=async(e,l,s)=>{try{console.log("handling submit for formValues:",e);let l=e.model_mappings||[];if("model_mappings"in e&&delete e.model_mappings,e.model&&e.model.includes("all-wildcard")){let s=e6[e.custom_llm_provider]+"/*";e.model_name=s,l.push({public_name:s,litellm_model:s}),e.model=s}for(let s of l){let l={},t={},a=s.public_name;for(let[a,r]of(l.model=s.litellm_model,e.input_cost_per_token&&(e.input_cost_per_token=Number(e.input_cost_per_token)/1e6),e.output_cost_per_token&&(e.output_cost_per_token=Number(e.output_cost_per_token)/1e6),l.model=s.litellm_model,console.log("formValues add deployment:",e),Object.entries(e)))if(""!==r&&"custom_pricing"!==a&&"pricing_model"!==a){if("model_name"==a)l.model=r;else if("custom_llm_provider"==a){console.log("custom_llm_provider:",r);let e=e6[r];l.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==a)continue;else if("base_model"===a)t[a]=r;else if("team_id"===a)t.team_id=r;else if("mode"==a)console.log("placing mode in modelInfo"),t.mode=r,delete l.mode;else if("custom_model_name"===a)l.model=r;else if("litellm_extra_params"==a){console.log("litellm_extra_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw P.ZP.error("Failed to parse LiteLLM Extra Params: "+e,10),Error("Failed to parse litellm_extra_params: "+e)}for(let[s,t]of Object.entries(e))l[s]=t}}else if("model_info_params"==a){console.log("model_info_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw P.ZP.error("Failed to parse LiteLLM Extra Params: "+e,10),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,s]of Object.entries(e))t[l]=s}}else if("input_cost_per_token"===a||"output_cost_per_token"===a||"input_cost_per_second"===a){r&&(l[a]=Number(r));continue}else l[a]=r}return{litellmParamsObj:l,modelInfoObj:t,modelName:a}}}catch(e){P.ZP.error("Failed to create model: "+e,10)}},ls=async(e,l,s,t)=>{try{let a=await ll(e,l,s);if(!a)return;let{litellmParamsObj:r,modelInfoObj:i,modelName:n}=a,o=await (0,g.kK)(l,{model_name:n,litellm_params:r,model_info:i});console.log("response for model create call: ".concat(o.data)),t&&t(),s.resetFields()}catch(e){P.ZP.error("Failed to add model: "+e,10)}};var lt=s(53410),la=s(47451),lr=s(69410);let{Link:li}=G.default,ln={[a.OpenAI]:[{key:"api_base",label:"API Base",type:"select",options:["https://api.openai.com/v1","https://eu.api.openai.com"],defaultValue:"https://api.openai.com/v1"},{key:"organization",label:"OpenAI Organization ID",placeholder:"[OPTIONAL] my-unique-org"},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[a.OpenAI_Text]:[{key:"api_base",label:"API Base",type:"select",options:["https://api.openai.com/v1","https://eu.api.openai.com"],defaultValue:"https://api.openai.com/v1"},{key:"organization",label:"OpenAI Organization ID",placeholder:"[OPTIONAL] my-unique-org"},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[a.Vertex_AI]:[{key:"vertex_project",label:"Vertex Project",placeholder:"adroit-cadet-1234..",required:!0},{key:"vertex_location",label:"Vertex Location",placeholder:"us-east-1",required:!0},{key:"vertex_credentials",label:"Vertex Credentials",required:!0,type:"upload"}],[a.AssemblyAI]:[{key:"api_base",label:"API Base",type:"select",required:!0,options:["https://api.assemblyai.com","https://api.eu.assemblyai.com"]},{key:"api_key",label:"AssemblyAI API Key",type:"password",required:!0}],[a.Azure]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_version",label:"API Version",placeholder:"2023-07-01-preview",tooltip:"By default litellm will use the latest version. If you want to use a different version, you can specify it here"},{key:"base_model",label:"Base Model",placeholder:"azure/gpt-3.5-turbo"},{key:"api_key",label:"Azure API Key",type:"password",required:!0}],[a.Azure_AI_Studio]:[{key:"api_base",label:"API Base",placeholder:"https://<test>.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-10-21",tooltip:"Enter your full Target URI from Azure Foundry here. Example: https://litellm8397336933.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-10-21",required:!0},{key:"api_key",label:"Azure API Key",type:"password",required:!0}],[a.OpenAI_Compatible]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[a.OpenAI_Text_Compatible]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[a.Bedrock]:[{key:"aws_access_key_id",label:"AWS Access Key ID",required:!0,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."},{key:"aws_secret_access_key",label:"AWS Secret Access Key",required:!0,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."},{key:"aws_region_name",label:"AWS Region Name",placeholder:"us-east-1",required:!0,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."}],[a.Ollama]:[],[a.Anthropic]:[{key:"api_key",label:"API Key",placeholder:"sk-",type:"password",required:!0}],[a.Google_AI_Studio]:[{key:"api_key",label:"API Key",placeholder:"aig-",type:"password",required:!0}],[a.Groq]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.MistralAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Deepseek]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Cohere]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Databricks]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.xAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Cerebras]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Sambanova]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Perplexity]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.TogetherAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.Openrouter]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[a.FireworksAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}]};var lo=e=>{let{selectedProvider:l,uploadProps:s}=e,t=a[l],n=i.useMemo(()=>ln[t]||[],[t]);return(0,r.jsx)(r.Fragment,{children:n.map(e=>{var l;return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:"Required"}]:void 0,tooltip:e.tooltip,className:"vertex_credentials"===e.key?"mb-0":void 0,children:"select"===e.type?(0,r.jsx)(A.default,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:e},e))}):"upload"===e.type?(0,r.jsx)($.Z,{...s,children:(0,r.jsx)(L.ZP,{icon:(0,r.jsx)(ee.Z,{}),children:"Click to Upload"})}):(0,r.jsx)(Z.Z,{placeholder:e.placeholder,type:"password"===e.type?"password":"text"})}),"vertex_credentials"===e.key&&(0,r.jsxs)(la.Z,{children:[(0,r.jsx)(lr.Z,{span:10}),(0,r.jsx)(lr.Z,{span:10,children:(0,r.jsx)(S.Z,{className:"mb-3 mt-1",children:"Give litellm a gcp service account(.json file), so it can make the relevant calls"})})]}),"base_model"===e.key&&(0,r.jsxs)(la.Z,{children:[(0,r.jsx)(lr.Z,{span:10}),(0,r.jsx)(lr.Z,{span:10,children:(0,r.jsxs)(S.Z,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,r.jsx)(li,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key)})})};let{Title:ld,Link:lc}=G.default;var lm=e=>{let{isVisible:l,onCancel:s,onAddCredential:t,onUpdateCredential:n,uploadProps:o,addOrEdit:d,existingCredential:c}=e,[m]=E.Z.useForm(),[u,h]=(0,i.useState)(a.OpenAI),[x,p]=(0,i.useState)(!1);return console.log("existingCredential in add credentials tab: ".concat(JSON.stringify(c))),(0,r.jsx)(O.Z,{title:"add"===d?"Add New Credential":"Edit Credential",visible:l,onCancel:()=>{s(),m.resetFields()},footer:null,width:600,children:(0,r.jsxs)(E.Z,{form:m,onFinish:e=>{"add"===d?t(e):n(e),m.resetFields()},layout:"vertical",children:[(0,r.jsx)(E.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==c?void 0:c.credential_name,children:(0,r.jsx)(Z.Z,{placeholder:"Enter a friendly name for these credentials",disabled:null!=c&&!!c.credential_name})}),(0,r.jsx)(E.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,r.jsx)(A.default,{value:(null==c?void 0:c.credential_info.custom_llm_provider)||u,onChange:e=>{h(e)},children:Object.entries(a).map(e=>{let[l,s]=e;return(0,r.jsx)(A.default.Option,{value:l,children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("img",{src:e8[s],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,t=l.parentElement;if(t){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=s.charAt(0),t.replaceChild(e,l)}}}),(0,r.jsx)("span",{children:s})]})},l)})})}),(0,r.jsx)(lo,{selectedProvider:u,uploadProps:o}),(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)(V.Z,{title:"Get help on our github",children:(0,r.jsx)(lc,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(L.ZP,{onClick:()=>{s(),m.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,r.jsx)(L.ZP,{htmlType:"submit",children:"add"===d?"Add Credential":"Update Credential"})]})]})]})})},lu=e=>{let{accessToken:l,uploadProps:s,credentialList:t,fetchCredentials:a}=e,[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(null),[h]=E.Z.useForm();console.log("selectedCredential in credentials panel: ".concat(JSON.stringify(m)));let x=["credential_name","custom_llm_provider"],p=async e=>{if(!l){console.error("No access token found");return}let s=Object.entries(e).filter(e=>{let[l]=e;return!x.includes(l)}).reduce((e,l)=>{let[s,t]=l;return{...e,[s]:t}},{}),t={credential_name:e.credential_name,credential_values:s,credential_info:{custom_llm_provider:e.custom_llm_provider}},r=await (0,g.eZ)(l,e.credential_name,t);P.ZP.success("Credential updated successfully"),console.log("response: ".concat(JSON.stringify(r))),c(!1),a(l)},j=async e=>{if(!l){console.error("No access token found");return}let s=Object.entries(e).filter(e=>{let[l]=e;return!x.includes(l)}).reduce((e,l)=>{let[s,t]=l;return{...e,[s]:t}},{}),t={credential_name:e.credential_name,credential_values:s,credential_info:{custom_llm_provider:e.custom_llm_provider}},r=await (0,g.oC)(l,t);P.ZP.success("Credential added successfully"),console.log("response: ".concat(JSON.stringify(r))),o(!1),a(l)};(0,i.useEffect)(()=>{l&&a(l)},[l]);let f=e=>{let l={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"},s=l[e.toLowerCase()]||l.default;return(0,r.jsx)(eO.Z,{color:s,size:"xs",children:e})},_=async e=>{if(!l){console.error("No access token found");return}let s=await (0,g.gX)(l,e);console.log("response: ".concat(JSON.stringify(s))),P.ZP.success("Credential deleted successfully"),a(l)};return(0,r.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,r.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,r.jsxs)(S.Z,{children:["Configured credentials for different AI providers. Add and manage your API credentials."," ",(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/credentials",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"Docs"})]})}),(0,r.jsx)(eT.Z,{children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Credential Name"}),(0,r.jsx)(eI.Z,{children:"Provider"}),(0,r.jsx)(eI.Z,{children:"Description"})]})}),(0,r.jsx)(ek.Z,{children:t&&0!==t.length?t.map((e,l)=>{var s,t;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e.credential_name}),(0,r.jsx)(eS.Z,{children:f((null===(s=e.credential_info)||void 0===s?void 0:s.custom_llm_provider)||"-")}),(0,r.jsx)(eS.Z,{children:(null===(t=e.credential_info)||void 0===t?void 0:t.description)||"-"}),(0,r.jsxs)(eS.Z,{children:[(0,r.jsx)(b.Z,{icon:lt.Z,variant:"light",size:"sm",onClick:()=>{console.log("credential being set: ".concat(JSON.stringify(e))),u(e),c(!0)}}),(0,r.jsx)(b.Z,{icon:eV.Z,variant:"light",size:"sm",onClick:()=>_(e.credential_name)})]})]},l)}):(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),(0,r.jsx)(b.Z,{onClick:()=>o(!0),className:"mt-4",children:"Add Credential"}),n&&(0,r.jsx)(lm,{onAddCredential:j,isVisible:n,onCancel:()=>o(!1),uploadProps:s,addOrEdit:"add",onUpdateCredential:p,existingCredential:null}),d&&(0,r.jsx)(lm,{onAddCredential:j,isVisible:d,existingCredential:m,onUpdateCredential:p,uploadProps:s,onCancel:()=>c(!1),addOrEdit:"edit"})]})};let lh=e=>{var l;return(null==e?void 0:null===(l=e.model_info)||void 0===l?void 0:l.team_public_model_name)?e.model_info.team_public_model_name:(null==e?void 0:e.model_name)||"-"},lx=async(e,l,s,t)=>{if(console.log("handleEditSubmit:",e),null==l)return;let a={},r=null;for(let[l,s]of(e.input_cost_per_token&&(e.input_cost_per_token=Number(e.input_cost_per_token)/1e6),e.output_cost_per_token&&(e.output_cost_per_token=Number(e.output_cost_per_token)/1e6),Object.entries(e)))"model_id"!==l?a[l]=""===s?null:s:r=""===s?null:s;let i={litellm_params:Object.keys(a).length>0?a:void 0,model_info:void 0!==r?{id:r}:void 0};console.log("handleEditSubmit payload:",i);try{await (0,g.um)(l,i),P.ZP.success("Model updated successfully, restart server to see updates"),s(!1),t(null)}catch(e){console.log("Error occurred")}};var lp=e=>{let{visible:l,onCancel:s,model:t,onSubmit:a}=e,[i]=E.Z.useForm(),n={},o="",d="";if(t){var c,m;n={...t.litellm_params,input_cost_per_token:(null===(c=t.litellm_params)||void 0===c?void 0:c.input_cost_per_token)?1e6*t.litellm_params.input_cost_per_token:void 0,output_cost_per_token:(null===(m=t.litellm_params)||void 0===m?void 0:m.output_cost_per_token)?1e6*t.litellm_params.output_cost_per_token:void 0},o=t.model_name;let e=t.model_info;e&&(d=e.id,console.log("model_id: ".concat(d)),n.model_id=d)}return(0,r.jsx)(O.Z,{title:"Edit '"+o+"' LiteLLM Params",visible:l,width:800,footer:null,onOk:()=>{i.validateFields().then(e=>{a({...e,input_cost_per_token:e.input_cost_per_token?Number(e.input_cost_per_token)/1e6:void 0,output_cost_per_token:e.output_cost_per_token?Number(e.output_cost_per_token)/1e6:void 0}),i.resetFields()}).catch(e=>{console.error("Validation failed:",e)})},onCancel:s,children:(0,r.jsxs)(E.Z,{form:i,onFinish:a,initialValues:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",tooltip:"float (optional) - Input cost per 1 million tokens",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",tooltip:"float (optional) - Output cost per 1 million tokens",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"api_base",name:"api_base",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"api_key",name:"api_key",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"custom_llm_provider",name:"custom_llm_provider",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"model",name:"model",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"organization",name:"organization",tooltip:"OpenAI Organization ID",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"tpm",name:"tpm",tooltip:"int (optional) - Tokens limit for this deployment: in tokens per minute (tpm). Find this information on your model/providers website",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)(E.Z.Item,{label:"rpm",name:"rpm",tooltip:"int (optional) - Rate limit for this deployment: in requests per minute (rpm). Find this information on your model/providers website",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)(E.Z.Item,{label:"max_retries",name:"max_retries",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)(E.Z.Item,{label:"timeout",name:"timeout",tooltip:"int (optional) - Timeout in seconds for LLM requests (Defaults to 600 seconds)",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)(E.Z.Item,{label:"stream_timeout",name:"stream_timeout",tooltip:"int (optional) - Timeout for stream requests (seconds)",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)(E.Z.Item,{label:"model_id",name:"model_id",hidden:!0})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Save"})})]})})},lg=s(53003),lj=s(47323),lf=s(75105),l_=s(40278),ly=s(14301),lv=s(59664),lb=e=>{let{modelMetrics:l,modelMetricsCategories:s,customTooltip:t,premiumUser:a}=e;return(0,r.jsx)(lv.Z,{title:"Time to First token (s)",className:"h-72",data:l,index:"date",showLegend:!1,categories:s,colors:["indigo","rose"],connectNulls:!0,customTooltip:t})},lZ=e=>{var l,s,t;let{visible:a,onCancel:n,onSubmit:o,initialData:d,mode:c,config:m}=e,[u]=E.Z.useForm();console.log("Initial Data:",d),(0,i.useEffect)(()=>{if(a){if("edit"===c&&d)u.setFieldsValue({...d,role:d.role||m.defaultRole});else{var e;u.resetFields(),u.setFieldsValue({role:m.defaultRole||(null===(e=m.roleOptions[0])||void 0===e?void 0:e.value)})}}},[a,d,c,u,m.defaultRole,m.roleOptions]);let h=async e=>{try{let l=Object.entries(e).reduce((e,l)=>{let[s,t]=l;return{...e,[s]:"string"==typeof t?t.trim():t}},{});o(l),u.resetFields(),P.ZP.success("Successfully ".concat("add"===c?"added":"updated"," member"))}catch(e){P.ZP.error("Failed to submit form"),console.error("Form submission error:",e)}},x=e=>{switch(e.type){case"input":return(0,r.jsx)(D.Z,{className:"px-3 py-2 border rounded-md w-full",onChange:e=>{e.target.value=e.target.value.trim()}});case"select":var l;return(0,r.jsx)(A.default,{children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,r.jsx)(A.default.Option,{value:e.value,children:e.label},e.value))});default:return null}};return(0,r.jsx)(O.Z,{title:m.title||("add"===c?"Add Member":"Edit Member"),open:a,width:800,footer:null,onCancel:n,children:(0,r.jsxs)(E.Z,{form:u,onFinish:h,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[m.showEmail&&(0,r.jsx)(E.Z.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,r.jsx)(D.Z,{className:"px-3 py-2 border rounded-md w-full",placeholder:"user@example.com",onChange:e=>{e.target.value=e.target.value.trim()}})}),m.showEmail&&m.showUserId&&(0,r.jsx)("div",{className:"text-center mb-4",children:(0,r.jsx)(S.Z,{children:"OR"})}),m.showUserId&&(0,r.jsx)(E.Z.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,r.jsx)(D.Z,{className:"px-3 py-2 border rounded-md w-full",placeholder:"user_123",onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{children:"Role"}),"edit"===c&&d&&(0,r.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(s=d.role,(null===(t=m.roleOptions.find(e=>e.value===s))||void 0===t?void 0:t.label)||s),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,r.jsx)(A.default,{children:"edit"===c&&d?[...m.roleOptions.filter(e=>e.value===d.role),...m.roleOptions.filter(e=>e.value!==d.role)].map(e=>(0,r.jsx)(A.default.Option,{value:e.value,children:e.label},e.value)):m.roleOptions.map(e=>(0,r.jsx)(A.default.Option,{value:e.value,children:e.label},e.value))})}),null===(l=m.additionalFields)||void 0===l?void 0:l.map(e=>(0,r.jsx)(E.Z.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:x(e)},e.name)),(0,r.jsxs)("div",{className:"text-right mt-6",children:[(0,r.jsx)(L.ZP,{onClick:n,className:"mr-2",children:"Cancel"}),(0,r.jsx)(L.ZP,{type:"default",htmlType:"submit",children:"add"===c?"Add Member":"Save Changes"})]})]})})},lN=e=>{let{isVisible:l,onCancel:s,onSubmit:t,accessToken:a,title:n="Add Team Member",roles:o=[{label:"admin",value:"admin",description:"Admin role. Can create team keys, add members, and manage settings."},{label:"user",value:"user",description:"User role. Can view team info, but not manage it."}],defaultRole:d="user"}=e,[c]=E.Z.useForm(),[m,u]=(0,i.useState)([]),[h,x]=(0,i.useState)(!1),[p,j]=(0,i.useState)("user_email"),f=async(e,l)=>{if(!e){u([]);return}x(!0);try{let s=new URLSearchParams;if(s.append(l,e),null==a)return;let t=(await (0,g.u5)(a,s)).map(e=>({label:"user_email"===l?"".concat(e.user_email):"".concat(e.user_id),value:"user_email"===l?e.user_email:e.user_id,user:e}));u(t)}catch(e){console.error("Error fetching users:",e)}finally{x(!1)}},_=(0,i.useCallback)(ed()((e,l)=>f(e,l),300),[]),y=(e,l)=>{j(l),_(e,l)},v=(e,l)=>{let s=l.user;c.setFieldsValue({user_email:s.user_email,user_id:s.user_id,role:c.getFieldValue("role")})};return(0,r.jsx)(O.Z,{title:n,open:l,onCancel:()=>{c.resetFields(),u([]),s()},footer:null,width:800,children:(0,r.jsxs)(E.Z,{form:c,onFinish:t,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:d},children:[(0,r.jsx)(E.Z.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,r.jsx)(A.default,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>y(e,"user_email"),onSelect:(e,l)=>v(e,l),options:"user_email"===p?m:[],loading:h,allowClear:!0})}),(0,r.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,r.jsx)(E.Z.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,r.jsx)(A.default,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>y(e,"user_id"),onSelect:(e,l)=>v(e,l),options:"user_id"===p?m:[],loading:h,allowClear:!0})}),(0,r.jsx)(E.Z.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,r.jsx)(A.default,{defaultValue:d,children:o.map(e=>(0,r.jsx)(A.default.Option,{value:e.value,children:(0,r.jsxs)(V.Z,{title:e.description,children:[(0,r.jsx)("span",{className:"font-medium",children:e.label}),(0,r.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,r.jsx)("div",{className:"text-right mt-4",children:(0,r.jsx)(L.ZP,{type:"default",htmlType:"submit",children:"Add Member"})})]})})},lw=e=>{var l;let{teamId:s,onClose:t,accessToken:a,is_team_admin:n,is_proxy_admin:o,userModels:d,editTeam:c}=e,[m,u]=(0,i.useState)(null),[h,x]=(0,i.useState)(!0),[p,j]=(0,i.useState)(!1),[f]=E.Z.useForm(),[_,y]=(0,i.useState)(!1),[Z,N]=(0,i.useState)(null),[w,k]=(0,i.useState)(!1);console.log("userModels in team info",d);let I=n||o,O=async()=>{try{if(x(!0),!a)return;let e=await (0,g.Xm)(a,s);u(e)}catch(e){P.ZP.error("Failed to load team information"),console.error("Error fetching team info:",e)}finally{x(!1)}};(0,i.useEffect)(()=>{O()},[s,a]);let T=async e=>{try{if(null==a)return;let l={user_email:e.user_email,user_id:e.user_id,role:e.role};await (0,g.cu)(a,s,l),P.ZP.success("Team member added successfully"),j(!1),f.resetFields(),O()}catch(e){P.ZP.error("Failed to add team member"),console.error("Error adding team member:",e)}},F=async e=>{try{if(null==a)return;let l={user_email:e.user_email,user_id:e.user_id,role:e.role};await (0,g.sN)(a,s,l),P.ZP.success("Team member updated successfully"),y(!1),O()}catch(e){P.ZP.error("Failed to update team member"),console.error("Error updating team member:",e)}},U=async e=>{try{if(null==a)return;await (0,g.Lp)(a,s,e),P.ZP.success("Team member removed successfully"),O()}catch(e){P.ZP.error("Failed to remove team member"),console.error("Error removing team member:",e)}},q=async e=>{try{if(!a)return;let l={team_id:s,team_alias:e.team_alias,models:e.models,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,max_budget:e.max_budget,budget_duration:e.budget_duration,metadata:{...e.metadata,guardrails:e.guardrails||[]}};await (0,g.Gh)(a,l),P.ZP.success("Team settings updated successfully"),k(!1),O()}catch(e){P.ZP.error("Failed to update team settings"),console.error("Error updating team:",e)}};if(h)return(0,r.jsx)("div",{className:"p-4",children:"Loading..."});if(!(null==m?void 0:m.team_info))return(0,r.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:K}=m;return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(L.ZP,{onClick:t,className:"mb-4",children:"← Back"}),(0,r.jsx)(C.Z,{children:K.team_alias}),(0,r.jsx)(S.Z,{className:"text-gray-500 font-mono",children:K.team_id})]})}),(0,r.jsxs)(eM.Z,{defaultIndex:c?2:0,children:[(0,r.jsx)(eD.Z,{className:"mb-4",children:[(0,r.jsx)(eL.Z,{children:"Overview"},"overview"),...I?[(0,r.jsx)(eL.Z,{children:"Members"},"members"),(0,r.jsx)(eL.Z,{children:"Settings"},"settings")]:[]]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Budget Status"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(C.Z,{children:["$",K.spend.toFixed(6)]}),(0,r.jsxs)(S.Z,{children:["of ",null===K.max_budget?"Unlimited":"$".concat(K.max_budget)]}),K.budget_duration&&(0,r.jsxs)(S.Z,{className:"text-gray-500",children:["Reset: ",K.budget_duration]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Rate Limits"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(S.Z,{children:["TPM: ",K.tpm_limit||"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["RPM: ",K.rpm_limit||"Unlimited"]}),K.max_parallel_requests&&(0,r.jsxs)(S.Z,{children:["Max Parallel Requests: ",K.max_parallel_requests]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Models"}),(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:K.models.map((e,l)=>(0,r.jsx)(eO.Z,{color:"red",children:e},l))})]})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(eT.Z,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"User ID"}),(0,r.jsx)(eI.Z,{children:"User Email"}),(0,r.jsx)(eI.Z,{children:"Role"}),(0,r.jsx)(eI.Z,{})]})}),(0,r.jsx)(ek.Z,{children:m.team_info.members_with_roles.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{className:"font-mono",children:e.user_id})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{className:"font-mono",children:e.user_email})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{className:"font-mono",children:e.role})}),(0,r.jsx)(eS.Z,{children:I&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>{N(e),y(!0)}}),(0,r.jsx)(lj.Z,{onClick:()=>U(e),icon:eV.Z,size:"sm"})]})})]},l))})]})}),(0,r.jsx)(b.Z,{onClick:()=>j(!0),children:"Add Member"})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(C.Z,{children:"Team Settings"}),I&&!w&&(0,r.jsx)(b.Z,{onClick:()=>k(!0),children:"Edit Settings"})]}),w?(0,r.jsxs)(E.Z,{form:f,onFinish:q,initialValues:{...K,team_alias:K.team_alias,models:K.models,tpm_limit:K.tpm_limit,rpm_limit:K.rpm_limit,max_budget:K.max_budget,budget_duration:K.budget_duration,guardrails:(null===(l=K.metadata)||void 0===l?void 0:l.guardrails)||[],metadata:K.metadata?JSON.stringify(K.metadata,null,2):""},layout:"vertical",children:[(0,r.jsx)(E.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,r.jsx)(D.Z,{type:""})}),(0,r.jsx)(E.Z.Item,{label:"Models",name:"models",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",children:[(0,r.jsx)(A.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),d.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:R(e)},e))]})}),(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(A.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(A.default.Option,{value:"30d",children:"monthly"})]})}),(0,r.jsx)(E.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,r.jsx)(M.Z,{step:1,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,r.jsx)(M.Z,{step:1,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Guardrails"," ",(0,r.jsx)(V.Z,{title:"Setup your first guardrail",children:(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,r.jsx)(A.default,{mode:"tags",placeholder:"Select or enter guardrails"})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",children:(0,r.jsx)(D.Z.TextArea,{rows:10})}),(0,r.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,r.jsx)(L.ZP,{onClick:()=>k(!1),children:"Cancel"}),(0,r.jsx)(b.Z,{children:"Save Changes"})]})]}):(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Team Name"}),(0,r.jsx)("div",{children:K.team_alias})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Team ID"}),(0,r.jsx)("div",{className:"font-mono",children:K.team_id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Created At"}),(0,r.jsx)("div",{children:new Date(K.created_at).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Models"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:K.models.map((e,l)=>(0,r.jsx)(eO.Z,{color:"red",children:e},l))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Rate Limits"}),(0,r.jsxs)("div",{children:["TPM: ",K.tpm_limit||"Unlimited"]}),(0,r.jsxs)("div",{children:["RPM: ",K.rpm_limit||"Unlimited"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Budget"}),(0,r.jsxs)("div",{children:["Max: ",null!==K.max_budget?"$".concat(K.max_budget):"No Limit"]}),(0,r.jsxs)("div",{children:["Reset: ",K.budget_duration||"Never"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Status"}),(0,r.jsx)(eO.Z,{color:K.blocked?"red":"green",children:K.blocked?"Blocked":"Active"})]})]})]})})]})]}),(0,r.jsx)(lZ,{visible:_,onCancel:()=>y(!1),onSubmit:F,initialData:Z,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}]}}),(0,r.jsx)(lN,{isVisible:p,onCancel:()=>j(!1),onSubmit:T,accessToken:a})]})},lk=s(30150),lS=s(45589);let{Title:lC,Link:lI}=G.default;var lA=e=>{let{isVisible:l,onCancel:s,onAddCredential:t,existingCredential:a,setIsCredentialModalOpen:i}=e,[n]=E.Z.useForm();return console.log("existingCredential in add credentials tab: ".concat(JSON.stringify(a))),(0,r.jsx)(O.Z,{title:"Reuse Credentials",visible:l,onCancel:()=>{s(),n.resetFields()},footer:null,width:600,children:(0,r.jsxs)(E.Z,{form:n,onFinish:e=>{t(e),n.resetFields(),i(!1)},layout:"vertical",children:[(0,r.jsx)(E.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==a?void 0:a.credential_name,children:(0,r.jsx)(Z.Z,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries((null==a?void 0:a.credential_values)||{}).map(e=>{let[l,s]=e;return(0,r.jsx)(E.Z.Item,{label:l,name:l,initialValue:s,children:(0,r.jsx)(Z.Z,{placeholder:"Enter ".concat(l),disabled:!0})},l)}),(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)(V.Z,{title:"Get help on our github",children:(0,r.jsx)(lI,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(L.ZP,{onClick:()=>{s(),n.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function lE(e){var l,s,t,a,n,o,d,c,m,u,h,x,p,j,f,_,y,N;let{modelId:w,onClose:k,modelData:I,accessToken:A,userID:T,userRole:M,editModel:D,setEditModalVisible:F,setSelectedModel:R,onModelUpdate:U}=e,[z]=E.Z.useForm(),[V,q]=(0,i.useState)(null),[K,B]=(0,i.useState)(!1),[H,J]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[Y,$]=(0,i.useState)(!1),[X,Q]=(0,i.useState)(!1),[ee,el]=(0,i.useState)(null),es=(null===(l=I.litellm_params)||void 0===l?void 0:l.litellm_credential_name)!=null&&(null===(s=I.litellm_params)||void 0===s?void 0:s.litellm_credential_name)!=void 0;console.log("usingExistingCredential, ",es),console.log("modelData.litellm_params.litellm_credential_name, ",I.litellm_params.litellm_credential_name),(0,i.useEffect)(()=>{let e=async()=>{if(!A)return;let e=await (0,g.ix)(A,w);console.log("modelInfoResponse, ",e),q(e.data[0])};(async()=>{if(console.log("accessToken, ",A),!A||es)return;let e=await (0,g.Qg)(A,null,w);console.log("existingCredentialResponse, ",e),el({credential_name:e.credential_name,credential_values:e.credential_values,credential_info:e.credential_info})})(),e()},[A,w]);let et=async e=>{var l;if(console.log("values, ",e),!A)return;let s={credential_name:e.credential_name,model_id:w,credential_info:{custom_llm_provider:null===(l=V.litellm_params)||void 0===l?void 0:l.custom_llm_provider}};P.ZP.info("Storing credential.."),console.log("credentialResponse, ",await (0,g.oC)(A,s)),P.ZP.success("Credential stored successfully")},ea=async e=>{try{if(!A)return;$(!0);let l={model_name:e.model_name,litellm_params:{...V.litellm_params,model:e.litellm_model_name,api_base:e.api_base,custom_llm_provider:e.custom_llm_provider,organization:e.organization,tpm:e.tpm,rpm:e.rpm,max_retries:e.max_retries,timeout:e.timeout,stream_timeout:e.stream_timeout,input_cost_per_token:e.input_cost/1e6,output_cost_per_token:e.output_cost/1e6},model_info:{id:w}};await (0,g.um)(A,l);let s={...V,model_name:e.model_name,litellm_model_name:e.litellm_model_name,litellm_params:l.litellm_params};q(s),U&&U(s),P.ZP.success("Model settings updated successfully"),G(!1),Q(!1)}catch(e){console.error("Error updating model:",e),P.ZP.error("Failed to update model settings")}finally{$(!1)}};if(!I)return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)(L.ZP,{icon:(0,r.jsx)(eU.Z,{}),onClick:k,className:"mb-4",children:"Back to Models"}),(0,r.jsx)(S.Z,{children:"Model not found"})]});let er=async()=>{try{if(!A)return;await (0,g.Og)(A,w),P.ZP.success("Model deleted successfully"),U&&U({deleted:!0,model_info:{id:w}}),k()}catch(e){console.error("Error deleting the model:",e),P.ZP.error("Failed to delete model")}};return(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(L.ZP,{icon:(0,r.jsx)(eU.Z,{}),onClick:k,className:"mb-4",children:"Back to Models"}),(0,r.jsxs)(C.Z,{children:["Public Model Name: ",lh(I)]}),(0,r.jsx)(S.Z,{className:"text-gray-500 font-mono",children:I.model_info.id})]}),"Admin"===M&&(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(b.Z,{icon:lS.Z,variant:"secondary",onClick:()=>J(!0),className:"flex items-center",children:"Re-use Credentials"}),(0,r.jsx)(b.Z,{icon:eV.Z,variant:"secondary",onClick:()=>B(!0),className:"flex items-center",children:"Delete Model"})]})]}),(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{className:"mb-6",children:[(0,r.jsx)(eL.Z,{children:"Overview"}),(0,r.jsx)(eL.Z,{children:"Raw JSON"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)(v.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Provider"}),(0,r.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[I.provider&&(0,r.jsx)("img",{src:e7(I.provider).logo,alt:"".concat(I.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.target,s=l.parentElement;if(s){var t;let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=(null===(t=I.provider)||void 0===t?void 0:t.charAt(0))||"-",s.replaceChild(e,l)}}}),(0,r.jsx)(C.Z,{children:I.provider||"Not Set"})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"LiteLLM Model"}),(0,r.jsx)("pre",{children:(0,r.jsx)(C.Z,{children:I.litellm_model_name||"Not Set"})})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Pricing"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(S.Z,{children:["Input: $",I.input_cost,"/1M tokens"]}),(0,r.jsxs)(S.Z,{children:["Output: $",I.output_cost,"/1M tokens"]})]})]})]}),(0,r.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At ",I.model_info.created_at?new Date(I.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,r.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",I.model_info.created_by||"Not Set"]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(C.Z,{children:"Model Settings"}),"Admin"===M&&!X&&(0,r.jsx)(b.Z,{variant:"secondary",onClick:()=>Q(!0),className:"flex items-center",children:"Edit Model"})]}),V?(0,r.jsx)(E.Z,{form:z,onFinish:ea,initialValues:{model_name:V.model_name,litellm_model_name:V.litellm_model_name,api_base:V.litellm_params.api_base,custom_llm_provider:V.litellm_params.custom_llm_provider,organization:V.litellm_params.organization,tpm:V.litellm_params.tpm,rpm:V.litellm_params.rpm,max_retries:V.litellm_params.max_retries,timeout:V.litellm_params.timeout,stream_timeout:V.litellm_params.stream_timeout,input_cost:V.litellm_params.input_cost_per_token?1e6*V.litellm_params.input_cost_per_token:(null===(t=V.model_info)||void 0===t?void 0:t.input_cost_per_token)*1e6||null,output_cost:(null===(a=V.litellm_params)||void 0===a?void 0:a.output_cost_per_token)?1e6*V.litellm_params.output_cost_per_token:(null===(n=V.model_info)||void 0===n?void 0:n.output_cost_per_token)*1e6||null},layout:"vertical",onValuesChange:()=>G(!0),children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Model Name"}),X?(0,r.jsx)(E.Z.Item,{name:"model_name",className:"mb-0",children:(0,r.jsx)(Z.Z,{placeholder:"Enter model name"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:V.model_name})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"LiteLLM Model Name"}),X?(0,r.jsx)(E.Z.Item,{name:"litellm_model_name",className:"mb-0",children:(0,r.jsx)(Z.Z,{placeholder:"Enter LiteLLM model name"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:V.litellm_model_name})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),X?(0,r.jsx)(E.Z.Item,{name:"input_cost",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter input cost"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==V?void 0:null===(o=V.litellm_params)||void 0===o?void 0:o.input_cost_per_token)?((null===(d=V.litellm_params)||void 0===d?void 0:d.input_cost_per_token)*1e6).toFixed(4):(null==V?void 0:null===(c=V.model_info)||void 0===c?void 0:c.input_cost_per_token)?(1e6*V.model_info.input_cost_per_token).toFixed(4):null})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),X?(0,r.jsx)(E.Z.Item,{name:"output_cost",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter output cost"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==V?void 0:null===(m=V.litellm_params)||void 0===m?void 0:m.output_cost_per_token)?(1e6*V.litellm_params.output_cost_per_token).toFixed(4):(null==V?void 0:null===(u=V.model_info)||void 0===u?void 0:u.output_cost_per_token)?(1e6*V.model_info.output_cost_per_token).toFixed(4):null})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"API Base"}),X?(0,r.jsx)(E.Z.Item,{name:"api_base",className:"mb-0",children:(0,r.jsx)(Z.Z,{placeholder:"Enter API base"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(h=V.litellm_params)||void 0===h?void 0:h.api_base)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Custom LLM Provider"}),X?(0,r.jsx)(E.Z.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,r.jsx)(Z.Z,{placeholder:"Enter custom LLM provider"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(x=V.litellm_params)||void 0===x?void 0:x.custom_llm_provider)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Organization"}),X?(0,r.jsx)(E.Z.Item,{name:"organization",className:"mb-0",children:(0,r.jsx)(Z.Z,{placeholder:"Enter organization"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(p=V.litellm_params)||void 0===p?void 0:p.organization)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"TPM (Tokens per Minute)"}),X?(0,r.jsx)(E.Z.Item,{name:"tpm",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter TPM"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(j=V.litellm_params)||void 0===j?void 0:j.tpm)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"RPM (Requests per Minute)"}),X?(0,r.jsx)(E.Z.Item,{name:"rpm",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter RPM"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(f=V.litellm_params)||void 0===f?void 0:f.rpm)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Max Retries"}),X?(0,r.jsx)(E.Z.Item,{name:"max_retries",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter max retries"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(_=V.litellm_params)||void 0===_?void 0:_.max_retries)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Timeout (seconds)"}),X?(0,r.jsx)(E.Z.Item,{name:"timeout",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter timeout"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(y=V.litellm_params)||void 0===y?void 0:y.timeout)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Stream Timeout (seconds)"}),X?(0,r.jsx)(E.Z.Item,{name:"stream_timeout",className:"mb-0",children:(0,r.jsx)(lk.Z,{placeholder:"Enter stream timeout"})}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(N=V.litellm_params)||void 0===N?void 0:N.stream_timeout)||"Not Set"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Team ID"}),(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:I.model_info.team_id||"Not Set"})]})]}),X&&(0,r.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,r.jsx)(b.Z,{variant:"secondary",onClick:()=>{z.resetFields(),G(!1),Q(!1)},children:"Cancel"}),(0,r.jsx)(b.Z,{variant:"primary",onClick:()=>z.submit(),loading:Y,children:"Save Changes"})]})]})}):(0,r.jsx)(S.Z,{children:"Loading..."})]})]}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(eT.Z,{children:(0,r.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(I,null,2)})})})]})]}),K&&(0,r.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,r.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,r.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,r.jsx)("div",{className:"sm:flex sm:items-start",children:(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Model"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this model?"})})]})})}),(0,r.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,r.jsx)(L.ZP,{onClick:er,className:"ml-2",danger:!0,children:"Delete"}),(0,r.jsx)(L.ZP,{onClick:()=>B(!1),children:"Cancel"})]})]})]})}),H&&!es?(0,r.jsx)(lA,{isVisible:H,onCancel:()=>J(!1),onAddCredential:et,existingCredential:ee,setIsCredentialModalOpen:J}):(0,r.jsx)(O.Z,{open:H,onCancel:()=>J(!1),title:"Using Existing Credential",children:(0,r.jsx)(S.Z,{children:I.litellm_params.litellm_credential_name})})]})}var lP=s(67960),lO=e=>{let{selectedProvider:l,providerModels:s,getPlaceholder:t}=e,i=E.Z.useFormInstance(),n=e=>{let l=e.target.value,s=(i.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?{public_name:l,litellm_model:l}:e);i.setFieldsValue({model_mappings:s})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(E.Z.Item,{label:"LiteLLM Model Name(s)",tooltip:"Actual model name used for making litellm.completion() / litellm.embedding() call.",className:"mb-0",children:[(0,r.jsx)(E.Z.Item,{name:"model",rules:[{required:!0,message:"Please select at least one model."}],noStyle:!0,children:l===a.Azure||l===a.OpenAI_Compatible||l===a.Ollama?(0,r.jsx)(Z.Z,{placeholder:t(l)}):s.length>0?(0,r.jsx)(A.default,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:e=>{let l=Array.isArray(e)?e:[e];if(l.includes("all-wildcard"))i.setFieldsValue({model_name:void 0,model_mappings:[]});else{let e=l.map(e=>({public_name:e,litellm_model:e}));i.setFieldsValue({model_mappings:e})}},optionFilterProp:"children",filterOption:(e,l)=>{var s;return(null!==(s=null==l?void 0:l.label)&&void 0!==s?s:"").toLowerCase().includes(e.toLowerCase())},options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:"All ".concat(l," Models (Wildcard)"),value:"all-wildcard"},...s.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,r.jsx)(Z.Z,{placeholder:t(l)})}),(0,r.jsx)(E.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.model!==l.model,children:e=>{let{getFieldValue:l}=e,s=l("model")||[];return(Array.isArray(s)?s:[s]).includes("custom")&&(0,r.jsx)(E.Z.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,r.jsx)(Z.Z,{placeholder:"Enter custom model name",onChange:n})})}})]}),(0,r.jsxs)(la.Z,{children:[(0,r.jsx)(lr.Z,{span:10}),(0,r.jsx)(lr.Z,{span:10,children:(0,r.jsx)(S.Z,{className:"mb-3 mt-1",children:"Actual model name used for making litellm.completion() call. We loadbalance models with the same public name"})})]})]})},lT=()=>{let e=E.Z.useFormInstance(),[l,s]=(0,i.useState)(0),t=E.Z.useWatch("model",e)||[],a=Array.isArray(t)?t:[t],n=E.Z.useWatch("custom_model_name",e),o=!a.includes("all-wildcard");if((0,i.useEffect)(()=>{if(n&&a.includes("custom")){let l=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?{public_name:n,litellm_model:n}:e);e.setFieldValue("model_mappings",l),s(e=>e+1)}},[n,a,e]),(0,i.useEffect)(()=>{if(a.length>0&&!a.includes("all-wildcard")){let l=a.map(e=>"custom"===e&&n?{public_name:n,litellm_model:n}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",l),s(e=>e+1)}},[a,n,e]),!o)return null;let d=[{title:"Public Name",dataIndex:"public_name",key:"public_name",render:(l,s,t)=>(0,r.jsx)(Z.Z,{value:l,onChange:l=>{let s=[...e.getFieldValue("model_mappings")];s[t].public_name=l.target.value,e.setFieldValue("model_mappings",s)}})},{title:"LiteLLM Model",dataIndex:"litellm_model",key:"litellm_model"}];return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(E.Z.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",required:!0,children:(0,r.jsx)(X.Z,{dataSource:e.getFieldValue("model_mappings"),columns:d,pagination:!1,size:"small"},l)})})},lL=s(63709),lM=s(90464);let{Link:lD}=G.default;var lF=e=>{let{showAdvancedSettings:l,setShowAdvancedSettings:s,teams:t}=e,[a]=E.Z.useForm(),[n,o]=i.useState(!1),[d,c]=i.useState("per_token"),m=(e,l)=>l&&(isNaN(Number(l))||0>Number(l))?Promise.reject("Please enter a valid positive number"):Promise.resolve(),u=(e,l)=>{if(!l)return Promise.resolve();try{return JSON.parse(l),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(N.Z,{className:"mt-2 mb-4",children:[(0,r.jsx)(k.Z,{children:(0,r.jsx)("b",{children:"Advanced Settings"})}),(0,r.jsx)(w.Z,{children:(0,r.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,r.jsx)(E.Z.Item,{label:"Team",name:"team_id",className:"mb-4",children:(0,r.jsx)(J,{teams:t})}),(0,r.jsx)(E.Z.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,r.jsx)(lL.Z,{onChange:e=>{o(e),e||a.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),n&&(0,r.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,r.jsx)(E.Z.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,r.jsx)(A.default,{defaultValue:"per_token",onChange:e=>c(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===d?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:m}],className:"mb-4",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:m}],className:"mb-4",children:(0,r.jsx)(Z.Z,{})})]}):(0,r.jsx)(E.Z.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:m}],className:"mb-4",children:(0,r.jsx)(Z.Z,{})})]}),(0,r.jsx)(E.Z.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,r.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,r.jsx)(lD,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,r.jsx)(lL.Z,{onChange:e=>{let l=a.getFieldValue("litellm_extra_params");try{let s=l?JSON.parse(l):{};e?s.use_in_pass_through=!0:delete s.use_in_pass_through,Object.keys(s).length>0?a.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):a.setFieldValue("litellm_extra_params","")}catch(l){e?a.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):a.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,r.jsx)(E.Z.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:u}],children:(0,r.jsx)(lM.Z,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,r.jsxs)(la.Z,{className:"mb-4",children:[(0,r.jsx)(lr.Z,{span:10}),(0,r.jsx)(lr.Z,{span:10,children:(0,r.jsxs)(S.Z,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,r.jsx)(lD,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,r.jsx)(E.Z.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:u}],children:(0,r.jsx)(lM.Z,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})},lR=s(29),lU=s.n(lR),lz=s(23496),lV=s(35291),lq=s(23639);let{Text:lK}=G.default;var lB=e=>{let{formValues:l,accessToken:s,testMode:t,modelName:a="this model",onClose:n,onTestComplete:o}=e,[d,c]=i.useState(null),[m,u]=i.useState(null),[h,x]=i.useState(null),[p,j]=i.useState(!0),[f,_]=i.useState(!1),[y,v]=i.useState(!1),b=async()=>{j(!0),v(!1),c(null),u(null),x(null),_(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",l);let a=await ll(l,s,null);if(!a){console.log("No result from prepareModelAddRequest"),c("Failed to prepare model data. Please check your form inputs."),_(!1),j(!1);return}console.log("Result from prepareModelAddRequest:",a);let{litellmParamsObj:r,modelInfoObj:i,modelName:n}=a,o=await (0,g.Hx)(s,r,null==i?void 0:i.mode);if("success"===o.status)P.ZP.success("Connection test successful!"),c(null),_(!0);else{var e,t;let l=(null===(e=o.result)||void 0===e?void 0:e.error)||o.message||"Unknown error";c(l),u(r),x(null===(t=o.result)||void 0===t?void 0:t.raw_request_typed_dict),_(!1)}}catch(e){console.error("Test connection error:",e),c(e instanceof Error?e.message:String(e)),_(!1)}finally{j(!1),o&&o()}};i.useEffect(()=>{let e=setTimeout(()=>{b()},200);return()=>clearTimeout(e)},[]);let Z=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",N="string"==typeof d?Z(d):(null==d?void 0:d.message)?Z(d.message):"Unknown error",w=h?((e,l,s)=>{let t=JSON.stringify(l,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),a=Object.entries(s).map(e=>{let[l,s]=e;return"-H '".concat(l,": ").concat(s,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(a?"".concat(a," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(t,"\n }'")})(h.raw_request_api_base,h.raw_request_body,h.raw_request_headers||{}):"";return(0,r.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[p?(0,r.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-776cdcbc0448e4ea",children:[(0,r.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-776cdcbc0448e4ea loading-spinner",children:(0,r.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-776cdcbc0448e4ea"})}),(0,r.jsxs)(lK,{style:{fontSize:"16px"},children:["Testing connection to ",a,"..."]}),(0,r.jsx)(lU(),{id:"776cdcbc0448e4ea",children:"@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}"})]}):f?(0,r.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},children:[(0,r.jsx)("div",{style:{color:"#52c41a",fontSize:"32px",marginBottom:"16px"},children:(0,r.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,r.jsxs)(lK,{type:"success",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",a," successful!"]})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,r.jsx)(lV.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,r.jsxs)(lK,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",a," failed"]})]}),(0,r.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,r.jsx)(lK,{strong:!0,style:{display:"block",marginBottom:"8px"},children:"Error: "}),(0,r.jsx)(lK,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:N}),d&&(0,r.jsx)("div",{style:{marginTop:"12px"},children:(0,r.jsx)(L.ZP,{type:"link",onClick:()=>v(!y),style:{paddingLeft:0,height:"auto"},children:y?"Hide Details":"Show Details"})})]}),y&&(0,r.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,r.jsx)(lK,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,r.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof d?d:JSON.stringify(d,null,2)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(lK,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,r.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:w||"No request data available"}),(0,r.jsx)(L.ZP,{style:{marginTop:"8px"},icon:(0,r.jsx)(lq.Z,{}),onClick:()=>{navigator.clipboard.writeText(w||""),P.ZP.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,r.jsx)(lz.Z,{style:{margin:"24px 0 16px"}}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,r.jsx)(L.ZP,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,r.jsx)(z.Z,{}),children:"View Documentation"})})]})};let lH=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"}],{Title:lJ,Link:lW}=G.default;var lG=e=>{let{form:l,handleOk:s,selectedProvider:t,setSelectedProvider:n,providerModels:o,setProviderModelsFn:d,getPlaceholder:c,uploadProps:m,showAdvancedSettings:u,setShowAdvancedSettings:h,teams:x,credentials:p,accessToken:g}=e,[j,f]=(0,i.useState)("chat"),[_,y]=(0,i.useState)(!1),[v,b]=(0,i.useState)(!1),[Z,N]=(0,i.useState)(""),w=async()=>{b(!0),N("test-".concat(Date.now())),y(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lJ,{level:2,children:"Add new model"}),(0,r.jsx)(lP.Z,{children:(0,r.jsx)(E.Z,{form:l,onFinish:s,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,r.jsx)(A.default,{showSearch:!0,value:t,onChange:e=>{n(e),d(e),l.setFieldsValue({model:[],model_name:void 0})},children:Object.entries(a).map(e=>{let[l,s]=e;return(0,r.jsx)(A.default.Option,{value:l,children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("img",{src:e8[s],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,t=l.parentElement;if(t){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=s.charAt(0),t.replaceChild(e,l)}}}),(0,r.jsx)("span",{children:s})]})},l)})})}),(0,r.jsx)(lO,{selectedProvider:t,providerModels:o,getPlaceholder:c}),(0,r.jsx)(lT,{}),(0,r.jsx)(E.Z.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,r.jsx)(A.default,{style:{width:"100%"},value:j,onChange:e=>f(e),options:lH})}),(0,r.jsxs)(la.Z,{children:[(0,r.jsx)(lr.Z,{span:10}),(0,r.jsx)(lr.Z,{span:10,children:(0,r.jsxs)(S.Z,{className:"mb-5 mt-1",children:[(0,r.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model ",(0,r.jsx)(lW,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(G.default.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,r.jsx)(E.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",children:(0,r.jsx)(A.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,l)=>{var s;return(null!==(s=null==l?void 0:l.label)&&void 0!==s?s:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,r.jsxs)("div",{className:"flex items-center my-4",children:[(0,r.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,r.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,r.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,r.jsx)(E.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.litellm_credential_name!==l.litellm_credential_name||e.provider!==l.provider,children:e=>{let{getFieldValue:l}=e,s=l("litellm_credential_name");return(console.log("\uD83D\uDD11 Credential Name Changed:",s),s)?(0,r.jsx)("div",{className:"text-gray-500 text-sm text-center",children:"Using existing credentials - no additional provider fields needed"}):(0,r.jsx)(lo,{selectedProvider:t,uploadProps:m})}}),(0,r.jsx)(lF,{showAdvancedSettings:u,setShowAdvancedSettings:h,teams:x}),(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(V.Z,{title:"Get help on our github",children:(0,r.jsx)(G.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,r.jsxs)("div",{className:"space-x-2",children:[(0,r.jsx)(L.ZP,{onClick:w,loading:v,children:"Test Connect"}),(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,r.jsx)(O.Z,{title:"Connection Test Results",open:_,onCancel:()=>{y(!1),b(!1)},footer:[(0,r.jsx)(L.ZP,{onClick:()=>{y(!1),b(!1)},children:"Close"},"close")],width:700,children:_&&(0,r.jsx)(lB,{formValues:l.getFieldsValue(),accessToken:g,testMode:j,modelName:l.getFieldValue("model_name")||l.getFieldValue("model"),onClose:()=>{y(!1),b(!1)},onTestComplete:()=>b(!1)},Z)})]})},lY=s(49084);function l$(e){let{data:l=[],columns:s,isLoading:t=!1}=e,[a,n]=i.useState([{id:"model_info.created_at",desc:!0}]),o=(0,eZ.b7)({data:l,columns:s,state:{sorting:a},onSortingChange:n,getCoreRowModel:(0,eN.sC)(),getSortedRowModel:(0,eN.tj)(),enableSorting:!0});return(0,r.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)(ew.Z,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,r.jsx)(eC.Z,{children:o.getHeaderGroups().map(e=>(0,r.jsx)(eA.Z,{children:e.headers.map(e=>(0,r.jsx)(eI.Z,{className:"py-1 h-8 ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),onClick:e.column.getToggleSortingHandler(),children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eZ.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,r.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,r.jsx)(eG.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,r.jsx)(eY.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,r.jsx)(lY.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,r.jsx)(ek.Z,{children:t?(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:s.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):o.getRowModel().rows.length>0?o.getRowModel().rows.map(e=>(0,r.jsx)(eA.Z,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(eS.Z,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),children:(0,eZ.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:s.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:"No models found"})})})})})]})})})}let lX=(e,l,s,t,a,i,n)=>[{header:"Model ID",accessorKey:"model_info.id",cell:e=>{let{row:s}=e,t=s.original;return(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(V.Z,{title:t.model_info.id,children:(0,r.jsxs)(b.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>l(t.model_info.id),children:[t.model_info.id.slice(0,7),"..."]})})})}},{header:"Public Model Name",accessorKey:"model_name",cell:e=>{let{row:l}=e,s=t(l.original)||"-";return(0,r.jsx)(V.Z,{title:s,children:(0,r.jsx)("p",{className:"text-xs",children:s.length>20?s.slice(0,20)+"...":s})})}},{header:"Provider",accessorKey:"provider",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[s.provider&&(0,r.jsx)("img",{src:e7(s.provider).logo,alt:"".concat(s.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.target,t=l.parentElement;if(t){var a;let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=(null===(a=s.provider)||void 0===a?void 0:a.charAt(0))||"-",t.replaceChild(e,l)}}}),(0,r.jsx)("p",{className:"text-xs",children:s.provider||"-"})]})}},{header:"LiteLLM Model Name",accessorKey:"litellm_model_name",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)(V.Z,{title:s.litellm_model_name,children:(0,r.jsx)("pre",{className:"text-xs",children:s.litellm_model_name?s.litellm_model_name.slice(0,20)+(s.litellm_model_name.length>20?"...":""):"-"})})}},{header:"Created At",accessorKey:"model_info.created_at",sortingFn:"datetime",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)("span",{className:"text-xs",children:s.model_info.created_at?new Date(s.model_info.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"model_info.updated_at",sortingFn:"datetime",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)("span",{className:"text-xs",children:s.model_info.updated_at?new Date(s.model_info.updated_at).toLocaleDateString():"-"})}},{header:"Created By",accessorKey:"model_info.created_by",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)("span",{className:"text-xs",children:s.model_info.created_by||"-"})}},{header:()=>(0,r.jsx)(V.Z,{title:"Cost per 1M tokens",children:(0,r.jsx)("span",{children:"Input Cost"})}),accessorKey:"input_cost",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)("pre",{className:"text-xs",children:s.input_cost||"-"})}},{header:()=>(0,r.jsx)(V.Z,{title:"Cost per 1M tokens",children:(0,r.jsx)("span",{children:"Output Cost"})}),accessorKey:"output_cost",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)("pre",{className:"text-xs",children:s.output_cost||"-"})}},{header:"Team ID",accessorKey:"model_info.team_id",cell:e=>{let{row:l}=e,t=l.original;return t.model_info.team_id?(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(V.Z,{title:t.model_info.team_id,children:(0,r.jsxs)(b.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>s(t.model_info.team_id),children:[t.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:"Credentials",accessorKey:"litellm_credential_name",cell:e=>{let{row:l}=e,s=l.original;return s.litellm_params&&s.litellm_params.litellm_credential_name?(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsxs)(V.Z,{title:s.litellm_params.litellm_credential_name,children:[s.litellm_params.litellm_credential_name.slice(0,7),"..."]})}):(0,r.jsx)("span",{className:"text-gray-400",children:"-"})}},{header:"Status",accessorKey:"model_info.db_model",cell:e=>{let{row:l}=e,s=l.original;return(0,r.jsx)("div",{className:"\n inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium\n ".concat(s.model_info.db_model?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-600","\n "),children:s.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:"",cell:e=>{let{row:s}=e,t=s.original;return(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2 pr-4",children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>{l(t.model_info.id),n(!0)}}),(0,r.jsx)(lj.Z,{icon:eV.Z,size:"sm",onClick:()=>{l(t.model_info.id),n(!1)}})]})}}],{Title:lQ,Link:l0}=G.default,l1={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"};var l2=e=>{let{accessToken:l,token:s,userRole:t,userID:n,modelData:o={data:[]},keys:d,setModelData:c,premiumUser:m,teams:u}=e,[h,x]=(0,i.useState)([]),[p]=E.Z.useForm(),[j,f]=(0,i.useState)(null),[_,y]=(0,i.useState)(""),[Z,N]=(0,i.useState)([]);Object.values(a).filter(e=>isNaN(Number(e)));let[w,k]=(0,i.useState)([]),[I,A]=(0,i.useState)(a.OpenAI),[O,T]=(0,i.useState)(""),[L,D]=(0,i.useState)(!1),[F,R]=(0,i.useState)(null),[U,z]=(0,i.useState)([]),[V,q]=(0,i.useState)([]),[K,B]=(0,i.useState)(null),[H,J]=(0,i.useState)([]),[Y,$]=(0,i.useState)([]),[X,Q]=(0,i.useState)([]),[ee,el]=(0,i.useState)([]),[es,et]=(0,i.useState)([]),[ea,er]=(0,i.useState)([]),[ei,en]=(0,i.useState)([]),[eo,ed]=(0,i.useState)([]),[ec,em]=(0,i.useState)([]),[eu,eh]=(0,i.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ex,ep]=(0,i.useState)(null),[eg,ej]=(0,i.useState)(0),[ef,e_]=(0,i.useState)({}),[ey,ev]=(0,i.useState)([]),[eb,eZ]=(0,i.useState)(!1),[eN,eE]=(0,i.useState)(null),[eO,eU]=(0,i.useState)(null),[eV,eq]=(0,i.useState)([]),[eK,eB]=(0,i.useState)([]),[eH,eJ]=(0,i.useState)(!1),[eG,eY]=(0,i.useState)(null),[e$,eX]=(0,i.useState)(!1),[eQ,e0]=(0,i.useState)(null),e1=async(e,s,a)=>{if(console.log("Updating model metrics for group:",e),!l||!n||!t||!s||!a)return;console.log("inside updateModelMetrics - startTime:",s,"endTime:",a),B(e);let r=null==eN?void 0:eN.token;void 0===r&&(r=null);let i=eO;void 0===i&&(i=null),s.setHours(0),s.setMinutes(0),s.setSeconds(0),a.setHours(23),a.setMinutes(59),a.setSeconds(59);try{let o=await (0,g.o6)(l,n,t,e,s.toISOString(),a.toISOString(),r,i);console.log("Model metrics response:",o),$(o.data),Q(o.all_api_bases);let d=await (0,g.Rg)(l,e,s.toISOString(),a.toISOString());el(d.data),et(d.all_api_bases);let c=await (0,g.N8)(l,n,t,e,s.toISOString(),a.toISOString(),r,i);console.log("Model exceptions response:",c),er(c.data),en(c.exception_types);let m=await (0,g.fP)(l,n,t,e,s.toISOString(),a.toISOString(),r,i);if(console.log("slowResponses:",m),em(m),e){let t=await (0,g.n$)(l,null==s?void 0:s.toISOString().split("T")[0],null==a?void 0:a.toISOString().split("T")[0],e);e_(t);let r=await (0,g.v9)(l,null==s?void 0:s.toISOString().split("T")[0],null==a?void 0:a.toISOString().split("T")[0],e);ev(r)}}catch(e){console.error("Failed to fetch model metrics",e)}},e2=async e=>{try{let l=await (0,g.N3)(e);console.log("credentials: ".concat(JSON.stringify(l))),eB(l.credentials)}catch(e){console.error("Error fetching credentials:",e)}};(0,i.useEffect)(()=>{e1(K,eu.from,eu.to)},[eN,eO]);let e4={name:"file",accept:".json",beforeUpload:e=>{if("application/json"===e.type){let l=new FileReader;l.onload=e=>{if(e.target){let l=e.target.result;p.setFieldsValue({vertex_credentials:l})}},l.readAsText(e)}return!1},onChange(e){"uploading"!==e.file.status&&console.log(e.file,e.fileList),"done"===e.file.status?P.ZP.success("".concat(e.file.name," file uploaded successfully")):"error"===e.file.status&&P.ZP.error("".concat(e.file.name," file upload failed."))}},e5=()=>{y(new Date().toLocaleString())},e8=async()=>{if(!l){console.error("Access token is missing");return}console.log("new modelGroupRetryPolicy:",ex);try{await (0,g.K_)(l,{router_settings:{model_group_retry_policy:ex}}),P.ZP.success("Retry settings saved successfully")}catch(e){console.error("Failed to save retry settings:",e),P.ZP.error("Failed to save retry settings")}};if((0,i.useEffect)(()=>{if(!l||!s||!t||!n)return;let e=async()=>{try{var e,s,a,r,i,o,d,m,u,h,x,p;let j=await (0,g.hy)(l);k(j);let f=await (0,g.AZ)(l,n,t);console.log("Model data response:",f.data),c(f);let _=new Set;for(let e=0;e<f.data.length;e++){let l=f.data[e];_.add(l.model_name)}console.log("all_model_groups:",_);let y=Array.from(_);y=y.sort(),z(y),console.log("array_model_groups:",y);let v="all";y.length>0&&(v=y[y.length-1],console.log("_initial_model_group:",v)),console.log("selectedModelGroup:",K);let b=await (0,g.o6)(l,n,t,v,null===(e=eu.from)||void 0===e?void 0:e.toISOString(),null===(s=eu.to)||void 0===s?void 0:s.toISOString(),null==eN?void 0:eN.token,eO);console.log("Model metrics response:",b),$(b.data),Q(b.all_api_bases);let Z=await (0,g.Rg)(l,v,null===(a=eu.from)||void 0===a?void 0:a.toISOString(),null===(r=eu.to)||void 0===r?void 0:r.toISOString());el(Z.data),et(Z.all_api_bases);let N=await (0,g.N8)(l,n,t,v,null===(i=eu.from)||void 0===i?void 0:i.toISOString(),null===(o=eu.to)||void 0===o?void 0:o.toISOString(),null==eN?void 0:eN.token,eO);console.log("Model exceptions response:",N),er(N.data),en(N.exception_types);let w=await (0,g.fP)(l,n,t,v,null===(d=eu.from)||void 0===d?void 0:d.toISOString(),null===(m=eu.to)||void 0===m?void 0:m.toISOString(),null==eN?void 0:eN.token,eO),S=await (0,g.n$)(l,null===(u=eu.from)||void 0===u?void 0:u.toISOString().split("T")[0],null===(h=eu.to)||void 0===h?void 0:h.toISOString().split("T")[0],v);e_(S);let C=await (0,g.v9)(l,null===(x=eu.from)||void 0===x?void 0:x.toISOString().split("T")[0],null===(p=eu.to)||void 0===p?void 0:p.toISOString().split("T")[0],v);ev(C),console.log("dailyExceptions:",S),console.log("dailyExceptionsPerDeplyment:",C),console.log("slowResponses:",w),em(w);let I=await (0,g.j2)(l);eq(null==I?void 0:I.end_users);let A=(await (0,g.BL)(l,n,t)).router_settings;console.log("routerSettingsInfo:",A);let E=A.model_group_retry_policy,P=A.num_retries;console.log("model_group_retry_policy:",E),console.log("default_retries:",P),ep(E),ej(P)}catch(e){console.error("There was an error fetching the model data",e)}};l&&s&&t&&n&&e();let a=async()=>{let e=await (0,g.qm)(l);console.log("received model cost map data: ".concat(Object.keys(e))),f(e)};null==j&&a(),e5()},[l,s,t,n,j,_]),!o||!l||!s||!t||!n)return(0,r.jsx)("div",{children:"Loading..."});let e7=[],ll=[];for(let e=0;e<o.data.length;e++){var lt,la,li;let l=o.data[e],s=null==l?void 0:null===(lt=l.litellm_params)||void 0===lt?void 0:lt.model,t=null==l?void 0:null===(la=l.litellm_params)||void 0===la?void 0:la.custom_llm_provider,a=null==l?void 0:l.model_info,r="",i="Undefined",n="Undefined",d="Undefined",c="Undefined",m={},u=e=>(console.log("GET PROVIDER CALLED! - ".concat(j)),null!=j&&"object"==typeof j&&e in j)?j[e].litellm_provider:"openai";if(s){let e=s.split("/"),l=e[0];(r=t)||(r=1===e.length?u(s):l)}else r="-";a&&(i=null==a?void 0:a.input_cost_per_token,n=null==a?void 0:a.output_cost_per_token,d=null==a?void 0:a.max_tokens,c=null==a?void 0:a.max_input_tokens),(null==l?void 0:l.litellm_params)&&(m=Object.fromEntries(Object.entries(null==l?void 0:l.litellm_params).filter(e=>{let[l]=e;return"model"!==l&&"api_base"!==l}))),o.data[e].provider=r,o.data[e].input_cost=i,o.data[e].output_cost=n,o.data[e].litellm_model_name=s,ll.push(r),o.data[e].input_cost&&(o.data[e].input_cost=(1e6*Number(o.data[e].input_cost)).toFixed(2)),o.data[e].output_cost&&(o.data[e].output_cost=(1e6*Number(o.data[e].output_cost)).toFixed(2)),o.data[e].max_tokens=d,o.data[e].max_input_tokens=c,o.data[e].api_base=null==l?void 0:null===(li=l.litellm_params)||void 0===li?void 0:li.api_base,o.data[e].cleanedLitellmParams=m,e7.push(l.model_name),console.log(o.data[e])}if(t&&"Admin Viewer"==t){let{Title:e,Paragraph:l}=G.default;return(0,r.jsxs)("div",{children:[(0,r.jsx)(e,{level:1,children:"Access Denied"}),(0,r.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}let ln=async()=>{try{P.ZP.info("Running health check..."),T("");let e=await (0,g.EY)(l);T(e)}catch(e){console.error("Error running health check:",e),T("Error running health check")}},lo=(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"mb-1",children:"Select API Key Name"}),m?(0,r.jsxs)("div",{children:[(0,r.jsxs)(eP.Z,{defaultValue:"all-keys",children:[(0,r.jsx)(W.Z,{value:"all-keys",onClick:()=>{eE(null)},children:"All Keys"},"all-keys"),null==d?void 0:d.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,r.jsx)(W.Z,{value:String(l),onClick:()=>{eE(e)},children:e.key_alias},l):null)]}),(0,r.jsx)(S.Z,{className:"mt-1",children:"Select Customer Name"}),(0,r.jsxs)(eP.Z,{defaultValue:"all-customers",children:[(0,r.jsx)(W.Z,{value:"all-customers",onClick:()=>{eU(null)},children:"All Customers"},"all-customers"),null==eV?void 0:eV.map((e,l)=>(0,r.jsx)(W.Z,{value:e,onClick:()=>{eU(e)},children:e},l))]})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)(eP.Z,{defaultValue:"all-keys",children:[(0,r.jsx)(W.Z,{value:"all-keys",onClick:()=>{eE(null)},children:"All Keys"},"all-keys"),null==d?void 0:d.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,r.jsxs)(W.Z,{value:String(l),disabled:!0,onClick:()=>{eE(e)},children:["✨ ",e.key_alias," (Enterprise only Feature)"]},l):null)]}),(0,r.jsx)(S.Z,{className:"mt-1",children:"Select Customer Name"}),(0,r.jsxs)(eP.Z,{defaultValue:"all-customers",children:[(0,r.jsx)(W.Z,{value:"all-customers",onClick:()=>{eU(null)},children:"All Customers"},"all-customers"),null==eV?void 0:eV.map((e,l)=>(0,r.jsxs)(W.Z,{value:e,disabled:!0,onClick:()=>{eU(e)},children:["✨ ",e," (Enterprise only Feature)"]},l))]})]})]}),ld=e=>{var l,s;let{payload:t,active:a}=e;if(!a||!t)return null;let i=null===(s=t[0])||void 0===s?void 0:null===(l=s.payload)||void 0===l?void 0:l.date,n=t.sort((e,l)=>l.value-e.value);if(n.length>5){let e=n.length-5;(n=n.slice(0,5)).push({dataKey:"".concat(e," other deployments"),value:t.slice(5).reduce((e,l)=>e+l.value,0),color:"gray"})}return(0,r.jsxs)("div",{className:"w-150 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[i&&(0,r.jsxs)("p",{className:"text-tremor-content-emphasis mb-2",children:["Date: ",i]}),n.map((e,l)=>{let s=parseFloat(e.value.toFixed(5)),t=0===s&&e.value>0?"<0.00001":s.toFixed(5);return(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"w-2 h-2 mt-1 rounded-full bg-".concat(e.color,"-500")}),(0,r.jsx)("p",{className:"text-tremor-content",children:e.dataKey})]}),(0,r.jsx)("p",{className:"font-medium text-tremor-content-emphasis text-righ ml-2",children:t})]},l)})]})};console.log("selectedProvider: ".concat(I)),console.log("providerModels.length: ".concat(Z.length));let lc=Object.keys(a).find(e=>a[e]===I);return(lc&&w.find(e=>e.name===e6[lc]),eQ)?(0,r.jsx)("div",{className:"w-full h-full",children:(0,r.jsx)(lw,{teamId:eQ,onClose:()=>e0(null),accessToken:l,is_team_admin:"Admin"===t,is_proxy_admin:"Proxy Admin"===t,userModels:e7,editTeam:!1})}):(0,r.jsx)("div",{style:{width:"100%",height:"100%"},children:eG?(0,r.jsx)(lE,{modelId:eG,editModel:!0,onClose:()=>{eY(null),eX(!1)},modelData:o.data.find(e=>e.model_info.id===eG),accessToken:l,userID:n,userRole:t,setEditModalVisible:D,setSelectedModel:R,onModelUpdate:e=>{c({...o,data:o.data.map(l=>l.model_info.id===e.model_info.id?e:l)}),e5()}}):(0,r.jsxs)(eM.Z,{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,r.jsxs)(eD.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(eL.Z,{children:"All Models"}),(0,r.jsx)(eL.Z,{children:"Add Model"}),(0,r.jsx)(eL.Z,{children:"LLM Credentials"}),(0,r.jsx)(eL.Z,{children:(0,r.jsx)("pre",{children:"/health Models"})}),(0,r.jsx)(eL.Z,{children:"Model Analytics"}),(0,r.jsx)(eL.Z,{children:"Model Retry Settings"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[_&&(0,r.jsxs)(S.Z,{children:["Last Refreshed: ",_]}),(0,r.jsx)(lj.Z,{icon:ez.Z,variant:"shadow",size:"xs",className:"self-center",onClick:e5})]})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)(v.Z,{children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(S.Z,{children:"Filter by Public Model Name"}),(0,r.jsxs)(eP.Z,{className:"mb-4 mt-2 ml-2 w-50",defaultValue:K||void 0,onValueChange:e=>B("all"===e?"all":e),value:K||void 0,children:[(0,r.jsx)(W.Z,{value:"all",children:"All Models"}),U.map((e,l)=>(0,r.jsx)(W.Z,{value:e,onClick:()=>B(e),children:e},l))]})]}),(0,r.jsx)(l$,{columns:lX(m,eY,e0,lh,e=>{R(e),D(!0)},e5,eX),data:o.data.filter(e=>"all"===K||e.model_name===K||!K),isLoading:!1})]}),(0,r.jsx)(lp,{visible:L,onCancel:()=>{D(!1),R(null)},model:F,onSubmit:e=>lx(e,l,D,R)})]}),(0,r.jsx)(eF.Z,{className:"h-full",children:(0,r.jsx)(lG,{form:p,handleOk:()=>{p.validateFields().then(e=>{ls(e,l,p,e5)}).catch(e=>{console.error("Validation failed:",e)})},selectedProvider:I,setSelectedProvider:A,providerModels:Z,setProviderModelsFn:e=>{let l=le(e,j);N(l),console.log("providerModels: ".concat(l))},getPlaceholder:e9,uploadProps:e4,showAdvancedSettings:eH,setShowAdvancedSettings:eJ,teams:u,credentials:eK,accessToken:l})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(lu,{accessToken:l,uploadProps:e4,credentialList:eK,fetchCredentials:e2})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"`/health` will run a very small request through your models configured on litellm"}),(0,r.jsx)(b.Z,{onClick:ln,children:"Run `/health`"}),O&&(0,r.jsx)("pre",{children:JSON.stringify(O,null,2)})]})}),(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)(v.Z,{numItems:4,className:"mt-2 mb-2",children:[(0,r.jsxs)(lr.Z,{children:[(0,r.jsx)(S.Z,{children:"Select Time Range"}),(0,r.jsx)(lg.Z,{enableSelect:!0,value:eu,className:"mr-2",onValueChange:e=>{eh(e),e1(K,e.from,e.to)}})]}),(0,r.jsxs)(lr.Z,{className:"ml-2",children:[(0,r.jsx)(S.Z,{children:"Select Model Group"}),(0,r.jsx)(eP.Z,{defaultValue:K||U[0],value:K||U[0],children:U.map((e,l)=>(0,r.jsx)(W.Z,{value:e,onClick:()=>e1(e,eu.from,eu.to),children:e},l))})]}),(0,r.jsx)(lr.Z,{children:(0,r.jsx)(ly.Z,{trigger:"click",content:lo,overlayStyle:{width:"20vw"},children:(0,r.jsx)(b.Z,{icon:eW.Z,size:"md",variant:"secondary",className:"mt-4 ml-2",style:{border:"none"},onClick:()=>eZ(!0)})})})]}),(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsx)(lr.Z,{children:(0,r.jsx)(eT.Z,{className:"mr-2 max-h-[400px] min-h-[400px]",children:(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{variant:"line",defaultValue:"1",children:[(0,r.jsx)(eL.Z,{value:"1",children:"Avg. Latency per Token"}),(0,r.jsx)(eL.Z,{value:"2",children:"Time to first token"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsxs)(eF.Z,{children:[(0,r.jsx)("p",{className:"text-gray-500 italic",children:" (seconds/token)"}),(0,r.jsx)(S.Z,{className:"text-gray-500 italic mt-1 mb-1",children:"average Latency for successfull requests divided by the total tokens"}),Y&&X&&(0,r.jsx)(lf.Z,{title:"Model Latency",className:"h-72",data:Y,showLegend:!1,index:"date",categories:X,connectNulls:!0,customTooltip:ld})]}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(lb,{modelMetrics:ee,modelMetricsCategories:es,customTooltip:ld,premiumUser:m})})]})]})})}),(0,r.jsx)(lr.Z,{children:(0,r.jsx)(eT.Z,{className:"ml-2 max-h-[400px] min-h-[400px] overflow-y-auto",children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Deployment"}),(0,r.jsx)(eI.Z,{children:"Success Responses"}),(0,r.jsxs)(eI.Z,{children:["Slow Responses ",(0,r.jsx)("p",{children:"Success Responses taking 600+s"})]})]})}),(0,r.jsx)(ek.Z,{children:ec.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e.api_base}),(0,r.jsx)(eS.Z,{children:e.total_count}),(0,r.jsx)(eS.Z,{children:e.slow_count})]},l))})]})})})]}),(0,r.jsx)(v.Z,{numItems:1,className:"gap-2 w-full mt-2",children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)(C.Z,{children:["All Exceptions for ",K]}),(0,r.jsx)(l_.Z,{className:"h-60",data:ea,index:"model",categories:ei,stack:!0,yAxisWidth:30})]})}),(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 w-full mt-2",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)(C.Z,{children:["All Up Rate Limit Errors (429) for ",K]}),(0,r.jsxs)(v.Z,{numItems:1,children:[(0,r.jsxs)(lr.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors ",ef.sum_num_rate_limit_exceptions]}),(0,r.jsx)(l_.Z,{className:"h-40",data:ef.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]}),(0,r.jsx)(lr.Z,{})]})]}),m?(0,r.jsx)(r.Fragment,{children:ey.map((e,l)=>(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:e.api_base?e.api_base:"Unknown API Base"}),(0,r.jsx)(v.Z,{numItems:1,children:(0,r.jsxs)(lr.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors (429) ",e.sum_num_rate_limit_exceptions]}),(0,r.jsx)(l_.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]})})]},l))}):(0,r.jsx)(r.Fragment,{children:ey&&ey.length>0&&ey.slice(0,1).map((e,l)=>(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:"✨ Rate Limit Errors by Deployment"}),(0,r.jsx)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:"Upgrade to see exceptions for all deployments"}),(0,r.jsx)(b.Z,{variant:"primary",className:"mb-2",children:(0,r.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:e.api_base}),(0,r.jsx)(v.Z,{numItems:1,children:(0,r.jsxs)(lr.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors ",e.sum_num_rate_limit_exceptions]}),(0,r.jsx)(l_.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]})})]})]},l))})]})]}),(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(S.Z,{children:"Filter by Public Model Name"}),(0,r.jsx)(eP.Z,{className:"mb-4 mt-2 ml-2 w-50",defaultValue:K||U[0],value:K||U[0],onValueChange:e=>B(e),children:U.map((e,l)=>(0,r.jsx)(W.Z,{value:e,onClick:()=>B(e),children:e},l))})]}),(0,r.jsxs)(C.Z,{children:["Retry Policy for ",K]}),(0,r.jsx)(S.Z,{className:"mb-6",children:"How many retries should be attempted based on the Exception"}),l1&&(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:Object.entries(l1).map((e,l)=>{var s;let[t,a]=e,i=null==ex?void 0:null===(s=ex[K])||void 0===s?void 0:s[a];return null==i&&(i=eg),(0,r.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,r.jsx)("td",{children:(0,r.jsx)(S.Z,{children:t})}),(0,r.jsx)("td",{children:(0,r.jsx)(M.Z,{className:"ml-5",value:i,min:0,step:1,onChange:e=>{ep(l=>{var s;let t=null!==(s=null==l?void 0:l[K])&&void 0!==s?s:{};return{...null!=l?l:{},[K]:{...t,[a]:e}}})}})})]},l)})})}),(0,r.jsx)(b.Z,{className:"mt-6 mr-8",onClick:e8,children:"Save"})]})]})]})})},l4=e=>{let{visible:l,possibleUIRoles:s,onCancel:t,user:a,onSubmit:n}=e,[o,d]=(0,i.useState)(a),[c]=E.Z.useForm();(0,i.useEffect)(()=>{c.resetFields()},[a]);let m=async()=>{c.resetFields(),t()},u=async e=>{n(e),c.resetFields(),t()};return a?(0,r.jsx)(O.Z,{visible:l,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,r.jsx)(E.Z,{form:c,onFinish:u,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"User Role",name:"user_role",children:(0,r.jsx)(A.default,{children:s&&Object.entries(s).map(e=>{let[l,{ui_label:s,description:t}]=e;return(0,r.jsx)(W.Z,{value:l,title:s,children:(0,r.jsxs)("div",{className:"flex",children:[s," ",(0,r.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:t})]})},l)})})}),(0,r.jsx)(E.Z.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)(E.Z.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,r.jsx)(M.Z,{min:0,step:1})}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Save"})})]})})}):null},l5=s(15731);let l3=(e,l,s)=>[{header:"User ID",accessorKey:"user_id",cell:e=>{let{row:l}=e;return(0,r.jsx)(V.Z,{title:l.original.user_id,children:(0,r.jsx)("span",{className:"text-xs",children:l.original.user_id?"".concat(l.original.user_id.slice(0,7),"..."):"-"})})}},{header:"User Email",accessorKey:"user_email",cell:e=>{let{row:l}=e;return(0,r.jsx)("span",{className:"text-xs",children:l.original.user_email||"-"})}},{header:"Global Proxy Role",accessorKey:"user_role",cell:l=>{var s;let{row:t}=l;return(0,r.jsx)("span",{className:"text-xs",children:(null==e?void 0:null===(s=e[t.original.user_role])||void 0===s?void 0:s.ui_label)||"-"})}},{header:"User Spend ($ USD)",accessorKey:"spend",cell:e=>{let{row:l}=e;return(0,r.jsx)("span",{className:"text-xs",children:l.original.spend?l.original.spend.toFixed(2):"-"})}},{header:"User Max Budget ($ USD)",accessorKey:"max_budget",cell:e=>{let{row:l}=e;return(0,r.jsx)("span",{className:"text-xs",children:null!==l.original.max_budget?l.original.max_budget:"Unlimited"})}},{header:()=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{children:"SSO ID"}),(0,r.jsx)(V.Z,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,r.jsx)(l5.Z,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",cell:e=>{let{row:l}=e;return(0,r.jsx)("span",{className:"text-xs",children:null!==l.original.sso_user_id?l.original.sso_user_id:"-"})}},{header:"API Keys",accessorKey:"key_count",cell:e=>{let{row:l}=e;return(0,r.jsx)(v.Z,{numItems:2,children:l.original.key_count>0?(0,r.jsxs)(eO.Z,{size:"xs",color:"indigo",children:[l.original.key_count," Keys"]}):(0,r.jsx)(eO.Z,{size:"xs",color:"gray",children:"No Keys"})})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:l}=e;return(0,r.jsx)("span",{className:"text-xs",children:l.original.created_at?new Date(l.original.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:l}=e;return(0,r.jsx)("span",{className:"text-xs",children:l.original.updated_at?new Date(l.original.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"",cell:e=>{let{row:t}=e;return(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>l(t.original)}),(0,r.jsx)(lj.Z,{icon:eV.Z,size:"sm",onClick:()=>s(t.original.user_id)})]})}}];function l6(e){let{data:l=[],columns:s,isLoading:t=!1}=e,[a,n]=i.useState([{id:"created_at",desc:!0}]),o=(0,eZ.b7)({data:l,columns:s,state:{sorting:a},onSortingChange:n,getCoreRowModel:(0,eN.sC)(),getSortedRowModel:(0,eN.tj)(),enableSorting:!0});return(0,r.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)(ew.Z,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,r.jsx)(eC.Z,{children:o.getHeaderGroups().map(e=>(0,r.jsx)(eA.Z,{children:e.headers.map(e=>(0,r.jsx)(eI.Z,{className:"py-1 h-8 ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),onClick:e.column.getToggleSortingHandler(),children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eZ.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,r.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,r.jsx)(eG.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,r.jsx)(eY.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,r.jsx)(lY.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,r.jsx)(ek.Z,{children:t?(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:s.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:"\uD83D\uDE85 Loading users..."})})})}):l.length>0?o.getRowModel().rows.map(e=>(0,r.jsx)(eA.Z,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(eS.Z,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),children:(0,eZ.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:s.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:"No users found"})})})})})]})})})}var l8=s(67982),l7=e=>{var l;let{accessToken:s,possibleUIRoles:t,userID:a,userRole:n}=e,[o,d]=(0,i.useState)(!0),[c,m]=(0,i.useState)(null),[u,h]=(0,i.useState)(!1),[x,p]=(0,i.useState)({}),[j,f]=(0,i.useState)(!1),[_,y]=(0,i.useState)([]),{Paragraph:v}=G.default,{Option:N}=A.default;(0,i.useEffect)(()=>{(async()=>{if(!s){d(!1);return}try{let e=await (0,g.NL)(s);if(m(e),p(e.values||{}),s)try{let e=await (0,g.So)(s,a,n);if(e&&e.data){let l=e.data.map(e=>e.id);y(l)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),P.ZP.error("Failed to fetch SSO settings")}finally{d(!1)}})()},[s]);let w=async()=>{if(s){f(!0);try{let e=await (0,g.nd)(s,x);m({...c,values:e.settings}),h(!1)}catch(e){console.error("Error updating SSO settings:",e),P.ZP.error("Failed to update settings")}finally{f(!1)}}},k=(e,l)=>{p(s=>({...s,[e]:l}))},C=(e,l,s)=>{var a;let i=l.type;return"user_role"===e&&t?(0,r.jsx)(A.default,{style:{width:"100%"},value:x[e]||"",onChange:l=>k(e,l),className:"mt-2",children:Object.entries(t).filter(e=>{let[l]=e;return l.includes("internal_user")}).map(e=>{let[l,{ui_label:s,description:t}]=e;return(0,r.jsx)(N,{value:l,children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{children:s}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:t})]})},l)})}):"budget_duration"===e?(0,r.jsx)(ep,{value:x[e]||null,onChange:l=>k(e,l),className:"mt-2"}):"boolean"===i?(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(lL.Z,{checked:!!x[e],onChange:l=>k(e,l)})}):"array"===i&&(null===(a=l.items)||void 0===a?void 0:a.enum)?(0,r.jsx)(A.default,{mode:"multiple",style:{width:"100%"},value:x[e]||[],onChange:l=>k(e,l),className:"mt-2",children:l.items.enum.map(e=>(0,r.jsx)(N,{value:e,children:e},e))}):"models"===e?(0,r.jsx)(A.default,{mode:"multiple",style:{width:"100%"},value:x[e]||[],onChange:l=>k(e,l),className:"mt-2",children:_.map(e=>(0,r.jsx)(N,{value:e,children:R(e)},e))}):"string"===i&&l.enum?(0,r.jsx)(A.default,{style:{width:"100%"},value:x[e]||"",onChange:l=>k(e,l),className:"mt-2",children:l.enum.map(e=>(0,r.jsx)(N,{value:e,children:e},e))}):(0,r.jsx)(Z.Z,{value:void 0!==x[e]?String(x[e]):"",onChange:l=>k(e,l.target.value),placeholder:l.description||"",className:"mt-2"})},I=(e,l)=>{if(null==l)return(0,r.jsx)("span",{className:"text-gray-400",children:"Not set"});if("user_role"===e&&t&&t[l]){let{ui_label:e,description:s}=t[l];return(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-medium",children:e}),s&&(0,r.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:s})]})}return"budget_duration"===e?(0,r.jsx)("span",{children:ex(l)}):"boolean"==typeof l?(0,r.jsx)("span",{children:l?"Enabled":"Disabled"}):"models"===e&&Array.isArray(l)?0===l.length?(0,r.jsx)("span",{className:"text-gray-400",children:"None"}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,l)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:R(e)},l))}):"object"==typeof l?Array.isArray(l)?0===l.length?(0,r.jsx)("span",{className:"text-gray-400",children:"None"}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,l)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},l))}):(0,r.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)}):(0,r.jsx)("span",{children:String(l)})};return o?(0,r.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,r.jsx)(eH.Z,{size:"large"})}):c?(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)("div",{className:"flex justify-end items-center mb-4",children:!o&&c&&(u?(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(b.Z,{variant:"secondary",onClick:()=>{h(!1),p(c.values||{})},disabled:j,children:"Cancel"}),(0,r.jsx)(b.Z,{onClick:w,loading:j,children:"Save Changes"})]}):(0,r.jsx)(b.Z,{onClick:()=>h(!0),children:"Edit Settings"}))}),(null==c?void 0:null===(l=c.schema)||void 0===l?void 0:l.description)&&(0,r.jsx)(v,{className:"mb-4",children:c.schema.description}),(0,r.jsx)(l8.Z,{}),(0,r.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,schema:l}=c;return l&&l.properties?Object.entries(l.properties).map(l=>{let[s,t]=l,a=e[s],i=s.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,r.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,r.jsx)(S.Z,{className:"font-medium text-lg",children:i}),(0,r.jsx)(v,{className:"text-sm text-gray-500 mt-1",children:t.description||"No description available"}),u?(0,r.jsx)("div",{className:"mt-2",children:C(s,t,a)}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:I(s,a)})]},s)}):(0,r.jsx)(S.Z,{children:"No schema information available"})})()})]}):(0,r.jsx)(eT.Z,{children:(0,r.jsx)(S.Z,{children:"No settings available or you do not have permission to view them."})})};console.log=function(){};var l9=e=>{let{accessToken:l,token:s,keys:t,userRole:a,userID:n,teams:o,setKeys:d}=e,[c,m]=(0,i.useState)(null),[u,h]=(0,i.useState)(null),[x,p]=(0,i.useState)(null),[j,f]=(0,i.useState)(1),[_,y]=i.useState(null),[v,Z]=(0,i.useState)(null),[N,w]=(0,i.useState)(!1),[k,S]=(0,i.useState)(null),[C,I]=(0,i.useState)(!1),[A,E]=(0,i.useState)(null),[O,T]=(0,i.useState)({}),[L,M]=(0,i.useState)(""),[D,F]=(0,i.useState)("users");window.addEventListener("beforeunload",function(){sessionStorage.clear()});let R=async()=>{if(A&&l)try{if(await (0,g.Eb)(l,[A]),P.ZP.success("User deleted successfully"),u){let e=u.filter(e=>e.user_id!==A);h(e)}}catch(e){console.error("Error deleting user:",e),P.ZP.error("Failed to delete user")}I(!1),E(null)},U=async()=>{S(null),w(!1)},z=async e=>{if(console.log("inside handleEditSubmit:",e),l&&s&&a&&n){try{await (0,g.pf)(l,e,null),P.ZP.success("User ".concat(e.user_id," updated successfully"))}catch(e){console.error("There was an error updating the user",e)}u&&h(u.map(l=>l.user_id===e.user_id?e:l)),S(null),w(!1)}};if((0,i.useEffect)(()=>{if(!l||!s||!a||!n)return;let e=async()=>{try{let e=sessionStorage.getItem("userList_".concat(j));if(e){let l=JSON.parse(e);m(l),h(l.users||[])}else{let e=await (0,g.Br)(l,null,a,!0,j,25);sessionStorage.setItem("userList_".concat(j),JSON.stringify(e)),m(e),h(e.users||[])}let s=sessionStorage.getItem("possibleUserRoles");if(s)T(JSON.parse(s));else{let e=await (0,g.lg)(l);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),T(e)}}catch(e){console.error("There was an error fetching the model data",e)}};l&&s&&a&&n&&e()},[l,s,a,n,j]),!u||!l||!s||!a||!n)return(0,r.jsx)("div",{children:"Loading..."});let V=l3(O,e=>{S(e),w(!0)},e=>{E(e),I(!0)});return(0,r.jsxs)("div",{className:"w-full p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h1",{className:"text-xl font-semibold",children:"Users"}),(0,r.jsx)("div",{className:"flex space-x-3",children:(0,r.jsx)(en,{userID:n,accessToken:l,teams:o,possibleUIRoles:O})})]}),(0,r.jsxs)(eM.Z,{defaultIndex:0,onIndexChange:e=>F(0===e?"users":"settings"),children:[(0,r.jsxs)(eD.Z,{className:"mb-4",children:[(0,r.jsx)(eL.Z,{children:"Users"}),(0,r.jsx)(eL.Z,{children:"Default User Settings"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsx)("div",{className:"border-b px-6 py-4",children:(0,r.jsx)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",c&&c.users&&c.users.length>0?(c.page-1)*c.page_size+1:0," ","-"," ",c&&c.users?Math.min(c.page*c.page_size,c.total):0," ","of ",c?c.total:0," results"]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("button",{onClick:()=>f(e=>Math.max(1,e-1)),disabled:!c||j<=1,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",c?c.page:"-"," of"," ",c?c.total_pages:"-"]}),(0,r.jsx)("button",{onClick:()=>f(e=>e+1),disabled:!c||j>=c.total_pages,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})})}),(0,r.jsx)(l6,{data:u||[],columns:V,isLoading:!u})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(l7,{accessToken:l,possibleUIRoles:O,userID:n,userRole:a})})]})]}),(0,r.jsx)(l4,{visible:N,possibleUIRoles:O,onCancel:U,user:k,onSubmit:z}),C&&(0,r.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,r.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,r.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,r.jsx)("div",{className:"sm:flex sm:items-start",children:(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete User"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this user?"}),(0,r.jsxs)("p",{className:"text-sm font-medium text-gray-900 mt-2",children:["User ID: ",A]})]})]})})}),(0,r.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,r.jsx)(b.Z,{onClick:R,color:"red",className:"ml-2",children:"Delete"}),(0,r.jsx)(b.Z,{onClick:()=>{I(!1),E(null)},children:"Cancel"})]})]})]})})]})},se=e=>{let{accessToken:l,userID:s}=e,[t,a]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(l&&s)try{let e=await (0,g.a6)(l);a(e)}catch(e){console.error("Error fetching available teams:",e)}})()},[l,s]);let n=async e=>{if(l&&s)try{await (0,g.cu)(l,e,{user_id:s,role:"user"}),P.ZP.success("Successfully joined team"),a(l=>l.filter(l=>l.team_id!==e))}catch(e){console.error("Error joining team:",e),P.ZP.error("Failed to join team")}};return(0,r.jsx)(eT.Z,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Team Name"}),(0,r.jsx)(eI.Z,{children:"Description"}),(0,r.jsx)(eI.Z,{children:"Members"}),(0,r.jsx)(eI.Z,{children:"Models"}),(0,r.jsx)(eI.Z,{children:"Actions"})]})}),(0,r.jsxs)(ek.Z,{children:[t.map(e=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{children:e.team_alias})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{children:e.description||"No description available"})}),(0,r.jsx)(eS.Z,{children:(0,r.jsxs)(S.Z,{children:[e.members_with_roles.length," members"]})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"blue",children:(0,r.jsx)(S.Z,{children:e.length>30?"".concat(e.slice(0,30),"..."):e})},l)):(0,r.jsx)(eO.Z,{size:"xs",color:"red",children:(0,r.jsx)(S.Z,{children:"All Proxy Models"})})})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(b.Z,{size:"xs",variant:"secondary",onClick:()=>n(e.team_id),children:"Join Team"})})]},e.team_id)),0===t.length&&(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:5,className:"text-center",children:(0,r.jsx)(S.Z,{children:"No available teams to join"})})})]})]})})};console.log=function(){};let sl=(e,l)=>{let s=[];return e&&e.models.length>0?(console.log("organization.models: ".concat(e.models)),s=e.models):s=l,U(s,l)};var ss=e=>{let{teams:l,searchParams:s,accessToken:t,setTeams:a,userID:n,userRole:o,organizations:d}=e,[c,m]=(0,i.useState)(""),[u,h]=(0,i.useState)(null),[x,p]=(0,i.useState)(null);(0,i.useEffect)(()=>{console.log("inside useeffect - ".concat(c)),t&&_(t,n,o,u,a),e_()},[c]);let[j]=E.Z.useForm(),[f]=E.Z.useForm(),{Title:C,Paragraph:I}=G.default,[T,U]=(0,i.useState)(""),[q,K]=(0,i.useState)(!1),[B,H]=(0,i.useState)(null),[J,W]=(0,i.useState)(null),[Y,$]=(0,i.useState)(!1),[X,Q]=(0,i.useState)(!1),[ee,el]=(0,i.useState)(!1),[es,et]=(0,i.useState)(!1),[ea,er]=(0,i.useState)([]),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(null),[ec,em]=(0,i.useState)([]),[eu,eh]=(0,i.useState)({}),[ex,ep]=(0,i.useState)([]);(0,i.useEffect)(()=>{console.log("currentOrgForCreateTeam: ".concat(x));let e=sl(x,ea);console.log("models: ".concat(e)),em(e),j.setFieldValue("models",[])},[x,ea]),(0,i.useEffect)(()=>{(async()=>{try{if(null==t)return;let e=(await (0,g.t3)(t)).guardrails.map(e=>e.guardrail_name);ep(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[t]);let eg=async e=>{ed(e),en(!0)},ej=async()=>{if(null!=eo&&null!=l&&null!=t){try{await (0,g.rs)(t,eo),_(t,n,o,u,a)}catch(e){console.error("Error deleting the team:",e)}en(!1),ed(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===n||null===o||null===t)return;let e=await F(n,o,t);e&&er(e)}catch(e){console.error("Error fetching user models:",e)}})()},[t,n,o,l]);let ef=async e=>{try{if(console.log("formValues: ".concat(JSON.stringify(e))),null!=t){var s;let r=null==e?void 0:e.team_alias,i=null!==(s=null==l?void 0:l.map(e=>e.team_alias))&&void 0!==s?s:[],n=(null==e?void 0:e.organization_id)||(null==u?void 0:u.organization_id);if(""===n||"string"!=typeof n?e.organization_id=null:e.organization_id=n.trim(),i.includes(r))throw Error("Team alias ".concat(r," already exists, please pick another alias"));P.ZP.info("Creating Team");let o=await (0,g.hT)(t,e);null!==l?a([...l,o]):a([o]),console.log("response for team create call: ".concat(o)),P.ZP.success("Team created"),j.resetFields(),Q(!1)}}catch(e){console.error("Error creating the team:",e),P.ZP.error("Error creating the team: "+e,20)}},e_=()=>{m(new Date().toLocaleString())};return(0,r.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:J?(0,r.jsx)(lw,{teamId:J,onClose:()=>{W(null),$(!1)},accessToken:t,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let l=0;l<e.members_with_roles.length;l++){let s=e.members_with_roles[l];if(s.user_id==n&&"admin"==s.role)return!0}return!1})(null==l?void 0:l.find(e=>e.team_id===J)),is_proxy_admin:"Admin"==o,userModels:ea,editTeam:Y}):(0,r.jsxs)(eM.Z,{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,r.jsxs)(eD.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(eL.Z,{children:"Your Teams"}),(0,r.jsx)(eL.Z,{children:"Available Teams"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[c&&(0,r.jsxs)(S.Z,{children:["Last Refreshed: ",c]}),(0,r.jsx)(lj.Z,{icon:ez.Z,variant:"shadow",size:"xs",className:"self-center",onClick:e_})]})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)(S.Z,{children:["Click on “Team ID” to view team details ",(0,r.jsx)("b",{children:"and"})," manage team members."]}),(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:[(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)(eT.Z,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Team Name"}),(0,r.jsx)(eI.Z,{children:"Team ID"}),(0,r.jsx)(eI.Z,{children:"Created"}),(0,r.jsx)(eI.Z,{children:"Spend (USD)"}),(0,r.jsx)(eI.Z,{children:"Budget (USD)"}),(0,r.jsx)(eI.Z,{children:"Models"}),(0,r.jsx)(eI.Z,{children:"Organization"}),(0,r.jsx)(eI.Z,{children:"Info"})]})}),(0,r.jsx)(ek.Z,{children:l&&l.length>0?l.filter(e=>!u||e.organization_id===u.organization_id).sort((e,l)=>new Date(l.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(V.Z,{title:e.team_id,children:(0,r.jsxs)(b.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>{W(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,r.jsx)(eS.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,r.jsx)(eS.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.spend}),(0,r.jsx)(eS.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:null!==e.max_budget&&void 0!==e.max_budget?e.max_budget:"No limit"}),(0,r.jsx)(eS.Z,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},children:Array.isArray(e.models)?(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:0===e.models.length?(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"red",children:(0,r.jsx)(S.Z,{children:"All Proxy Models"})}):e.models.map((e,l)=>"all-proxy-models"===e?(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"red",children:(0,r.jsx)(S.Z,{children:"All Proxy Models"})},l):(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"blue",children:(0,r.jsx)(S.Z,{children:e.length>30?"".concat(R(e).slice(0,30),"..."):R(e)})},l))}):null}),(0,r.jsx)(eS.Z,{children:e.organization_id}),(0,r.jsxs)(eS.Z,{children:[(0,r.jsxs)(S.Z,{children:[eu&&e.team_id&&eu[e.team_id]&&eu[e.team_id].keys&&eu[e.team_id].keys.length," ","Keys"]}),(0,r.jsxs)(S.Z,{children:[eu&&e.team_id&&eu[e.team_id]&&eu[e.team_id].members_with_roles&&eu[e.team_id].members_with_roles.length," ","Members"]})]}),(0,r.jsx)(eS.Z,{children:"Admin"==o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>{W(e.team_id),$(!0)}}),(0,r.jsx)(lj.Z,{onClick:()=>eg(e.team_id),icon:eV.Z,size:"sm"})]}):null})]},e.team_id)):null})]}),ei&&(0,r.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,r.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,r.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,r.jsx)("div",{className:"sm:flex sm:items-start",children:(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Team"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this team ?"})})]})})}),(0,r.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,r.jsx)(b.Z,{onClick:ej,color:"red",className:"ml-2",children:"Delete"}),(0,r.jsx)(b.Z,{onClick:()=>{en(!1),ed(null)},children:"Cancel"})]})]})]})})]})}),"Admin"==o||"Org Admin"==o?(0,r.jsxs)(y.Z,{numColSpan:1,children:[(0,r.jsx)(b.Z,{className:"mx-auto",onClick:()=>Q(!0),children:"+ Create New Team"}),(0,r.jsx)(O.Z,{title:"Create Team",visible:X,width:800,footer:null,onOk:()=>{Q(!1),j.resetFields()},onCancel:()=>{Q(!1),j.resetFields()},children:(0,r.jsxs)(E.Z,{form:j,onFinish:ef,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Organization"," ",(0,r.jsx)(V.Z,{title:(0,r.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:u?u.organization_id:null,className:"mt-8",children:(0,r.jsx)(A.default,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{j.setFieldValue("organization_id",e),p((null==d?void 0:d.find(l=>l.organization_id===e))||null)},filterOption:(e,l)=>{var s;return!!l&&((null===(s=l.children)||void 0===s?void 0:s.toString())||"").toLowerCase().includes(e.toLowerCase())},optionFilterProp:"children",children:null==d?void 0:d.map(e=>(0,r.jsxs)(A.default.Option,{value:e.organization_id,children:[(0,r.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,r.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Models"," ",(0,r.jsx)(V.Z,{title:"These are the models that your selected organization has access to",children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,r.jsx)(A.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),ec.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:R(e)},e))]})}),(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(A.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(A.default.Option,{value:"30d",children:"monthly"})]})}),(0,r.jsx)(E.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,r.jsx)(M.Z,{step:1,width:400})}),(0,r.jsx)(E.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,r.jsx)(M.Z,{step:1,width:400})}),(0,r.jsxs)(N.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(k.Z,{children:(0,r.jsx)("b",{children:"Additional Settings"})}),(0,r.jsxs)(w.Z,{children:[(0,r.jsx)(E.Z.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,r.jsx)(Z.Z,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,r.jsx)(D.Z.TextArea,{rows:4})}),(0,r.jsx)(E.Z.Item,{label:(0,r.jsxs)("span",{children:["Guardrails"," ",(0,r.jsx)(V.Z,{title:"Setup your first guardrail",children:(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,r.jsx)(z.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,r.jsx)(A.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:ex.map(e=>({value:e,label:e}))})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Create Team"})})]})})]}):null]})]}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(se,{accessToken:t,userID:n})})]})]})})},st=e=>{var l;let{organizationId:s,onClose:t,accessToken:a,is_org_admin:n,is_proxy_admin:o,userModels:d,editOrg:c}=e,[m,u]=(0,i.useState)(null),[h,x]=(0,i.useState)(!0),[p]=E.Z.useForm(),[j,f]=(0,i.useState)(!1),[_,y]=(0,i.useState)(!1),[Z,N]=(0,i.useState)(!1),[w,k]=(0,i.useState)(null),I=n||o,O=async()=>{try{if(x(!0),!a)return;let e=await (0,g.t$)(a,s);u(e)}catch(e){P.ZP.error("Failed to load organization information"),console.error("Error fetching organization info:",e)}finally{x(!1)}};(0,i.useEffect)(()=>{O()},[s,a]);let T=async e=>{try{if(null==a)return;let l={user_email:e.user_email,user_id:e.user_id,role:e.role};await (0,g.vh)(a,s,l),P.ZP.success("Organization member added successfully"),y(!1),p.resetFields(),O()}catch(e){P.ZP.error("Failed to add organization member"),console.error("Error adding organization member:",e)}},F=async e=>{try{if(!a)return;let l={user_email:e.user_email,user_id:e.user_id,role:e.role};await (0,g.LY)(a,s,l),P.ZP.success("Organization member updated successfully"),N(!1),p.resetFields(),O()}catch(e){P.ZP.error("Failed to update organization member"),console.error("Error updating organization member:",e)}},U=async e=>{try{if(!a)return;await (0,g.Sb)(a,s,e.user_id),P.ZP.success("Organization member deleted successfully"),N(!1),p.resetFields(),O()}catch(e){P.ZP.error("Failed to delete organization member"),console.error("Error deleting organization member:",e)}},z=async e=>{try{if(!a)return;let l={organization_id:s,organization_alias:e.organization_alias,models:e.models,litellm_budget_table:{tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,max_budget:e.max_budget,budget_duration:e.budget_duration},metadata:e.metadata?JSON.parse(e.metadata):null};await (0,g.VA)(a,l),P.ZP.success("Organization settings updated successfully"),f(!1),O()}catch(e){P.ZP.error("Failed to update organization settings"),console.error("Error updating organization:",e)}};return h?(0,r.jsx)("div",{className:"p-4",children:"Loading..."}):m?(0,r.jsxs)("div",{className:"w-full h-screen p-4 bg-white",children:[(0,r.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(L.ZP,{onClick:t,className:"mb-4",children:"← Back"}),(0,r.jsx)(C.Z,{children:m.organization_alias}),(0,r.jsx)(S.Z,{className:"text-gray-500 font-mono",children:m.organization_id})]})}),(0,r.jsxs)(eM.Z,{defaultIndex:c?2:0,children:[(0,r.jsxs)(eD.Z,{className:"mb-4",children:[(0,r.jsx)(eL.Z,{children:"Overview"}),(0,r.jsx)(eL.Z,{children:"Members"}),(0,r.jsx)(eL.Z,{children:"Settings"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Organization Details"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(S.Z,{children:["Created: ",new Date(m.created_at).toLocaleDateString()]}),(0,r.jsxs)(S.Z,{children:["Updated: ",new Date(m.updated_at).toLocaleDateString()]}),(0,r.jsxs)(S.Z,{children:["Created By: ",m.created_by]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Budget Status"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(C.Z,{children:["$",m.spend.toFixed(6)]}),(0,r.jsxs)(S.Z,{children:["of ",null===m.litellm_budget_table.max_budget?"Unlimited":"$".concat(m.litellm_budget_table.max_budget)]}),m.litellm_budget_table.budget_duration&&(0,r.jsxs)(S.Z,{className:"text-gray-500",children:["Reset: ",m.litellm_budget_table.budget_duration]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Rate Limits"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)(S.Z,{children:["TPM: ",m.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,r.jsxs)(S.Z,{children:["RPM: ",m.litellm_budget_table.rpm_limit||"Unlimited"]}),m.litellm_budget_table.max_parallel_requests&&(0,r.jsxs)(S.Z,{children:["Max Parallel Requests: ",m.litellm_budget_table.max_parallel_requests]})]})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Models"}),(0,r.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:m.models.map((e,l)=>(0,r.jsx)(eO.Z,{color:"red",children:e},l))})]})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(eT.Z,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[75vh]",children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"User ID"}),(0,r.jsx)(eI.Z,{children:"Role"}),(0,r.jsx)(eI.Z,{children:"Spend"}),(0,r.jsx)(eI.Z,{children:"Created At"}),(0,r.jsx)(eI.Z,{})]})}),(0,r.jsx)(ek.Z,{children:null===(l=m.members)||void 0===l?void 0:l.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{className:"font-mono",children:e.user_id})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{className:"font-mono",children:e.user_role})}),(0,r.jsx)(eS.Z,{children:(0,r.jsxs)(S.Z,{children:["$",e.spend.toFixed(6)]})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{children:new Date(e.created_at).toLocaleString()})}),(0,r.jsx)(eS.Z,{children:I&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>{k({role:e.user_role,user_email:e.user_email,user_id:e.user_id}),N(!0)}}),(0,r.jsx)(lj.Z,{icon:eV.Z,size:"sm",onClick:()=>{U(e)}})]})})]},l))})]})}),I&&(0,r.jsx)(b.Z,{onClick:()=>{y(!0)},children:"Add Member"})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(C.Z,{children:"Organization Settings"}),I&&!j&&(0,r.jsx)(b.Z,{onClick:()=>f(!0),children:"Edit Settings"})]}),j?(0,r.jsxs)(E.Z,{form:p,onFinish:z,initialValues:{organization_alias:m.organization_alias,models:m.models,tpm_limit:m.litellm_budget_table.tpm_limit,rpm_limit:m.litellm_budget_table.rpm_limit,max_budget:m.litellm_budget_table.max_budget,budget_duration:m.litellm_budget_table.budget_duration,metadata:m.metadata?JSON.stringify(m.metadata,null,2):""},layout:"vertical",children:[(0,r.jsx)(E.Z.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,r.jsx)(D.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"Models",name:"models",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",children:[(0,r.jsx)(A.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),d.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:R(e)},e))]})}),(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(A.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(A.default.Option,{value:"30d",children:"monthly"})]})}),(0,r.jsx)(E.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,r.jsx)(M.Z,{step:1,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,r.jsx)(M.Z,{step:1,style:{width:"100%"}})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",children:(0,r.jsx)(D.Z.TextArea,{rows:4})}),(0,r.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,r.jsx)(L.ZP,{onClick:()=>f(!1),children:"Cancel"}),(0,r.jsx)(b.Z,{type:"submit",children:"Save Changes"})]})]}):(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Organization Name"}),(0,r.jsx)("div",{children:m.organization_alias})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Organization ID"}),(0,r.jsx)("div",{className:"font-mono",children:m.organization_id})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Created At"}),(0,r.jsx)("div",{children:new Date(m.created_at).toLocaleString()})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Models"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:m.models.map((e,l)=>(0,r.jsx)(eO.Z,{color:"red",children:e},l))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Rate Limits"}),(0,r.jsxs)("div",{children:["TPM: ",m.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,r.jsxs)("div",{children:["RPM: ",m.litellm_budget_table.rpm_limit||"Unlimited"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"font-medium",children:"Budget"}),(0,r.jsxs)("div",{children:["Max: ",null!==m.litellm_budget_table.max_budget?"$".concat(m.litellm_budget_table.max_budget):"No Limit"]}),(0,r.jsxs)("div",{children:["Reset: ",m.litellm_budget_table.budget_duration||"Never"]})]})]})]})})]})]}),(0,r.jsx)(lN,{isVisible:_,onCancel:()=>y(!1),onSubmit:T,accessToken:a,title:"Add Organization Member",roles:[{label:"org_admin",value:"org_admin",description:"Can add and remove members, and change their roles."},{label:"internal_user",value:"internal_user",description:"Can view/create keys for themselves within organization."},{label:"internal_user_viewer",value:"internal_user_viewer",description:"Can only view their keys within organization."}],defaultRole:"internal_user"}),(0,r.jsx)(lZ,{visible:Z,onCancel:()=>N(!1),onSubmit:F,initialData:w,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Org Admin",value:"org_admin"},{label:"Internal User",value:"internal_user"},{label:"Internal User Viewer",value:"internal_user_viewer"}]}})]}):(0,r.jsx)("div",{className:"p-4",children:"Organization not found"})};let sa=async(e,l)=>{l(await (0,g.r6)(e))};var sr=e=>{let{organizations:l,userRole:s,userModels:t,accessToken:a,lastRefreshed:n,handleRefreshClick:o,currentOrg:d,guardrailsList:c=[],setOrganizations:m,premiumUser:u}=e,[h,x]=(0,i.useState)(null),[p,j]=(0,i.useState)(!1),[f,_]=(0,i.useState)(!1),[N,w]=(0,i.useState)(null),[k,C]=(0,i.useState)(!1),[I]=E.Z.useForm();(0,i.useEffect)(()=>{0===l.length&&a&&sa(a,m)},[l,a]);let T=e=>{e&&(w(e),_(!0))},L=async()=>{if(N&&a)try{await (0,g.cq)(a,N),P.ZP.success("Organization deleted successfully"),_(!1),w(null),sa(a,m)}catch(e){console.error("Error deleting organization:",e)}},F=async e=>{try{if(!a)return;console.log("values in organizations new create call: ".concat(JSON.stringify(e))),await (0,g.H1)(a,e),C(!1),I.resetFields(),sa(a,m)}catch(e){console.error("Error creating organization:",e)}};return u?h?(0,r.jsx)(st,{organizationId:h,onClose:()=>{x(null),j(!1)},accessToken:a,is_org_admin:!0,is_proxy_admin:"Admin"===s,userModels:t,editOrg:p}):(0,r.jsxs)(eM.Z,{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,r.jsxs)(eD.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)(eL.Z,{children:"Your Organizations"})}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[n&&(0,r.jsxs)(S.Z,{children:["Last Refreshed: ",n]}),(0,r.jsx)(lj.Z,{icon:ez.Z,variant:"shadow",size:"xs",className:"self-center",onClick:o})]})]}),(0,r.jsx)(eR.Z,{children:(0,r.jsxs)(eF.Z,{children:[(0,r.jsx)(S.Z,{children:"Click on “Organization ID” to view organization details."}),(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:[(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsx)(eT.Z,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Organization ID"}),(0,r.jsx)(eI.Z,{children:"Organization Name"}),(0,r.jsx)(eI.Z,{children:"Created"}),(0,r.jsx)(eI.Z,{children:"Spend (USD)"}),(0,r.jsx)(eI.Z,{children:"Budget (USD)"}),(0,r.jsx)(eI.Z,{children:"Models"}),(0,r.jsx)(eI.Z,{children:"TPM / RPM Limits"}),(0,r.jsx)(eI.Z,{children:"Info"}),(0,r.jsx)(eI.Z,{children:"Actions"})]})}),(0,r.jsx)(ek.Z,{children:l&&l.length>0?l.sort((e,l)=>new Date(l.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>{var l,t,a,i,n,o,d,c,m;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(V.Z,{title:e.organization_id,children:(0,r.jsxs)(b.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>x(e.organization_id),children:[null===(l=e.organization_id)||void 0===l?void 0:l.slice(0,7),"..."]})})})}),(0,r.jsx)(eS.Z,{children:e.organization_alias}),(0,r.jsx)(eS.Z,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,r.jsx)(eS.Z,{children:e.spend}),(0,r.jsx)(eS.Z,{children:(null===(t=e.litellm_budget_table)||void 0===t?void 0:t.max_budget)!==null&&(null===(a=e.litellm_budget_table)||void 0===a?void 0:a.max_budget)!==void 0?null===(i=e.litellm_budget_table)||void 0===i?void 0:i.max_budget:"No limit"}),(0,r.jsx)(eS.Z,{children:Array.isArray(e.models)&&(0,r.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"red",children:"All Proxy Models"}):e.models.map((e,l)=>"all-proxy-models"===e?(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"red",children:"All Proxy Models"},l):(0,r.jsx)(eO.Z,{size:"xs",className:"mb-1",color:"blue",children:e.length>30?"".concat(R(e).slice(0,30),"..."):R(e)},l))})}),(0,r.jsx)(eS.Z,{children:(0,r.jsxs)(S.Z,{children:["TPM: ",(null===(n=e.litellm_budget_table)||void 0===n?void 0:n.tpm_limit)?null===(o=e.litellm_budget_table)||void 0===o?void 0:o.tpm_limit:"Unlimited",(0,r.jsx)("br",{}),"RPM: ",(null===(d=e.litellm_budget_table)||void 0===d?void 0:d.rpm_limit)?null===(c=e.litellm_budget_table)||void 0===c?void 0:c.rpm_limit:"Unlimited"]})}),(0,r.jsx)(eS.Z,{children:(0,r.jsxs)(S.Z,{children:[(null===(m=e.members)||void 0===m?void 0:m.length)||0," Members"]})}),(0,r.jsx)(eS.Z,{children:"Admin"===s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>{x(e.organization_id),j(!0)}}),(0,r.jsx)(lj.Z,{onClick:()=>T(e.organization_id),icon:eV.Z,size:"sm"})]})})]},e.organization_id)}):null})]})})}),("Admin"===s||"Org Admin"===s)&&(0,r.jsxs)(y.Z,{numColSpan:1,children:[(0,r.jsx)(b.Z,{className:"mx-auto",onClick:()=>C(!0),children:"+ Create New Organization"}),(0,r.jsx)(O.Z,{title:"Create Organization",visible:k,width:800,footer:null,onCancel:()=>{C(!1),I.resetFields()},children:(0,r.jsxs)(E.Z,{form:I,onFinish:F,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsx)(E.Z.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:"Models",name:"models",children:(0,r.jsxs)(A.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,r.jsx)(A.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),t&&t.length>0&&t.map(e=>(0,r.jsx)(A.default.Option,{value:e,children:R(e)},e))]})}),(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(A.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(A.default.Option,{value:"30d",children:"monthly"})]})}),(0,r.jsx)(E.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,r.jsx)(M.Z,{step:1,width:400})}),(0,r.jsx)(E.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,r.jsx)(M.Z,{step:1,width:400})}),(0,r.jsx)(E.Z.Item,{label:"Metadata",name:"metadata",children:(0,r.jsx)(D.Z.TextArea,{rows:4})}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(b.Z,{type:"submit",children:"Create Organization"})})]})})]})]})]})}),f?(0,r.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,r.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,r.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,r.jsx)("div",{className:"sm:flex sm:items-start",children:(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Organization"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this organization?"})})]})})}),(0,r.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,r.jsx)(b.Z,{onClick:L,color:"red",className:"ml-2",children:"Delete"}),(0,r.jsx)(b.Z,{onClick:()=>{_(!1),w(null)},children:"Cancel"})]})]})]})}):(0,r.jsx)(r.Fragment,{})]}):(0,r.jsx)("div",{children:(0,r.jsxs)(S.Z,{children:["This is a LiteLLM Enterprise feature, and requires a valid key to use. Get a trial key ",(0,r.jsx)("a",{href:"https://litellm.ai/pricing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})},si=s(94789);let sn={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},so={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"GOOGLE CLIENT ID",name:"google_client_id"},{label:"GOOGLE CLIENT SECRET",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"MICROSOFT CLIENT ID",name:"microsoft_client_id"},{label:"MICROSOFT CLIENT SECRET",name:"microsoft_client_secret"},{label:"MICROSOFT TENANT",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"GENERIC CLIENT ID",name:"generic_client_id"},{label:"GENERIC CLIENT SECRET",name:"generic_client_secret"},{label:"AUTHORIZATION ENDPOINT",name:"generic_authorization_endpoint",placeholder:"https://your-okta-domain/authorize"},{label:"TOKEN ENDPOINT",name:"generic_token_endpoint",placeholder:"https://your-okta-domain/token"},{label:"USERINFO ENDPOINT",name:"generic_userinfo_endpoint",placeholder:"https://your-okta-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"GENERIC CLIENT ID",name:"generic_client_id"},{label:"GENERIC CLIENT SECRET",name:"generic_client_secret"},{label:"AUTHORIZATION ENDPOINT",name:"generic_authorization_endpoint"},{label:"TOKEN ENDPOINT",name:"generic_token_endpoint"},{label:"USERINFO ENDPOINT",name:"generic_userinfo_endpoint"}]}};var sd=e=>{let{isAddSSOModalVisible:l,isInstructionsModalVisible:s,handleAddSSOOk:t,handleAddSSOCancel:a,handleShowInstructions:i,handleInstructionsOk:n,handleInstructionsCancel:o,form:d}=e,c=e=>{let l=so[e];return l?l.fields.map(e=>(0,r.jsx)(E.Z.Item,{label:e.label,name:e.name,rules:[{required:!0,message:"Please enter the ".concat(e.label.toLowerCase())}],children:e.name.includes("client")?(0,r.jsx)(D.Z.Password,{}):(0,r.jsx)(Z.Z,{placeholder:e.placeholder})},e.name)):null};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.Z,{title:"Add SSO",visible:l,width:800,footer:null,onOk:t,onCancel:a,children:(0,r.jsxs)(E.Z,{form:d,onFinish:i,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,r.jsx)(A.default,{children:Object.entries(sn).map(e=>{let[l,s]=e;return(0,r.jsx)(A.default.Option,{value:l,children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,r.jsx)("img",{src:s,alt:l,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,r.jsxs)("span",{children:[l.charAt(0).toUpperCase()+l.slice(1)," SSO"]})]})},l)})})}),(0,r.jsx)(E.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.sso_provider!==l.sso_provider,children:e=>{let{getFieldValue:l}=e,s=l("sso_provider");return s?c(s):null}}),(0,r.jsx)(E.Z.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"PROXY BASE URL",name:"proxy_base_url",rules:[{required:!0,message:"Please enter the proxy base url"}],children:(0,r.jsx)(Z.Z,{})})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Save"})})]})}),(0,r.jsxs)(O.Z,{title:"SSO Setup Instructions",visible:s,width:800,footer:null,onOk:n,onCancel:o,children:[(0,r.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,r.jsx)(S.Z,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,r.jsx)(S.Z,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,r.jsx)(S.Z,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,r.jsx)(S.Z,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{onClick:n,children:"Done"})})]})]})};let sc=()=>{let[e,l]=(0,i.useState)("http://localhost:4000");return(0,i.useEffect)(()=>{{let{protocol:e,host:s}=window.location;l("".concat(e,"//").concat(s))}},[]),e};var sm=e=>{let{searchParams:l,accessToken:s,showSSOBanner:t,premiumUser:a}=e,[o]=E.Z.useForm(),[d]=E.Z.useForm(),{Title:c,Paragraph:m}=G.default,[u,h]=(0,i.useState)(""),[x,p]=(0,i.useState)(null),[j,f]=(0,i.useState)(null),[_,y]=(0,i.useState)(!1),[Z,N]=(0,i.useState)(!1),[w,k]=(0,i.useState)(!1),[S,C]=(0,i.useState)(!1),[I,A]=(0,i.useState)(!1),[T,M]=(0,i.useState)(!1),[F,R]=(0,i.useState)(!1),[U,z]=(0,i.useState)(!1),[V,q]=(0,i.useState)(!1),[K,B]=(0,i.useState)([]),[H,J]=(0,i.useState)(null);(0,n.useRouter)();let[W,Y]=(0,i.useState)(null);console.log=function(){};let $=sc(),X="All IP Addresses Allowed",Q=$;Q+="/fallback/login";let ee=async()=>{try{if(!0!==a){P.ZP.error("This feature is only available for premium users. Please upgrade your account.");return}if(s){let e=await (0,g.PT)(s);B(e&&e.length>0?e:[X])}else B([X])}catch(e){console.error("Error fetching allowed IPs:",e),P.ZP.error("Failed to fetch allowed IPs ".concat(e)),B([X])}finally{!0===a&&R(!0)}},el=async e=>{try{if(s){await (0,g.eH)(s,e.ip);let l=await (0,g.PT)(s);B(l),P.ZP.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),P.ZP.error("Failed to add IP address ".concat(e))}finally{z(!1)}},es=async e=>{J(e),q(!0)},et=async()=>{if(H&&s)try{await (0,g.$I)(s,H);let e=await (0,g.PT)(s);B(e.length>0?e:[X]),P.ZP.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),P.ZP.error("Failed to delete IP address ".concat(e))}finally{q(!1),J(null)}};(0,i.useEffect)(()=>{(async()=>{if(null!=s){let e=[],l=await (0,g.Xd)(s,"proxy_admin_viewer");console.log("proxy admin viewer response: ",l);let t=l.users;console.log("proxy viewers response: ".concat(t)),t.forEach(l=>{e.push({user_role:l.user_role,user_id:l.user_id,user_email:l.user_email})}),console.log("proxy viewers: ".concat(t));let a=(await (0,g.Xd)(s,"proxy_admin")).users;a.forEach(l=>{e.push({user_role:l.user_role,user_id:l.user_id,user_email:l.user_email})}),console.log("proxy admins: ".concat(a)),console.log("combinedList: ".concat(e)),p(e),Y(await (0,g.lg)(s))}})()},[s]);let ea=async e=>{try{if(null!=s&&null!=x){var l;P.ZP.info("Making API Call"),e.user_email,e.user_id;let t=await (0,g.pf)(s,e,"proxy_admin"),a=(null===(l=t.data)||void 0===l?void 0:l.user_id)||t.user_id;(0,g.XO)(s,a).then(e=>{f(e),y(!0)}),console.log("response for team create call: ".concat(t));let r=x.findIndex(e=>(console.log("user.user_id=".concat(e.user_id,"; response.user_id=").concat(a)),e.user_id===t.user_id));console.log("foundIndex: ".concat(r)),-1==r&&(console.log("updates admin with new user"),x.push(t),p(x)),o.resetFields(),k(!1)}}catch(e){console.error("Error creating the key:",e)}},er=async e=>{if(null==s)return;let l=so[e.sso_provider],t={PROXY_BASE_URL:e.proxy_base_url};l&&Object.entries(l.envVarMap).forEach(l=>{let[s,a]=l;e[s]&&(t[a]=e[s])}),(0,g.K_)(s,{environment_variables:t})};return console.log("admins: ".concat(null==x?void 0:x.length)),(0,r.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,r.jsx)(c,{level:4,children:"Admin Access "}),(0,r.jsx)(m,{children:"Go to 'Internal Users' page to add other admins."}),(0,r.jsxs)(v.Z,{children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(c,{level:4,children:" ✨ Security Settings"}),(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem"},children:[(0,r.jsx)("div",{children:(0,r.jsx)(b.Z,{onClick:()=>!0===a?A(!0):P.ZP.error("Only premium users can add SSO"),children:"Add SSO"})}),(0,r.jsx)("div",{children:(0,r.jsx)(b.Z,{onClick:ee,children:"Allowed IPs"})})]})]}),(0,r.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,r.jsx)(sd,{isAddSSOModalVisible:I,isInstructionsModalVisible:T,handleAddSSOOk:()=>{A(!1),o.resetFields()},handleAddSSOCancel:()=>{A(!1),o.resetFields()},handleShowInstructions:e=>{ea(e),er(e),A(!1),M(!0)},handleInstructionsOk:()=>{M(!1)},handleInstructionsCancel:()=>{M(!1)},form:o}),(0,r.jsx)(O.Z,{title:"Manage Allowed IP Addresses",width:800,visible:F,onCancel:()=>R(!1),footer:[(0,r.jsx)(b.Z,{className:"mx-1",onClick:()=>z(!0),children:"Add IP Address"},"add"),(0,r.jsx)(b.Z,{onClick:()=>R(!1),children:"Close"},"close")],children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"IP Address"}),(0,r.jsx)(eI.Z,{className:"text-right",children:"Action"})]})}),(0,r.jsx)(ek.Z,{children:K.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e}),(0,r.jsx)(eS.Z,{className:"text-right",children:e!==X&&(0,r.jsx)(b.Z,{onClick:()=>es(e),color:"red",size:"xs",children:"Delete"})})]},l))})]})}),(0,r.jsx)(O.Z,{title:"Add Allowed IP Address",visible:U,onCancel:()=>z(!1),footer:null,children:(0,r.jsxs)(E.Z,{onFinish:el,children:[(0,r.jsx)(E.Z.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,r.jsx)(D.Z,{placeholder:"Enter IP address"})}),(0,r.jsx)(E.Z.Item,{children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,r.jsx)(O.Z,{title:"Confirm Delete",visible:V,onCancel:()=>q(!1),onOk:et,footer:[(0,r.jsx)(b.Z,{className:"mx-1",onClick:()=>et(),children:"Yes"},"delete"),(0,r.jsx)(b.Z,{onClick:()=>q(!1),children:"Close"},"close")],children:(0,r.jsxs)("p",{children:["Are you sure you want to delete the IP address: ",H,"?"]})})]}),(0,r.jsxs)(si.Z,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,r.jsxs)("a",{href:Q,target:"_blank",children:[(0,r.jsx)("b",{children:Q})," "]})]})]})]})},su=s(92858),sh=e=>{let{alertingSettings:l,handleInputChange:s,handleResetField:t,handleSubmit:a,premiumUser:i}=e,[n]=E.Z.useForm();return(0,r.jsxs)(E.Z,{form:n,onFinish:()=>{console.log("INSIDE ONFINISH");let e=n.getFieldsValue(),l=Object.entries(e).every(e=>{let[l,s]=e;return"boolean"!=typeof s&&(""===s||null==s)});console.log("formData: ".concat(JSON.stringify(e),", isEmpty: ").concat(l)),l?console.log("Some form fields are empty."):a(e)},labelAlign:"left",children:[l.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsxs)(eS.Z,{align:"center",children:[(0,r.jsx)(S.Z,{children:e.field_name}),(0,r.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:e.field_description})]}),e.premium_field?i?(0,r.jsx)(E.Z.Item,{name:e.field_name,children:(0,r.jsx)(eS.Z,{children:"Integer"===e.field_type?(0,r.jsx)(M.Z,{step:1,value:e.field_value,onChange:l=>s(e.field_name,l)}):"Boolean"===e.field_type?(0,r.jsx)(su.Z,{checked:e.field_value,onChange:l=>s(e.field_name,l)}):(0,r.jsx)(D.Z,{value:e.field_value,onChange:l=>s(e.field_name,l)})})}):(0,r.jsx)(eS.Z,{children:(0,r.jsx)(b.Z,{className:"flex items-center justify-center",children:(0,r.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"✨ Enterprise Feature"})})}):(0,r.jsx)(E.Z.Item,{name:e.field_name,className:"mb-0",valuePropName:"Boolean"===e.field_type?"checked":"value",children:(0,r.jsx)(eS.Z,{children:"Integer"===e.field_type?(0,r.jsx)(M.Z,{step:1,value:e.field_value,onChange:l=>s(e.field_name,l),className:"p-0"}):"Boolean"===e.field_type?(0,r.jsx)(su.Z,{checked:e.field_value,onChange:l=>{s(e.field_name,l),n.setFieldsValue({[e.field_name]:l})}}):(0,r.jsx)(D.Z,{value:e.field_value,onChange:l=>s(e.field_name,l)})})}),(0,r.jsx)(eS.Z,{children:!0==e.stored_in_db?(0,r.jsx)(eO.Z,{icon:ea.Z,className:"text-white",children:"In DB"}):!1==e.stored_in_db?(0,r.jsx)(eO.Z,{className:"text-gray bg-white outline",children:"In Config"}):(0,r.jsx)(eO.Z,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(lj.Z,{icon:eV.Z,color:"red",onClick:()=>t(e.field_name,l),children:"Reset"})})]},l)),(0,r.jsx)("div",{children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Update Settings"})})]})},sx=e=>{let{accessToken:l,premiumUser:s}=e,[t,a]=(0,i.useState)([]);return(0,i.useEffect)(()=>{l&&(0,g.RQ)(l).then(e=>{a(e)})},[l]),(0,r.jsx)(sh,{alertingSettings:t,handleInputChange:(e,l)=>{let s=t.map(s=>s.field_name===e?{...s,field_value:l}:s);console.log("updatedSettings: ".concat(JSON.stringify(s))),a(s)},handleResetField:(e,s)=>{if(l)try{let l=t.map(l=>l.field_name===e?{...l,stored_in_db:null,field_value:l.field_default_value}:l);a(l)}catch(e){console.log("ERROR OCCURRED!")}},handleSubmit:e=>{if(!l||(console.log("formValues: ".concat(e)),null==e||void 0==e))return;let s={};t.forEach(e=>{s[e.field_name]=e.field_value});let a={...e,...s};console.log("mergedFormValues: ".concat(JSON.stringify(a)));let{slack_alerting:r,...i}=a;console.log("slack_alerting: ".concat(r,", alertingArgs: ").concat(JSON.stringify(i)));try{(0,g.jA)(l,"alerting_args",i),"boolean"==typeof r&&(!0==r?(0,g.jA)(l,"alerting",["slack"]):(0,g.jA)(l,"alerting",[])),P.ZP.success("Wait 10s for proxy to update.")}catch(e){}},premiumUser:s})},sp=s(86582);let{Title:sg,Paragraph:sj}=G.default;console.log=function(){};var sf=e=>{let{accessToken:l,userRole:s,userID:t,premiumUser:a}=e,[n,o]=(0,i.useState)([]),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)(!1),[h]=E.Z.useForm(),[x,p]=(0,i.useState)(null),[j,f]=(0,i.useState)([]),[_,y]=(0,i.useState)(""),[N,w]=(0,i.useState)({}),[k,C]=(0,i.useState)([]),[I,T]=(0,i.useState)(!1),[M,D]=(0,i.useState)([]),[F,R]=(0,i.useState)(null),[U,z]=(0,i.useState)([]),[V,q]=(0,i.useState)(!1),[K,B]=(0,i.useState)(null),H=e=>{k.includes(e)?C(k.filter(l=>l!==e)):C([...k,e])},J={llm_exceptions:"LLM Exceptions",llm_too_slow:"LLM Responses Too Slow",llm_requests_hanging:"LLM Requests Hanging",budget_alerts:"Budget Alerts (API Keys, Users)",db_exceptions:"Database Exceptions (Read/Write)",daily_reports:"Weekly/Monthly Spend Reports",outage_alerts:"Outage Alerts",region_outage_alerts:"Region Outage Alerts"};(0,i.useEffect)(()=>{l&&s&&t&&(0,g.BL)(l,t,s).then(e=>{console.log("callbacks",e),o(e.callbacks),D(e.available_callbacks);let l=e.alerts;if(console.log("alerts_data",l),l&&l.length>0){let e=l[0];console.log("_alert_info",e);let s=e.variables.SLACK_WEBHOOK_URL;console.log("catch_all_webhook",s),C(e.active_alerts),y(s),w(e.alerts_to_webhook)}c(l)})},[l,s,t]);let G=e=>k&&k.includes(e),Y=()=>{if(!l)return;let e={};d.filter(e=>"email"===e.name).forEach(l=>{var s;Object.entries(null!==(s=l.variables)&&void 0!==s?s:{}).forEach(l=>{let[s,t]=l,a=document.querySelector('input[name="'.concat(s,'"]'));a&&a.value&&(e[s]=null==a?void 0:a.value)})}),console.log("updatedVariables",e);try{(0,g.K_)(l,{general_settings:{alerting:["email"]},environment_variables:e})}catch(e){P.ZP.error("Failed to update alerts: "+e,20)}P.ZP.success("Email settings updated successfully")},$=async e=>{if(!l)return;let s={};Object.entries(e).forEach(e=>{let[l,t]=e;"callback"!==l&&(s[l]=t)});try{await (0,g.K_)(l,{environment_variables:s}),P.ZP.success("Callback added successfully"),u(!1),h.resetFields(),p(null)}catch(e){P.ZP.error("Failed to add callback: "+e,20)}},X=async e=>{if(!l)return;let s=null==e?void 0:e.callback,t={};Object.entries(e).forEach(e=>{let[l,s]=e;"callback"!==l&&(t[l]=s)});try{await (0,g.K_)(l,{environment_variables:t,litellm_settings:{success_callback:[s]}}),P.ZP.success("Callback ".concat(s," added successfully")),u(!1),h.resetFields(),p(null)}catch(e){P.ZP.error("Failed to add callback: "+e,20)}},Q=e=>{console.log("inside handleSelectedCallbackChange",e),p(e.litellm_callback_name),console.log("all callbacks",M),e&&e.litellm_callback_params?(z(e.litellm_callback_params),console.log("selectedCallbackParams",U)):z([])};return l?(console.log("callbacks: ".concat(n)),(0,r.jsxs)("div",{className:"w-full mx-4",children:[(0,r.jsx)(v.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{variant:"line",defaultValue:"1",children:[(0,r.jsx)(eL.Z,{value:"1",children:"Logging Callbacks"}),(0,r.jsx)(eL.Z,{value:"2",children:"Alerting Types"}),(0,r.jsx)(eL.Z,{value:"3",children:"Alerting Settings"}),(0,r.jsx)(eL.Z,{value:"4",children:"Email Alerts"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsxs)(eF.Z,{children:[(0,r.jsx)(sg,{level:4,children:"Active Logging Callbacks"}),(0,r.jsx)(v.Z,{numItems:2,children:(0,r.jsx)(eT.Z,{className:"max-h-[50vh]",children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eI.Z,{children:"Callback Name"})})}),(0,r.jsx)(ek.Z,{children:n.map((e,s)=>(0,r.jsxs)(eA.Z,{className:"flex justify-between",children:[(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{children:e.name})}),(0,r.jsx)(eS.Z,{children:(0,r.jsxs)(v.Z,{numItems:2,className:"flex justify-between",children:[(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>{B(e),q(!0)}}),(0,r.jsx)(b.Z,{onClick:()=>(0,g.jE)(l,e.name),className:"ml-2",variant:"secondary",children:"Test Callback"})]})})]},s))})]})})}),(0,r.jsx)(b.Z,{className:"mt-2",onClick:()=>T(!0),children:"Add Callback"})]}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)(S.Z,{className:"my-2",children:["Alerts are only supported for Slack Webhook URLs. Get your webhook urls from"," ",(0,r.jsx)("a",{href:"https://api.slack.com/messaging/webhooks",target:"_blank",style:{color:"blue"},children:"here"})]}),(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{}),(0,r.jsx)(eI.Z,{}),(0,r.jsx)(eI.Z,{children:"Slack Webhook URL"})]})}),(0,r.jsx)(ek.Z,{children:Object.entries(J).map((e,l)=>{let[s,t]=e;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:"region_outage_alerts"==s?a?(0,r.jsx)(su.Z,{id:"switch",name:"switch",checked:G(s),onChange:()=>H(s)}):(0,r.jsx)(b.Z,{className:"flex items-center justify-center",children:(0,r.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"✨ Enterprise Feature"})}):(0,r.jsx)(su.Z,{id:"switch",name:"switch",checked:G(s),onChange:()=>H(s)})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{children:t})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(Z.Z,{name:s,type:"password",defaultValue:N&&N[s]?N[s]:_})})]},l)})})]}),(0,r.jsx)(b.Z,{size:"xs",className:"mt-2",onClick:()=>{if(!l)return;let e={};Object.entries(J).forEach(l=>{let[s,t]=l,a=document.querySelector('input[name="'.concat(s,'"]'));console.log("key",s),console.log("webhookInput",a);let r=(null==a?void 0:a.value)||"";console.log("newWebhookValue",r),e[s]=r}),console.log("updatedAlertToWebhooks",e);let s={general_settings:{alert_to_webhook_url:e,alert_types:k}};console.log("payload",s);try{(0,g.K_)(l,s)}catch(e){P.ZP.error("Failed to update alerts: "+e,20)}P.ZP.success("Alerts updated successfully")},children:"Save Changes"}),(0,r.jsx)(b.Z,{onClick:()=>(0,g.jE)(l,"slack"),className:"mx-2",children:"Test Alerts"})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sx,{accessToken:l,premiumUser:a})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(sg,{level:4,children:"Email Settings"}),(0,r.jsxs)(S.Z,{children:[(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/email",target:"_blank",style:{color:"blue"},children:" LiteLLM Docs: email alerts"})," ",(0,r.jsx)("br",{})]}),(0,r.jsx)("div",{className:"flex w-full",children:d.filter(e=>"email"===e.name).map((e,l)=>{var s;return(0,r.jsx)(eS.Z,{children:(0,r.jsx)("ul",{children:(0,r.jsx)(v.Z,{numItems:2,children:Object.entries(null!==(s=e.variables)&&void 0!==s?s:{}).map(e=>{let[l,s]=e;return(0,r.jsxs)("li",{className:"mx-2 my-2",children:[!0!=a&&("EMAIL_LOGO_URL"===l||"EMAIL_SUPPORT_CONTACT"===l)?(0,r.jsxs)("div",{children:[(0,r.jsx)("a",{href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:(0,r.jsxs)(S.Z,{className:"mt-2",children:[" ","✨ ",l]})}),(0,r.jsx)(Z.Z,{name:l,defaultValue:s,type:"password",disabled:!0,style:{width:"400px"}})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)(S.Z,{className:"mt-2",children:l}),(0,r.jsx)(Z.Z,{name:l,defaultValue:s,type:"password",style:{width:"400px"}})]}),(0,r.jsxs)("p",{style:{fontSize:"small",fontStyle:"italic"},children:["SMTP_HOST"===l&&(0,r.jsxs)("div",{style:{color:"gray"},children:["Enter the SMTP host address, e.g. `smtp.resend.com`",(0,r.jsx)("span",{style:{color:"red"},children:" Required * "})]}),"SMTP_PORT"===l&&(0,r.jsxs)("div",{style:{color:"gray"},children:["Enter the SMTP port number, e.g. `587`",(0,r.jsx)("span",{style:{color:"red"},children:" Required * "})]}),"SMTP_USERNAME"===l&&(0,r.jsxs)("div",{style:{color:"gray"},children:["Enter the SMTP username, e.g. `username`",(0,r.jsx)("span",{style:{color:"red"},children:" Required * "})]}),"SMTP_PASSWORD"===l&&(0,r.jsx)("span",{style:{color:"red"},children:" Required * "}),"SMTP_SENDER_EMAIL"===l&&(0,r.jsxs)("div",{style:{color:"gray"},children:["Enter the sender email address, e.g. `sender@berri.ai`",(0,r.jsx)("span",{style:{color:"red"},children:" Required * "})]}),"TEST_EMAIL_ADDRESS"===l&&(0,r.jsxs)("div",{style:{color:"gray"},children:["Email Address to send `Test Email Alert` to. example: `info@berri.ai`",(0,r.jsx)("span",{style:{color:"red"},children:" Required * "})]}),"EMAIL_LOGO_URL"===l&&(0,r.jsx)("div",{style:{color:"gray"},children:"(Optional) Customize the Logo that appears in the email, pass a url to your logo"}),"EMAIL_SUPPORT_CONTACT"===l&&(0,r.jsx)("div",{style:{color:"gray"},children:"(Optional) Customize the support email address that appears in the email. Default is support@berri.ai"})]})]},l)})})})},l)})}),(0,r.jsx)(b.Z,{className:"mt-2",onClick:()=>Y(),children:"Save Changes"}),(0,r.jsx)(b.Z,{onClick:()=>(0,g.jE)(l,"email"),className:"mx-2",children:"Test Email Alerts"})]})})]})]})}),(0,r.jsxs)(O.Z,{title:"Add Logging Callback",visible:I,width:800,onCancel:()=>T(!1),footer:null,children:[(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/logging",className:"mb-8 mt-4",target:"_blank",style:{color:"blue"},children:" LiteLLM Docs: Logging"}),(0,r.jsx)(E.Z,{form:h,onFinish:X,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(sp.Z,{label:"Callback",name:"callback",rules:[{required:!0,message:"Please select a callback"}],children:(0,r.jsx)(A.default,{onChange:e=>{let l=M[e];l&&(console.log(l.ui_callback_name),Q(l))},children:M&&Object.values(M).map(e=>(0,r.jsx)(W.Z,{value:e.litellm_callback_name,children:e.ui_callback_name},e.litellm_callback_name))})}),U&&U.map(e=>(0,r.jsx)(sp.Z,{label:e,name:e,rules:[{required:!0,message:"Please enter the value for "+e}],children:(0,r.jsx)(Z.Z,{type:"password"})},e)),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Save"})})]})})]}),(0,r.jsx)(O.Z,{visible:V,width:800,title:"Edit ".concat(null==K?void 0:K.name," Settings"),onCancel:()=>q(!1),footer:null,children:(0,r.jsxs)(E.Z,{form:h,onFinish:$,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsx)(r.Fragment,{children:K&&K.variables&&Object.entries(K.variables).map(e=>{let[l,s]=e;return(0,r.jsx)(sp.Z,{label:l,name:l,children:(0,r.jsx)(Z.Z,{type:"password",defaultValue:s})},l)})}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Save"})})]})})]})):null},s_=s(92414),sy=s(46030);let{Option:sv}=A.default;var sb=e=>{let{models:l,accessToken:s,routerSettings:t,setRouterSettings:a}=e,[n]=E.Z.useForm(),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)("");return(0,r.jsxs)("div",{children:[(0,r.jsx)(b.Z,{className:"mx-auto",onClick:()=>d(!0),children:"+ Add Fallbacks"}),(0,r.jsx)(O.Z,{title:"Add Fallbacks",visible:o,width:800,footer:null,onOk:()=>{d(!1),n.resetFields()},onCancel:()=>{d(!1),n.resetFields()},children:(0,r.jsxs)(E.Z,{form:n,onFinish:e=>{console.log(e);let{model_name:l,models:r}=e,i=[...t.fallbacks||[],{[l]:r}],o={...t,fallbacks:i};console.log(o);try{(0,g.K_)(s,{router_settings:o}),a(o)}catch(e){P.ZP.error("Failed to update router settings: "+e,20)}P.ZP.success("router settings updated successfully"),d(!1),n.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Public Model Name",name:"model_name",rules:[{required:!0,message:"Set the model to fallback for"}],help:"required",children:(0,r.jsx)(eP.Z,{defaultValue:c,children:l&&l.map((e,l)=>(0,r.jsx)(W.Z,{value:e,onClick:()=>m(e),children:e},l))})}),(0,r.jsx)(E.Z.Item,{label:"Fallback Models",name:"models",rules:[{required:!0,message:"Please select a model"}],help:"required",children:(0,r.jsx)(s_.Z,{value:l,children:l&&l.filter(e=>e!=c).map(e=>(0,r.jsx)(sy.Z,{value:e,children:e},e))})})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Add Fallbacks"})})]})})]})},sZ=s(33619);async function sN(e,l){console.log=function(){},console.log("isLocal:",!1);let s=window.location.origin,t=new sZ.ZP.OpenAI({apiKey:l,baseURL:s,dangerouslyAllowBrowser:!0});try{let l=await t.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});P.ZP.success((0,r.jsxs)("span",{children:["Test model=",(0,r.jsx)("strong",{children:e}),", received model=",(0,r.jsx)("strong",{children:l.model}),". See"," ",(0,r.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){P.ZP.error("Error occurred while generating model response. Please try again. Error: ".concat(e),20)}}let sw={ttl:3600,lowest_latency_buffer:0},sk=e=>{let{selectedStrategy:l,strategyArgs:s,paramExplanation:t}=e;return(0,r.jsxs)(N.Z,{children:[(0,r.jsx)(k.Z,{className:"text-sm font-medium text-tremor-content-strong dark:text-dark-tremor-content-strong",children:"Routing Strategy Specific Args"}),(0,r.jsx)(w.Z,{children:"latency-based-routing"==l?(0,r.jsx)(eT.Z,{children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Setting"}),(0,r.jsx)(eI.Z,{children:"Value"})]})}),(0,r.jsx)(ek.Z,{children:Object.entries(s).map(e=>{let[l,s]=e;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsxs)(eS.Z,{children:[(0,r.jsx)(S.Z,{children:l}),(0,r.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:t[l]})]}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(Z.Z,{name:l,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s.toString()})})]},l)})})]})}):(0,r.jsx)(S.Z,{children:"No specific settings"})})]})};var sS=e=>{let{accessToken:l,userRole:s,userID:t,modelData:a}=e,[n,o]=(0,i.useState)({}),[d,c]=(0,i.useState)({}),[m,u]=(0,i.useState)([]),[h,x]=(0,i.useState)(!1),[p]=E.Z.useForm(),[j,f]=(0,i.useState)(null),[_,N]=(0,i.useState)(null),[w,k]=(0,i.useState)(null),I={routing_strategy_args:"(dict) Arguments to pass to the routing strategy",routing_strategy:"(string) Routing strategy to use",allowed_fails:"(int) Number of times a deployment can fail before being added to cooldown",cooldown_time:"(int) time in seconds to cooldown a deployment after failure",num_retries:"(int) Number of retries for failed requests. Defaults to 0.",timeout:"(float) Timeout for requests. Defaults to None.",retry_after:"(int) Minimum time to wait before retrying a failed request",ttl:"(int) Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"(float) Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};(0,i.useEffect)(()=>{l&&s&&t&&((0,g.BL)(l,t,s).then(e=>{console.log("callbacks",e);let l=e.router_settings;"model_group_retry_policy"in l&&delete l.model_group_retry_policy,o(l)}),(0,g.YU)(l).then(e=>{u(e)}))},[l,s,t]);let A=async e=>{if(!l)return;console.log("received key: ".concat(e)),console.log("routerSettings['fallbacks']: ".concat(n.fallbacks));let s=n.fallbacks.map(l=>(e in l&&delete l[e],l)).filter(e=>Object.keys(e).length>0),t={...n,fallbacks:s};try{await (0,g.K_)(l,{router_settings:t}),o(t),P.ZP.success("Router settings updated successfully")}catch(e){P.ZP.error("Failed to update router settings: "+e,20)}},O=(e,l)=>{u(m.map(s=>s.field_name===e?{...s,field_value:l}:s))},T=(e,s)=>{if(!l)return;let t=m[s].field_value;if(null!=t&&void 0!=t)try{(0,g.jA)(l,e,t);let s=m.map(l=>l.field_name===e?{...l,stored_in_db:!0}:l);u(s)}catch(e){}},L=(e,s)=>{if(l)try{(0,g.ao)(l,e);let s=m.map(l=>l.field_name===e?{...l,stored_in_db:null,field_value:null}:l);u(s)}catch(e){}},D=e=>{if(!l)return;console.log("router_settings",e);let s=Object.fromEntries(Object.entries(e).map(e=>{let[l,s]=e;if("routing_strategy_args"!==l&&"routing_strategy"!==l){var t;return[l,(null===(t=document.querySelector('input[name="'.concat(l,'"]')))||void 0===t?void 0:t.value)||s]}if("routing_strategy"==l)return[l,_];if("routing_strategy_args"==l&&"latency-based-routing"==_){let e={},l=document.querySelector('input[name="lowest_latency_buffer"]'),s=document.querySelector('input[name="ttl"]');return(null==l?void 0:l.value)&&(e.lowest_latency_buffer=Number(l.value)),(null==s?void 0:s.value)&&(e.ttl=Number(s.value)),console.log("setRoutingStrategyArgs: ".concat(e)),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",s);try{(0,g.K_)(l,{router_settings:s})}catch(e){P.ZP.error("Failed to update router settings: "+e,20)}P.ZP.success("router settings updated successfully")};return l?(0,r.jsx)("div",{className:"w-full mx-4",children:(0,r.jsxs)(eM.Z,{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,r.jsxs)(eD.Z,{variant:"line",defaultValue:"1",children:[(0,r.jsx)(eL.Z,{value:"1",children:"Loadbalancing"}),(0,r.jsx)(eL.Z,{value:"2",children:"Fallbacks"}),(0,r.jsx)(eL.Z,{value:"3",children:"General"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:[(0,r.jsx)(C.Z,{children:"Router Settings"}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Setting"}),(0,r.jsx)(eI.Z,{children:"Value"})]})}),(0,r.jsx)(ek.Z,{children:Object.entries(n).filter(e=>{let[l,s]=e;return"fallbacks"!=l&&"context_window_fallbacks"!=l&&"routing_strategy_args"!=l}).map(e=>{let[l,s]=e;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsxs)(eS.Z,{children:[(0,r.jsx)(S.Z,{children:l}),(0,r.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:I[l]})]}),(0,r.jsx)(eS.Z,{children:"routing_strategy"==l?(0,r.jsxs)(eP.Z,{defaultValue:s,className:"w-full max-w-md",onValueChange:N,children:[(0,r.jsx)(W.Z,{value:"usage-based-routing",children:"usage-based-routing"}),(0,r.jsx)(W.Z,{value:"latency-based-routing",children:"latency-based-routing"}),(0,r.jsx)(W.Z,{value:"simple-shuffle",children:"simple-shuffle"})]}):(0,r.jsx)(Z.Z,{name:l,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s.toString()})})]},l)})})]}),(0,r.jsx)(sk,{selectedStrategy:_,strategyArgs:n&&n.routing_strategy_args&&Object.keys(n.routing_strategy_args).length>0?n.routing_strategy_args:sw,paramExplanation:I})]}),(0,r.jsx)(y.Z,{children:(0,r.jsx)(b.Z,{className:"mt-2",onClick:()=>D(n),children:"Save Changes"})})]})}),(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Model Name"}),(0,r.jsx)(eI.Z,{children:"Fallbacks"})]})}),(0,r.jsx)(ek.Z,{children:n.fallbacks&&n.fallbacks.map((e,s)=>Object.entries(e).map(e=>{let[t,a]=e;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:t}),(0,r.jsx)(eS.Z,{children:Array.isArray(a)?a.join(", "):a}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(b.Z,{onClick:()=>sN(t,l),children:"Test Fallback"})}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(lj.Z,{icon:eV.Z,size:"sm",onClick:()=>A(t)})})]},s.toString()+t)}))})]}),(0,r.jsx)(sb,{models:(null==a?void 0:a.data)?a.data.map(e=>e.model_name):[],accessToken:l,routerSettings:n,setRouterSettings:o})]}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(eT.Z,{children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Setting"}),(0,r.jsx)(eI.Z,{children:"Value"}),(0,r.jsx)(eI.Z,{children:"Status"}),(0,r.jsx)(eI.Z,{children:"Action"})]})}),(0,r.jsx)(ek.Z,{children:m.filter(e=>"TypedDictionary"!==e.field_type).map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsxs)(eS.Z,{children:[(0,r.jsx)(S.Z,{children:e.field_name}),(0,r.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:e.field_description})]}),(0,r.jsx)(eS.Z,{children:"Integer"==e.field_type?(0,r.jsx)(M.Z,{step:1,value:e.field_value,onChange:l=>O(e.field_name,l)}):null}),(0,r.jsx)(eS.Z,{children:!0==e.stored_in_db?(0,r.jsx)(eO.Z,{icon:ea.Z,className:"text-white",children:"In DB"}):!1==e.stored_in_db?(0,r.jsx)(eO.Z,{className:"text-gray bg-white outline",children:"In Config"}):(0,r.jsx)(eO.Z,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,r.jsxs)(eS.Z,{children:[(0,r.jsx)(b.Z,{onClick:()=>T(e.field_name,l),children:"Update"}),(0,r.jsx)(lj.Z,{icon:eV.Z,color:"red",onClick:()=>L(e.field_name,l),children:"Reset"})]})]},l))})]})})})]})]})}):null},sC=s(93142),sI=s(45246),sA=s(96473),sE=e=>{let{value:l={},onChange:s}=e,[t,a]=(0,i.useState)(Object.entries(l)),n=e=>{let l=t.filter((l,s)=>s!==e);a(l),null==s||s(Object.fromEntries(l))},o=(e,l,r)=>{let i=[...t];i[e]=[l,r],a(i),null==s||s(Object.fromEntries(i))};return(0,r.jsxs)("div",{children:[t.map((e,l)=>{let[s,t]=e;return(0,r.jsxs)(sC.Z,{style:{display:"flex",marginBottom:8},align:"start",children:[(0,r.jsx)(Z.Z,{placeholder:"Header Name",value:s,onChange:e=>o(l,e.target.value,t)}),(0,r.jsx)(Z.Z,{placeholder:"Header Value",value:t,onChange:e=>o(l,s,e.target.value)}),(0,r.jsx)(sI.Z,{onClick:()=>n(l)})]},l)}),(0,r.jsx)(L.ZP,{type:"dashed",onClick:()=>{a([...t,["",""]])},icon:(0,r.jsx)(sA.Z,{}),children:"Add Header"})]})};let{Option:sP}=A.default;var sO=e=>{let{accessToken:l,setPassThroughItems:s,passThroughItems:t}=e,[a]=E.Z.useForm(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)("");return(0,r.jsxs)("div",{children:[(0,r.jsx)(b.Z,{className:"mx-auto",onClick:()=>o(!0),children:"+ Add Pass-Through Endpoint"}),(0,r.jsx)(O.Z,{title:"Add Pass-Through Endpoint",visible:n,width:800,footer:null,onOk:()=>{o(!1),a.resetFields()},onCancel:()=>{o(!1),a.resetFields()},children:(0,r.jsxs)(E.Z,{form:a,onFinish:e=>{console.log(e);let r=[...t,{headers:e.headers,path:e.path,target:e.target}];try{(0,g.Vt)(l,e),s(r)}catch(e){P.ZP.error("Failed to update router settings: "+e,20)}P.ZP.success("Pass through endpoint successfully added"),o(!1),a.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Path",name:"path",rules:[{required:!0,message:"The route to be added to the LiteLLM Proxy Server."}],help:"required",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"Target",name:"target",rules:[{required:!0,message:"The URL to which requests for this path should be forwarded."}],help:"required",children:(0,r.jsx)(Z.Z,{})}),(0,r.jsx)(E.Z.Item,{label:"Headers",name:"headers",rules:[{required:!0,message:"Key-value pairs of headers to be forwarded with the request. You can set any key value pair here and it will be forwarded to your target endpoint"}],help:"required",children:(0,r.jsx)(sE,{})})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Add Pass-Through Endpoint"})})]})})]})},sT=e=>{let{accessToken:l,userRole:s,userID:t,modelData:a}=e,[n,o]=(0,i.useState)([]);(0,i.useEffect)(()=>{l&&s&&t&&(0,g.mp)(l).then(e=>{o(e.endpoints)})},[l,s,t]);let d=(e,s)=>{if(l)try{(0,g.EG)(l,e);let s=n.filter(l=>l.path!==e);o(s),P.ZP.success("Endpoint deleted successfully.")}catch(e){}};return l?(0,r.jsx)("div",{className:"w-full mx-4",children:(0,r.jsx)(eM.Z,{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Path"}),(0,r.jsx)(eI.Z,{children:"Target"}),(0,r.jsx)(eI.Z,{children:"Headers"}),(0,r.jsx)(eI.Z,{children:"Action"})]})}),(0,r.jsx)(ek.Z,{children:n.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:(0,r.jsx)(S.Z,{children:e.path})}),(0,r.jsx)(eS.Z,{children:e.target}),(0,r.jsx)(eS.Z,{children:JSON.stringify(e.headers)}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)(lj.Z,{icon:eV.Z,color:"red",onClick:()=>d(e.path,l),children:"Reset"})})]},l))})]}),(0,r.jsx)(sO,{accessToken:l,setPassThroughItems:o,passThroughItems:n})]})})}):null},sL=e=>{let{isModalVisible:l,accessToken:s,setIsModalVisible:t,setBudgetList:a}=e,[i]=E.Z.useForm(),n=async e=>{if(null!=s&&void 0!=s)try{P.ZP.info("Making API Call");let l=await (0,g.Zr)(s,e);console.log("key create Response:",l),a(e=>e?[...e,l]:[l]),P.ZP.success("API Key Created"),i.resetFields()}catch(e){console.error("Error creating the key:",e),P.ZP.error("Error creating the key: ".concat(e),20)}};return(0,r.jsx)(O.Z,{title:"Create Budget",visible:l,width:800,footer:null,onOk:()=>{t(!1),i.resetFields()},onCancel:()=>{t(!1),i.resetFields()},children:(0,r.jsxs)(E.Z,{form:i,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,r.jsx)(M.Z,{step:1,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,r.jsx)(M.Z,{step:1,precision:2,width:200})}),(0,r.jsxs)(N.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(k.Z,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(w.Z,{children:[(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(A.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(A.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Create Budget"})})]})})},sM=e=>{let{isModalVisible:l,accessToken:s,setIsModalVisible:t,setBudgetList:a,existingBudget:n,handleUpdateCall:o}=e;console.log("existingBudget",n);let[d]=E.Z.useForm();(0,i.useEffect)(()=>{d.setFieldsValue(n)},[n,d]);let c=async e=>{if(null!=s&&void 0!=s)try{P.ZP.info("Making API Call"),t(!0);let l=await (0,g.qI)(s,e);a(e=>e?[...e,l]:[l]),P.ZP.success("Budget Updated"),d.resetFields(),o()}catch(e){console.error("Error creating the key:",e),P.ZP.error("Error creating the key: ".concat(e),20)}};return(0,r.jsx)(O.Z,{title:"Edit Budget",visible:l,width:800,footer:null,onOk:()=>{t(!1),d.resetFields()},onCancel:()=>{t(!1),d.resetFields()},children:(0,r.jsxs)(E.Z,{form:d,onFinish:c,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:n,children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Z.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,r.jsx)(Z.Z,{placeholder:""})}),(0,r.jsx)(E.Z.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,r.jsx)(M.Z,{step:1,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,r.jsx)(M.Z,{step:1,precision:2,width:200})}),(0,r.jsxs)(N.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(k.Z,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(w.Z,{children:[(0,r.jsx)(E.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(M.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(E.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(A.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(A.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(A.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(A.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(L.ZP,{htmlType:"submit",children:"Save"})})]})})},sD=s(17906),sF=e=>{let{accessToken:l}=e,[s,t]=(0,i.useState)(!1),[a,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(null),[c,m]=(0,i.useState)([]);(0,i.useEffect)(()=>{l&&(0,g.O3)(l).then(e=>{m(e)})},[l]);let u=async(e,s)=>{console.log("budget_id",e),null!=l&&(d(c.find(l=>l.budget_id===e)||null),n(!0))},h=async(e,s)=>{if(null==l)return;P.ZP.info("Request made"),await (0,g.NV)(l,e);let t=[...c];t.splice(s,1),m(t),P.ZP.success("Budget Deleted.")},x=async()=>{null!=l&&(0,g.O3)(l).then(e=>{m(e)})};return(0,r.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,r.jsx)(b.Z,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>t(!0),children:"+ Create Budget"}),(0,r.jsx)(sL,{accessToken:l,isModalVisible:s,setIsModalVisible:t,setBudgetList:m}),o&&(0,r.jsx)(sM,{accessToken:l,isModalVisible:a,setIsModalVisible:n,setBudgetList:m,existingBudget:o,handleUpdateCall:x}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(S.Z,{children:"Create a budget to assign to customers."}),(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Budget ID"}),(0,r.jsx)(eI.Z,{children:"Max Budget"}),(0,r.jsx)(eI.Z,{children:"TPM"}),(0,r.jsx)(eI.Z,{children:"RPM"})]})}),(0,r.jsx)(ek.Z,{children:c.slice().sort((e,l)=>new Date(l.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e.budget_id}),(0,r.jsx)(eS.Z,{children:e.max_budget?e.max_budget:"n/a"}),(0,r.jsx)(eS.Z,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,r.jsx)(eS.Z,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,r.jsx)(lj.Z,{icon:lt.Z,size:"sm",onClick:()=>u(e.budget_id,l)}),(0,r.jsx)(lj.Z,{icon:eV.Z,size:"sm",onClick:()=>h(e.budget_id,l)})]},l))})]})]}),(0,r.jsxs)("div",{className:"mt-5",children:[(0,r.jsx)(S.Z,{className:"text-base",children:"How to use budget id"}),(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{children:[(0,r.jsx)(eL.Z,{children:"Assign Budget to Customer"}),(0,r.jsx)(eL.Z,{children:"Test it (Curl)"}),(0,r.jsx)(eL.Z,{children:"Test it (OpenAI SDK)"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sD.Z,{language:"bash",children:"\ncurl -X POST --location '<your_proxy_base_url>/end_user/new' \n-H 'Authorization: Bearer <your-master-key>' \n-H 'Content-Type: application/json' \n-d '{\"user_id\": \"my-customer-id', \"budget_id\": \"<BUDGET_ID>\"}' # \uD83D\uDC48 KEY CHANGE\n\n "})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sD.Z,{language:"bash",children:'\ncurl -X POST --location \'<your_proxy_base_url>/chat/completions\' \n-H \'Authorization: Bearer <your-master-key>\' \n-H \'Content-Type: application/json\' \n-d \'{\n "model": "gpt-3.5-turbo\', \n "messages":[{"role": "user", "content": "Hey, how\'s it going?"}],\n "user": "my-customer-id"\n}\' # \uD83D\uDC48 KEY CHANGE\n\n '})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sD.Z,{language:"python",children:'from openai import OpenAI\nclient = OpenAI(\n base_url="<your_proxy_base_url>",\n api_key="<your_proxy_key>"\n)\n\ncompletion = client.chat.completions.create(\n model="gpt-3.5-turbo",\n messages=[\n {"role": "system", "content": "You are a helpful assistant."},\n {"role": "user", "content": "Hello!"}\n ],\n user="my-customer-id"\n)\n\nprint(completion.choices[0].message)'})})]})]})]})]})},sR=s(77398),sU=s.n(sR),sz=s(20016);async function sV(e){try{let l=await fetch("http://ip-api.com/json/".concat(e)),s=await l.json();console.log("ip lookup data",s);let t=s.countryCode?s.countryCode.toUpperCase().split("").map(e=>String.fromCodePoint(e.charCodeAt(0)+127397)).join(""):"";return s.country?"".concat(t," ").concat(s.country):"Unknown"}catch(e){return console.error("Error looking up IP:",e),"Unknown"}}let sq=e=>{let{ipAddress:l}=e,[s,t]=i.useState("-");return i.useEffect(()=>{if(!l)return;let e=!0;return sV(l).then(l=>{e&&t(l)}).catch(()=>{e&&t("-")}),()=>{e=!1}},[l]),(0,r.jsx)("span",{children:s})},sK=e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}},sB=e=>{let{utcTime:l}=e;return(0,r.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:sK(l)})},sH=[{id:"expander",header:()=>null,cell:e=>{let{row:l}=e;return(0,r.jsx)(()=>{let[e,s]=i.useState(l.getIsExpanded()),t=i.useCallback(()=>{s(e=>!e),l.getToggleExpandedHandler()()},[l]);return l.getCanExpand()?(0,r.jsx)("button",{onClick:t,style:{cursor:"pointer"},"aria-label":e?"Collapse row":"Expand row",className:"w-6 h-6 flex items-center justify-center focus:outline-none",children:(0,r.jsx)("svg",{className:"w-4 h-4 transform transition-transform duration-75 ".concat(e?"rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):(0,r.jsx)("span",{className:"w-6 h-6 flex items-center justify-center",children:"●"})},{})}},{header:"Time",accessorKey:"startTime",cell:e=>(0,r.jsx)(sB,{utcTime:e.getValue()})},{header:"Status",accessorKey:"metadata.status",cell:e=>{let l="failure"!==(e.getValue()||"Success").toLowerCase();return(0,r.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ".concat(l?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:l?"Success":"Failure"})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,r.jsx)(V.Z,{title:String(e.getValue()||""),children:(0,r.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:"Cost",accessorKey:"spend",cell:e=>(0,r.jsxs)("span",{children:["$",Number(e.getValue()||0).toFixed(6)]})},{header:"Country",accessorKey:"requester_ip_address",cell:e=>(0,r.jsx)(sq,{ipAddress:e.getValue()})},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,r.jsx)(V.Z,{title:String(e.getValue()||"-"),children:(0,r.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let l=String(e.getValue()||"-");return(0,r.jsx)(V.Z,{title:l,children:(0,r.jsx)("span",{className:"font-mono max-w-[15ch] truncate block",children:l})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,r.jsx)(V.Z,{title:String(e.getValue()||"-"),children:(0,r.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let l=e.row.original.custom_llm_provider,s=String(e.getValue()||"");return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[l&&(0,r.jsx)("img",{src:e7(l).logo,alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,r.jsx)(V.Z,{title:s,children:(0,r.jsx)("span",{className:"max-w-[15ch] truncate block",children:s})})]})}},{header:"Tokens",accessorKey:"total_tokens",cell:e=>{let l=e.row.original;return(0,r.jsxs)("span",{className:"text-sm",children:[String(l.total_tokens||"0"),(0,r.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(l.prompt_tokens||"0"),"+",String(l.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,r.jsx)(V.Z,{title:String(e.getValue()||"-"),children:(0,r.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,r.jsx)(V.Z,{title:String(e.getValue()||"-"),children:(0,r.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let l=e.getValue();if(!l||0===Object.keys(l).length)return"-";let s=Object.entries(l),t=s[0],a=s.slice(1);return(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,r.jsx)(V.Z,{title:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:s.map(e=>{let[l,s]=e;return(0,r.jsxs)("span",{children:[l,": ",String(s)]},l)})}),children:(0,r.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[t[0],": ",String(t[1]),a.length>0&&" +".concat(a.length)]})})})}}],sJ=async(e,l,s,t)=>{console.log("prefetchLogDetails called with",e.length,"logs");let a=e.map(e=>{if(e.request_id)return console.log("Prefetching details for request_id:",e.request_id),t.prefetchQuery({queryKey:["logDetails",e.request_id,l],queryFn:async()=>{console.log("Fetching details for",e.request_id);let t=await (0,g.qk)(s,e.request_id,l);return console.log("Received details for",e.request_id,":",t?"success":"failed"),t},staleTime:6e5,gcTime:6e5})});try{let e=await Promise.all(a);return console.log("All prefetch promises completed:",e.length),e}catch(e){throw console.error("Error in prefetchLogDetails:",e),e}},sW=e=>{var l;let{errorInfo:s}=e,[t,a]=i.useState({}),[n,o]=i.useState(!1),d=e=>{a(l=>({...l,[e]:!l[e]}))},c=s.traceback&&(l=s.traceback)?Array.from(l.matchAll(/File "([^"]+)", line (\d+)/g)).map(e=>{let s=e[1],t=e[2],a=s.split("/").pop()||s,r=e.index||0,i=l.indexOf('File "',r+1),n=i>-1?l.substring(r,i).trim():l.substring(r).trim(),o=n.split("\n"),d="";return o.length>1&&(d=o[o.length-1].trim()),{filePath:s,fileName:a,lineNumber:t,code:d,inFunction:n.includes(" in ")?n.split(" in ")[1].split("\n")[0]:""}}):[];return(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsx)("div",{className:"p-4 border-b",children:(0,r.jsxs)("h3",{className:"text-lg font-medium flex items-center text-red-600",children:[(0,r.jsx)("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),"Error Details"]})}),(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"bg-red-50 rounded-md p-4 mb-4",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"text-red-800 font-medium w-20",children:"Type:"}),(0,r.jsx)("span",{className:"text-red-700",children:s.error_class||"Unknown Error"})]}),(0,r.jsxs)("div",{className:"flex mt-2",children:[(0,r.jsx)("span",{className:"text-red-800 font-medium w-20",children:"Message:"}),(0,r.jsx)("span",{className:"text-red-700",children:s.error_message||"Unknown error occurred"})]})]}),s.traceback&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,r.jsx)("h4",{className:"font-medium",children:"Traceback"}),(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsx)("button",{onClick:()=>{let e=!n;if(o(e),c.length>0){let l={};c.forEach((s,t)=>{l[t]=e}),a(l)}},className:"text-gray-500 hover:text-gray-700 flex items-center text-sm",children:n?"Collapse All":"Expand All"}),(0,r.jsxs)("button",{onClick:()=>navigator.clipboard.writeText(s.traceback||""),className:"text-gray-500 hover:text-gray-700 flex items-center",title:"Copy traceback",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),(0,r.jsx)("span",{className:"ml-1",children:"Copy"})]})]})]}),(0,r.jsx)("div",{className:"bg-white rounded-md border border-gray-200 overflow-hidden shadow-sm",children:c.map((e,l)=>(0,r.jsxs)("div",{className:"border-b border-gray-200 last:border-b-0",children:[(0,r.jsxs)("div",{className:"px-4 py-2 flex items-center justify-between cursor-pointer hover:bg-gray-50",onClick:()=>d(l),children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"text-gray-400 mr-2 w-12 text-right",children:e.lineNumber}),(0,r.jsx)("span",{className:"text-gray-600 font-medium",children:e.fileName}),(0,r.jsx)("span",{className:"text-gray-500 mx-1",children:"in"}),(0,r.jsx)("span",{className:"text-indigo-600 font-medium",children:e.inFunction||e.fileName})]}),(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-500 transition-transform ".concat(t[l]?"transform rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(t[l]||!1)&&e.code&&(0,r.jsx)("div",{className:"px-12 py-2 font-mono text-sm text-gray-800 bg-gray-50 overflow-x-auto border-t border-gray-100",children:e.code})]},l))})]})]})]})},sG=e=>{let{show:l}=e;return l?(0,r.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,r.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,r.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,r.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file:"]}),(0,r.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:"general_settings:\n store_model_in_db: true\n store_prompts_in_spend_logs: true"}),(0,r.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null};function sY(e){var l,s,t,a;let{accessToken:n,token:o,userRole:d,userID:m}=e,[u,h]=(0,i.useState)(""),[x,p]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[_,y]=(0,i.useState)(1),[v]=(0,i.useState)(50),b=(0,i.useRef)(null),Z=(0,i.useRef)(null),N=(0,i.useRef)(null),[w,k]=(0,i.useState)(sU()().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[S,C]=(0,i.useState)(sU()().format("YYYY-MM-DDTHH:mm")),[I,A]=(0,i.useState)(!1),[E,P]=(0,i.useState)(!1),[O,T]=(0,i.useState)(""),[L,M]=(0,i.useState)(""),[D,F]=(0,i.useState)(""),[R,U]=(0,i.useState)(""),[z,V]=(0,i.useState)("Team ID"),[q,K]=(0,i.useState)(d&&em.includes(d)),[B,H]=(0,i.useState)(null),J=(0,c.NL)();(0,i.useEffect)(()=>{function e(e){b.current&&!b.current.contains(e.target)&&f(!1),Z.current&&!Z.current.contains(e.target)&&p(!1),N.current&&!N.current.contains(e.target)&&P(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{d&&em.includes(d)&&K(!0)},[d]);let W=(0,sz.a)({queryKey:["logs","table",_,v,w,S,D,R,q?m:null],queryFn:async()=>{if(!n||!o||!d||!m)return console.log("Missing required auth parameters"),{data:[],total:0,page:1,page_size:v,total_pages:0};let e=sU()(w).utc().format("YYYY-MM-DD HH:mm:ss"),l=I?sU()(S).utc().format("YYYY-MM-DD HH:mm:ss"):sU()().utc().format("YYYY-MM-DD HH:mm:ss"),s=await (0,g.h3)(n,R||void 0,D||void 0,void 0,e,l,_,v,q?m:void 0);return await sJ(s.data,e,n,J),s.data=s.data.map(l=>{let s=J.getQueryData(["logDetails",l.request_id,e]);return(null==s?void 0:s.messages)&&(null==s?void 0:s.response)&&(l.messages=s.messages,l.response=s.response),l}),s},enabled:!!n&&!!o&&!!d&&!!m,refetchInterval:5e3,refetchIntervalInBackground:!0});if((0,i.useEffect)(()=>{var e;(null===(e=W.data)||void 0===e?void 0:e.data)&&B&&!W.data.data.some(e=>e.request_id===B)&&H(null)},[null===(l=W.data)||void 0===l?void 0:l.data,B]),!n||!o||!d||!m)return console.log("got None values for one of accessToken, token, userRole, userID"),null;let G=(null===(t=W.data)||void 0===t?void 0:null===(s=t.data)||void 0===s?void 0:s.filter(e=>!u||e.request_id.includes(u)||e.model.includes(u)||e.user&&e.user.includes(u)))||[],Y=()=>{if(I)return"".concat(sU()(w).format("MMM D, h:mm A")," - ").concat(sU()(S).format("MMM D, h:mm A"));let e=sU()(),l=sU()(w),s=e.diff(l,"minutes");if(s<=15)return"Last 15 Minutes";if(s<=60)return"Last Hour";let t=e.diff(l,"hours");return t<=4?"Last 4 Hours":t<=24?"Last 24 Hours":t<=168?"Last 7 Days":"".concat(l.format("MMM D")," - ").concat(e.format("MMM D"))};return(0,r.jsxs)("div",{className:"w-full p-6",children:[(0,r.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,r.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsx)("div",{className:"border-b px-6 py-4",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,r.jsxs)("div",{className:"relative w-64",children:[(0,r.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:u,onChange:e=>h(e.target.value)}),(0,r.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,r.jsxs)("div",{className:"relative",ref:Z,children:[(0,r.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>p(!x),children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filter"]}),x&&(0,r.jsx)("div",{className:"absolute left-0 mt-2 w-[500px] bg-white rounded-lg shadow-lg border p-4 z-50",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium",children:"Where"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{onClick:()=>f(!j),className:"px-3 py-1.5 border rounded-md bg-white text-sm min-w-[160px] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-left flex justify-between items-center",children:[z,(0,r.jsx)("svg",{className:"h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),j&&(0,r.jsx)("div",{className:"absolute left-0 mt-1 w-[160px] bg-white border rounded-md shadow-lg z-50",children:["Team ID","Key Hash"].map(e=>(0,r.jsxs)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 flex items-center gap-2 ".concat(z===e?"bg-blue-50 text-blue-600":""),onClick:()=>{V(e),f(!1),"Team ID"===e?M(""):T("")},children:[z===e&&(0,r.jsx)("svg",{className:"h-4 w-4 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),e]},e))})]}),(0,r.jsx)("input",{type:"text",placeholder:"Enter value...",className:"px-3 py-1.5 border rounded-md text-sm flex-1 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:"Team ID"===z?O:L,onChange:e=>{"Team ID"===z?T(e.target.value):M(e.target.value)}}),(0,r.jsx)("button",{className:"p-1 hover:bg-gray-100 rounded-md",onClick:()=>{T(""),M("")},children:(0,r.jsx)("span",{className:"text-gray-500",children:"\xd7"})})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{className:"px-3 py-1.5 text-sm border rounded-md hover:bg-gray-50",onClick:()=>{T(""),M(""),p(!1)},children:"Cancel"}),(0,r.jsx)("button",{className:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700",onClick:()=>{F(O),U(L),y(1),p(!1)},children:"Apply Filters"})]})]})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative",ref:N,children:[(0,r.jsxs)("button",{onClick:()=>P(!E),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),Y()]}),E&&(0,r.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,r.jsxs)("div",{className:"space-y-1",children:[[{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}].map(e=>(0,r.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ".concat(Y()===e.label?"bg-blue-50 text-blue-600":""),onClick:()=>{C(sU()().format("YYYY-MM-DDTHH:mm")),k(sU()().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),P(!1),A(!1)},children:e.label},e.label)),(0,r.jsx)("div",{className:"border-t my-2"}),(0,r.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ".concat(I?"bg-blue-50 text-blue-600":""),onClick:()=>A(!I),children:"Custom Range"})]})})]}),(0,r.jsxs)("button",{onClick:()=>{W.refetch()},className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",title:"Refresh data",children:[(0,r.jsx)("svg",{className:"w-4 h-4 ".concat(W.isFetching?"animate-spin":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),(0,r.jsx)("span",{children:"Refresh"})]})]}),I&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{children:(0,r.jsx)("input",{type:"datetime-local",value:w,onChange:e=>{k(e.target.value),y(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,r.jsx)("span",{className:"text-gray-500",children:"to"}),(0,r.jsx)("div",{children:(0,r.jsx)("input",{type:"datetime-local",value:S,onChange:e=>{C(e.target.value),y(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",W.isLoading?"...":W.data?(_-1)*v+1:0," ","-"," ",W.isLoading?"...":W.data?Math.min(_*v,W.data.total):0," ","of"," ",W.isLoading?"...":W.data?W.data.total:0," ","results"]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",W.isLoading?"...":_," of"," ",W.isLoading?"...":W.data?W.data.total_pages:1]}),(0,r.jsx)("button",{onClick:()=>y(e=>Math.max(1,e-1)),disabled:W.isLoading||1===_,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,r.jsx)("button",{onClick:()=>y(e=>{var l;return Math.min((null===(l=W.data)||void 0===l?void 0:l.total_pages)||1,e+1)}),disabled:W.isLoading||_===((null===(a=W.data)||void 0===a?void 0:a.total_pages)||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),(0,r.jsx)(eE,{columns:sH,data:G,renderSubComponent:s$,getRowCanExpand:()=>!0,onRowExpand:e=>{H(e)},expandedRequestId:B})]})]})}function s$(e){var l,s,t,a,i,n;let{row:o}=e,d=e=>{let l={...e};return"proxy_server_request"in l&&delete l.proxy_server_request,l},c=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e},m=()=>{var e;return(null===(e=o.original.metadata)||void 0===e?void 0:e.proxy_server_request)?c(o.original.metadata.proxy_server_request):c(o.original.messages)},u=(null===(l=o.original.metadata)||void 0===l?void 0:l.status)==="failure",h=u?null===(s=o.original.metadata)||void 0===s?void 0:s.error_information:null,x=o.original.messages&&(Array.isArray(o.original.messages)?o.original.messages.length>0:Object.keys(o.original.messages).length>0),p=o.original.response&&Object.keys(c(o.original.response)).length>0,g=()=>u&&h?{error:{message:h.error_message||"An error occurred",type:h.error_class||"error",code:h.error_code||"unknown",param:null}}:c(o.original.response);return(0,r.jsxs)("div",{className:"p-6 bg-gray-50 space-y-6",children:[(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsx)("div",{className:"p-4 border-b",children:(0,r.jsx)("h3",{className:"text-lg font-medium",children:"Request Details"})}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4 p-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Request ID:"}),(0,r.jsx)("span",{className:"font-mono text-sm",children:o.original.request_id})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Model:"}),(0,r.jsx)("span",{children:o.original.model})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,r.jsx)("span",{children:o.original.custom_llm_provider||"-"})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,r.jsx)("span",{children:o.original.startTime})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,r.jsx)("span",{children:o.original.endTime})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Tokens:"}),(0,r.jsxs)("span",{children:[o.original.total_tokens," (",o.original.prompt_tokens,"+",o.original.completion_tokens,")"]})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Cost:"}),(0,r.jsxs)("span",{children:["$",Number(o.original.spend||0).toFixed(6)]})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Cache Hit:"}),(0,r.jsx)("span",{children:o.original.cache_hit})]}),(null==o?void 0:null===(t=o.original)||void 0===t?void 0:t.requester_ip_address)&&(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"IP Address:"}),(0,r.jsx)("span",{children:null==o?void 0:null===(a=o.original)||void 0===a?void 0:a.requester_ip_address})]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"font-medium w-1/3",children:"Status:"}),(0,r.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ".concat("failure"!==((null===(i=o.original.metadata)||void 0===i?void 0:i.status)||"Success").toLowerCase()?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:"failure"!==((null===(n=o.original.metadata)||void 0===n?void 0:n.status)||"Success").toLowerCase()?"Success":"Failure"})]})]})]})]}),(0,r.jsx)(sG,{show:!x&&!p}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center p-4 border-b",children:[(0,r.jsx)("h3",{className:"text-lg font-medium",children:"Request"}),(0,r.jsx)("button",{onClick:()=>navigator.clipboard.writeText(JSON.stringify(m(),null,2)),className:"p-1 hover:bg-gray-200 rounded",title:"Copy request",disabled:!x,children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}),(0,r.jsx)("div",{className:"p-4 overflow-auto max-h-96",children:(0,r.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all",children:JSON.stringify(m(),null,2)})})]}),(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center p-4 border-b",children:[(0,r.jsxs)("h3",{className:"text-lg font-medium",children:["Response",u&&(0,r.jsxs)("span",{className:"ml-2 text-sm text-red-600",children:["• HTTP code ",(null==h?void 0:h.error_code)||400]})]}),(0,r.jsx)("button",{onClick:()=>navigator.clipboard.writeText(JSON.stringify(g(),null,2)),className:"p-1 hover:bg-gray-200 rounded",title:"Copy response",disabled:!p,children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}),(0,r.jsx)("div",{className:"p-4 overflow-auto max-h-96 bg-gray-50",children:p?(0,r.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all",children:JSON.stringify(g(),null,2)}):(0,r.jsx)("div",{className:"text-gray-500 text-sm italic text-center py-4",children:"Response data not available"})})]})]}),u&&h&&(0,r.jsx)(sW,{errorInfo:h}),o.original.request_tags&&Object.keys(o.original.request_tags).length>0&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsx)("div",{className:"flex justify-between items-center p-4 border-b",children:(0,r.jsx)("h3",{className:"text-lg font-medium",children:"Request Tags"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(o.original.request_tags).map(e=>{let[l,s]=e;return(0,r.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[l,": ",String(s)]},l)})})})]}),o.original.metadata&&Object.keys(o.original.metadata).length>0&&(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center p-4 border-b",children:[(0,r.jsx)("h3",{className:"text-lg font-medium",children:"Metadata"}),(0,r.jsx)("button",{onClick:()=>{let e=d(o.original.metadata);navigator.clipboard.writeText(JSON.stringify(e,null,2))},className:"p-1 hover:bg-gray-200 rounded",title:"Copy metadata",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}),(0,r.jsx)("div",{className:"p-4 overflow-auto max-h-64",children:(0,r.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all",children:JSON.stringify(d(o.original.metadata),null,2)})})]})]})}var sX=s(92699),sQ=e=>{let{proxySettings:l}=e,s="<your_proxy_base_url>";return l&&l.PROXY_BASE_URL&&void 0!==l.PROXY_BASE_URL&&(s=l.PROXY_BASE_URL),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(v.Z,{className:"gap-2 p-8 h-[80vh] w-full mt-2",children:(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:"OpenAI Compatible Proxy: API Reference"}),(0,r.jsx)(S.Z,{className:"mt-2 mb-2",children:"LiteLLM is OpenAI Compatible. This means your API Key works with the OpenAI SDK. Just replace the base_url to point to your litellm proxy. Example Below "}),(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{children:[(0,r.jsx)(eL.Z,{children:"OpenAI Python SDK"}),(0,r.jsx)(eL.Z,{children:"LlamaIndex"}),(0,r.jsx)(eL.Z,{children:"Langchain Py"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sD.Z,{language:"python",children:'\nimport openai\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="'.concat(s,'" # LiteLLM Proxy is OpenAI compatible, Read More: https://docs.litellm.ai/docs/proxy/user_keys\n)\n\nresponse = client.chat.completions.create(\n model="gpt-3.5-turbo", # model to send to the proxy\n messages = [\n {\n "role": "user",\n "content": "this is a test request, write a short poem"\n }\n ]\n)\n\nprint(response)\n ')})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sD.Z,{language:"python",children:'\nimport os, dotenv\n\nfrom llama_index.llms import AzureOpenAI\nfrom llama_index.embeddings import AzureOpenAIEmbedding\nfrom llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n\nllm = AzureOpenAI(\n engine="azure-gpt-3.5", # model_name on litellm proxy\n temperature=0.0,\n azure_endpoint="'.concat(s,'", # litellm proxy endpoint\n api_key="sk-1234", # litellm proxy API Key\n api_version="2023-07-01-preview",\n)\n\nembed_model = AzureOpenAIEmbedding(\n deployment_name="azure-embedding-model",\n azure_endpoint="').concat(s,'",\n api_key="sk-1234",\n api_version="2023-07-01-preview",\n)\n\n\ndocuments = SimpleDirectoryReader("llama_index_data").load_data()\nservice_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model)\nindex = VectorStoreIndex.from_documents(documents, service_context=service_context)\n\nquery_engine = index.as_query_engine()\nresponse = query_engine.query("What did the author do growing up?")\nprint(response)\n\n ')})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(sD.Z,{language:"python",children:'\nfrom langchain.chat_models import ChatOpenAI\nfrom langchain.prompts.chat import (\n ChatPromptTemplate,\n HumanMessagePromptTemplate,\n SystemMessagePromptTemplate,\n)\nfrom langchain.schema import HumanMessage, SystemMessage\n\nchat = ChatOpenAI(\n openai_api_base="'.concat(s,'",\n model = "gpt-3.5-turbo",\n temperature=0.1\n)\n\nmessages = [\n SystemMessage(\n content="You are a helpful assistant that im using to make a test request to."\n ),\n HumanMessage(\n content="test from litellm. tell me why it\'s amazing in 1 sentence"\n ),\n]\nresponse = chat(messages)\n\nprint(response)\n\n ')})})]})]})]})})})},s0=s(243),s1=s(94263);async function s2(e,l,s,t){console.log=function(){},console.log("isLocal:",!1);let a=window.location.origin,r=new sZ.ZP.OpenAI({apiKey:t,baseURL:a,dangerouslyAllowBrowser:!0});try{for await(let t of(await r.chat.completions.create({model:s,stream:!0,messages:e})))console.log(t),t.choices[0].delta.content&&l(t.choices[0].delta.content,t.model)}catch(e){P.ZP.error("Error occurred while generating model response. Please try again. Error: ".concat(e),20)}}var s4=e=>{let{accessToken:l,token:s,userRole:t,userID:a,disabledPersonalKeyCreation:n}=e,[o,d]=(0,i.useState)(n?"custom":"session"),[c,m]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[x,p]=(0,i.useState)([]),[j,f]=(0,i.useState)(void 0),[_,N]=(0,i.useState)(!1),[w,k]=(0,i.useState)([]),C=(0,i.useRef)(null),I=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e="session"===o?l:c;if(console.log("useApiKey:",e),!e||!s||!t||!a){console.log("useApiKey or token or userRole or userID is missing = ",e,s,t,a);return}(async()=>{try{let l=await (0,g.So)(null!=e?e:"",a,t);if(console.log("model_info:",l),(null==l?void 0:l.data.length)>0){let e=new Map;l.data.forEach(l=>{e.set(l.id,{value:l.id,label:l.id})});let s=Array.from(e.values());s.sort((e,l)=>e.label.localeCompare(l.label)),k(s),f(s[0].value)}}catch(e){console.error("Error fetching model info:",e)}})()},[l,a,t,o,c]),(0,i.useEffect)(()=>{I.current&&setTimeout(()=>{var e;null===(e=I.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},100)},[x]);let E=(e,l,s)=>{p(t=>{let a=t[t.length-1];return a&&a.role===e?[...t.slice(0,t.length-1),{role:e,content:a.content+l,model:s}]:[...t,{role:e,content:l,model:s}]})},O=async()=>{if(""===u.trim()||!s||!t||!a)return;let e="session"===o?l:c;if(!e){P.ZP.error("Please provide an API key or select Current UI Session");return}let r={role:"user",content:u},i=[...x.map(e=>{let{role:l,content:s}=e;return{role:l,content:s}}),r];p([...x,r]);try{j&&await s2(i,(e,l)=>E("assistant",e,l),j,e)}catch(e){console.error("Error fetching model response",e),E("assistant","Error fetching model response")}h("")};if(t&&"Admin Viewer"===t){let{Title:e,Paragraph:l}=G.default;return(0,r.jsxs)("div",{children:[(0,r.jsx)(e,{level:1,children:"Access Denied"}),(0,r.jsx)(l,{children:"Ask your proxy admin for access to test models"})]})}return(0,r.jsx)("div",{style:{width:"100%",position:"relative"},children:(0,r.jsx)(v.Z,{className:"gap-2 p-8 h-[80vh] w-full mt-2",children:(0,r.jsx)(eT.Z,{children:(0,r.jsxs)(eM.Z,{children:[(0,r.jsx)(eD.Z,{children:(0,r.jsx)(eL.Z,{children:"Chat"})}),(0,r.jsx)(eR.Z,{children:(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)("div",{className:"sm:max-w-2xl",children:[(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(S.Z,{children:"API Key Source"}),(0,r.jsx)(A.default,{disabled:n,defaultValue:"session",style:{width:"100%"},onChange:e=>d(e),options:[{value:"session",label:"Current UI Session"},{value:"custom",label:"Virtual Key"}]}),"custom"===o&&(0,r.jsx)(Z.Z,{className:"mt-2",placeholder:"Enter custom API key",type:"password",onValueChange:m,value:c})]}),(0,r.jsxs)(y.Z,{className:"mx-2",children:[(0,r.jsx)(S.Z,{children:"Select Model:"}),(0,r.jsx)(A.default,{placeholder:"Select a Model",onChange:e=>{console.log("selected ".concat(e)),f(e),N("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model"}],style:{width:"350px"},showSearch:!0}),_&&(0,r.jsx)(Z.Z,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{f(e)},500)}})]})]}),(0,r.jsx)(b.Z,{onClick:()=>{p([]),P.ZP.success("Chat history cleared.")},className:"mt-4",children:"Clear Chat"})]}),(0,r.jsxs)(ew.Z,{className:"mt-5",style:{display:"block",maxHeight:"60vh",overflowY:"auto"},children:[(0,r.jsx)(eC.Z,{children:(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{})})}),(0,r.jsxs)(ek.Z,{children:[x.map((e,l)=>(0,r.jsx)(eA.Z,{children:(0,r.jsxs)(eS.Z,{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[(0,r.jsx)("strong",{children:e.role}),"assistant"===e.role&&e.model&&(0,r.jsx)("span",{style:{fontSize:"12px",color:"#666",backgroundColor:"#f5f5f5",padding:"2px 6px",borderRadius:"4px",fontWeight:"normal"},children:e.model})]}),(0,r.jsx)("div",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",maxWidth:"100%"},children:(0,r.jsx)(s0.U,{components:{code(e){let{node:l,inline:s,className:t,children:a,...i}=e,n=/language-(\w+)/.exec(t||"");return!s&&n?(0,r.jsx)(sD.Z,{style:s1.Z,language:n[1],PreTag:"div",...i,children:String(a).replace(/\n$/,"")}):(0,r.jsx)("code",{className:t,...i,children:a})}},children:e.content})})]})},l)),(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{children:(0,r.jsx)("div",{ref:I,style:{height:"1px"}})})})]})]}),(0,r.jsx)("div",{className:"mt-3",style:{position:"absolute",bottom:5,width:"95%"},children:(0,r.jsxs)("div",{className:"flex",style:{marginTop:"16px"},children:[(0,r.jsx)(Z.Z,{type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O()},placeholder:"Type your message..."}),(0,r.jsx)(b.Z,{onClick:O,className:"ml-2",children:"Send"})]})})]})})]})})})})},s5=s(19226),s3=s(45937),s6=s(92403),s8=s(28595),s7=s(68208),s9=s(9775),te=s(41361),tl=s(37527),ts=s(12660),tt=s(88009),ta=s(48231),tr=s(41169),ti=s(44625),tn=s(57400),to=s(55322);let{Sider:td}=s5.default,tc=[{key:"1",page:"api-keys",label:"Virtual Keys",icon:(0,r.jsx)(s6.Z,{})},{key:"3",page:"llm-playground",label:"Test Key",icon:(0,r.jsx)(s8.Z,{}),roles:eu},{key:"2",page:"models",label:"Models",icon:(0,r.jsx)(s7.Z,{}),roles:ec},{key:"4",page:"usage",label:"Usage",icon:(0,r.jsx)(s9.Z,{})},{key:"6",page:"teams",label:"Teams",icon:(0,r.jsx)(te.Z,{})},{key:"17",page:"organizations",label:"Organizations",icon:(0,r.jsx)(tl.Z,{}),roles:ec},{key:"5",page:"users",label:"Internal Users",icon:(0,r.jsx)(h.Z,{}),roles:ec},{key:"14",page:"api_ref",label:"API Reference",icon:(0,r.jsx)(ts.Z,{})},{key:"16",page:"model-hub",label:"Model Hub",icon:(0,r.jsx)(tt.Z,{})},{key:"15",page:"logs",label:"Logs",icon:(0,r.jsx)(ta.Z,{})},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,r.jsx)(tr.Z,{}),roles:ec,children:[{key:"9",page:"caching",label:"Caching",icon:(0,r.jsx)(ti.Z,{}),roles:ec},{key:"10",page:"budgets",label:"Budgets",icon:(0,r.jsx)(tl.Z,{}),roles:ec},{key:"11",page:"guardrails",label:"Guardrails",icon:(0,r.jsx)(tn.Z,{}),roles:ec}]},{key:"settings",page:"settings",label:"Settings",icon:(0,r.jsx)(to.Z,{}),roles:ec,children:[{key:"11",page:"general-settings",label:"Router Settings",icon:(0,r.jsx)(to.Z,{}),roles:ec},{key:"12",page:"pass-through-settings",label:"Pass-Through",icon:(0,r.jsx)(ts.Z,{}),roles:ec},{key:"8",page:"settings",label:"Logging & Alerts",icon:(0,r.jsx)(to.Z,{}),roles:ec},{key:"13",page:"admin-panel",label:"Admin Settings",icon:(0,r.jsx)(to.Z,{}),roles:ec}]}];var tm=e=>{let{setPage:l,userRole:s,defaultSelectedKey:t}=e,a=(e=>{let l=tc.find(l=>l.page===e);if(l)return l.key;for(let l of tc)if(l.children){let s=l.children.find(l=>l.page===e);if(s)return s.key}return"1"})(t),i=tc.filter(e=>!e.roles||e.roles.includes(s));return(0,r.jsx)(s5.default,{style:{minHeight:"100vh"},children:(0,r.jsx)(td,{theme:"light",width:220,children:(0,r.jsx)(s3.Z,{mode:"inline",selectedKeys:[a],style:{borderRight:0,backgroundColor:"transparent",fontSize:"14px"},items:i.map(e=>{var s;return{key:e.key,icon:e.icon,label:e.label,children:null===(s=e.children)||void 0===s?void 0:s.map(e=>({key:e.key,icon:e.icon,label:e.label,onClick:()=>{let s=new URLSearchParams(window.location.search);s.set("page",e.page),window.history.pushState(null,"","?".concat(s.toString())),l(e.page)}})),onClick:e.children?void 0:()=>{let s=new URLSearchParams(window.location.search);s.set("page",e.page),window.history.pushState(null,"","?".concat(s.toString())),l(e.page)}}})})})})},tu=s(96889);console.log=function(){};var th=e=>{let{userID:l,userRole:s,accessToken:t,userSpend:a,userMaxBudget:n,selectedTeam:o}=e;console.log("userSpend: ".concat(a));let[d,c]=(0,i.useState)(null!==a?a:0),[m,u]=(0,i.useState)(o?o.max_budget:null);(0,i.useEffect)(()=>{if(o){if("Default Team"===o.team_alias)u(n);else{let e=!1;if(o.team_memberships)for(let s of o.team_memberships)s.user_id===l&&"max_budget"in s.litellm_budget_table&&null!==s.litellm_budget_table.max_budget&&(u(s.litellm_budget_table.max_budget),e=!0);e||u(o.max_budget)}}},[o,n]);let[h,x]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=async()=>{if(!t||!l||!s)return};(async()=>{try{if(null===l||null===s)return;if(null!==t){let e=(await (0,g.So)(t,l,s)).data.map(e=>e.id);console.log("available_model_names:",e),x(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[s,t,l]),(0,i.useEffect)(()=>{null!==a&&c(a)},[a]);let p=[];o&&o.models&&(p=o.models),p&&p.includes("all-proxy-models")?(console.log("user models:",h),p=h):p&&p.includes("all-team-models")?p=o.models:p&&0===p.length&&(p=h);let j=void 0!==d?d.toFixed(4):null;return console.log("spend in view user spend: ".concat(d)),(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,r.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",j]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,r.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:null!==m?"$".concat(m," limit"):"No limit"})]})]})})},tx=s(14042);let tp=e=>{let{key:l,info:s}=e;return{token:l,...s}};var tg=e=>{let{topKeys:l,accessToken:s,userID:t,userRole:a,teams:n}=e,[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(null),[u,h]=(0,i.useState)(void 0),[x,p]=(0,i.useState)("table"),j=async e=>{if(s)try{let l=await (0,g.t0)(s,e.api_key),t=tp(l);h(t),m(e.key),d(!0)}catch(e){console.error("Error fetching key info:",e)}},f=()=>{d(!1),m(null),h(void 0)};return i.useEffect(()=>{let e=e=>{"Escape"===e.key&&o&&f()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-4 flex justify-end items-center",children:(0,r.jsxs)("div",{className:"flex space-x-2",children:[(0,r.jsx)("button",{onClick:()=>p("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===x?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,r.jsx)("button",{onClick:()=>p("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===x?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})}),"chart"===x?(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(l_.Z,{className:"mt-4 h-40 cursor-pointer hover:opacity-90",data:l,index:"key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:80,tickGap:5,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>e?"$".concat(e.toFixed(2)):"No Key Alias",onValueChange:e=>j(e),showTooltip:!0,customTooltip:e=>{var l,s,t;let a=null===(s=e.payload)||void 0===s?void 0:null===(l=s[0])||void 0===l?void 0:l.payload;return(0,r.jsx)("div",{className:"p-3 bg-black/90 shadow-lg rounded-lg text-white",children:(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"text-gray-300",children:"Key: "}),(0,r.jsxs)("span",{className:"font-mono text-gray-100",children:[null==a?void 0:null===(t=a.key)||void 0===t?void 0:t.slice(0,10),"..."]})]}),(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,r.jsxs)("span",{className:"text-white font-medium",children:["$",null==a?void 0:a.spend.toFixed(2)]})]})]})})}})}):(0,r.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,r.jsx)(eE,{columns:[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(V.Z,{title:e.getValue(),children:(0,r.jsx)(b.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>j(e.row.original),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})})})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>"$".concat(Number(e.getValue()).toFixed(2))}],data:l,renderSubComponent:()=>(0,r.jsx)(r.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})}),o&&c&&u&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&f()},children:(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-xl relative w-11/12 max-w-6xl max-h-[90vh] overflow-y-auto min-h-[750px]",children:[(0,r.jsx)("button",{onClick:f,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-none","aria-label":"Close",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsx)("div",{className:"p-6 h-full",children:(0,r.jsx)(eB,{keyId:c,onClose:f,keyData:u,accessToken:s,userID:t,userRole:a,teams:n})})]})})]})};console.log("process.env.NODE_ENV","production"),console.log=function(){};let tj=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);var tf=e=>{let{accessToken:l,token:s,userRole:t,userID:a,keys:n,premiumUser:o}=e,d=new Date,[c,m]=(0,i.useState)([]),[u,h]=(0,i.useState)([]),[x,p]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[_,Z]=(0,i.useState)([]),[N,w]=(0,i.useState)([]),[k,I]=(0,i.useState)([]),[A,E]=(0,i.useState)([]),[P,O]=(0,i.useState)([]),[T,L]=(0,i.useState)([]),[M,D]=(0,i.useState)({}),[F,R]=(0,i.useState)([]),[U,z]=(0,i.useState)(""),[V,q]=(0,i.useState)(["all-tags"]),[K,B]=(0,i.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[H,J]=(0,i.useState)(null),[G,Y]=(0,i.useState)(0),$=new Date(d.getFullYear(),d.getMonth(),1),X=new Date(d.getFullYear(),d.getMonth()+1,0),Q=er($),ee=er(X);function el(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",n),console.log("premium user in usage",o);let es=async()=>{if(l)try{let e=await (0,g.g)(l);return console.log("usage tab: proxy_settings",e),e}catch(e){console.error("Error fetching proxy settings:",e)}};(0,i.useEffect)(()=>{ea(K.from,K.to)},[K,V]);let et=async(e,s,t)=>{if(!e||!s||!l)return;s.setHours(23,59,59,999),e.setHours(0,0,0,0),console.log("uiSelectedKey",t);let a=await (0,g.b1)(l,t,e.toISOString(),s.toISOString());console.log("End user data updated successfully",a),f(a)},ea=async(e,s)=>{if(!e||!s||!l)return;let t=await es();null!=t&&t.DISABLE_EXPENSIVE_DB_QUERIES||(s.setHours(23,59,59,999),e.setHours(0,0,0,0),w((await (0,g.J$)(l,e.toISOString(),s.toISOString(),0===V.length?void 0:V)).spend_per_tag),console.log("Tag spend data updated successfully"))};function er(e){let l=e.getFullYear(),s=e.getMonth()+1,t=e.getDate();return"".concat(l,"-").concat(s<10?"0"+s:s,"-").concat(t<10?"0"+t:t)}console.log("Start date is ".concat(Q)),console.log("End date is ".concat(ee));let ei=async(e,l,s)=>{try{let s=await e();l(s)}catch(e){console.error(s,e)}},en=(e,l,s,t)=>{let a=[],r=new Date(l),i=e=>{if(e.includes("-"))return e;{let[l,s]=e.split(" ");return new Date(new Date().getFullYear(),new Date("".concat(l," 01 2024")).getMonth(),parseInt(s)).toISOString().split("T")[0]}},n=new Map(e.map(e=>{let l=i(e.date);return[l,{...e,date:l}]}));for(;r<=s;){let e=r.toISOString().split("T")[0];if(n.has(e))a.push(n.get(e));else{let l={date:e,api_requests:0,total_tokens:0};t.forEach(e=>{l[e]||(l[e]=0)}),a.push(l)}r.setDate(r.getDate()+1)}return a},eo=async()=>{if(l)try{let e=await (0,g.FC)(l),s=new Date,t=new Date(s.getFullYear(),s.getMonth(),1),a=new Date(s.getFullYear(),s.getMonth()+1,0),r=en(e,t,a,[]),i=Number(r.reduce((e,l)=>e+(l.spend||0),0).toFixed(2));Y(i),m(r)}catch(e){console.error("Error fetching overall spend:",e)}},ed=()=>ei(()=>l&&s?(0,g.OU)(l,s,Q,ee):Promise.reject("No access token or token"),L,"Error fetching provider spend"),ec=async()=>{l&&await ei(async()=>(await (0,g.tN)(l)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),h,"Error fetching top keys")},em=async()=>{l&&await ei(async()=>(await (0,g.Au)(l)).map(e=>({key:e.model,spend:Number(e.total_spend.toFixed(2))})),p,"Error fetching top models")},eu=async()=>{l&&await ei(async()=>{let e=await (0,g.mR)(l),s=new Date,t=new Date(s.getFullYear(),s.getMonth(),1),a=new Date(s.getFullYear(),s.getMonth()+1,0);return Z(en(e.daily_spend,t,a,e.teams)),E(e.teams),e.total_spend_per_team.map(e=>({name:e.team_id||"",value:Number(e.total_spend||0).toFixed(2)}))},O,"Error fetching team spend")},eh=()=>{l&&ei(async()=>(await (0,g.X)(l)).tag_names,I,"Error fetching tag names")},ex=()=>{l&&ei(()=>{var e,s;return(0,g.J$)(l,null===(e=K.from)||void 0===e?void 0:e.toISOString(),null===(s=K.to)||void 0===s?void 0:s.toISOString(),void 0)},e=>w(e.spend_per_tag),"Error fetching top tags")},ep=()=>{l&&ei(()=>(0,g.b1)(l,null,void 0,void 0),f,"Error fetching top end users")},eg=async()=>{if(l)try{let e=await (0,g.wd)(l,Q,ee),s=new Date,t=new Date(s.getFullYear(),s.getMonth(),1),a=new Date(s.getFullYear(),s.getMonth()+1,0),r=en(e.daily_data||[],t,a,["api_requests","total_tokens"]);D({...e,daily_data:r})}catch(e){console.error("Error fetching global activity:",e)}},ej=async()=>{if(l)try{let e=await (0,g.xA)(l,Q,ee),s=new Date,t=new Date(s.getFullYear(),s.getMonth(),1),a=new Date(s.getFullYear(),s.getMonth()+1,0),r=e.map(e=>({...e,daily_data:en(e.daily_data||[],t,a,["api_requests","total_tokens"])}));R(r)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,i.useEffect)(()=>{(async()=>{if(l&&s&&t&&a){let e=await es();e&&(J(e),null!=e&&e.DISABLE_EXPENSIVE_DB_QUERIES)||(console.log("fetching data - valiue of proxySettings",H),eo(),ed(),ec(),em(),eg(),ej(),tj(t)&&(eu(),eh(),ex(),ep()))}})()},[l,s,t,a,Q,ee]),null==H?void 0:H.DISABLE_EXPENSIVE_DB_QUERIES)?(0,r.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:"Database Query Limit Reached"}),(0,r.jsxs)(S.Z,{className:"mt-4",children:["SpendLogs in DB has ",H.NUM_SPEND_LOGS_ROWS," rows.",(0,r.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,r.jsx)(b.Z,{className:"mt-4",children:(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,r.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{className:"mt-2",children:[(0,r.jsx)(eL.Z,{children:"All Up"}),tj(t)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eL.Z,{children:"Team Based Usage"}),(0,r.jsx)(eL.Z,{children:"Customer Usage"}),(0,r.jsx)(eL.Z,{children:"Tag Based Usage"})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{})})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{variant:"solid",className:"mt-1",children:[(0,r.jsx)(eL.Z,{children:"Cost"}),(0,r.jsx)(eL.Z,{children:"Activity"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,r.jsxs)(y.Z,{numColSpan:2,children:[(0,r.jsxs)(S.Z,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 - ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,r.jsx)(th,{userID:a,userRole:t,accessToken:l,userSpend:G,selectedTeam:null,userMaxBudget:null})]}),(0,r.jsx)(y.Z,{numColSpan:2,children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:"Monthly Spend"}),(0,r.jsx)(l_.Z,{data:c,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>"$ ".concat(e.toFixed(2)),yAxisWidth:100,tickGap:5})]})}),(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)(eT.Z,{className:"h-full",children:[(0,r.jsx)(C.Z,{children:"Top API Keys"}),(0,r.jsx)(tg,{topKeys:u,accessToken:l,userID:a,userRole:t,teams:null})]})}),(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)(eT.Z,{className:"h-full",children:[(0,r.jsx)(C.Z,{children:"Top Models"}),(0,r.jsx)(l_.Z,{className:"mt-4 h-40",data:x,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>"$".concat(e.toFixed(2))})]})}),(0,r.jsx)(y.Z,{numColSpan:1}),(0,r.jsx)(y.Z,{numColSpan:2,children:(0,r.jsxs)(eT.Z,{className:"mb-2",children:[(0,r.jsx)(C.Z,{children:"Spend by Provider"}),(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsx)(tx.Z,{className:"mt-4 h-40",variant:"pie",data:T,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>"$".concat(e.toFixed(2))})}),(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Provider"}),(0,r.jsx)(eI.Z,{children:"Spend"})]})}),(0,r.jsx)(ek.Z,{children:T.map(e=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e.provider}),(0,r.jsx)(eS.Z,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":e.spend.toFixed(2)})]},e.provider))})]})})]})})]})})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:"All Up"}),(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsxs)(y.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",el(M.sum_api_requests)]}),(0,r.jsx)(lf.Z,{className:"h-40",data:M.daily_data,valueFormatter:el,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,r.jsxs)(y.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",el(M.sum_total_tokens)]}),(0,r.jsx)(l_.Z,{className:"h-40",data:M.daily_data,valueFormatter:el,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,r.jsx)(r.Fragment,{children:F.map((e,l)=>(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:e.model}),(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsxs)(y.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",el(e.sum_api_requests)]}),(0,r.jsx)(lf.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:el,onValueChange:e=>console.log(e)})]}),(0,r.jsxs)(y.Z,{children:[(0,r.jsxs)(e3.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",el(e.sum_total_tokens)]}),(0,r.jsx)(l_.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:el,onValueChange:e=>console.log(e)})]})]})]},l))})]})})]})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(v.Z,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,r.jsxs)(y.Z,{numColSpan:2,children:[(0,r.jsxs)(eT.Z,{className:"mb-2",children:[(0,r.jsx)(C.Z,{children:"Total Spend Per Team"}),(0,r.jsx)(tu.Z,{data:P})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:"Daily Spend Per Team"}),(0,r.jsx)(l_.Z,{className:"h-72",data:_,showLegend:!0,index:"date",categories:A,yAxisWidth:80,stack:!0})]})]}),(0,r.jsx)(y.Z,{numColSpan:2})]})}),(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls ",(0,r.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(S.Z,{children:"Select Time Range"}),(0,r.jsx)(lg.Z,{enableSelect:!0,value:K,onValueChange:e=>{B(e),et(e.from,e.to,null)}})]}),(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(S.Z,{children:"Select Key"}),(0,r.jsxs)(eP.Z,{defaultValue:"all-keys",children:[(0,r.jsx)(W.Z,{value:"all-keys",onClick:()=>{et(K.from,K.to,null)},children:"All Keys"},"all-keys"),null==n?void 0:n.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,r.jsx)(W.Z,{value:String(l),onClick:()=>{et(K.from,K.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,r.jsx)(eT.Z,{className:"mt-4",children:(0,r.jsxs)(ew.Z,{className:"max-h-[70vh] min-h-[500px]",children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Customer"}),(0,r.jsx)(eI.Z,{children:"Spend"}),(0,r.jsx)(eI.Z,{children:"Total Events"})]})}),(0,r.jsx)(ek.Z,{children:null==j?void 0:j.map((e,l)=>{var s;return(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e.end_user}),(0,r.jsx)(eS.Z,{children:null===(s=e.total_spend)||void 0===s?void 0:s.toFixed(4)}),(0,r.jsx)(eS.Z,{children:e.total_count})]},l)})})]})})]}),(0,r.jsxs)(eF.Z,{children:[(0,r.jsxs)(v.Z,{numItems:2,children:[(0,r.jsx)(y.Z,{numColSpan:1,children:(0,r.jsx)(lg.Z,{className:"mb-4",enableSelect:!0,value:K,onValueChange:e=>{B(e),ea(e.from,e.to)}})}),(0,r.jsx)(y.Z,{children:o?(0,r.jsx)("div",{children:(0,r.jsxs)(s_.Z,{value:V,onValueChange:e=>q(e),children:[(0,r.jsx)(sy.Z,{value:"all-tags",onClick:()=>q(["all-tags"]),children:"All Tags"},"all-tags"),k&&k.filter(e=>"all-tags"!==e).map((e,l)=>(0,r.jsx)(sy.Z,{value:String(e),children:e},e))]})}):(0,r.jsx)("div",{children:(0,r.jsxs)(s_.Z,{value:V,onValueChange:e=>q(e),children:[(0,r.jsx)(sy.Z,{value:"all-tags",onClick:()=>q(["all-tags"]),children:"All Tags"},"all-tags"),k&&k.filter(e=>"all-tags"!==e).map((e,l)=>(0,r.jsxs)(W.Z,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,r.jsxs)(v.Z,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,r.jsx)(y.Z,{numColSpan:2,children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)(C.Z,{children:"Spend Per Tag"}),(0,r.jsxs)(S.Z,{children:["Get Started Tracking cost per tag ",(0,r.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,r.jsx)(l_.Z,{className:"h-72",data:N,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,r.jsx)(y.Z,{numColSpan:2})]})]})]})]})})},t_=s(51853);let ty=e=>{let{responseTimeMs:l}=e;return null==l?null:(0,r.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,r.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,r.jsxs)("span",{children:[l.toFixed(0),"ms"]})]})},tv=e=>{let l=e;if("string"==typeof l)try{l=JSON.parse(l)}catch(e){}return l},tb=e=>{let{label:l,value:s}=e,[t,a]=i.useState(!1),[n,o]=i.useState(!1),d=(null==s?void 0:s.toString())||"N/A",c=d.length>50?d.substring(0,50)+"...":d;return(0,r.jsx)("tr",{className:"hover:bg-gray-50",children:(0,r.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,r.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,r.jsxs)("div",{className:"flex items-center flex-1",children:[(0,r.jsx)("button",{onClick:()=>a(!t),className:"text-gray-400 hover:text-gray-600 mr-2",children:t?"▼":"▶"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm text-gray-600",children:l}),(0,r.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:t?d:c})]})]}),(0,r.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(d),o(!0),setTimeout(()=>o(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,r.jsx)(t_.Z,{className:"h-4 w-4"})})]})})})},tZ=e=>{var l,s,t,a,i,n,o,d,c,m,u,h,x,p;let{response:g}=e,j=null,f={},_={};try{if(null==g?void 0:g.error)try{let e="string"==typeof g.error.message?JSON.parse(g.error.message):g.error.message;j={message:(null==e?void 0:e.message)||"Unknown error",traceback:(null==e?void 0:e.traceback)||"No traceback available",litellm_params:(null==e?void 0:e.litellm_cache_params)||{},health_check_cache_params:(null==e?void 0:e.health_check_cache_params)||{}},f=tv(j.litellm_params)||{},_=tv(j.health_check_cache_params)||{}}catch(e){console.warn("Error parsing error details:",e),j={message:String(g.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else f=tv(null==g?void 0:g.litellm_cache_params)||{},_=tv(null==g?void 0:g.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),f={},_={}}let y={redis_host:(null==_?void 0:null===(t=_.redis_client)||void 0===t?void 0:null===(s=t.connection_pool)||void 0===s?void 0:null===(l=s.connection_kwargs)||void 0===l?void 0:l.host)||(null==_?void 0:null===(n=_.redis_async_client)||void 0===n?void 0:null===(i=n.connection_pool)||void 0===i?void 0:null===(a=i.connection_kwargs)||void 0===a?void 0:a.host)||(null==_?void 0:null===(o=_.connection_kwargs)||void 0===o?void 0:o.host)||(null==_?void 0:_.host)||"N/A",redis_port:(null==_?void 0:null===(m=_.redis_client)||void 0===m?void 0:null===(c=m.connection_pool)||void 0===c?void 0:null===(d=c.connection_kwargs)||void 0===d?void 0:d.port)||(null==_?void 0:null===(x=_.redis_async_client)||void 0===x?void 0:null===(h=x.connection_pool)||void 0===h?void 0:null===(u=h.connection_kwargs)||void 0===u?void 0:u.port)||(null==_?void 0:null===(p=_.connection_kwargs)||void 0===p?void 0:p.port)||(null==_?void 0:_.port)||"N/A",redis_version:(null==_?void 0:_.redis_version)||"N/A",startup_nodes:(()=>{try{var e,l,s,t,a,r,i,n,o,d,c,m,u;if(null==_?void 0:null===(e=_.redis_kwargs)||void 0===e?void 0:e.startup_nodes)return JSON.stringify(_.redis_kwargs.startup_nodes);let h=(null==_?void 0:null===(t=_.redis_client)||void 0===t?void 0:null===(s=t.connection_pool)||void 0===s?void 0:null===(l=s.connection_kwargs)||void 0===l?void 0:l.host)||(null==_?void 0:null===(i=_.redis_async_client)||void 0===i?void 0:null===(r=i.connection_pool)||void 0===r?void 0:null===(a=r.connection_kwargs)||void 0===a?void 0:a.host),x=(null==_?void 0:null===(d=_.redis_client)||void 0===d?void 0:null===(o=d.connection_pool)||void 0===o?void 0:null===(n=o.connection_kwargs)||void 0===n?void 0:n.port)||(null==_?void 0:null===(u=_.redis_async_client)||void 0===u?void 0:null===(m=u.connection_pool)||void 0===m?void 0:null===(c=m.connection_kwargs)||void 0===c?void 0:c.port);return h&&x?JSON.stringify([{host:h,port:x}]):"N/A"}catch(e){return"N/A"}})(),namespace:(null==_?void 0:_.namespace)||"N/A"};return(0,r.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,r.jsxs)(eM.Z,{children:[(0,r.jsxs)(eD.Z,{className:"border-b border-gray-200 px-4",children:[(0,r.jsx)(eL.Z,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,r.jsx)(eL.Z,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{className:"p-4",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center mb-6",children:[(null==g?void 0:g.status)==="healthy"?(0,r.jsx)(ea.Z,{className:"h-5 w-5 text-green-500 mr-2"}):(0,r.jsx)(et.Z,{className:"h-5 w-5 text-red-500 mr-2"}),(0,r.jsxs)(S.Z,{className:"text-sm font-medium ".concat((null==g?void 0:g.status)==="healthy"?"text-green-500":"text-red-500"),children:["Cache Status: ",(null==g?void 0:g.status)||"unhealthy"]})]}),(0,r.jsx)("table",{className:"w-full border-collapse",children:(0,r.jsxs)("tbody",{children:[j&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,r.jsx)(tb,{label:"Error Message",value:j.message}),(0,r.jsx)(tb,{label:"Traceback",value:j.traceback})]}),(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,r.jsx)(tb,{label:"Cache Configuration",value:String(null==f?void 0:f.type)}),(0,r.jsx)(tb,{label:"Ping Response",value:String(g.ping_response)}),(0,r.jsx)(tb,{label:"Set Cache Response",value:g.set_cache_response||"N/A"}),(0,r.jsx)(tb,{label:"litellm_settings.cache_params",value:JSON.stringify(f,null,2)}),(null==f?void 0:f.type)==="redis"&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,r.jsx)(tb,{label:"Redis Host",value:y.redis_host||"N/A"}),(0,r.jsx)(tb,{label:"Redis Port",value:y.redis_port||"N/A"}),(0,r.jsx)(tb,{label:"Redis Version",value:y.redis_version||"N/A"}),(0,r.jsx)(tb,{label:"Startup Nodes",value:y.startup_nodes||"N/A"}),(0,r.jsx)(tb,{label:"Namespace",value:y.namespace||"N/A"})]})]})})]})}),(0,r.jsx)(eF.Z,{className:"p-4",children:(0,r.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,r.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let e={...g,litellm_cache_params:f,health_check_cache_params:_},l=JSON.parse(JSON.stringify(e,(e,l)=>{if("string"==typeof l)try{return JSON.parse(l)}catch(e){}return l}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},tN=e=>{let{accessToken:l,healthCheckResponse:s,runCachingHealthCheck:t,responseTimeMs:a}=e,[n,o]=i.useState(null),[d,c]=i.useState(!1),m=async()=>{c(!0);let e=performance.now();await t(),o(performance.now()-e),c(!1)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(b.Z,{onClick:m,disabled:d,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:d?"Running Health Check...":"Run Health Check"}),(0,r.jsx)(ty,{responseTimeMs:n})]}),s&&(0,r.jsx)(tZ,{response:s})]})},tw=e=>{if(e)return e.toISOString().split("T")[0]};function tk(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}var tS=e=>{let{accessToken:l,token:s,userRole:t,userID:a,premiumUser:n}=e,[o,d]=(0,i.useState)([]),[c,m]=(0,i.useState)([]),[u,h]=(0,i.useState)([]),[x,p]=(0,i.useState)([]),[j,f]=(0,i.useState)("0"),[_,b]=(0,i.useState)("0"),[Z,N]=(0,i.useState)("0"),[w,k]=(0,i.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[C,I]=(0,i.useState)(""),[A,E]=(0,i.useState)("");(0,i.useEffect)(()=>{l&&w&&((async()=>{p(await (0,g.zg)(l,tw(w.from),tw(w.to)))})(),I(new Date().toLocaleString()))},[l]);let O=Array.from(new Set(x.map(e=>{var l;return null!==(l=null==e?void 0:e.api_key)&&void 0!==l?l:""}))),T=Array.from(new Set(x.map(e=>{var l;return null!==(l=null==e?void 0:e.model)&&void 0!==l?l:""})));Array.from(new Set(x.map(e=>{var l;return null!==(l=null==e?void 0:e.call_type)&&void 0!==l?l:""})));let L=async(e,s)=>{e&&s&&l&&(s.setHours(23,59,59,999),e.setHours(0,0,0,0),p(await (0,g.zg)(l,tw(e),tw(s))))};(0,i.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",x);let e=x;c.length>0&&(e=e.filter(e=>c.includes(e.api_key))),u.length>0&&(e=e.filter(e=>u.includes(e.model))),console.log("before processed data in cache dashboard",e);let l=0,s=0,t=0,a=e.reduce((e,a)=>{console.log("Processing item:",a),a.call_type||(console.log("Item has no call_type:",a),a.call_type="Unknown"),l+=(a.total_rows||0)-(a.cache_hit_true_rows||0),s+=a.cache_hit_true_rows||0,t+=a.cached_completion_tokens||0;let r=e.find(e=>e.name===a.call_type);return r?(r["LLM API requests"]+=(a.total_rows||0)-(a.cache_hit_true_rows||0),r["Cache hit"]+=a.cache_hit_true_rows||0,r["Cached Completion Tokens"]+=a.cached_completion_tokens||0,r["Generated Completion Tokens"]+=a.generated_completion_tokens||0):e.push({name:a.call_type,"LLM API requests":(a.total_rows||0)-(a.cache_hit_true_rows||0),"Cache hit":a.cache_hit_true_rows||0,"Cached Completion Tokens":a.cached_completion_tokens||0,"Generated Completion Tokens":a.generated_completion_tokens||0}),e},[]);f(tk(s)),b(tk(t));let r=s+l;r>0?N((s/r*100).toFixed(2)):N("0"),d(a),console.log("PROCESSED DATA IN CACHE DASHBOARD",a)},[c,u,w,x]);let M=async()=>{try{P.ZP.info("Running cache health check..."),E("");let e=await (0,g.Tj)(null!==l?l:"");console.log("CACHING HEALTH CHECK RESPONSE",e),E(e)}catch(l){let e;if(console.error("Error running health check:",l),l&&l.message)try{let s=JSON.parse(l.message);s.error&&(s=s.error),e=s}catch(s){e={message:l.message}}else e={message:"Unknown error occurred"};E({error:e})}};return(0,r.jsxs)(eM.Z,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,r.jsxs)(eD.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(eL.Z,{children:"Cache Analytics"}),(0,r.jsx)(eL.Z,{children:(0,r.jsx)("pre",{children:"Cache Health"})})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[C&&(0,r.jsxs)(S.Z,{children:["Last Refreshed: ",C]}),(0,r.jsx)(lj.Z,{icon:ez.Z,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{I(new Date().toLocaleString())}})]})]}),(0,r.jsxs)(eR.Z,{children:[(0,r.jsx)(eF.Z,{children:(0,r.jsxs)(eT.Z,{children:[(0,r.jsxs)(v.Z,{numItems:3,className:"gap-4 mt-4",children:[(0,r.jsx)(y.Z,{children:(0,r.jsx)(s_.Z,{placeholder:"Select API Keys",value:c,onValueChange:m,children:O.map(e=>(0,r.jsx)(sy.Z,{value:e,children:e},e))})}),(0,r.jsx)(y.Z,{children:(0,r.jsx)(s_.Z,{placeholder:"Select Models",value:u,onValueChange:h,children:T.map(e=>(0,r.jsx)(sy.Z,{value:e,children:e},e))})}),(0,r.jsx)(y.Z,{children:(0,r.jsx)(lg.Z,{enableSelect:!0,value:w,onValueChange:e=>{k(e),L(e.from,e.to)},selectPlaceholder:"Select date range"})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,r.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,r.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[Z,"%"]})})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,r.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,r.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:j})})]}),(0,r.jsxs)(eT.Z,{children:[(0,r.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,r.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,r.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:_})})]})]}),(0,r.jsx)(e3.Z,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,r.jsx)(l_.Z,{title:"Cache Hits vs API Requests",data:o,stack:!0,index:"name",valueFormatter:tk,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,r.jsx)(e3.Z,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,r.jsx)(l_.Z,{className:"mt-6",data:o,stack:!0,index:"name",valueFormatter:tk,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,r.jsx)(eF.Z,{children:(0,r.jsx)(tN,{accessToken:l,healthCheckResponse:A,runCachingHealthCheck:M})})]})]})},tC=e=>{let{accessToken:l}=e,[s,t]=(0,i.useState)([]);return(0,i.useEffect)(()=>{l&&(async()=>{try{let e=await (0,g.t3)(l);console.log("guardrails: ".concat(JSON.stringify(e))),t(e.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}})()},[l]),(0,r.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,r.jsxs)(S.Z,{className:"mb-4",children:["Configured guardrails and their current status. Setup guardrails in config.yaml."," ",(0,r.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"Docs"})]}),(0,r.jsx)(eT.Z,{children:(0,r.jsxs)(ew.Z,{children:[(0,r.jsx)(eC.Z,{children:(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eI.Z,{children:"Guardrail Name"}),(0,r.jsx)(eI.Z,{children:"Mode"}),(0,r.jsx)(eI.Z,{children:"Status"})]})}),(0,r.jsx)(ek.Z,{children:s&&0!==s.length?null==s?void 0:s.map((e,l)=>(0,r.jsxs)(eA.Z,{children:[(0,r.jsx)(eS.Z,{children:e.guardrail_name}),(0,r.jsx)(eS.Z,{children:e.litellm_params.mode}),(0,r.jsx)(eS.Z,{children:(0,r.jsx)("div",{className:"inline-flex rounded-full px-2 py-1 text-xs font-medium\n ".concat(e.litellm_params.default_on?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"),children:e.litellm_params.default_on?"Always On":"Per Request"})})]},l)):(0,r.jsx)(eA.Z,{children:(0,r.jsx)(eS.Z,{colSpan:3,className:"mt-4 text-gray-500 text-center py-4",children:"No guardrails configured"})})})]})})]})};let tI=new d.S;function tA(){let[e,l]=(0,i.useState)(""),[s,t]=(0,i.useState)(!1),[a,d]=(0,i.useState)(!1),[m,u]=(0,i.useState)(null),[h,x]=(0,i.useState)(null),[p,j]=(0,i.useState)(null),[y,v]=(0,i.useState)([]),[b,Z]=(0,i.useState)([]),[N,w]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[k,S]=(0,i.useState)(!0),C=(0,n.useSearchParams)(),[I,A]=(0,i.useState)({data:[]}),[E,P]=(0,i.useState)(null),O=C.get("userID"),T=C.get("invitation_id"),[L,M]=(0,i.useState)(()=>C.get("page")||"api-keys"),[D,F]=(0,i.useState)(null);return(0,i.useEffect)(()=>{P(function(e){let l=document.cookie.split("; ").find(l=>l.startsWith(e+"="));return l?l.split("=")[1]:null}("token"))},[]),(0,i.useEffect)(()=>{if(!E)return;let e=(0,o.o)(E);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),F(e.key),d(e.disabled_non_admin_personal_key_creation),e.user_role){let s=function(e){if(!e)return"Undefined Role";switch(console.log("Received user role: ".concat(e.toLowerCase())),console.log("Received user role length: ".concat(e.toLowerCase().length)),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",s),l(s),"Admin Viewer"==s&&M("usage")}else console.log("User role not defined");e.user_email?u(e.user_email):console.log("User Email is not set ".concat(e)),e.login_method?S("username_password"==e.login_method):console.log("User Email is not set ".concat(e)),e.premium_user&&t(e.premium_user),e.auth_header_name&&(0,g.K8)(e.auth_header_name)}},[E]),(0,i.useEffect)(()=>{D&&O&&e&&e_(O,e,D,Z),D&&O&&e&&_(D,O,e,null,x),D&&sa(D,v)},[D,O,e]),(0,r.jsx)(i.Suspense,{fallback:(0,r.jsx)("div",{children:"Loading..."}),children:(0,r.jsx)(c.aH,{client:tI,children:T?(0,r.jsx)(e5,{userID:O,userRole:e,premiumUser:s,teams:h,keys:p,setUserRole:l,userEmail:m,setUserEmail:u,setTeams:x,setKeys:j,organizations:y}):(0,r.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,r.jsx)(f,{userID:O,userRole:e,premiumUser:s,userEmail:m,setProxySettings:w,proxySettings:N,accessToken:D}),(0,r.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,r.jsx)("div",{className:"mt-8",children:(0,r.jsx)(tm,{setPage:e=>{let l=new URLSearchParams(C);l.set("page",e),window.history.pushState(null,"","?".concat(l.toString())),M(e)},userRole:e,defaultSelectedKey:L})}),"api-keys"==L?(0,r.jsx)(e5,{userID:O,userRole:e,premiumUser:s,teams:h,keys:p,setUserRole:l,userEmail:m,setUserEmail:u,setTeams:x,setKeys:j,organizations:y}):"models"==L?(0,r.jsx)(l2,{userID:O,userRole:e,token:E,keys:p,accessToken:D,modelData:I,setModelData:A,premiumUser:s,teams:h}):"llm-playground"==L?(0,r.jsx)(s4,{userID:O,userRole:e,token:E,accessToken:D,disabledPersonalKeyCreation:a}):"users"==L?(0,r.jsx)(l9,{userID:O,userRole:e,token:E,keys:p,teams:h,accessToken:D,setKeys:j}):"teams"==L?(0,r.jsx)(ss,{teams:h,setTeams:x,searchParams:C,accessToken:D,userID:O,userRole:e,organizations:y}):"organizations"==L?(0,r.jsx)(sr,{organizations:y,setOrganizations:v,userModels:b,accessToken:D,userRole:e,premiumUser:s}):"admin-panel"==L?(0,r.jsx)(sm,{setTeams:x,searchParams:C,accessToken:D,showSSOBanner:k,premiumUser:s}):"api_ref"==L?(0,r.jsx)(sQ,{proxySettings:N}):"settings"==L?(0,r.jsx)(sf,{userID:O,userRole:e,accessToken:D,premiumUser:s}):"budgets"==L?(0,r.jsx)(sF,{accessToken:D}):"guardrails"==L?(0,r.jsx)(tC,{accessToken:D}):"general-settings"==L?(0,r.jsx)(sS,{userID:O,userRole:e,accessToken:D,modelData:I}):"model-hub"==L?(0,r.jsx)(sX.Z,{accessToken:D,publicPage:!1,premiumUser:s}):"caching"==L?(0,r.jsx)(tS,{userID:O,userRole:e,token:E,accessToken:D,premiumUser:s}):"pass-through-settings"==L?(0,r.jsx)(sT,{userID:O,userRole:e,accessToken:D,modelData:I}):"logs"==L?(0,r.jsx)(sY,{userID:O,userRole:e,token:E,accessToken:D}):(0,r.jsx)(tf,{userID:O,userRole:e,token:E,accessToken:D,keys:p,premiumUser:s})]})]})})})}},3914:function(e,l,s){"use strict";function t(){let e=window.location.hostname,l=["Lax","Strict","None"];["/","/ui"].forEach(s=>{document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(s,";"),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(s,"; domain=").concat(e,";"),l.forEach(l=>{let t="None"===l?" Secure;":"";document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(s,"; SameSite=").concat(l,";").concat(t),document.cookie="token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=".concat(s,"; domain=").concat(e,"; SameSite=").concat(l,";").concat(t)})}),console.log("After clearing cookies:",document.cookie)}function a(e){let l=document.cookie.split("; ").find(l=>l.startsWith(e+"="));return l?l.split("=")[1]:null}s.d(l,{b:function(){return t},e:function(){return a}})}},function(e){e.O(0,[665,990,42,261,899,394,250,699,971,117,744],function(){return e(e.s=1900)}),_N_E=e.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/fd9d1056-524b80e1a6b8bb06.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/fd9d1056-524b80e1a6b8bb06.js new file mode 100644 index 00000000..1c1c7aa9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/fd9d1056-524b80e1a6b8bb06.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{84417:function(e,t,n){var r,l=n(2265),a=n(71767),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=Object.assign,s=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=s.ReactCurrentDispatcher,f={pending:!1,data:null,method:null,action:null},d=[],p=-1;function m(e){return{current:e}}function h(e){0>p||(e.current=d[p],d[p]=null,p--)}function g(e,t){d[++p]=e.current,e.current=t}var y=Symbol.for("react.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen"),F=Symbol.for("react.legacy_hidden"),M=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var O=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D=m(null),A=m(null),I=m(null),U=m(null),B={$$typeof:E,_currentValue:null,_currentValue2:null,_threadCount:0,Provider:null,Consumer:null};function V(e,t){switch(g(I,t),g(A,e),g(D,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?s2(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=s3(e=s2(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}h(D),g(D,t)}function Q(){h(D),h(A),h(I)}function $(e){null!==e.memoizedState&&g(U,e);var t=D.current,n=s3(t,e.type);t!==n&&(g(A,e),g(D,n))}function j(e){A.current===e&&(h(D),h(A)),U.current===e&&(h(U),B._currentValue=null)}var W=a.unstable_scheduleCallback,H=a.unstable_cancelCallback,q=a.unstable_shouldYield,K=a.unstable_requestPaint,Y=a.unstable_now,X=a.unstable_getCurrentPriorityLevel,G=a.unstable_ImmediatePriority,Z=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,ee=a.unstable_LowPriority,et=a.unstable_IdlePriority,en=a.log,er=a.unstable_setDisableYieldValue,el=null,ea=null;function eo(e){if("function"==typeof en&&er(e),ea&&"function"==typeof ea.setStrictMode)try{ea.setStrictMode(el,e)}catch(e){}}var ei=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eu(e)/es|0)|0},eu=Math.log,es=Math.LN2,ec=128,ef=4194304;function ed(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ep(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes;e=e.pingedLanes;var a=134217727&n;return 0!==a?0!=(n=a&~l)?r=ed(n):0!=(e&=a)&&(r=ed(e)):0!=(n&=~l)?r=ed(n):0!==e&&(r=ed(e)),0===r?0:0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(e=t&-t)||32===l&&0!=(4194176&e))?t:r}function em(e,t){return e.errorRecoveryDisabledLanes&t?0:0!=(e=-536870913&e.pendingLanes)?e:536870912&e?536870912:0}function eh(){var e=ec;return 0==(4194176&(ec<<=1))&&(ec=128),e}function eg(){var e=ef;return 0==(62914560&(ef<<=1))&&(ef=4194304),e}function ey(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ev(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ei(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function eb(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ei(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var ek=0;function ew(e){return 2<(e&=-e)?8<e?0!=(134217727&e)?32:268435456:8:2}var eS=Object.prototype.hasOwnProperty,eC=Math.random().toString(36).slice(2),eE="__reactFiber$"+eC,ex="__reactProps$"+eC,ez="__reactContainer$"+eC,eP="__reactEvents$"+eC,eN="__reactListeners$"+eC,e_="__reactHandles$"+eC,eL="__reactResources$"+eC,eT="__reactMarker$"+eC;function eF(e){delete e[eE],delete e[ex],delete e[eP],delete e[eN],delete e[e_]}function eM(e){var t=e[eE];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ez]||n[eE]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[eE])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function eO(e){if(e=e[eE]||e[ez]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function eR(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(i(33))}function eD(e){return e[ex]||null}function eA(e){var t=e[eL];return t||(t=e[eL]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function eI(e){e[eT]=!0}var eU=new Set,eB={};function eV(e,t){eQ(e,t),eQ(e+"Capture",t)}function eQ(e,t){for(eB[e]=t,e=0;e<t.length;e++)eU.add(t[e])}var e$=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ej=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),eW={},eH={};function eq(e,t,n){if(eS.call(eH,t)||!eS.call(eW,t)&&(ej.test(t)?eH[t]=!0:(eW[t]=!0,!1))){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}}function eK(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function eY(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function eX(e){if(void 0===iY)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);iY=t&&t[1]||""}return"\n"+iY+e}var eG=!1;function eZ(e,t){if(!e||eG)return"";eG=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});try{var a=r.DetermineComponentFrameRoot(),o=a[0],i=a[1];if(o&&i){var u=o.split("\n"),s=i.split("\n");for(l=r=0;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;for(;l<s.length&&!s[l].includes("DetermineComponentFrameRoot");)l++;if(r===u.length||l===s.length)for(r=u.length-1,l=s.length-1;1<=r&&0<=l&&u[r]!==s[l];)l--;for(;1<=r&&0<=l;r--,l--)if(u[r]!==s[l]){if(1!==r||1!==l)do if(r--,l--,0>l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{eG=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?eX(n):""}function eJ(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return eX(e.type);case 16:return eX("Lazy");case 13:return eX("Suspense");case 19:return eX("SuspenseList");case 0:case 2:case 15:return e=eZ(e.type,!1);case 11:return e=eZ(e.type.render,!1);case 1:return e=eZ(e.type,!0);default:return""}}(e),e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var e0=Symbol.for("react.client.reference");function e1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e2(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e3(e){e._valueTracker||(e._valueTracker=function(e){var t=e2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e2(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e6(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var e8=/[\n"\\]/g;function e5(e){return e.replace(e8,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e7(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e1(t)):e.value!==""+e1(t)&&(e.value=""+e1(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?te(e,o,e1(t)):null!=n?te(e,o,e1(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+e1(i):e.removeAttribute("name")}function e9(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+e1(n):"",t=null!=t?""+e1(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function te(e,t,n){"number"===t&&e6(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var tt=Array.isArray;function tn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(l=0,n=""+e1(n),t=null;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function tr(e,t,n){if(null!=t&&((t=""+e1(t))!==e.value&&(e.value=t),null==n)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=null!=n?""+e1(n):""}function tl(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(i(92));if(tt(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=e1(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r)}function ta(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((iX=iX||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=iX.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var to=ta;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(to=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return ta(e,t)})});var ti=to;function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ts=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tc(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||ts.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function tf(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(i(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in t)r=t[l],t.hasOwnProperty(l)&&n[l]!==r&&tc(e,l,r)}else for(var a in t)t.hasOwnProperty(a)&&tc(e,a,t[a])}function td(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tm=null;function th(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tg=null,ty=null;function tv(e){var t=eO(e);if(t&&(e=t.stateNode)){var n=eD(e);switch(e=t.stateNode,t.type){case"input":if(e7(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+e5(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=eD(r);if(!l)throw Error(i(90));e7(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&e4(r)}break;case"textarea":tr(e,n.value,n.defaultValue);break;case"select":null!=(t=n.value)&&tn(e,!!n.multiple,t,!1)}}}function tb(e){tg?ty?ty.push(e):ty=[e]:tg=e}function tk(){if(tg){var e=tg,t=ty;if(ty=tg=null,tv(e),t)for(e=0;e<t.length;e++)tv(t[e])}}function tw(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do 0!=(4098&(t=e).flags)&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function tS(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function tC(e){if(tw(e)!==e)throw Error(i(188))}function tE(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=tw(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(null===l)break;var a=l.alternate;if(null===a){if(null!==(r=l.return)){n=r;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===n)return tC(l),e;if(a===r)return tC(l),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=l,r=a;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=a;break}if(u===r){o=!0,r=l,n=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===n){o=!0,n=a,r=l;break}if(u===r){o=!0,r=a,n=l;break}u=u.sibling}if(!o)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?function e(t){var n=t.tag;if(5===n||26===n||27===n||6===n)return t;for(t=t.child;null!==t;){if(null!==(n=e(t)))return n;t=t.sibling}return null}(e):null}var tx={},tz=m(tx),tP=m(!1),tN=tx;function t_(e,t){var n=e.type.contextTypes;if(!n)return tx;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in n)a[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function tL(e){return null!=(e=e.childContextTypes)}function tT(){h(tP),h(tz)}function tF(e,t,n){if(tz.current!==tx)throw Error(i(168));g(tz,t),g(tP,n)}function tM(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var l in r=r.getChildContext())if(!(l in t))throw Error(i(108,function(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===e0?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case b:return"Fragment";case v:return"Portal";case w:return"Profiler";case k:return"StrictMode";case z:return"Suspense";case P:return"SuspenseList";case M:return"Cache"}if("object"==typeof t)switch(t.$$typeof){case S:return(t._context.displayName||"Context")+".Provider";case E:return(t.displayName||"Context")+".Consumer";case x:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case N:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case _:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}(e)||"Unknown",l));return u({},n,r)}function tO(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tx,tN=tz.current,g(tz,e),g(tP,tP.current),!0}function tR(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=tM(e,t,tN),r.__reactInternalMemoizedMergedChildContext=e,h(tP),h(tz),g(tz,e)):h(tP),g(tP,n)}var tD="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},tA=[],tI=0,tU=null,tB=0,tV=[],tQ=0,t$=null,tj=1,tW="";function tH(e,t){tA[tI++]=tB,tA[tI++]=tU,tU=e,tB=t}function tq(e,t,n){tV[tQ++]=tj,tV[tQ++]=tW,tV[tQ++]=t$,t$=e;var r=tj;e=tW;var l=32-ei(r)-1;r&=~(1<<l),n+=1;var a=32-ei(t)+l;if(30<a){var o=l-l%5;a=(r&(1<<o)-1).toString(32),r>>=o,l-=o,tj=1<<32-ei(t)+l|n<<l|r,tW=a+e}else tj=1<<a|n<<l|r,tW=e}function tK(e){null!==e.return&&(tH(e,1),tq(e,1,0))}function tY(e){for(;e===tU;)tU=tA[--tI],tA[tI]=null,tB=tA[--tI],tA[tI]=null;for(;e===t$;)t$=tV[--tQ],tV[tQ]=null,tW=tV[--tQ],tV[tQ]=null,tj=tV[--tQ],tV[tQ]=null}var tX=null,tG=null,tZ=!1,tJ=null,t0=!1;function t1(e,t){var n=iS(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function t2(e,t){t.flags=-4097&t.flags|2}function t3(e,t){return null!==(t=function(e,t,n,r){for(;1===e.nodeType;){if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[eT])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(l=e.getAttribute("rel"))&&e.hasAttribute("data-precedence")||l!==n.rel||e.getAttribute("href")!==(null==n.href?null:n.href)||e.getAttribute("crossorigin")!==(null==n.crossOrigin?null:n.crossOrigin)||e.getAttribute("title")!==(null==n.title?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((l=e.getAttribute("src"))!==(null==n.src?null:n.src)||e.getAttribute("type")!==(null==n.type?null:n.type)||e.getAttribute("crossorigin")!==(null==n.crossOrigin?null:n.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var l=null==n.name?null:""+n.name;if("hidden"===n.type&&e.getAttribute("name")===l)return e}if(null===(e=ca(e)))break}return null}(t,e.type,e.pendingProps,t0))&&(e.stateNode=t,tX=e,tG=cl(t.firstChild),t0=!1,!0)}function t4(e,t){return null!==(t=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;)if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n||null===(e=ca(e)))return null;return e}(t,e.pendingProps,t0))&&(e.stateNode=t,tX=e,tG=null,!0)}function t6(e,t){e:{var n=t;for(t=t0;8!==n.nodeType;)if(!t||null===(n=ca(n))){t=null;break e}t=n}return null!==t&&(n=null!==t$?{id:tj,overflow:tW}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:536870912},(n=iS(18,null,null,0)).stateNode=t,n.return=e,e.child=n,tX=e,tG=null,!0)}function t8(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function t5(){throw Error(i(418))}function t7(e){for(tX=e.return;tX;)switch(tX.tag){case 3:case 27:t0=!0;return;case 5:case 13:t0=!1;return;default:tX=tX.return}}function t9(e){if(e!==tX)return!1;if(!tZ)return t7(e),tZ=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||s4(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&(n=tG)){if(t8(e))ne(),t5();else for(;n;)t1(e,n),n=ca(n)}if(t7(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(n=0,e=e.nextSibling;e;){if(8===e.nodeType){if("/$"===(t=e.data)){if(0===n){tG=ca(e);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++}e=e.nextSibling}tG=null}}else tG=tX?ca(e.stateNode):null;return!0}function ne(){for(var e=tG;e;)e=ca(e)}function nt(){tG=tX=null,tZ=!1}function nn(e){null===tJ?tJ=[e]:tJ.push(e)}var nr=[],nl=0,na=0;function no(){for(var e=nl,t=na=nl=0;t<e;){var n=nr[t];nr[t++]=null;var r=nr[t];nr[t++]=null;var l=nr[t];nr[t++]=null;var a=nr[t];if(nr[t++]=null,null!==r&&null!==l){var o=r.pending;null===o?l.next=l:(l.next=o.next,o.next=l),r.pending=l}0!==a&&nc(n,l,a)}}function ni(e,t,n,r){nr[nl++]=e,nr[nl++]=t,nr[nl++]=n,nr[nl++]=r,na|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function nu(e,t,n,r){return ni(e,t,n,r),nf(e)}function ns(e,t){return ni(e,null,null,t),nf(e)}function nc(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var l=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(r=a.alternate)&&(r.childLanes|=n),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(l=!0)),e=a,a=a.return;l&&null!==t&&3===e.tag&&(a=e.stateNode,l=31-ei(n),null===(e=(a=a.hiddenUpdates)[l])?a[l]=[t]:e.push(t),t.lane=536870912|n)}function nf(e){ik();for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var nd=null,np=null,nm=!1,nh=!1,ng=!1,ny=0;function nv(e){e!==np&&null===e.next&&(null===np?nd=np=e:np=np.next=e),nh=!0,nm||(nm=!0,nC(nw))}function nb(e){if(!ng&&nh){var t=null;ng=!0;do for(var n=!1,r=nd;null!==r;){if(!e||0===r.tag){var l=oS,a=ep(r,r===ok?l:0);if(0!=(3&a))try{if(n=!0,l=r,0!=(6&ob))throw Error(i(327));if(!id()){var o=il(l,a);if(0!==l.tag&&2===o){var u=a,s=em(l,u);0!==s&&(a=s,o=oJ(l,u,s))}if(1===o)throw u=oN,o5(l,0),o3(l,a,0),nv(l),u;6===o?o3(l,a,oF):(l.finishedWork=l.current.alternate,l.finishedLanes=a,is(l,oO,oU,oR,oF))}nv(l)}catch(e){null===t?t=[e]:t.push(e)}}r=r.next}while(n);if(ng=!1,null!==t){if(1<t.length){if("function"==typeof AggregateError)throw AggregateError(t);for(e=1;e<t.length;e++)nC(nk.bind(null,t[e]))}throw t[0]}}}function nk(e){throw e}function nw(){nh=nm=!1;for(var e=Y(),t=null,n=nd;null!==n;){var r=n.next;if(0!==ny&&function(){var e=window.event;return e&&"popstate"===e.type?e!==s6&&(s6=e,!0):(s6=null,!1)}()){var l=n,a=ny;l.pendingLanes|=2,l.entangledLanes|=2,l.entanglements[1]|=a}0===(l=nS(n,e))?(n.next=null,null===t?nd=r:t.next=r,null===r&&(np=t)):(t=n,0!=(3&l)&&(nh=!0)),n=r}ny=0,nb(!1)}function nS(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-ei(a),i=1<<o,u=l[o];-1===u?(0==(i&n)||0!=(i&r))&&(l[o]=function(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return -1}}(i,t)):u<=t&&(e.expiredLanes|=i),a&=~i}if(t=ok,n=oS,n=ep(e,e===t?n:0),r=e.callbackNode,0===n||e===t&&2===oC||null!==e.cancelPendingCommit)return null!==r&&null!==r&&H(r),e.callbackNode=null,e.callbackPriority=0;if(0!=(3&n))return null!==r&&null!==r&&H(r),e.callbackPriority=2,e.callbackNode=null,2;if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&H(r),ew(n)){case 2:n=G;break;case 8:n=Z;break;case 32:default:n=J;break;case 268435456:n=et}return n=W(n,r=oZ.bind(null,e)),e.callbackPriority=t,e.callbackNode=n,t}function nC(e){s9(function(){0!=(6&ob)?W(G,e):e()})}function nE(){return 0===ny&&(ny=eh()),ny}var nx=null,nz=0,nP=0,nN=null;function n_(){if(null!==nx&&0==--nz){null!==nN&&(nN.status="fulfilled");var e=nx;nx=null,nP=0,nN=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var nL=!1;function nT(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nF(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function nM(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nO(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&ob)){var l=r.pending;return null===l?t.next=t:(t.next=l.next,l.next=t),r.pending=t,t=nf(e),nc(e,null,n),t}return ni(e,r,t,n),nf(e)}function nR(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194176&n))){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eb(e,n)}}function nD(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var l=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?l=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?l=a=t:a=a.next=t}else l=a=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var nA=!1;function nI(){if(nA){var e=nN;if(null!==e)throw e}}function nU(e,t,n,r){nA=!1;var l=e.updateQueue;nL=!1;var a=l.firstBaseUpdate,o=l.lastBaseUpdate,i=l.shared.pending;if(null!==i){l.shared.pending=null;var s=i,c=s.next;s.next=null,null===o?a=c:o.next=c,o=s;var f=e.alternate;null!==f&&(i=(f=f.updateQueue).lastBaseUpdate)!==o&&(null===i?f.firstBaseUpdate=c:i.next=c,f.lastBaseUpdate=s)}if(null!==a){var d=l.baseState;for(o=0,f=c=s=null,i=a;;){var p=-536870913&i.lane,m=p!==i.lane;if(m?(oS&p)===p:(r&p)===p){0!==p&&p===nP&&(nA=!0),null!==f&&(f=f.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var h=e,g=i;switch(p=t,g.tag){case 1:if("function"==typeof(h=g.payload)){d=h.call(n,d,p);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(p="function"==typeof(h=g.payload)?h.call(n,d,p):h))break e;d=u({},d,p);break e;case 2:nL=!0}}null!==(p=i.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=l.callbacks)?l.callbacks=[p]:m.push(p))}else m={lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===f?(c=f=m,s=d):f=f.next=m,o|=p;if(null===(i=i.next)){if(null===(i=l.shared.pending))break;i=(m=i).next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}null===f&&(s=d),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=f,null===a&&(l.shared.lanes=0),o_|=o,e.lanes=o,e.memoizedState=d}}function nB(e,t){if("function"!=typeof e)throw Error(i(191,e));e.call(t)}function nV(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)nB(n[e],t)}function nQ(e,t){if(tD(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!eS.call(t,l)||!tD(e[l],t[l]))return!1}return!0}var n$=Error(i(460)),nj=Error(i(474)),nW={then:function(){}};function nH(e){return"fulfilled"===(e=e.status)||"rejected"===e}function nq(){}function nK(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(nq,nq),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===n$)throw Error(i(483));throw e;default:if("string"==typeof t.status)t.then(nq,nq);else{if(null!==(e=ok)&&100<e.shellSuspendCounter)throw Error(i(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===n$)throw Error(i(483));throw e}throw nY=t,n$}}var nY=null;function nX(){if(null===nY)throw Error(i(459));var e=nY;return nY=null,e}var nG=null,nZ=0;function nJ(e){var t=nZ;return nZ+=1,null===nG&&(nG=[]),nK(nG,e,t)}function n0(e,t,n,r){var l=r.ref;e=null!==l&&"function"!=typeof l&&"object"!=typeof l?function(e,t,n,r){function l(e){var t=o.refs;null===e?delete t[a]:t[a]=e}if(!(e=n._owner)){if("string"!=typeof r)throw Error(i(284));throw Error(i(290,r))}if(1!==e.tag)throw Error(i(309));var a=""+r,o=e.stateNode;if(!o)throw Error(i(147,a));return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(l._stringRef=a,l)}(e,t,r,l):l,n.ref=e}function n1(e,t){throw Error(i(31,"[object Object]"===(e=Object.prototype.toString.call(t))?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function n2(e){return(0,e._init)(e._payload)}function n3(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function l(e,t){return(e=iE(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return(t.index=r,e)?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=33554434,n):r:(t.flags|=33554434,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function u(e,t,n,r){return null===t||6!==t.tag?(t=i_(n,e.mode,r)).return=e:(t=l(t,n)).return=e,t}function s(e,t,n,r){var a=n.type;return a===b?f(e,t,n.props.children,r,n.key):(r=null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===_&&n2(a)===t.type)?l(t,n.props):iz(n.type,n.key,n.props,null,e.mode,r),n0(e,t,r,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=iL(n,e.mode,r)).return=e:(t=l(t,n.children||[])).return=e,t}function f(e,t,n,r,a){return null===t||7!==t.tag?(t=iP(n,e.mode,r,a)).return=e:(t=l(t,n)).return=e,t}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=i_(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case y:return n=iz(t.type,t.key,t.props,null,e.mode,n),n0(e,null,n,t),n.return=e,n;case v:return(t=iL(t,e.mode,n)).return=e,t;case _:return d(e,(0,t._init)(t._payload),n)}if(tt(t)||R(t))return(t=iP(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return d(e,nJ(t),n);if(t.$$typeof===E)return d(e,ai(e,t,n),n);n1(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case y:return n.key===l?s(e,t,n,r):null;case v:return n.key===l?c(e,t,n,r):null;case _:return p(e,t,(l=n._init)(n._payload),r)}if(tt(n)||R(n))return null!==l?null:f(e,t,n,r,null);if("function"==typeof n.then)return p(e,t,nJ(n),r);if(n.$$typeof===E)return p(e,t,ai(e,n,r),r);n1(e,n)}return null}function m(e,t,n,r,l){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case y:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l);case v:return c(t,e=e.get(null===r.key?n:r.key)||null,r,l);case _:return m(e,t,n,(0,r._init)(r._payload),l)}if(tt(r)||R(r))return f(t,e=e.get(n)||null,r,l,null);if("function"==typeof r.then)return m(e,t,n,nJ(r),l);if(r.$$typeof===E)return m(e,t,n,ai(t,r,l),l);n1(t,r)}return null}return function(u,s,c,f){return nZ=0,u=function u(s,c,f,h){if("object"==typeof f&&null!==f&&f.type===b&&null===f.key&&(f=f.props.children),"object"==typeof f&&null!==f){switch(f.$$typeof){case y:e:{for(var g=f.key,k=c;null!==k;){if(k.key===g){if((g=f.type)===b){if(7===k.tag){n(s,k.sibling),(c=l(k,f.props.children)).return=s,s=c;break e}}else if(k.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===_&&n2(g)===k.type){n(s,k.sibling),c=l(k,f.props),n0(s,k,c,f),c.return=s,s=c;break e}n(s,k);break}t(s,k),k=k.sibling}f.type===b?((c=iP(f.props.children,s.mode,h,f.key)).return=s,s=c):(h=iz(f.type,f.key,f.props,null,s.mode,h),n0(s,c,h,f),h.return=s,s=h)}return o(s);case v:e:{for(k=f.key;null!==c;){if(c.key===k){if(4===c.tag&&c.stateNode.containerInfo===f.containerInfo&&c.stateNode.implementation===f.implementation){n(s,c.sibling),(c=l(c,f.children||[])).return=s,s=c;break e}n(s,c);break}t(s,c),c=c.sibling}(c=iL(f,s.mode,h)).return=s,s=c}return o(s);case _:return u(s,c,(k=f._init)(f._payload),h)}if(tt(f))return function(l,o,i,u){for(var s=null,c=null,f=o,h=o=0,g=null;null!==f&&h<i.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),tZ&&tH(l,h),s;if(null===f){for(;h<i.length;h++)null!==(f=d(l,i[h],u))&&(o=a(f,o,h),null===c?s=f:c.sibling=f,c=f);return tZ&&tH(l,h),s}for(f=r(l,f);h<i.length;h++)null!==(g=m(f,l,h,i[h],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),o=a(g,o,h),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach(function(e){return t(l,e)}),tZ&&tH(l,h),s}(s,c,f,h);if(R(f))return function(l,o,u,s){var c=R(u);if("function"!=typeof c)throw Error(i(150));if(null==(u=c.call(u)))throw Error(i(151));for(var f=c=null,h=o,g=o=0,y=null,v=u.next();null!==h&&!v.done;g++,v=u.next()){h.index>g?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),tZ&&tH(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return tZ&&tH(l,g),c}for(h=r(l,h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),tZ&&tH(l,g),c}(s,c,f,h);if("function"==typeof f.then)return u(s,c,nJ(f),h);if(f.$$typeof===E)return u(s,c,ai(s,f,h),h);n1(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f?(f=""+f,null!==c&&6===c.tag?(n(s,c.sibling),(c=l(c,f)).return=s):(n(s,c),(c=i_(f,s.mode,h)).return=s),o(s=c)):n(s,c)}(u,s,c,f),nG=null,u}}var n4=n3(!0),n6=n3(!1),n8=m(null),n5=m(0);function n7(e,t){g(n5,e=oz),g(n8,t),oz=e|t.baseLanes}function n9(){g(n5,oz),g(n8,n8.current)}function re(){oz=n5.current,h(n8),h(n5)}var rt=m(null),rn=null;function rr(e){var t=e.alternate;g(ri,1&ri.current),g(rt,e),null===rn&&(null===t||null!==n8.current?rn=e:null!==t.memoizedState&&(rn=e))}function rl(e){if(22===e.tag){if(g(ri,ri.current),g(rt,e),null===rn){var t=e.alternate;null!==t&&null!==t.memoizedState&&(rn=e)}}else ra(e)}function ra(){g(ri,ri.current),g(rt,rt.current)}function ro(e){h(rt),rn===e&&(rn=null),h(ri)}var ri=m(0);function ru(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=s.ReactCurrentDispatcher,rc=s.ReactCurrentBatchConfig,rf=0,rd=null,rp=null,rm=null,rh=!1,rg=!1,ry=!1,rv=0,rb=0,rk=null,rw=0;function rS(){throw Error(i(321))}function rC(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tD(e[n],t[n]))return!1;return!0}function rE(e,t,n,r,l,a){return rf=a,rd=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,rs.current=null===e||null===e.memoizedState?lg:ly,ry=!1,e=n(r,l),ry=!1,rg&&(e=rz(t,n,r,l)),rx(),e}function rx(){rs.current=lh;var e=null!==rp&&null!==rp.next;if(rf=0,rm=rp=rd=null,rh=!1,rb=0,rk=null,e)throw Error(i(300))}function rz(e,t,n,r){rd=e;var l=0;do{if(rg&&(rk=null),rb=0,rg=!1,25<=l)throw Error(i(301));l+=1,rm=rp=null,e.updateQueue=null,rs.current=lv;var a=t(n,r)}while(rg);return a}function rP(){var e=rs.current.useState()[0];return"function"==typeof e.then?rM(e):e}function rN(){var e=0!==rv;return rv=0,e}function r_(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function rL(e){if(rh){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}rh=!1}rf=0,rm=rp=rd=null,rg=!1,rb=rv=0,rk=null}function rT(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===rm?rd.memoizedState=rm=e:rm=rm.next=e,rm}function rF(){if(null===rp){var e=rd.alternate;e=null!==e?e.memoizedState:null}else e=rp.next;var t=null===rm?rd.memoizedState:rm.next;if(null!==t)rm=t,rp=e;else{if(null===e){if(null===rd.alternate)throw Error(i(467));throw Error(i(310))}e={memoizedState:(rp=e).memoizedState,baseState:rp.baseState,baseQueue:rp.baseQueue,queue:rp.queue,next:null},null===rm?rd.memoizedState=rm=e:rm=rm.next=e}return rm}function rM(e){var t=rb;return rb+=1,null===rk&&(rk=[]),e=nK(rk,e,t),null===rd.alternate&&(null===rm?null===rd.memoizedState:null===rm.next)&&(rs.current=lg),e}function rO(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return rM(e);if(e.$$typeof===E)return ao(e)}throw Error(i(438,String(e)))}function rR(e,t){return"function"==typeof t?t(e):t}function rD(e){return rA(rF(),rp,e)}function rA(e,t,n){var r=e.queue;if(null===r)throw Error(i(311));r.lastRenderedReducer=n;var l=e.baseQueue,a=r.pending;if(null!==a){if(null!==l){var o=l.next;l.next=a.next,a.next=o}t.baseQueue=l=a,r.pending=null}if(a=e.baseState,null===l)e.memoizedState=a;else{t=l.next;var u=o=null,s=null,c=t,f=!1;do{var d=-536870913&c.lane;if(d!==c.lane?(oS&d)===d:(rf&d)===d){var p=c.revertLane;if(0===p)null!==s&&(s=s.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===nP&&(f=!0);else if((rf&p)===p){c=c.next,p===nP&&(f=!0);continue}else d={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===s?(u=s=d,o=a):s=s.next=d,rd.lanes|=p,o_|=p;d=c.action,ry&&n(a,d),a=c.hasEagerState?c.eagerState:n(a,d)}else p={lane:d,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===s?(u=s=p,o=a):s=s.next=p,rd.lanes|=d,o_|=d;c=c.next}while(null!==c&&c!==t);if(null===s?o=a:s.next=u,!tD(a,e.memoizedState)&&(lR=!0,f&&null!==(n=nN)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=s,r.lastRenderedState=a}return null===l&&(r.lanes=0),[e.memoizedState,r.dispatch]}function rI(e){var t=rF(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,a=t.memoizedState;if(null!==l){n.pending=null;var o=l=l.next;do a=e(a,o.action),o=o.next;while(o!==l);tD(a,t.memoizedState)||(lR=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function rU(e,t,n){var r=rd,l=rF(),a=tZ;if(a){if(void 0===n)throw Error(i(407));n=n()}else n=t();var o=!tD((rp||l).memoizedState,n);if(o&&(l.memoizedState=n,lR=!0),l=l.queue,r4(rQ.bind(null,r,l,e),[e]),l.getSnapshot!==t||o||null!==rm&&1&rm.memoizedState.tag){if(r.flags|=2048,rJ(9,rV.bind(null,r,l,n,t),{destroy:void 0},null),null===ok)throw Error(i(349));a||0!=(60&rf)||rB(r,t,n)}return n}function rB(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=rd.updateQueue)?(t=iG(),rd.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function rV(e,t,n,r){t.value=n,t.getSnapshot=r,r$(t)&&rj(e)}function rQ(e,t,n){return n(function(){r$(t)&&rj(e)})}function r$(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tD(e,n)}catch(e){return!0}}function rj(e){var t=ns(e,2);null!==t&&oG(t,e,2)}function rW(e){var t=rT();if("function"==typeof e){var n=e;e=n(),ry&&(eo(!0),n(),eo(!1))}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rR,lastRenderedState:e},t}function rH(e,t,n,r){return e.baseState=n,rA(e,rp,"function"==typeof r?r:rR)}function rq(e,t,n,r){if(ld(e))throw Error(i(485));null===(e=t.pending)?((e={payload:r,next:null}).next=t.pending=e,rK(t,n,r)):t.pending=e.next={payload:r,next:e.next}}function rK(e,t,n){var r=e.action,l=e.state,a=rc.transition,o={_callbacks:new Set};rc.transition=o;try{var i=r(l,n);null!==i&&"object"==typeof i&&"function"==typeof i.then?(av(o,i),i.then(function(n){e.state=n,rY(e,t)},function(){return rY(e,t)}),t(i)):(t(i),e.state=i,rY(e,t))}catch(n){t({then:function(){},status:"rejected",reason:n}),rY(e,t)}finally{rc.transition=a}}function rY(e,t){var n=e.pending;if(null!==n){var r=n.next;r===n?e.pending=null:(r=r.next,n.next=r,rK(e,t,r.payload))}}function rX(e,t){return t}function rG(e,t,n){e="object"==typeof(e=rA(e,t,rX)[0])&&null!==e&&"function"==typeof e.then?rM(e):e;var r=(t=rF()).queue,l=r.dispatch;return n!==t.memoizedState&&(rd.flags|=2048,rJ(9,rZ.bind(null,r,n),{destroy:void 0},null)),[e,l]}function rZ(e,t){e.action=t}function rJ(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},null===(t=rd.updateQueue)?(t=iG(),rd.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function r0(){return rF().memoizedState}function r1(e,t,n,r){var l=rT();rd.flags|=e,l.memoizedState=rJ(1|t,n,{destroy:void 0},void 0===r?null:r)}function r2(e,t,n,r){var l=rF();r=void 0===r?null:r;var a=l.memoizedState.inst;null!==rp&&null!==r&&rC(r,rp.memoizedState.deps)?l.memoizedState=rJ(t,n,a,r):(rd.flags|=e,l.memoizedState=rJ(1|t,n,a,r))}function r3(e,t){r1(8390656,8,e,t)}function r4(e,t){r2(2048,8,e,t)}function r6(e,t){return r2(4,2,e,t)}function r8(e,t){return r2(4,4,e,t)}function r5(e,t){return"function"==typeof t?(t(e=e()),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function r7(e,t,n){n=null!=n?n.concat([e]):null,r2(4,4,r5.bind(null,t,e),n)}function r9(){}function le(e,t){var n=rF();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&rC(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function lt(e,t){var n=rF();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&rC(t,r[1])?r[0]:(r=e(),ry&&(eo(!0),e(),eo(!1)),n.memoizedState=[r,t],r)}function ln(e,t,n){return tD(n,t)?n:null!==n8.current?(e.memoizedState=n,tD(n,t)||(lR=!0),n):0==(42&rf)?(lR=!0,e.memoizedState=n):(0===oF&&(oF=0==(536870912&oS)||tZ?eh():536870912),null!==(e=rt.current)&&(e.flags|=32),e=oF,rd.lanes|=e,o_|=e,t)}function lr(e,t,n,r,l){var a=ek;ek=0!==a&&8>a?a:8;var o=rc.transition,i={_callbacks:new Set};rc.transition=i,lf(e,!1,t,n);try{var u=l();if(null!==u&&"object"==typeof u&&"function"==typeof u.then){av(i,u);var s,c,f=(s=[],c={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},u.then(function(){c.status="fulfilled",c.value=r;for(var e=0;e<s.length;e++)(0,s[e])(r)},function(e){for(c.status="rejected",c.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),c);lc(e,t,f)}else lc(e,t,r)}catch(n){lc(e,t,{then:function(){},status:"rejected",reason:n})}finally{ek=a,rc.transition=o}}function ll(e,t,n,r){if(5!==e.tag)throw Error(i(476));if(null===e.memoizedState){var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rR,lastRenderedState:f},a=l;l={memoizedState:f,baseState:f,baseQueue:null,queue:l,next:null},e.memoizedState=l;var o=e.alternate;null!==o&&(o.memoizedState=l)}else a=e.memoizedState.queue;lr(e,a,t,f,function(){return n(r)})}function la(){var e=ao(B);return null!==e?e:f}function lo(){return rF().memoizedState}function li(){return rF().memoizedState}function lu(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=oX(t),r=nO(t,e=nM(n),n);null!==r&&(oG(r,t,n),nR(r,t,n)),t={cache:ap()},e.payload=t;return}t=t.return}}function ls(e,t,n){var r=oX(e);n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},ld(e)?lp(t,n):null!==(n=nu(e,t,n,r))&&(oG(n,e,r),lm(n,t,r))}function lc(e,t,n){var r=oX(e),l={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(ld(e))lp(t,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=a(o,n);if(l.hasEagerState=!0,l.eagerState=i,tD(i,o)){ni(e,t,l,0),null===ok&&no();return}}catch(e){}finally{}null!==(n=nu(e,t,l,r))&&(oG(n,e,r),lm(n,t,r))}}function lf(e,t,n,r){if(ag(),r={lane:2,revertLane:nE(),action:r,hasEagerState:!1,eagerState:null,next:null},ld(e)){if(t)throw Error(i(479))}else null!==(t=nu(e,n,r,2))&&oG(t,e,2)}function ld(e){var t=e.alternate;return e===rd||null!==t&&t===rd}function lp(e,t){rg=rh=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lm(e,t,n){if(0!=(4194176&n)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eb(e,n)}}iG=function(){return{lastEffect:null,events:null,stores:null}};var lh={readContext:ao,use:rO,useCallback:rS,useContext:rS,useEffect:rS,useImperativeHandle:rS,useInsertionEffect:rS,useLayoutEffect:rS,useMemo:rS,useReducer:rS,useRef:rS,useState:rS,useDebugValue:rS,useDeferredValue:rS,useTransition:rS,useSyncExternalStore:rS,useId:rS};lh.useCacheRefresh=rS,lh.useHostTransitionStatus=rS,lh.useFormState=rS,lh.useOptimistic=rS;var lg={readContext:ao,use:rO,useCallback:function(e,t){return rT().memoizedState=[e,void 0===t?null:t],e},useContext:ao,useEffect:r3,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,r1(4194308,4,r5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return r1(4194308,4,e,t)},useInsertionEffect:function(e,t){r1(4,2,e,t)},useMemo:function(e,t){var n=rT();t=void 0===t?null:t;var r=e();return ry&&(eo(!0),e(),eo(!1)),n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rT();if(void 0!==n){var l=n(t);ry&&(eo(!0),n(t),eo(!1))}else l=t;return r.memoizedState=r.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},r.queue=e,e=e.dispatch=ls.bind(null,rd,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},rT().memoizedState=e},useState:function(e){var t=(e=rW(e)).queue,n=lc.bind(null,rd,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:r9,useDeferredValue:function(e){return rT().memoizedState=e,e},useTransition:function(){var e=rW(!1);return e=lr.bind(null,rd,e.queue,!0,!1),rT().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=rd,l=rT();if(tZ){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===ok)throw Error(i(349));0!=(60&oS)||rB(r,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,r3(rQ.bind(null,r,a,e),[e]),r.flags|=2048,rJ(9,rV.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=rT(),t=ok.identifierPrefix;if(tZ){var n=tW,r=tj;t=":"+t+"R"+(n=(r&~(1<<32-ei(r)-1)).toString(32)+n),0<(n=rv++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=rw++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return rT().memoizedState=lu.bind(null,rd)}};lg.useHostTransitionStatus=la,lg.useFormState=function(e,t){if(tZ){var n=ok.formState;if(null!==n){e:{if(tZ){if(tG){t:{for(var r=tG,l=t0;8!==r.nodeType;)if(!l||null===(r=ca(r))){r=null;break t}r="F!"===(l=r.data)||"F"===l?r:null}if(r){tG=ca(r),r="F!"===r.data;break e}}t5()}r=!1}r&&(t=n[0])}}return(n=rT()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rX,lastRenderedState:t},n.queue=r,n=lc.bind(null,rd,r),r.dispatch=n,r=rT(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=rq.bind(null,rd,l,n),l.dispatch=n,r.memoizedState=e,[t,n]},lg.useOptimistic=function(e){var t=rT();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=lf.bind(null,rd,!0,n),n.dispatch=t,[e,t]};var ly={readContext:ao,use:rO,useCallback:le,useContext:ao,useEffect:r4,useImperativeHandle:r7,useInsertionEffect:r6,useLayoutEffect:r8,useMemo:lt,useReducer:rD,useRef:r0,useState:function(){return rD(rR)},useDebugValue:r9,useDeferredValue:function(e){return ln(rF(),rp.memoizedState,e)},useTransition:function(){var e=rD(rR)[0],t=rF().memoizedState;return["boolean"==typeof e?e:rM(e),t]},useSyncExternalStore:rU,useId:lo};ly.useCacheRefresh=li,ly.useHostTransitionStatus=la,ly.useFormState=function(e){return rG(rF(),rp,e)},ly.useOptimistic=function(e,t){return rH(rF(),rp,e,t)};var lv={readContext:ao,use:rO,useCallback:le,useContext:ao,useEffect:r4,useImperativeHandle:r7,useInsertionEffect:r6,useLayoutEffect:r8,useMemo:lt,useReducer:rI,useRef:r0,useState:function(){return rI(rR)},useDebugValue:r9,useDeferredValue:function(e){var t=rF();return null===rp?(t.memoizedState=e,e):ln(t,rp.memoizedState,e)},useTransition:function(){var e=rI(rR)[0],t=rF().memoizedState;return["boolean"==typeof e?e:rM(e),t]},useSyncExternalStore:rU,useId:lo};function lb(e,t){if(e&&e.defaultProps)for(var n in t=u({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function lk(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}lv.useCacheRefresh=li,lv.useHostTransitionStatus=la,lv.useFormState=function(e){var t=rF(),n=rp;if(null!==n)return rG(t,n,e);t=t.memoizedState;var r=(n=rF()).queue.dispatch;return n.memoizedState=e,[t,r]},lv.useOptimistic=function(e,t){var n=rF();return null!==rp?rH(n,rp,e,t):(n.baseState=e,[e,n.queue.dispatch])};var lw={isMounted:function(e){return!!(e=e._reactInternals)&&tw(e)===e},enqueueSetState:function(e,t,n){var r=oX(e=e._reactInternals),l=nM(r);l.payload=t,null!=n&&(l.callback=n),null!==(t=nO(e,l,r))&&(oG(t,e,r),nR(t,e,r))},enqueueReplaceState:function(e,t,n){var r=oX(e=e._reactInternals),l=nM(r);l.tag=1,l.payload=t,null!=n&&(l.callback=n),null!==(t=nO(e,l,r))&&(oG(t,e,r),nR(t,e,r))},enqueueForceUpdate:function(e,t){var n=oX(e=e._reactInternals),r=nM(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=nO(e,r,n))&&(oG(t,e,n),nR(t,e,n))}};function lS(e,t,n,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||!nQ(n,r)||!nQ(l,a)}function lC(e,t,n){var r=!1,l=tx,a=t.contextType;return"object"==typeof a&&null!==a?a=ao(a):(l=tL(t)?tN:tz.current,a=(r=null!=(r=t.contextTypes))?t_(e,l):tx),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=lw,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function lE(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&lw.enqueueReplaceState(t,t.state,null)}function lx(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},nT(e);var a=t.contextType;"object"==typeof a&&null!==a?l.context=ao(a):(a=tL(t)?tN:tz.current,l.context=t_(e,a)),l.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(lk(e,t,a,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&lw.enqueueReplaceState(l,l.state,null),nU(e,n,l,r),nI(),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}var lz=new WeakMap;function lP(e,t){if("object"==typeof e&&null!==e){var n=lz.get(e);"string"!=typeof n&&(n=eJ(t),lz.set(e,n))}else n=eJ(t);return{value:e,source:t,stack:n,digest:null}}function lN(e,t,n){return"string"==typeof n&&lz.set(e,n),{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function l_(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}function lL(e,t,n){(n=nM(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oB||(oB=!0,oV=r),l_(e,t)},n}function lT(e,t,n){(n=nM(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){l_(e,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){l_(e,t),"function"!=typeof r&&(null===oQ?oQ=new Set([this]):oQ.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}function lF(e,t,n,r,l){return 0==(1&e.mode)?e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=nM(2)).tag=2,nO(n,t,2))),n.lanes|=2):(e.flags|=65536,e.lanes=l),e}var lM=s.ReactCurrentOwner,lO=Error(i(461)),lR=!1;function lD(e,t,n,r){t.child=null===e?n6(t,null,n,r):n4(t,e.child,n,r)}function lA(e,t,n,r,l){n=n.render;var a=t.ref;return(aa(t,l),r=rE(e,t,n,r,a,l),n=rN(),null===e||lR)?(tZ&&n&&tK(t),t.flags|=1,lD(e,t,r,l),t.child):(r_(e,t,l),l6(e,t,l))}function lI(e,t,n,r,l){if(null===e){var a=n.type;return"function"!=typeof a||iC(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=iz(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,lU(e,t,a,r,l))}if(a=e.child,0==(e.lanes&l)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:nQ)(o,r)&&e.ref===t.ref)return l6(e,t,l)}return t.flags|=1,(e=iE(a,r)).ref=t.ref,e.return=t,t.child=e}function lU(e,t,n,r,l){if(null!==e){var a=e.memoizedProps;if(nQ(a,r)&&e.ref===t.ref){if(lR=!1,t.pendingProps=r=a,0==(e.lanes&l))return t.lanes=e.lanes,l6(e,t,l);0!=(131072&e.flags)&&(lR=!0)}}return l$(e,t,n,r,l)}function lB(e,t,n){var r=t.pendingProps,l=r.children,a=0!=(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(lQ(e,t),"hidden"===r.mode||a){if(0!=(128&t.flags)){if(n=null!==o?o.baseLanes|n:n,null!==e){for(l=0,r=t.child=e.child;null!==r;)l=l|r.lanes|r.childLanes,r=r.sibling;t.childLanes=l&~n}else t.childLanes=0,t.child=null;return lV(e,t,n)}if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},null!==e&&aw(t,null),n9(),rl(t);else{if(0==(536870912&n))return t.lanes=t.childLanes=536870912,lV(e,t,null!==o?o.baseLanes|n:n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&aw(t,null!==o?o.cachePool:null),null!==o?n7(t,o):n9(),rl(t)}}else null!==o?(aw(t,o.cachePool),n7(t,o),ra(t),t.memoizedState=null):(null!==e&&aw(t,null),n9(),ra(t));return lD(e,t,l,n),t.child}function lV(e,t,n){var r=ak();return r=null===r?null:{parent:ad._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},null!==e&&aw(t,null),n9(),rl(t),null}function lQ(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function l$(e,t,n,r,l){var a=tL(n)?tN:tz.current;return(a=t_(t,a),aa(t,l),n=rE(e,t,n,r,a,l),r=rN(),null===e||lR)?(tZ&&r&&tK(t),t.flags|=1,lD(e,t,n,l),t.child):(r_(e,t,l),l6(e,t,l))}function lj(e,t,n,r,l,a){return(aa(t,a),n=rz(t,r,n,l),rx(),r=rN(),null===e||lR)?(tZ&&r&&tK(t),t.flags|=1,lD(e,t,n,a),t.child):(r_(e,t,a),l6(e,t,a))}function lW(e,t,n,r,l){if(tL(n)){var a=!0;tO(t)}else a=!1;if(aa(t,l),null===t.stateNode)l4(e,t),lC(t,n,r),lx(t,n,r,l),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;s="object"==typeof s&&null!==s?ao(s):t_(t,s=tL(n)?tN:tz.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&lE(t,o,r,s),nL=!1;var d=t.memoizedState;o.state=d,nU(t,r,o,l),nI(),u=t.memoizedState,i!==r||d!==u||tP.current||nL?("function"==typeof c&&(lk(t,n,c,r),u=t.memoizedState),(i=nL||lS(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nF(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:lb(t.type,i),o.props=s,f=t.pendingProps,d=o.context,u="object"==typeof(u=n.contextType)&&null!==u?ao(u):t_(t,u=tL(n)?tN:tz.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&lE(t,o,r,u),nL=!1,d=t.memoizedState,o.state=d,nU(t,r,o,l),nI();var m=t.memoizedState;i!==f||d!==m||tP.current||nL?("function"==typeof p&&(lk(t,n,p,r),m=t.memoizedState),(s=nL||lS(t,n,s,r,d,m,u)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return lH(e,t,n,r,a,l)}function lH(e,t,n,r,l,a){lQ(e,t);var o=0!=(128&t.flags);if(!r&&!o)return l&&tR(t,n,!1),l6(e,t,a);r=t.stateNode,lM.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=n4(t,e.child,null,a),t.child=n4(t,null,i,a)):lD(e,t,i,a),t.memoizedState=r.state,l&&tR(t,n,!0),t.child}function lq(e){var t=e.stateNode;t.pendingContext?tF(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tF(e,t.context,!1),V(e,t.containerInfo)}function lK(e,t,n,r,l){return nt(),nn(l),t.flags|=256,lD(e,t,n,r),t.child}var lY={dehydrated:null,treeContext:null,retryLane:0};function lX(e){return{baseLanes:e,cachePool:aS()}}function lG(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=oF),e}function lZ(e,t,n){var r,l=t.pendingProps,a=!1,o=0!=(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&ri.current)),r&&(a=!0,t.flags&=-129),r=0!=(32&t.flags),t.flags&=-33,null===e){if(tZ){if(a?rr(t):ra(t),tZ){var u=o=tG;if(u){if(!t6(t,u)){t8(t)&&t5(),tG=ca(u);var s=tX;tG&&t6(t,tG)?t1(s,u):(t2(tX,t),tZ=!1,tX=t,tG=o)}}else t8(t)&&t5(),t2(tX,t),tZ=!1,tX=t,tG=o}if(null!==(o=t.memoizedState)&&null!==(o=o.dehydrated))return 0==(1&t.mode)?t.lanes=2:"$!"===o.data?t.lanes=16:t.lanes=536870912,null;ro(t)}return(o=l.children,l=l.fallback,a)?(ra(t),a=t.mode,u=t.child,o={mode:"hidden",children:o},0==(1&a)&&null!==u?(u.childLanes=0,u.pendingProps=o):u=iN(o,a,0,null),l=iP(l,a,n,null),u.return=t,l.return=t,u.sibling=l,t.child=u,(a=t.child).memoizedState=lX(n),a.childLanes=lG(e,r,n),t.memoizedState=lY,l):(rr(t),lJ(t,o))}if(null!==(u=e.memoizedState)&&null!==(s=u.dehydrated))return function(e,t,n,r,l,a,o,u){if(n)return 256&t.flags?(rr(t),t.flags&=-257,l0(e,t,u,a=lN(Error(i(422))))):null!==t.memoizedState?(ra(t),t.child=e.child,t.flags|=128,null):(ra(t),a=l.fallback,o=t.mode,l=iN({mode:"visible",children:l.children},o,0,null),a=iP(a,o,u,null),a.flags|=2,l.return=t,a.return=t,l.sibling=a,t.child=l,0!=(1&t.mode)&&n4(t,e.child,null,u),(o=t.child).memoizedState=lX(u),o.childLanes=lG(e,r,u),t.memoizedState=lY,a);if(rr(t),0==(1&t.mode))return l0(e,t,u,null);if("$!"===a.data){if(a=a.nextSibling&&a.nextSibling.dataset)var s=a.dgst;return a=s,(r=Error(i(419))).digest=a,l0(e,t,u,a=lN(r,a,void 0))}if(r=0!=(u&e.childLanes),lR||r){if(null!==(r=ok)){if(0!=(42&(l=u&-u)))l=1;else switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=64;break;case 268435456:l=134217728;break;default:l=0}if(0!==(l=0!=(l&(r.suspendedLanes|u))?0:l)&&l!==o.retryLane)throw o.retryLane=l,ns(e,l),oG(r,e,l),lO}return"$?"!==a.data&&ir(),l0(e,t,u,null)}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=iv.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,tG=cl(a.nextSibling),tX=t,tZ=!0,tJ=null,t0=!1,null!==e&&(tV[tQ++]=tj,tV[tQ++]=tW,tV[tQ++]=t$,tj=e.id,tW=e.overflow,t$=t),t=lJ(t,l.children),t.flags|=4096,t)}(e,t,o,r,l,s,u,n);if(a){ra(t),a=l.fallback,o=t.mode,s=(u=e.child).sibling;var c={mode:"hidden",children:l.children};return 0==(1&o)&&t.child!==u?((l=t.child).childLanes=0,l.pendingProps=c,t.deletions=null):(l=iE(u,c)).subtreeFlags=31457280&u.subtreeFlags,null!==s?a=iE(s,a):(a=iP(a,o,n,null),a.flags|=2),a.return=t,l.return=t,l.sibling=a,t.child=l,l=a,a=t.child,null===(o=e.child.memoizedState)?o=lX(n):(null!==(u=o.cachePool)?(s=ad._currentValue,u=u.parent!==s?{parent:s,pool:s}:u):u=aS(),o={baseLanes:o.baseLanes|n,cachePool:u}),a.memoizedState=o,a.childLanes=lG(e,r,n),t.memoizedState=lY,l}return rr(t),e=(r=e.child).sibling,r=iE(r,{mode:"visible",children:l.children}),0==(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lJ(e,t){return(t=iN({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function l0(e,t,n,r){return null!==r&&nn(r),n4(t,e.child,null,n),e=lJ(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function l1(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ar(e.return,t,n)}function l2(e,t,n,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function l3(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(lD(e,t,r.children,n),0!=(2&(r=ri.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&l1(e,n,t);else if(19===e.tag)l1(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(g(ri,r),0==(1&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(l=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===ru(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),l2(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===ru(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}l2(t,!0,n,null,a);break;case"together":l2(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function l4(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function l6(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),o_|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=iE(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=iE(e,e.pendingProps)).return=t;n.sibling=null}return t.child}var l8=m(null),l5=null,l7=null,l9=null;function ae(){l9=l7=l5=null}function at(e,t,n){g(l8,t._currentValue),t._currentValue=n}function an(e){e._currentValue=l8.current,h(l8)}function ar(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function al(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var l=r.dependencies;if(null!==l)for(var a=r.child,o=l.firstContext;null!==o;){if(o.context===t){if(1===r.tag){(o=nM(n&-n)).tag=2;var u=r.updateQueue;if(null!==u){var s=(u=u.shared).pending;null===s?o.next=o:(o.next=s.next,s.next=o),u.pending=o}}r.lanes|=n,null!==(o=r.alternate)&&(o.lanes|=n),ar(r.return,n,e),l.lanes|=n;break}o=o.next}else if(10===r.tag)a=r.type===e.type?null:r.child;else if(18===r.tag){if(null===(a=r.return))throw Error(i(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),ar(a,n,e),a=r.sibling}else a=r.child;if(null!==a)a.return=r;else for(a=r;null!==a;){if(a===e){a=null;break}if(null!==(r=a.sibling)){r.return=a.return,a=r;break}a=a.return}r=a}}function aa(e,t){l5=e,l9=l7=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(lR=!0),e.firstContext=null)}function ao(e){return au(l5,e)}function ai(e,t,n){return null===l5&&aa(e,n),au(e,t)}function au(e,t){var n=t._currentValue;if(l9!==t){if(t={context:t,memoizedValue:n,next:null},null===l7){if(null===e)throw Error(i(308));l7=t,e.dependencies={lanes:0,firstContext:t}}else l7=l7.next=t}return n}var as="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ac=a.unstable_scheduleCallback,af=a.unstable_NormalPriority,ad={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ap(){return{controller:new as,data:new Map,refCount:0}}function am(e){e.refCount--,0===e.refCount&&ac(af,function(){e.controller.abort()})}var ah=s.ReactCurrentBatchConfig;function ag(){var e=ah.transition;return null!==e&&e._callbacks.add(ay),e}function ay(e,t){!function(e,t){if(null===nx){var n=nx=[];nz=0,nP=nE(),nN={status:"pending",value:void 0,then:function(e){n.push(e)}}}nz++,t.then(n_,n_)}(0,t)}function av(e,t){e._callbacks.forEach(function(n){return n(e,t)})}var ab=m(null);function ak(){var e=ab.current;return null!==e?e:ok.pooledCache}function aw(e,t){null===t?g(ab,ab.current):g(ab,t.pool)}function aS(){var e=ak();return null===e?null:{parent:ad._currentValue,pool:e}}function aC(e){e.flags|=4}function aE(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,0==(42&oS)&&!(t="stylesheet"!==t.type||0!=(3&t.state.loading))){if(o9())e.flags|=8192;else throw nY=nW,nj}}function ax(e,t){null!==t?e.flags|=4:16384&e.flags&&(t=22!==e.tag?eg():536870912,e.lanes|=t)}function az(e,t){if(!tZ)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function aP(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=31457280&l.subtreeFlags,r|=31457280&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function aN(e,t){switch(tY(t),t.tag){case 1:null!=(e=t.type.childContextTypes)&&tT();break;case 3:an(ad),Q(),h(tP),h(tz);break;case 26:case 27:case 5:j(t);break;case 4:Q();break;case 13:ro(t);break;case 19:h(ri);break;case 10:an(t.type._context);break;case 22:case 23:ro(t),re(),null!==e&&h(ab);break;case 24:an(ad)}}function a_(e,t,n){var r=Array.prototype.slice.call(arguments,3);try{t.apply(n,r)}catch(e){this.onError(e)}}var aL=!1,aT=null,aF=!1,aM=null,aO={onError:function(e){aL=!0,aT=e}};function aR(e,t,n,r,l,a,o,i,u){aL=!1,aT=null,a_.apply(aO,arguments)}var aD=!1,aA=!1,aI="function"==typeof WeakSet?WeakSet:Set,aU=null;function aB(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var l=r;break;default:l=r}"function"==typeof n?e.refCleanup=n(l):n.current=l}}catch(n){im(e,t,n)}}function aV(e,t){var n=e.ref,r=e.refCleanup;if(null!==n){if("function"==typeof r)try{r()}catch(n){im(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){im(e,t,n)}else n.current=null}}function aQ(e,t,n){try{n()}catch(n){im(e,t,n)}}var a$=!1;function aj(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var a=l.inst,o=a.destroy;void 0!==o&&(a.destroy=void 0,aQ(t,n,o))}l=l.next}while(l!==r)}}function aW(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create,l=n.inst;r=r(),l.destroy=r}n=n.next}while(n!==t)}}function aH(e,t){try{aW(t,e)}catch(t){im(e,e.return,t)}}function aq(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{nV(t,n)}catch(t){im(e,e.return,t)}}}function aK(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break;case"img":n.src&&(r.src=n.src)}}catch(t){im(e,e.return,t)}}function aY(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:a9(e,n),4&r&&aH(n,5);break;case 1:if(a9(e,n),4&r){if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){im(n,n.return,e)}else{var l=n.elementType===n.type?t.memoizedProps:lb(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){im(n,n.return,e)}}}64&r&&aq(n),512&r&&aB(n,n.return);break;case 3:if(a9(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{nV(r,e)}catch(e){im(n,n.return,e)}}break;case 26:a9(e,n),512&r&&aB(n,n.return);break;case 27:case 5:a9(e,n),null===t&&4&r&&aK(n),512&r&&aB(n,n.return);break;case 12:default:a9(e,n);break;case 13:a9(e,n),4&r&&a3(e,n);break;case 22:if(0!=(1&n.mode)){if(!(l=null!==n.memoizedState||aD)){t=null!==t&&null!==t.memoizedState||aA;var a=aD,o=aA;aD=l,(aA=t)&&!o?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var l=n.alternate,a=t,o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(a,o,r),aH(o,4);break;case 1:if(e(a,o,r),"function"==typeof(a=o.stateNode).componentDidMount)try{a.componentDidMount()}catch(e){im(o,o.return,e)}if(null!==(l=o.updateQueue)){var u=l.shared.hiddenCallbacks;if(null!==u)for(l.shared.hiddenCallbacks=null,l=0;l<u.length;l++)nB(u[l],a)}r&&64&i&&aq(o),aB(o,o.return);break;case 26:case 27:case 5:e(a,o,r),r&&null===l&&4&i&&aK(o),aB(o,o.return);break;case 12:default:e(a,o,r);break;case 13:e(a,o,r),r&&4&i&&a3(a,o);break;case 22:null===o.memoizedState&&e(a,o,r),aB(o,o.return)}n=n.sibling}}(e,n,0!=(8772&n.subtreeFlags)):a9(e,n),aD=a,aA=o}}else a9(e,n);512&r&&("manual"===n.memoizedProps.mode?aB(n,n.return):aV(n,n.return))}}function aX(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function aG(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||aX(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags||null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function aZ(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&27!==r&&null!==(e=e.child))for(aZ(e,t,n),e=e.sibling;null!==e;)aZ(e,t,n),e=e.sibling}var aJ=null,a0=!1;function a1(e,t,n){for(n=n.child;null!==n;)a2(e,t,n),n=n.sibling}function a2(e,t,n){if(ea&&"function"==typeof ea.onCommitFiberUnmount)try{ea.onCommitFiberUnmount(el,n)}catch(e){}switch(n.tag){case 26:aA||aV(n,t),a1(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:aA||aV(n,t);var r=aJ,l=a0;for(aJ=n.stateNode,a1(e,t,n),e=(n=n.stateNode).attributes;e.length;)n.removeAttributeNode(e[0]);eF(n),aJ=r,a0=l;break;case 5:aA||aV(n,t);case 6:r=aJ,l=a0,aJ=null,a1(e,t,n),aJ=r,a0=l,null!==aJ&&(a0?(e=aJ,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):aJ.removeChild(n.stateNode));break;case 18:null!==aJ&&(a0?(e=aJ,n=n.stateNode,8===e.nodeType?ct(e.parentNode,n):1===e.nodeType&&ct(e,n),uL(e)):ct(aJ,n.stateNode));break;case 4:r=aJ,l=a0,aJ=n.stateNode.containerInfo,a0=!0,a1(e,t,n),aJ=r,a0=l;break;case 0:case 11:case 14:case 15:if(!aA&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){l=r=r.next;do{var a=l.tag,o=l.inst,i=o.destroy;void 0!==i&&(0!=(2&a)?(o.destroy=void 0,aQ(n,t,i)):0!=(4&a)&&(o.destroy=void 0,aQ(n,t,i))),l=l.next}while(l!==r)}a1(e,t,n);break;case 1:if(!aA&&(aV(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){im(n,t,e)}a1(e,t,n);break;case 21:default:a1(e,t,n);break;case 22:aV(n,t),1&n.mode?(aA=(r=aA)||null!==n.memoizedState,a1(e,t,n),aA=r):a1(e,t,n)}}function a3(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{uL(e)}catch(e){im(t,t.return,e)}}function a4(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new aI),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new aI),t;default:throw Error(i(435,e.tag))}}(e);t.forEach(function(t){var r=ib.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}function a6(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var l=n[r];try{var a=t,o=a;e:for(;null!==o;){switch(o.tag){case 27:case 5:aJ=o.stateNode,a0=!1;break e;case 3:case 4:aJ=o.stateNode.containerInfo,a0=!0;break e}o=o.return}if(null===aJ)throw Error(i(160));a2(e,a,l),aJ=null,a0=!1;var u=l.alternate;null!==u&&(u.return=null),l.return=null}catch(e){im(l,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)a5(t,e),t=t.sibling}var a8=null;function a5(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a6(t,e),a7(e),4&r){try{aj(3,e,e.return),aW(3,e)}catch(t){im(e,e.return,t)}try{aj(5,e,e.return)}catch(t){im(e,e.return,t)}}break;case 1:a6(t,e),a7(e),512&r&&null!==n&&aV(n,n.return),64&r&&aD&&null!==(e=e.updateQueue)&&null!==(n=e.callbacks)&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===r?n:r.concat(n));break;case 26:var l=a8;if(a6(t,e),a7(e),512&r&&null!==n&&aV(n,n.return),4&r){if(t=null!==n?n.memoizedState:null,r=e.memoizedState,null===n){if(null===r){if(null===e.stateNode){e:{n=e.type,r=e.memoizedProps,t=l.ownerDocument||l;t:switch(n){case"title":(!(l=t.getElementsByTagName("title")[0])||l[eT]||l[eE]||"http://www.w3.org/2000/svg"===l.namespaceURI||l.hasAttribute("itemprop"))&&(l=t.createElement(n),t.head.insertBefore(l,t.querySelector("head > title"))),sG(l,n,r),l[eE]=e,eI(l),n=l;break e;case"link":var a=cE("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o<a.length;o++)if((l=a[o]).getAttribute("href")===(null==r.href?null:r.href)&&l.getAttribute("rel")===(null==r.rel?null:r.rel)&&l.getAttribute("title")===(null==r.title?null:r.title)&&l.getAttribute("crossorigin")===(null==r.crossOrigin?null:r.crossOrigin)){a.splice(o,1);break t}}sG(l=t.createElement(n),n,r),t.head.appendChild(l);break;case"meta":if(a=cE("meta","content",t).get(n+(r.content||""))){for(o=0;o<a.length;o++)if((l=a[o]).getAttribute("content")===(null==r.content?null:""+r.content)&&l.getAttribute("name")===(null==r.name?null:r.name)&&l.getAttribute("property")===(null==r.property?null:r.property)&&l.getAttribute("http-equiv")===(null==r.httpEquiv?null:r.httpEquiv)&&l.getAttribute("charset")===(null==r.charSet?null:r.charSet)){a.splice(o,1);break t}}sG(l=t.createElement(n),n,r),t.head.appendChild(l);break;default:throw Error(i(468,n))}l[eE]=e,eI(l),n=l}e.stateNode=n}else cx(l,e.type,e.stateNode)}else e.stateNode=cb(l,r,e.memoizedProps)}else if(t!==r)null===t?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):t.count--,null===r?cx(l,e.type,e.stateNode):cb(l,r,e.memoizedProps);else if(null===r&&null!==e.stateNode){e.updateQueue=null;try{var u=e.stateNode,s=e.memoizedProps;sZ(u,e.type,n.memoizedProps,s),u[ex]=s}catch(t){im(e,e.return,t)}}}break;case 27:if(4&r&&null===e.alternate){for(l=e.stateNode,a=e.memoizedProps,o=l.firstChild;o;){var c=o.nextSibling,f=o.nodeName;o[eT]||"HEAD"===f||"BODY"===f||"SCRIPT"===f||"STYLE"===f||"LINK"===f&&"stylesheet"===o.rel.toLowerCase()||l.removeChild(o),o=c}for(o=e.type,c=l.attributes;c.length;)l.removeAttributeNode(c[0]);sG(l,o,a),l[eE]=e,l[ex]=a}case 5:if(a6(t,e),a7(e),512&r&&null!==n&&aV(n,n.return),32&e.flags){t=e.stateNode;try{tu(t,"")}catch(t){im(e,e.return,t)}}if(4&r&&null!=(r=e.stateNode)){t=e.memoizedProps,n=null!==n?n.memoizedProps:t,l=e.type,e.updateQueue=null;try{sZ(r,l,n,t),r[ex]=t}catch(t){im(e,e.return,t)}}break;case 6:if(a6(t,e),a7(e),4&r){if(null===e.stateNode)throw Error(i(162));n=e.stateNode,r=e.memoizedProps;try{n.nodeValue=r}catch(t){im(e,e.return,t)}}break;case 3:if(cC=null,l=a8,a8=cf(t.containerInfo),a6(t,e),a8=l,a7(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{uL(t.containerInfo)}catch(t){im(e,e.return,t)}break;case 4:n=a8,a8=cf(e.stateNode.containerInfo),a6(t,e),a7(e),a8=n;break;case 13:a6(t,e),a7(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(oA=Y()),4&r&&null!==(n=e.updateQueue)&&(e.updateQueue=null,a4(e,n));break;case 22:if(512&r&&null!==n&&aV(n,n.return),u=null!==e.memoizedState,s=null!==n&&null!==n.memoizedState,1&e.mode){var d=aD,p=aA;aD=d||u,aA=p||s,a6(t,e),aA=p,aD=d}else a6(t,e);if(a7(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&r&&(t._visibility=u?-2&t._visibility:1|t._visibility,u&&(t=aD||aA,null===n||s||t||0!=(1&e.mode)&&function e(t){for(t=t.child;null!==t;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:aj(4,n,n.return),e(n);break;case 1:aV(n,n.return);var r=n.stateNode;if("function"==typeof r.componentWillUnmount){var l=n.return;try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){im(n,l,e)}}e(n);break;case 26:case 27:case 5:aV(n,n.return),e(n);break;case 22:aV(n,n.return),null===n.memoizedState&&e(n);break;default:e(n)}t=t.sibling}}(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){n=t;try{l=t.stateNode,u?(a=l.style,"function"==typeof a.setProperty?a.setProperty("display","none","important"):a.display="none"):(o=t.stateNode,f=null!=(c=t.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,o.style.display=null==f||"boolean"==typeof f?"":(""+f).trim())}catch(t){im(e,e.return,t)}}}else if(6===t.tag){if(null===n)try{t.stateNode.nodeValue=u?"":t.memoizedProps}catch(t){im(e,e.return,t)}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(n=e.updateQueue)&&null!==(r=n.retryQueue)&&(n.retryQueue=null,a4(e,r));break;case 19:a6(t,e),a7(e),4&r&&null!==(n=e.updateQueue)&&(e.updateQueue=null,a4(e,n));break;case 21:break;default:a6(t,e),a7(e)}}function a7(e){var t=e.flags;if(2&t){try{if(27!==e.tag){t:{for(var n=e.return;null!==n;){if(aX(n)){var r=n;break t}n=n.return}throw Error(i(160))}switch(r.tag){case 27:var l=r.stateNode,a=aG(e);aZ(e,a,l);break;case 5:var o=r.stateNode;32&r.flags&&(tu(o,""),r.flags&=-33);var u=aG(e);aZ(e,u,o);break;case 3:case 4:var s=r.stateNode.containerInfo,c=aG(e);!function e(t,n,r){var l=t.tag;if(5===l||6===l)t=t.stateNode,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!=(r=r._reactRootContainer)||null!==n.onclick||(n.onclick=sK));else if(4!==l&&27!==l&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,c,s);break;default:throw Error(i(161))}}}catch(t){im(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function a9(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)aY(e,t.alternate,t),t=t.sibling}function oe(e,t){try{aW(t,e)}catch(t){im(e,e.return,t)}}function ot(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&am(n))}function on(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&am(e))}function or(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ol(e,t,n,r),t=t.sibling}function ol(e,t,n,r){var l=t.flags;switch(t.tag){case 0:case 11:case 15:or(e,t,n,r),2048&l&&oe(t,9);break;case 3:or(e,t,n,r),2048&l&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&am(e)));break;case 23:break;case 22:var a=t.stateNode;null!==t.memoizedState?4&a._visibility?or(e,t,n,r):1&t.mode?oa(e,t):(a._visibility|=4,or(e,t,n,r)):4&a._visibility?or(e,t,n,r):(a._visibility|=4,function e(t,n,r,l,a){for(a=a&&0!=(10256&n.subtreeFlags),n=n.child;null!==n;){var o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(t,o,r,l,a),oe(o,8);break;case 23:break;case 22:var u=o.stateNode;null!==o.memoizedState?4&u._visibility?e(t,o,r,l,a):1&o.mode?oa(t,o):(u._visibility|=4,e(t,o,r,l,a)):(u._visibility|=4,e(t,o,r,l,a)),a&&2048&i&&ot(o.alternate,o);break;case 24:e(t,o,r,l,a),a&&2048&i&&on(o.alternate,o);break;default:e(t,o,r,l,a)}n=n.sibling}}(e,t,n,r,0!=(10256&t.subtreeFlags))),2048&l&&ot(t.alternate,t);break;case 24:or(e,t,n,r),2048&l&&on(t.alternate,t);break;default:or(e,t,n,r)}}function oa(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=t,r=n.flags;switch(n.tag){case 22:oa(e,n),2048&r&&ot(n.alternate,n);break;case 24:oa(e,n),2048&r&&on(n.alternate,n);break;default:oa(e,n)}t=t.sibling}}var oo=8192;function oi(e){if(e.subtreeFlags&oo)for(e=e.child;null!==e;)ou(e),e=e.sibling}function ou(e){switch(e.tag){case 26:oi(e),e.flags&oo&&null!==e.memoizedState&&function(e,t,n){if(null===cz)throw Error(i(475));var r=cz;if("stylesheet"===t.type&&("string"!=typeof n.media||!1!==matchMedia(n.media).matches)&&0==(4&t.state.loading)){if(null===t.instance){var l=cm(n.href),a=e.querySelector(ch(l));if(a){null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(r.count++,r=cN.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=a,eI(a);return}a=e.ownerDocument||e,n=cg(n),(l=cs.get(l))&&cw(n,l),eI(a=a.createElement("link"));var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sG(a,"link",n),t.instance=a}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&0==(3&t.state.loading)&&(r.count++,t=cN.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}(a8,e.memoizedState,e.memoizedProps);break;case 5:default:oi(e);break;case 3:case 4:var t=a8;a8=cf(e.stateNode.containerInfo),oi(e),a8=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=oo,oo=16777216,oi(e),oo=t):oi(e))}}function os(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(null!==e)}}function oc(e){var t=e.deletions;if(0!=(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];aU=r,od(r,e)}os(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)of(e),e=e.sibling}function of(e){switch(e.tag){case 0:case 11:case 15:oc(e),2048&e.flags&&aj(9,e,e.return);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,function e(t){var n=t.deletions;if(0!=(16&t.flags)){if(null!==n)for(var r=0;r<n.length;r++){var l=n[r];aU=l,od(l,t)}os(t)}for(t=t.child;null!==t;){switch((n=t).tag){case 0:case 11:case 15:aj(8,n,n.return),e(n);break;case 22:4&(r=n.stateNode)._visibility&&(r._visibility&=-5,e(n));break;default:e(n)}t=t.sibling}}(e)):oc(e);break;default:oc(e)}}function od(e,t){for(;null!==aU;){var n=aU;switch(n.tag){case 0:case 11:case 15:aj(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:am(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,aU=r;else for(n=e;null!==aU;){var l=(r=aU).sibling,a=r.return;if(!function e(t){var n=t.alternate;null!==n&&(t.alternate=null,e(n)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(n=t.stateNode)&&eF(n),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(r),r===n){aU=null;break}if(null!==l){l.return=a,aU=l;break}aU=a}}}var op={getCacheSignal:function(){return ao(ad).controller.signal},getCacheForType:function(e){var t=ao(ad),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},om="function"==typeof WeakMap?WeakMap:Map,oh=s.ReactCurrentDispatcher,og=s.ReactCurrentCache,oy=s.ReactCurrentOwner,ov=s.ReactCurrentBatchConfig,ob=0,ok=null,ow=null,oS=0,oC=0,oE=null,ox=!1,oz=0,oP=0,oN=null,o_=0,oL=0,oT=0,oF=0,oM=null,oO=null,oR=!1,oD=!1,oA=0,oI=1/0,oU=null,oB=!1,oV=null,oQ=null,o$=!1,oj=null,oW=0,oH=0,oq=null,oK=0,oY=null;function oX(e){return 0==(1&e.mode)?2:0!=(2&ob)&&0!==oS?oS&-oS:null!==ag()?0!==(e=nP)?e:nE():0!==(e=ek)?e:e=void 0===(e=window.event)?32:uU(e.type)}function oG(e,t,n){(e===ok&&2===oC||null!==e.cancelPendingCommit)&&(o5(e,0),o3(e,oS,oF)),o2(e,n),(0==(2&ob)||e!==ok)&&(e===ok&&(0==(2&ob)&&(oL|=n),4===oP&&o3(e,oS,oF)),nv(e),2===n&&0===ob&&0==(1&t.mode)&&(oI=Y()+500,nb(!0)))}function oZ(e,t){if(0!=(6&ob))throw Error(i(327));var n=e.callbackNode;if(id()&&e.callbackNode!==n)return null;var r=ep(e,e===ok?oS:0);if(0===r)return null;var l=0==(60&r)&&0==(r&e.expiredLanes)&&!t;if(0!==(t=l?function(e,t){var n=ob;ob|=2;var r=ie(),l=it();(ok!==e||oS!==t)&&(oU=null,oI=Y()+500,o5(e,t));e:for(;;)try{if(0!==oC&&null!==ow){t=ow;var a=oE;t:switch(oC){case 1:case 6:oC=0,oE=null,ii(e,t,a);break;case 2:if(nH(a)){oC=0,oE=null,io(t);break}t=function(){2===oC&&ok===e&&(oC=7),nv(e)},a.then(t,t);break e;case 3:oC=7;break e;case 4:oC=5;break e;case 7:nH(a)?(oC=0,oE=null,io(t)):(oC=0,oE=null,ii(e,t,a));break;case 5:switch(ow.tag){case 5:case 26:case 27:t=ow,oC=0,oE=null;var o=t.sibling;if(null!==o)ow=o;else{var u=t.return;null!==u?(ow=u,iu(u)):ow=null}break t}oC=0,oE=null,ii(e,t,a);break;case 8:o8(),oP=6;break e;default:throw Error(i(462))}}!function(){for(;null!==ow&&!q();)ia(ow)}();break}catch(t){o7(e,t)}return(ae(),oh.current=r,og.current=l,ob=n,null!==ow)?0:(ok=null,oS=0,no(),oP)}(e,r):il(e,r)))for(var a=l;;){if(6===t)o3(e,r,0);else{if(l=e.current.alternate,a&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var l=n[r],a=l.getSnapshot;l=l.value;try{if(!tD(a(),l))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(l)){t=il(e,r),a=!1;continue}if(2===t){var o=em(e,a=r);0!==o&&(r=o,t=oJ(e,a,o))}if(1===t)throw n=oN,o5(e,0),o3(e,r,0),nv(e),n;e.finishedWork=l,e.finishedLanes=r;e:{switch(a=e,t){case 0:case 1:throw Error(i(345));case 4:if((4194176&r)===r){o3(a,r,oF);break e}break;case 2:case 3:case 5:break;default:throw Error(i(329))}if((62914560&r)===r&&10<(t=oA+300-Y())){if(o3(a,r,oF),0!==ep(a,0))break e;a.timeoutHandle=s8(o1.bind(null,a,l,oO,oU,oR,r,oF),t);break e}o1(a,l,oO,oU,oR,r,oF)}}break}return nv(e),nS(e,Y()),e=e.callbackNode===n?oZ.bind(null,e):null}function oJ(e,t,n){var r=oM,l=e.current.memoizedState.isDehydrated;if(l&&(o5(e,n).flags|=256),2!==(n=il(e,n))){if(ox&&!l)return e.errorRecoveryDisabledLanes|=t,oL|=t,4;e=oO,oO=r,null!==e&&o0(e)}return n}function o0(e){null===oO?oO=e:oO.push.apply(oO,e)}function o1(e,t,n,r,l,a,o){if(0==(42&a)&&(cz={stylesheets:null,count:0,unsuspend:cP},ou(t),null!==(t=function(){if(null===cz)throw Error(i(475));var e=cz;return e.stylesheets&&0===e.count&&cL(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&cL(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}()))){e.cancelPendingCommit=t(is.bind(null,e,n,r,l)),o3(e,a,o);return}is(e,n,r,l,o)}function o2(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0),2&ob?oR=!0:4&ob&&(oD=!0),ik()}function o3(e,t,n){t&=~oT,t&=~oL,e.suspendedLanes|=t,e.pingedLanes&=~t;for(var r=e.expirationTimes,l=t;0<l;){var a=31-ei(l),o=1<<a;r[a]=-1,l&=~o}0!==n&&ev(e,n,t)}function o4(e,t){var n=ob;ob|=1;try{return e(t)}finally{0===(ob=n)&&(oI=Y()+500,nb(!0))}}function o6(e){null!==oj&&0===oj.tag&&0==(6&ob)&&id();var t=ob;ob|=1;var n=ov.transition,r=ek;try{if(ov.transition=null,ek=2,e)return e()}finally{ek=r,ov.transition=n,0==(6&(ob=t))&&nb(!1)}}function o8(){if(null!==ow){if(0===oC)var e=ow.return;else e=ow,ae(),rL(e),nG=null,nZ=0,e=ow;for(;null!==e;)aN(e.alternate,e),e=e.return;ow=null}}function o5(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,s5(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),o8(),ok=e,ow=n=iE(e.current,null),oS=t,oC=0,oE=null,ox=!1,oP=0,oN=null,oF=oT=oL=o_=0,oO=oM=null,oR=!1,0!=(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var l=31-ei(r),a=1<<l;t|=e[l],r&=~a}return oz=t,no(),n}function o7(e,t){rd=null,rs.current=lh,oy.current=null,t===n$?(t=nX(),oC=o9()&&0==(134217727&o_)&&0==(134217727&oL)?2:3):t===nj?(t=nX(),oC=4):oC=t===lO?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,oE=t,null===ow&&(oP=1,oN=t)}function o9(){var e=rt.current;return null===e||((4194176&oS)===oS?null===rn:((62914560&oS)===oS||0!=(536870912&oS))&&e===rn)}function ie(){var e=oh.current;return oh.current=lh,null===e?lh:e}function it(){var e=og.current;return og.current=op,e}function ir(){oP=4,0==(134217727&o_)&&0==(134217727&oL)||null===ok||o3(ok,oS,oF)}function il(e,t){var n=ob;ob|=2;var r=ie(),l=it();(ok!==e||oS!==t)&&(oU=null,o5(e,t)),t=!1;e:for(;;)try{if(0!==oC&&null!==ow){var a=ow,o=oE;switch(oC){case 8:o8(),oP=6;break e;case 3:case 2:t||null!==rt.current||(t=!0);default:oC=0,oE=null,ii(e,a,o)}}!function(){for(;null!==ow;)ia(ow)}();break}catch(t){o7(e,t)}if(t&&e.shellSuspendCounter++,ae(),ob=n,oh.current=r,og.current=l,null!==ow)throw Error(i(261));return ok=null,oS=0,no(),oP}function ia(e){var t=iZ(e.alternate,e,oz);e.memoizedProps=e.pendingProps,null===t?iu(e):ow=t,oy.current=null}function io(e){var t=e.alternate;switch(e.tag){case 2:e.tag=0;case 15:case 0:var n=e.type,r=e.pendingProps;r=e.elementType===n?r:lb(n,r);var l=tL(n)?tN:tz.current;l=t_(e,l),t=lj(t,e,r,n,l,oS);break;case 11:n=e.type.render,r=e.pendingProps,r=e.elementType===n?r:lb(n,r),t=lj(t,e,r,n,e.ref,oS);break;case 5:rL(e);default:aN(t,e),e=ow=ix(e,oz),t=iZ(t,e,oz)}e.memoizedProps=e.pendingProps,null===t?iu(e):ow=t,oy.current=null}function ii(e,t,n){ae(),rL(t),nG=null,nZ=0;var r=t.return;try{if(function(e,t,n,r,l){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){var a=n.tag;if(0!=(1&n.mode)||0!==a&&11!==a&&15!==a||((a=n.alternate)?(n.updateQueue=a.updateQueue,n.memoizedState=a.memoizedState,n.lanes=a.lanes):(n.updateQueue=null,n.memoizedState=null)),null!==(a=rt.current)){switch(a.tag){case 13:return 1&n.mode&&(null===rn?ir():null===a.alternate&&0===oP&&(oP=3)),a.flags&=-257,lF(a,t,n,e,l),r===nW?a.flags|=16384:(null===(t=a.updateQueue)?a.updateQueue=new Set([r]):t.add(r),1&a.mode&&ih(e,r,l)),!1;case 22:if(1&a.mode)return a.flags|=65536,r===nW?a.flags|=16384:(null===(t=a.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),ih(e,r,l)),!1}throw Error(i(435,a.tag))}if(1===e.tag)return ih(e,r,l),ir(),!1;r=Error(i(426))}if(tZ&&1&n.mode&&null!==(a=rt.current))return 0==(65536&a.flags)&&(a.flags|=256),lF(a,t,n,e,l),nn(lP(r,n)),!1;if(e=r=lP(r,n),4!==oP&&(oP=2),null===oM?oM=[e]:oM.push(e),null===t)return!0;e=t;do{switch(e.tag){case 3:return e.flags|=65536,l&=-l,e.lanes|=l,l=lL(e,r,l),nD(e,l),!1;case 1:if(t=r,n=e.type,a=e.stateNode,0==(128&e.flags)&&("function"==typeof n.getDerivedStateFromError||null!==a&&"function"==typeof a.componentDidCatch&&(null===oQ||!oQ.has(a))))return e.flags|=65536,l&=-l,e.lanes|=l,l=lT(e,t,l),nD(e,l),!1}e=e.return}while(null!==e);return!1}(e,r,t,n,oS)){oP=1,oN=n,ow=null;return}}catch(e){if(null!==r)throw ow=r,e;oP=1,oN=n,ow=null;return}if(32768&t.flags)e:{e=t;do{if(null!==(t=function(e,t){switch(tY(t),t.tag){case 1:return tL(t.type)&&tT(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return an(ad),Q(),h(tP),h(tz),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return j(t),null;case 13:if(ro(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));nt()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return h(ri),null;case 4:return Q(),null;case 10:return an(t.type._context),null;case 22:case 23:return ro(t),re(),null!==e&&h(ab),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return an(ad),null;default:return null}}(e.alternate,e))){t.flags&=32767,ow=t;break e}null!==(e=e.return)&&(e.flags|=32768,e.subtreeFlags=0,e.deletions=null),ow=e}while(null!==e);oP=6,ow=null}else iu(t)}function iu(e){var t=e;do{e=t.return;var n=function(e,t,n){var r=t.pendingProps;switch(tY(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return aP(t),null;case 1:case 17:return tL(t.type)&&tT(),aP(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),an(ad),Q(),h(tP),h(tz),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(null===e||null===e.child)&&(t9(t)?aC(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==tJ&&(o0(tJ),tJ=null))),aP(t),null;case 26:if(n=t.memoizedState,null===e)aC(t),null!==n?(aP(t),aE(t,n)):(aP(t),t.flags&=-16777217);else{var l=e.memoizedState;n!==l&&aC(t),null!==n?(aP(t),n===l?t.flags&=-16777217:aE(t,n)):(e.memoizedProps!==r&&aC(t),aP(t),t.flags&=-16777217)}return null;case 27:if(j(t),n=I.current,l=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&aC(t);else{if(!r){if(null===t.stateNode)throw Error(i(166));return aP(t),null}e=D.current,t9(t)?co(t.stateNode,t.type,t.memoizedProps,e,t):(e=cu(l,r,n),t.stateNode=e,aC(t))}return aP(t),null;case 5:if(j(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&aC(t);else{if(!r){if(null===t.stateNode)throw Error(i(166));return aP(t),null}if(e=D.current,t9(t))co(t.stateNode,t.type,t.memoizedProps,e,t);else{switch(l=s1(I.current),e){case 1:e=l.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=l.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=l.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=l.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=l.createElement("div")).innerHTML="<script></script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[eE]=t,e[ex]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,sG(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&aC(t)}}return aP(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&aC(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t9(t)){e:{if(e=t.stateNode,n=t.memoizedProps,e[eE]=t,(r=e.nodeValue!==n)&&null!==(l=tX))switch(l.tag){case 3:if(l=0!=(1&l.mode),sq(e.nodeValue,n,l),l){e=!1;break e}break;case 27:case 5:var a=0!=(1&l.mode);if(!0!==l.memoizedProps.suppressHydrationWarning&&sq(e.nodeValue,n,a),a){e=!1;break e}}e=r}e&&aC(t)}else(e=s1(e).createTextNode(r))[eE]=t,t.stateNode=e}return aP(t),null;case 13:if(ro(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tZ&&null!==tG&&0!=(1&t.mode)&&0==(128&t.flags))ne(),nt(),t.flags|=384,l=!1;else if(l=t9(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[eE]=t}else nt(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;aP(t),l=!1}else null!==tJ&&(o0(tJ),tJ=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ax(t,t.updateQueue),aP(t),null;case 4:return Q(),null===e&&sA(t.stateNode.containerInfo),aP(t),null;case 10:return an(t.type._context),aP(t),null;case 19:if(h(ri),null===(l=t.memoizedState))return aP(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)az(l,!1);else{if(0!==oP||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=ru(e))){for(t.flags|=128,az(l,!1),e=a.updateQueue,t.updateQueue=e,ax(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)ix(n,e),n=n.sibling;return g(ri,1&ri.current|2),t.child}e=e.sibling}null!==l.tail&&Y()>oI&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}}else{if(!r){if(null!==(e=ru(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ax(t,e),az(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!tZ)return aP(t),null}else 2*Y()-l.renderingStartTime>oI&&536870912!==n&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Y(),t.sibling=null,e=ri.current,g(ri,r?1&e|2:1&e),t;return aP(t),null;case 22:case 23:return ro(t),re(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(536870912&n)&&0==(128&t.flags)&&(aP(t),6&t.subtreeFlags&&(t.flags|=8192)):aP(t),null!==(n=t.updateQueue)&&ax(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&h(ab),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),an(ad),aP(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,oz);if(null!==n){ow=n;return}if(null!==(t=t.sibling)){ow=t;return}ow=t=e}while(null!==t);0===oP&&(oP=5)}function is(e,t,n,r,l){var a=ek,o=ov.transition;try{ov.transition=null,ek=2,function(e,t,n,r,l,a){do id();while(null!==oj);if(0!=(6&ob))throw Error(i(327));var o,u=e.finishedWork,s=e.finishedLanes;if(null!==u){if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=u.lanes|u.childLanes;if(function(e,t,n){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,a=e.hiddenUpdates;0<r;){var o=31-ei(r),i=1<<o;t[o]=0,l[o]=-1;var u=a[o];if(null!==u)for(a[o]=null,o=0;o<u.length;o++){var s=u[o];null!==s&&(s.lane&=-536870913)}r&=~i}0!==n&&ev(e,n,0)}(e,c|=na,a),oD=!1,e===ok&&(ow=ok=null,oS=0),0==(10256&u.subtreeFlags)&&0==(10256&u.flags)||o$||(o$=!0,oH=c,oq=n,o=function(){return id(),null},W(J,o)),n=0!=(15990&u.flags),0!=(15990&u.subtreeFlags)||n){n=ov.transition,ov.transition=null,a=ek,ek=2;var f=ob;ob|=4,oy.current=null,function(e,t){if(sJ=uF,ss(e=su())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var l,a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var u=0,s=-1,c=-1,f=0,d=0,p=e,m=null;t:for(;;){for(;p!==n||0!==a&&3!==p.nodeType||(s=u+a),p!==o||0!==r&&3!==p.nodeType||(c=u+r),3===p.nodeType&&(u+=p.nodeValue.length),null!==(l=p.firstChild);)m=p,p=l;for(;;){if(p===e)break t;if(m===n&&++f===a&&(s=u),m===o&&++d===r&&(c=u),null!==(l=p.nextSibling))break;m=(p=m).parentNode}p=l}n=-1===s||-1===c?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(s0={focusedElem:e,selectionRange:n},uF=!1,aU=t;null!==aU;)if(e=(t=aU).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,aU=e;else for(;null!==aU;){t=aU;try{var h=t.alternate,g=t.flags;switch(t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!=(1024&g)&&null!==h){var y=h.memoizedProps,v=h.memoizedState,b=t.stateNode,k=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:lb(t.type,y),v);b.__reactInternalSnapshotBeforeUpdate=k}break;case 3:0!=(1024&g)&&cn(t.stateNode.containerInfo);break;default:if(0!=(1024&g))throw Error(i(163))}}catch(e){im(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,aU=e;break}aU=t.return}h=a$,a$=!1}(e,u),a5(u,e),function(e){var t=su(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&function e(t,n){return!!t&&!!n&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&ss(n)){if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var l=n.textContent.length,a=Math.min(r.start,l);r=void 0===r.end?a:Math.min(r.end,l),!e.extend&&a>r&&(l=r,r=a,a=l),l=si(n,a);var o=si(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}(s0),uF=!!sJ,s0=sJ=null,e.current=u,aY(e,u.alternate,u),K(),ob=f,ek=a,ov.transition=n}else e.current=u;if(o$?(o$=!1,oj=e,oW=s):ic(e,c),0===(c=e.pendingLanes)&&(oQ=null),function(e){if(ea&&"function"==typeof ea.onCommitFiberRoot)try{ea.onCommitFiberRoot(el,e,void 0,128==(128&e.current.flags))}catch(e){}}(u.stateNode,l),nv(e),null!==t)for(l=e.onRecoverableError,u=0;u<t.length;u++)n={digest:(c=t[u]).digest,componentStack:c.stack},l(c.value,n);if(oB)throw oB=!1,e=oV,oV=null,e;0!=(3&oW)&&0!==e.tag&&id(),c=e.pendingLanes,r||oD||0!=(4194218&s)&&0!=(42&c)?e===oY?oK++:(oK=0,oY=e):oK=0,nb(!1)}}(e,t,n,r,a,l)}finally{ov.transition=o,ek=a}return null}function ic(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,am(t))}function id(){if(null!==oj){var e=oj,t=oH;oH=0;var n=ew(oW),r=32>n?32:n;n=ov.transition;var l=ek;try{if(ov.transition=null,ek=r,null===oj)var a=!1;else{r=oq,oq=null;var o=oj,u=oW;if(oj=null,oW=0,0!=(6&ob))throw Error(i(331));var s=ob;if(ob|=4,of(o.current),ol(o,o.current,u,r),ob=s,nb(!1),ea&&"function"==typeof ea.onPostCommitFiberRoot)try{ea.onPostCommitFiberRoot(el,o)}catch(e){}a=!0}return a}finally{ek=l,ov.transition=n,ic(e,t)}}return!1}function ip(e,t,n){t=lL(e,t=lP(n,t),2),null!==(e=nO(e,t,2))&&(o2(e,2),nv(e))}function im(e,t,n){if(3===e.tag)ip(e,e,n);else for(;null!==t;){if(3===t.tag){ip(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oQ||!oQ.has(r))){e=lT(t,e=lP(n,e),2),null!==(t=nO(t,e,2))&&(o2(t,2),nv(t));break}}t=t.return}}function ih(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new om;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(ox=!0,l.add(n),e=ig.bind(null,e,t,n),t.then(e,e))}function ig(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,2&ob?oR=!0:4&ob&&(oD=!0),ik(),ok===e&&(oS&n)===n&&(4===oP||3===oP&&(62914560&oS)===oS&&300>Y()-oA?0==(2&ob)&&o5(e,0):oT|=n),nv(e)}function iy(e,t){0===t&&(t=0==(1&e.mode)?2:eg()),null!==(e=ns(e,t))&&(o2(e,t),nv(e))}function iv(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iy(e,n)}function ib(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),iy(e,n)}function ik(){if(50<oK)throw oK=0,oY=null,2&ob&&null!==ok&&(ok.errorRecoveryDisabledLanes|=oS),Error(i(185))}function iw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function iS(e,t,n,r){return new iw(e,t,n,r)}function iC(e){return!(!(e=e.prototype)||!e.isReactComponent)}function iE(e,t){var n=e.alternate;return null===n?((n=iS(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ix(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function iz(e,t,n,r,l,a){var o=2;if(r=e,"function"==typeof e)iC(e)&&(o=1);else if("string"==typeof e)o=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(!0===t.async&&!t.onLoad&&!t.onError&&"string"==typeof t.src&&t.src)return!0}return!1}(e,n,D.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case b:return iP(n.children,l,a,t);case k:o=8,0!=(1&(l|=8))&&(l|=16);break;case w:return(e=iS(12,n,t,2|l)).elementType=w,e.lanes=a,e;case z:return(e=iS(13,n,t,l)).elementType=z,e.lanes=a,e;case P:return(e=iS(19,n,t,l)).elementType=P,e.lanes=a,e;case T:return iN(n,l,a,t);case F:case L:case M:return(e=iS(24,n,t,l)).elementType=M,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:o=10;break e;case E:o=9;break e;case C:case x:o=11;break e;case N:o=14;break e;case _:o=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=iS(o,n,t,l)).elementType=e,t.type=r,t.lanes=a,t}function iP(e,t,n,r){return(e=iS(7,e,r,t)).lanes=n,e}function iN(e,t,n,r){(e=iS(22,e,r,t)).elementType=T,e.lanes=n;var l={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0==(2&l._pendingVisibility)){var t=ns(e,2);null!==t&&(l._pendingVisibility|=2,oG(t,e,2))}},attach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0!=(2&l._pendingVisibility)){var t=ns(e,2);null!==t&&(l._pendingVisibility&=-3,oG(t,e,2))}}};return e.stateNode=l,e}function i_(e,t,n){return(e=iS(6,e,null,t)).lanes=n,e}function iL(e,t,n){return(t=iS(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iT(e,t,n,r,l,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ey(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ey(0),this.hiddenUpdates=ey(null),this.identifierPrefix=r,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=a,this.incompleteTransitions=new Map}function iF(e,t,n,r,l,a,o,i,u,s,c){return e=new iT(e,t,n,i,u,c),1===t?(t=1,!0===a&&(t|=24)):t=0,a=iS(3,null,null,t),e.current=a,a.stateNode=e,t=ap(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},nT(a),e}function iM(e){if(!e)return tx;e=e._reactInternals;e:{if(tw(e)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tL(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(tL(n))return tM(e,n,t)}return t}function iO(e,t,n,r,l,a,o,i,u,s,c){return(e=iF(n,r,!0,e,l,a,o,i,u,s,c)).context=iM(null),(l=nM(r=oX(n=e.current))).callback=null!=t?t:null,nO(n,l,r),e.current.lanes=r,o2(e,r),nv(e),e}function iR(e,t,n,r){var l=t.current,a=oX(l);return n=iM(n),null===t.context?t.context=n:t.pendingContext=n,(t=nM(a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=nO(l,t,a))&&(oG(e,l,a),nR(e,l,a)),a}function iD(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function iA(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function iI(e,t){iA(e,t),(e=e.alternate)&&iA(e,t)}function iU(e){if(13===e.tag){var t=ns(e,67108864);null!==t&&oG(t,e,67108864),iI(e,67108864)}}iZ=function(e,t,n){if(null!==e){if(e.memoizedProps!==t.pendingProps||tP.current)lR=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return lR=!1,function(e,t,n){switch(t.tag){case 3:lq(t),at(t,ad,e.memoizedState.cache),nt();break;case 27:case 5:$(t);break;case 1:tL(t.type)&&tO(t);break;case 4:V(t,t.stateNode.containerInfo);break;case 10:at(t,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r){if(null!==r.dehydrated)return rr(t),t.flags|=128,null;if(0!=(n&t.child.childLanes))return lZ(e,t,n);return rr(t),null!==(e=l6(e,t,n))?e.sibling:null}rr(t);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return l3(e,t,n);t.flags|=128}var l=t.memoizedState;if(null!==l&&(l.rendering=null,l.tail=null,l.lastEffect=null),g(ri,ri.current),!r)return null;break;case 22:case 23:return t.lanes=0,lB(e,t,n);case 24:at(t,ad,e.memoizedState.cache)}return l6(e,t,n)}(e,t,n);lR=0!=(131072&e.flags)}}else lR=!1,tZ&&0!=(1048576&t.flags)&&tq(t,tB,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;l4(e,t),e=t.pendingProps;var l=t_(t,tz.current);aa(t,n),l=rE(null,t,r,e,l,n);var a=rN();return t.flags|=1,"object"==typeof l&&null!==l&&"function"==typeof l.render&&void 0===l.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tL(r)?(a=!0,tO(t)):a=!1,t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,nT(t),l.updater=lw,t.stateNode=l,l._reactInternals=t,lx(t,r,e,n),t=lH(null,t,r,!0,a,n)):(t.tag=0,tZ&&a&&tK(t),lD(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(l4(e,t),e=t.pendingProps,r=(l=r._init)(r._payload),t.type=r,l=t.tag=function(e){if("function"==typeof e)return iC(e)?1:0;if(null!=e){if((e=e.$$typeof)===x)return 11;if(e===N)return 14}return 2}(r),e=lb(r,e),l){case 0:t=l$(null,t,r,e,n);break e;case 1:t=lW(null,t,r,e,n);break e;case 11:t=lA(null,t,r,e,n);break e;case 14:t=lI(null,t,r,lb(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lb(r,l),l$(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lb(r,l),lW(e,t,r,l,n);case 3:e:{if(lq(t),null===e)throw Error(i(387));l=t.pendingProps,r=(a=t.memoizedState).element,nF(e,t),nU(t,l,null,n);var o=t.memoizedState;if(at(t,ad,l=o.cache),l!==a.cache&&al(t,ad,n),nI(),l=o.element,a.isDehydrated){if(a={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){r=lP(Error(i(423)),t),t=lK(e,t,l,n,r);break e}if(l!==r){r=lP(Error(i(424)),t),t=lK(e,t,l,n,r);break e}for(tG=cl(t.stateNode.containerInfo.firstChild),tX=t,tZ=!0,tJ=null,t0=!0,n=n6(t,null,l,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(nt(),l===r){t=l6(e,t,n);break e}lD(e,t,l,n)}t=t.child}return t;case 26:return lQ(e,t),n=t.memoizedState=function(e,t,n){if(!(t=(t=I.current)?cf(t):null))throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(n=cm(n.href),(e=(t=eA(t).hoistableStyles).get(n))||(e={type:"style",instance:null,count:0,state:null},t.set(n,e)),e):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=cm(n.href);var r,l,a,o,u=eA(t).hoistableStyles,s=u.get(e);return s||(t=t.ownerDocument||t,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,s),cs.has(e)||(r=t,l=e,a={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},o=s.state,cs.set(l,a),r.querySelector(ch(l))||(r.querySelector('link[rel="preload"][as="style"]['+l+"]")?o.loading=1:(l=r.createElement("link"),o.preload=l,l.addEventListener("load",function(){return o.loading|=1}),l.addEventListener("error",function(){return o.loading|=2}),sG(l,"link",a),eI(l),r.head.appendChild(l))))),s}return null;case"script":return"string"==typeof n.src&&!0===n.async?(n=cy(n.src),(e=(t=eA(t).hoistableScripts).get(n))||(e={type:"script",instance:null,count:0,state:null},t.set(n,e)),e):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}(t.type,null===e?null:e.memoizedProps,t.pendingProps),null!==e||tZ||null!==n||(n=t.type,e=t.pendingProps,(r=s1(I.current).createElement(n))[eE]=t,r[ex]=e,sG(r,n,e),eI(r),t.stateNode=r),null;case 27:return $(t),null===e&&tZ&&(r=t.stateNode=cu(t.type,t.pendingProps,I.current),tX=t,t0=!0,tG=cl(r.firstChild)),r=t.pendingProps.children,null!==e||tZ?lD(e,t,r,n):t.child=n4(t,null,r,n),lQ(e,t),t.child;case 5:return null===e&&tZ&&((l=r=tG)?t3(t,l)||(t8(t)&&t5(),tG=ca(l),a=tX,tG&&t3(t,tG)?t1(a,l):(t2(tX,t),tZ=!1,tX=t,tG=r)):(t8(t)&&t5(),t2(tX,t),tZ=!1,tX=t,tG=r)),$(t),l=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,r=a.children,s4(l,a)?r=null:null!==o&&s4(l,o)&&(t.flags|=32),null!==t.memoizedState&&(l=rE(e,t,rP,null,null,n),B._currentValue=l,lR&&null!==e&&e.memoizedState.memoizedState!==l&&al(t,B,n)),lQ(e,t),lD(e,t,r,n),t.child;case 6:return null===e&&tZ&&((r=""!==t.pendingProps,(e=n=tG)&&r)?t4(t,e)||(t8(t)&&t5(),tG=ca(e),r=tX,tG&&t4(t,tG)?t1(r,e):(t2(tX,t),tZ=!1,tX=t,tG=n)):(t8(t)&&t5(),t2(tX,t),tZ=!1,tX=t,tG=n)),null;case 13:return lZ(e,t,n);case 4:return V(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=n4(t,null,r,n):lD(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lb(r,l),lA(e,t,r,l,n);case 7:return lD(e,t,t.pendingProps,n),t.child;case 8:case 12:return lD(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,a=t.memoizedProps,at(t,r,o=l.value),null!==a){if(tD(a.value,o)){if(a.children===l.children&&!tP.current){t=l6(e,t,n);break e}}else al(t,r,n)}lD(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,aa(t,n),r=r(l=ao(l)),t.flags|=1,lD(e,t,r,n),t.child;case 14:return l=lb(r=t.type,t.pendingProps),l=lb(r.type,l),lI(e,t,r,l,n);case 15:return lU(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lb(r,l),l4(e,t),t.tag=1,tL(r)?(e=!0,tO(t)):e=!1,aa(t,n),lC(t,r,l),lx(t,r,l,n),lH(null,t,r,!0,e,n);case 19:return l3(e,t,n);case 22:return lB(e,t,n);case 24:return aa(t,n),r=ao(ad),null===e?(null===(l=ak())&&(l=ok,a=ap(),l.pooledCache=a,a.refCount++,null!==a&&(l.pooledCacheLanes|=n),l=a),t.memoizedState={parent:r,cache:l},nT(t),at(t,ad,l)):(0!=(e.lanes&n)&&(nF(e,t),nU(t,null,null,n),nI()),l=e.memoizedState,a=t.memoizedState,l.parent!==r?(l={parent:r,cache:r},t.memoizedState=l,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=l),at(t,ad,r)):(at(t,ad,r=a.cache),r!==l.cache&&al(t,ad,n))),lD(e,t,t.pendingProps.children,n),t.child}throw Error(i(156,t.tag))};var iB=!1;function iV(e,t,n){if(iB)return e(t,n);iB=!0;try{return o4(e,t,n)}finally{iB=!1,(null!==tg||null!==ty)&&(o6(),tk())}}function iQ(e,t){var n=e.stateNode;if(null===n)return null;var r=eD(n);if(null===r)return null;switch(n=r[t],t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}var i$=!1;if(e$)try{var ij={};Object.defineProperty(ij,"passive",{get:function(){i$=!0}}),window.addEventListener("test",ij,ij),window.removeEventListener("test",ij,ij)}catch(e){i$=!1}function iW(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function iH(){return!0}function iq(){return!1}function iK(e){function t(t,n,r,l,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=l,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(l):l[o]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?iH:iq,this.isPropagationStopped=iq,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=iH)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=iH)},persist:function(){},isPersistent:iH}),t}var iY,iX,iG,iZ,iJ,i0,i1,i2={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},i3=iK(i2),i4=u({},i2,{view:0,detail:0}),i6=iK(i4),i8=u({},i4,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ui,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==i1&&(i1&&"mousemove"===e.type?(iJ=e.screenX-i1.screenX,i0=e.screenY-i1.screenY):i0=iJ=0,i1=e),iJ)},movementY:function(e){return"movementY"in e?e.movementY:i0}}),i5=iK(i8),i7=iK(u({},i8,{dataTransfer:0})),i9=iK(u({},i4,{relatedTarget:0})),ue=iK(u({},i2,{animationName:0,elapsedTime:0,pseudoElement:0})),ut=iK(u({},i2,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),un=iK(u({},i2,{data:0})),ur={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ul={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ua={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=ua[e])&&!!t[e]}function ui(){return uo}var uu=iK(u({},i4,{key:function(e){if(e.key){var t=ur[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=iW(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ul[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ui,charCode:function(e){return"keypress"===e.type?iW(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?iW(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),us=iK(u({},i8,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),uc=iK(u({},i4,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ui})),uf=iK(u({},i2,{propertyName:0,elapsedTime:0,pseudoElement:0})),ud=iK(u({},i8,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),up=!1,um=null,uh=null,ug=null,uy=new Map,uv=new Map,ub=[],uk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function uw(e,t){switch(e){case"focusin":case"focusout":um=null;break;case"dragenter":case"dragleave":uh=null;break;case"mouseover":case"mouseout":ug=null;break;case"pointerover":case"pointerout":uy.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":uv.delete(t.pointerId)}}function uS(e,t,n,r,l,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},null!==t&&null!==(t=eO(t))&&iU(t)):(e.eventSystemFlags|=r,t=e.targetContainers,null!==l&&-1===t.indexOf(l)&&t.push(l)),e}function uC(e){var t=eM(e.target);if(null!==t){var n=tw(t);if(null!==n){if(13===(t=n.tag)){if(null!==(t=tS(n))){e.blockedOn=t,function(e,t){var n=ek;try{return ek=e,t()}finally{ek=n}}(e.priority,function(){if(13===n.tag){var e=oX(n),t=ns(n,e);null!==t&&oG(t,n,e),iI(n,e)}});return}}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=3===n.tag?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uE(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=uD(e.nativeEvent);if(null!==n)return null!==(t=eO(n))&&iU(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);tm=r,n.target.dispatchEvent(r),tm=null,t.shift()}return!0}function ux(e,t,n){uE(e)&&n.delete(t)}function uz(){up=!1,null!==um&&uE(um)&&(um=null),null!==uh&&uE(uh)&&(uh=null),null!==ug&&uE(ug)&&(ug=null),uy.forEach(ux),uv.forEach(ux)}function uP(e,t){e.blockedOn===t&&(e.blockedOn=null,up||(up=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,uz)))}var uN=null;function u_(e){uN!==e&&(uN=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){uN===e&&(uN=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],l=e[t+2];if("function"!=typeof r){if(null===uI(r||n))continue;break}var a=eO(n);null!==a&&(e.splice(t,3),t-=3,ll(a,{pending:!0,data:l,method:n.method,action:r},r,l))}}))}function uL(e){function t(t){return uP(t,e)}null!==um&&uP(um,e),null!==uh&&uP(uh,e),null!==ug&&uP(ug,e),uy.forEach(t),uv.forEach(t);for(var n=0;n<ub.length;n++){var r=ub[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ub.length&&null===(n=ub[0]).blockedOn;)uC(n),null===n.blockedOn&&ub.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var l=n[r],a=n[r+1],o=eD(l);if("function"==typeof a)o||u_(n);else if(o){var i=null;if(a&&a.hasAttribute("formAction")){if(l=a,o=eD(a))i=o.formAction;else if(null!==uI(l))continue}else i=o.action;"function"==typeof i?n[r+1]=i:(n.splice(r,3),r-=3),u_(n)}}}var uT=s.ReactCurrentBatchConfig,uF=!0;function uM(e,t,n,r){var l=ek,a=uT.transition;uT.transition=null;try{ek=2,uR(e,t,n,r)}finally{ek=l,uT.transition=a}}function uO(e,t,n,r){var l=ek,a=uT.transition;uT.transition=null;try{ek=8,uR(e,t,n,r)}finally{ek=l,uT.transition=a}}function uR(e,t,n,r){if(uF){var l=uD(r);if(null===l)sU(e,t,r,uA,n),uw(e,r);else if(function(e,t,n,r,l){switch(t){case"focusin":return um=uS(um,e,t,n,r,l),!0;case"dragenter":return uh=uS(uh,e,t,n,r,l),!0;case"mouseover":return ug=uS(ug,e,t,n,r,l),!0;case"pointerover":var a=l.pointerId;return uy.set(a,uS(uy.get(a)||null,e,t,n,r,l)),!0;case"gotpointercapture":return a=l.pointerId,uv.set(a,uS(uv.get(a)||null,e,t,n,r,l)),!0}return!1}(l,e,t,n,r))r.stopPropagation();else if(uw(e,r),4&t&&-1<uk.indexOf(e)){for(;null!==l;){var a=eO(l);if(null!==a&&function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ed(t.pendingLanes);0!==n&&(function(e,t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var n=1<<31-ei(t);e.entanglements[1]|=n,t&=~n}}(t,n),nv(t),0==(6&ob)&&(oI=Y()+500,nb(!1)))}break;case 13:o6(function(){var t=ns(e,2);null!==t&&oG(t,e,2)}),iI(e,2)}}(a),null===(a=uD(r))&&sU(e,t,r,uA,n),a===l)break;l=a}null!==l&&r.stopPropagation()}else sU(e,t,r,null,n)}}function uD(e){return uI(e=th(e))}var uA=null;function uI(e){if(uA=null,null!==(e=eM(e))){var t=tw(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=tS(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uA=e,null}function uU(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(X()){case G:return 2;case Z:return 8;case J:case ee:return 32;case et:return 268435456;default:return 32}default:return 32}}var uB=null,uV=null,uQ=null;function u$(){if(uQ)return uQ;var e,t,n=uV,r=n.length,l="value"in uB?uB.value:uB.textContent,a=l.length;for(e=0;e<r&&n[e]===l[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===l[a-t];t++);return uQ=l.slice(e,1<t?1-t:void 0)}var uj=[9,13,27,32],uW=e$&&"CompositionEvent"in window,uH=null;e$&&"documentMode"in document&&(uH=document.documentMode);var uq=e$&&"TextEvent"in window&&!uH,uK=e$&&(!uW||uH&&8<uH&&11>=uH),uY=!1;function uX(e,t){switch(e){case"keyup":return -1!==uj.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uG(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uZ=!1,uJ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function u0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uJ[e.type]:"textarea"===t}function u1(e,t,n,r){tb(r),0<(t=sV(t,"onChange")).length&&(n=new i3("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var u2=null,u3=null;function u4(e){sM(e,0)}function u6(e){if(e4(eR(e)))return e}function u8(e,t){if("change"===e)return t}var u5=!1;if(e$){if(e$){var u7="oninput"in document;if(!u7){var u9=document.createElement("div");u9.setAttribute("oninput","return;"),u7="function"==typeof u9.oninput}r=u7}else r=!1;u5=r&&(!document.documentMode||9<document.documentMode)}function se(){u2&&(u2.detachEvent("onpropertychange",st),u3=u2=null)}function st(e){if("value"===e.propertyName&&u6(u3)){var t=[];u1(t,u3,e,th(e)),iV(u4,t)}}function sn(e,t,n){"focusin"===e?(se(),u2=t,u3=n,u2.attachEvent("onpropertychange",st)):"focusout"===e&&se()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return u6(u3)}function sl(e,t){if("click"===e)return u6(t)}function sa(e,t){if("input"===e||"change"===e)return u6(t)}function so(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function si(e,t){var n,r=so(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=so(r)}}function su(){for(var e=window,t=e6();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e6(e.document)}return t}function ss(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sc=e$&&"documentMode"in document&&11>=document.documentMode,sf=null,sd=null,sp=null,sm=!1;function sh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sm||null==sf||sf!==e6(r)||(r="selectionStart"in(r=sf)&&ss(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sp&&nQ(sp,r)||(sp=r,0<(r=sV(sd,"onSelect")).length&&(t=new i3("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sf)))}function sg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sy={animationend:sg("Animation","AnimationEnd"),animationiteration:sg("Animation","AnimationIteration"),animationstart:sg("Animation","AnimationStart"),transitionend:sg("Transition","TransitionEnd")},sv={},sb={};function sk(e){if(sv[e])return sv[e];if(!sy[e])return e;var t,n=sy[e];for(t in n)if(n.hasOwnProperty(t)&&t in sb)return sv[e]=n[t];return e}e$&&(sb=document.createElement("div").style,"AnimationEvent"in window||(delete sy.animationend.animation,delete sy.animationiteration.animation,delete sy.animationstart.animation),"TransitionEvent"in window||delete sy.transitionend.transition);var sw=sk("animationend"),sS=sk("animationiteration"),sC=sk("animationstart"),sE=sk("transitionend"),sx=new Map,sz="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function sP(e,t){sx.set(e,t),eV(t,[e])}for(var sN=0;sN<sz.length;sN++){var s_=sz[sN];sP(s_.toLowerCase(),"on"+(s_[0].toUpperCase()+s_.slice(1)))}sP(sw,"onAnimationEnd"),sP(sS,"onAnimationIteration"),sP(sC,"onAnimationStart"),sP("dblclick","onDoubleClick"),sP("focusin","onFocus"),sP("focusout","onBlur"),sP(sE,"onTransitionEnd"),eQ("onMouseEnter",["mouseout","mouseover"]),eQ("onMouseLeave",["mouseout","mouseover"]),eQ("onPointerEnter",["pointerout","pointerover"]),eQ("onPointerLeave",["pointerout","pointerover"]),eV("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),eV("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),eV("onBeforeInput",["compositionend","keypress","textInput","paste"]),eV("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),eV("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),eV("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sL="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),sT=new Set("cancel close invalid load scroll scrollend toggle".split(" ").concat(sL));function sF(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,l,a,o,u,s){if(aR.apply(this,arguments),aL){if(aL){var c=aT;aL=!1,aT=null}else throw Error(i(198));aF||(aF=!0,aM=c)}}(r,t,void 0,e),e.currentTarget=null}function sM(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var i=r[o],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==a&&l.isPropagationStopped())break e;sF(l,i,s),a=u}else for(o=0;o<r.length;o++){if(u=(i=r[o]).instance,s=i.currentTarget,i=i.listener,u!==a&&l.isPropagationStopped())break e;sF(l,i,s),a=u}}}if(aF)throw e=aM,aF=!1,aM=null,e}function sO(e,t){var n=t[eP];void 0===n&&(n=t[eP]=new Set);var r=e+"__bubble";n.has(r)||(sI(t,e,2,!1),n.add(r))}function sR(e,t,n){var r=0;t&&(r|=4),sI(n,e,r,t)}var sD="_reactListening"+Math.random().toString(36).slice(2);function sA(e){if(!e[sD]){e[sD]=!0,eU.forEach(function(t){"selectionchange"!==t&&(sT.has(t)||sR(t,!1,e),sR(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[sD]||(t[sD]=!0,sR("selectionchange",!1,t))}}function sI(e,t,n,r){switch(uU(t)){case 2:var l=uM;break;case 8:l=uO;break;default:l=uR}n=l.bind(null,t,n,e),l=void 0,i$&&("touchstart"===t||"touchmove"===t||"wheel"===t)&&(l=!0),r?void 0!==l?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):void 0!==l?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function sU(e,t,n,r,l){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var i=r.stateNode.containerInfo;if(i===l||8===i.nodeType&&i.parentNode===l)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===l||8===u.nodeType&&u.parentNode===l))return;o=o.return}for(;null!==i;){if(null===(o=eM(i)))return;if(5===(u=o.tag)||6===u||26===u||27===u){r=a=o;continue e}i=i.parentNode}}r=r.return}iV(function(){var r=a,l=th(n),o=[];e:{var i=sx.get(e);if(void 0!==i){var u=i3,s=e;switch(e){case"keypress":if(0===iW(n))break e;case"keydown":case"keyup":u=uu;break;case"focusin":s="focus",u=i9;break;case"focusout":s="blur",u=i9;break;case"beforeblur":case"afterblur":u=i9;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=i5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=i7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=uc;break;case sw:case sS:case sC:u=ue;break;case sE:u=uf;break;case"scroll":case"scrollend":u=i6;break;case"wheel":u=ud;break;case"copy":case"cut":case"paste":u=ut;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=us}var c=0!=(4&t),f=!c&&("scroll"===e||"scrollend"===e),d=c?null!==i?i+"Capture":null:i;c=[];for(var p,m=r;null!==m;){var h=m;if(p=h.stateNode,5!==(h=h.tag)&&26!==h&&27!==h||null===p||null===d||null!=(h=iQ(m,d))&&c.push(sB(m,h,p)),f)break;m=m.return}0<c.length&&(i=new u(i,s,null,n,l),o.push({event:i,listeners:c}))}}if(0==(7&t)){if(i="mouseover"===e||"pointerover"===e,u="mouseout"===e||"pointerout"===e,!(i&&n!==tm&&(s=n.relatedTarget||n.fromElement)&&(eM(s)||s[ez]))&&(u||i)&&(i=l.window===l?l:(i=l.ownerDocument)?i.defaultView||i.parentWindow:window,u?(s=n.relatedTarget||n.toElement,u=r,null!==(s=s?eM(s):null)&&(f=tw(s),c=s.tag,s!==f||5!==c&&27!==c&&6!==c)&&(s=null)):(u=null,s=r),u!==s)){if(c=i5,h="onMouseLeave",d="onMouseEnter",m="mouse",("pointerout"===e||"pointerover"===e)&&(c=us,h="onPointerLeave",d="onPointerEnter",m="pointer"),f=null==u?i:eR(u),p=null==s?i:eR(s),(i=new c(h,m+"leave",u,n,l)).target=f,i.relatedTarget=p,h=null,eM(l)===r&&((c=new c(d,m+"enter",s,n,l)).target=p,c.relatedTarget=f,h=c),f=h,u&&s)t:{for(c=u,d=s,m=0,p=c;p;p=sQ(p))m++;for(p=0,h=d;h;h=sQ(h))p++;for(;0<m-p;)c=sQ(c),m--;for(;0<p-m;)d=sQ(d),p--;for(;m--;){if(c===d||null!==d&&c===d.alternate)break t;c=sQ(c),d=sQ(d)}c=null}else c=null;null!==u&&s$(o,i,u,c,!1),null!==s&&null!==f&&s$(o,f,s,c,!0)}e:{if("select"===(u=(i=r?eR(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===u&&"file"===i.type)var g,y=u8;else if(u0(i)){if(u5)y=sa;else{y=sr;var v=sn}}else(u=i.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(y=sl);if(y&&(y=y(e,r))){u1(o,y,n,l);break e}v&&v(e,i,r),"focusout"===e&&r&&"number"===i.type&&null!=r.memoizedProps.value&&te(i,"number",i.value)}switch(v=r?eR(r):window,e){case"focusin":(u0(v)||"true"===v.contentEditable)&&(sf=v,sd=r,sp=null);break;case"focusout":sp=sd=sf=null;break;case"mousedown":sm=!0;break;case"contextmenu":case"mouseup":case"dragend":sm=!1,sh(o,n,l);break;case"selectionchange":if(sc)break;case"keydown":case"keyup":sh(o,n,l)}if(uW)t:{switch(e){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else uZ?uX(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(uK&&"ko"!==n.locale&&(uZ||"onCompositionStart"!==b?"onCompositionEnd"===b&&uZ&&(g=u$()):(uV="value"in(uB=l)?uB.value:uB.textContent,uZ=!0)),0<(v=sV(r,b)).length&&(b=new un(b,e,null,n,l),o.push({event:b,listeners:v}),g?b.data=g:null!==(g=uG(n))&&(b.data=g))),(g=uq?function(e,t){switch(e){case"compositionend":return uG(t);case"keypress":if(32!==t.which)return null;return uY=!0," ";case"textInput":return" "===(e=t.data)&&uY?null:e;default:return null}}(e,n):function(e,t){if(uZ)return"compositionend"===e||!uW&&uX(e,t)?(e=u$(),uQ=uV=uB=null,uZ=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return uK&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(b=sV(r,"onBeforeInput")).length&&(v=new un("onBeforeInput","beforeinput",null,n,l),o.push({event:v,listeners:b}),v.data=g),function(e,t,n,r,l){if("submit"===t&&n&&n.stateNode===l){var a=eD(l).action,o=r.submitter;if(o&&null!=(t=(t=eD(o))?t.formAction:o.getAttribute("formAction"))&&(a=t,o=null),"function"==typeof a){var i=new i3("action","action",null,r,l);e.push({event:i,listeners:[{instance:null,listener:function(){if(!r.defaultPrevented){if(i.preventDefault(),o){var e=o.ownerDocument.createElement("input");e.name=o.name,e.value=o.value,o.parentNode.insertBefore(e,o);var t=new FormData(l);e.parentNode.removeChild(e)}else t=new FormData(l);ll(n,{pending:!0,data:t,method:l.method,action:a},a,t)}},currentTarget:l}]})}}}(o,e,r,n,l)}sM(o,t)})}function sB(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sV(e,t){for(var n=t+"Capture",r=[];null!==e;){var l=e,a=l.stateNode;5!==(l=l.tag)&&26!==l&&27!==l||null===a||(null!=(l=iQ(e,n))&&r.unshift(sB(e,l,a)),null!=(l=iQ(e,t))&&r.push(sB(e,l,a))),e=e.return}return r}function sQ(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag&&27!==e.tag);return e||null}function s$(e,t,n,r,l){for(var a=t._reactName,o=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(i=i.tag,null!==u&&u===r)break;5!==i&&26!==i&&27!==i||null===s||(u=s,l?null!=(s=iQ(n,a))&&o.unshift(sB(n,s,u)):l||null!=(s=iQ(n,a))&&o.push(sB(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var sj=/\r\n?/g,sW=/\u0000|\uFFFD/g;function sH(e){return("string"==typeof e?e:""+e).replace(sj,"\n").replace(sW,"")}function sq(e,t,n){if(t=sH(t),sH(e)!==t&&n)throw Error(i(425))}function sK(){}function sY(e,t,n,r,l,a){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||tu(e,r):"number"==typeof r&&"body"!==t&&tu(e,""+r);break;case"className":eK(e,"class",r);break;case"tabIndex":eK(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":eK(e,n,r);break;case"style":tf(e,r,a);break;case"src":case"href":if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}e.setAttribute(n,""+r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof a&&("formAction"===n?("input"!==t&&sY(e,t,"name",l.name,l,null),sY(e,t,"formEncType",l.formEncType,l,null),sY(e,t,"formMethod",l.formMethod,l,null),sY(e,t,"formTarget",l.formTarget,l,null)):(sY(e,t,"encType",l.encType,l,null),sY(e,t,"method",l.method,l,null),sY(e,t,"target",l.target,l,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}e.setAttribute(n,""+r);break;case"onClick":null!=r&&(e.onclick=sK);break;case"onScroll":null!=r&&sO("scroll",e);break;case"onScrollEnd":null!=r&&sO("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(i(61));if(null!=(r=r.__html)){if(null!=l.children)throw Error(i(60));ti(e,r)}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",""+r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"xlinkActuate":eY(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":eY(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":eY(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":eY(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":eY(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":eY(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":eY(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":eY(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":eY(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":eq(e,"is",r);break;default:2<n.length&&("o"===n[0]||"O"===n[0])&&("n"===n[1]||"N"===n[1])||eq(e,l=tp.get(n)||n,r)}}function sX(e,t,n,r,l,a){switch(n){case"style":tf(e,r,a);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(i(61));if(null!=(t=r.__html)){if(null!=l.children)throw Error(i(60));ti(e,t)}}break;case"children":"string"==typeof r?tu(e,r):"number"==typeof r&&tu(e,""+r);break;case"onScroll":null!=r&&sO("scroll",e);break;case"onScrollEnd":null!=r&&sO("scrollend",e);break;case"onClick":null!=r&&(e.onclick=sK);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;default:eB.hasOwnProperty(n)||("boolean"==typeof r&&(r=""+r),eq(e,n,r))}}function sG(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":sO("invalid",e);var r=null,l=null,a=null,o=null,u=null,s=null;for(f in n)if(n.hasOwnProperty(f)){var c=n[f];if(null!=c)switch(f){case"name":r=c;break;case"type":l=c;break;case"checked":u=c;break;case"defaultChecked":s=c;break;case"value":a=c;break;case"defaultValue":o=c;break;case"children":case"dangerouslySetInnerHTML":if(null!=c)throw Error(i(137,t));break;default:sY(e,t,f,c,n,null)}}e9(e,a,o,u,s,l,r,!1),e3(e);return;case"select":sO("invalid",e);var f=l=a=null;for(r in n)if(n.hasOwnProperty(r)&&null!=(o=n[r]))switch(r){case"value":a=o;break;case"defaultValue":l=o;break;case"multiple":f=o;default:sY(e,t,r,o,n,null)}t=a,n=l,e.multiple=!!f,null!=t?tn(e,!!f,t,!1):null!=n&&tn(e,!!f,n,!0);return;case"textarea":for(l in sO("invalid",e),a=r=f=null,n)if(n.hasOwnProperty(l)&&null!=(o=n[l]))switch(l){case"value":f=o;break;case"defaultValue":r=o;break;case"children":a=o;break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(i(91));break;default:sY(e,t,l,o,n,null)}tl(e,f,r,a),e3(e);return;case"option":for(o in n)n.hasOwnProperty(o)&&null!=(f=n[o])&&("selected"===o?e.selected=f&&"function"!=typeof f&&"symbol"!=typeof f:sY(e,t,o,f,n,null));return;case"dialog":sO("cancel",e),sO("close",e);break;case"iframe":case"object":sO("load",e);break;case"video":case"audio":for(f=0;f<sL.length;f++)sO(sL[f],e);break;case"image":sO("error",e),sO("load",e);break;case"details":sO("toggle",e);break;case"embed":case"source":case"img":case"link":sO("error",e),sO("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(f=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:sY(e,t,u,f,n,null)}return;default:if(td(t)){for(s in n)n.hasOwnProperty(s)&&null!=(f=n[s])&&sX(e,t,s,f,n,null);return}}for(a in n)n.hasOwnProperty(a)&&null!=(f=n[a])&&sY(e,t,a,f,n,null)}function sZ(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,a=null,o=null,u=null,s=null,c=null,f=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&null!=d)switch(m){case"checked":case"value":break;case"defaultValue":s=d;default:r.hasOwnProperty(m)||sY(e,t,m,null,r,d)}}for(var p in r){var m=r[p];if(d=n[p],r.hasOwnProperty(p)&&(null!=m||null!=d))switch(p){case"type":a=m;break;case"name":l=m;break;case"checked":c=m;break;case"defaultChecked":f=m;break;case"value":o=m;break;case"defaultValue":u=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(i(137,t));break;default:m!==d&&sY(e,t,p,m,r,d)}}e7(e,o,u,s,c,f,a,l);return;case"select":for(a in m=o=u=p=null,n)if(s=n[a],n.hasOwnProperty(a)&&null!=s)switch(a){case"value":break;case"multiple":m=s;default:r.hasOwnProperty(a)||sY(e,t,a,null,r,s)}for(l in r)if(a=r[l],s=n[l],r.hasOwnProperty(l)&&(null!=a||null!=s))switch(l){case"value":p=a;break;case"defaultValue":u=a;break;case"multiple":o=a;default:a!==s&&sY(e,t,l,a,r,s)}t=u,n=o,r=m,null!=p?tn(e,!!n,p,!1):!!r!=!!n&&(null!=t?tn(e,!!n,t,!0):tn(e,!!n,n?[]:"",!1));return;case"textarea":for(u in m=p=null,n)if(l=n[u],n.hasOwnProperty(u)&&null!=l&&!r.hasOwnProperty(u))switch(u){case"value":case"children":break;default:sY(e,t,u,null,r,l)}for(o in r)if(l=r[o],a=n[o],r.hasOwnProperty(o)&&(null!=l||null!=a))switch(o){case"value":p=l;break;case"defaultValue":m=l;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(i(91));break;default:l!==a&&sY(e,t,o,l,r,a)}tr(e,p,m);return;case"option":for(var h in n)p=n[h],n.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h)&&("selected"===h?e.selected=!1:sY(e,t,h,null,r,p));for(s in r)p=r[s],m=n[s],r.hasOwnProperty(s)&&p!==m&&(null!=p||null!=m)&&("selected"===s?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:sY(e,t,s,p,r,m));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&sY(e,t,g,null,r,p);for(c in r)if(p=r[c],m=n[c],r.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(i(137,t));break;default:sY(e,t,c,p,r,m)}return;default:if(td(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&null!=p&&!r.hasOwnProperty(y)&&sX(e,t,y,null,r,p);for(f in r)p=r[f],m=n[f],r.hasOwnProperty(f)&&p!==m&&(null!=p||null!=m)&&sX(e,t,f,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&sY(e,t,v,null,r,p);for(d in r)p=r[d],m=n[d],r.hasOwnProperty(d)&&p!==m&&(null!=p||null!=m)&&sY(e,t,d,p,r,m)}var sJ=null,s0=null;function s1(e){return 9===e.nodeType?e:e.ownerDocument}function s2(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function s3(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function s4(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var s6=null,s8="function"==typeof setTimeout?setTimeout:void 0,s5="function"==typeof clearTimeout?clearTimeout:void 0,s7="function"==typeof Promise?Promise:void 0,s9="function"==typeof queueMicrotask?queueMicrotask:void 0!==s7?function(e){return s7.resolve(null).then(e).catch(ce)}:s8;function ce(e){setTimeout(function(){throw e})}function ct(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&8===l.nodeType){if("/$"===(n=l.data)){if(0===r){e.removeChild(l),uL(t);return}r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++}n=l}while(n);uL(t)}function cn(e){var t=e.nodeType;if(9===t)cr(e);else if(1===t)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cr(e);break;default:e.textContent=""}}function cr(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cr(n),eF(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function cl(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function ca(e){return cl(e.nextSibling)}function co(e,t,n,r,l){switch(e[eE]=l,e[ex]=n,r=0!=(1&l.mode),t){case"dialog":sO("cancel",e),sO("close",e);break;case"iframe":case"object":case"embed":sO("load",e);break;case"video":case"audio":for(l=0;l<sL.length;l++)sO(sL[l],e);break;case"source":sO("error",e);break;case"img":case"image":case"link":sO("error",e),sO("load",e);break;case"details":sO("toggle",e);break;case"input":sO("invalid",e),e9(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),e3(e);break;case"select":sO("invalid",e);break;case"textarea":sO("invalid",e),tl(e,n.value,n.defaultValue,n.children),e3(e)}"string"!=typeof(l=n.children)&&"number"!=typeof l||e.textContent===""+l||(!0!==n.suppressHydrationWarning&&sq(e.textContent,l,r),r||"body"===t||(e.textContent=l)),null!=n.onScroll&&sO("scroll",e),null!=n.onScrollEnd&&sO("scrollend",e),null!=n.onClick&&(e.onclick=sK)}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function cu(e,t,n){switch(t=s1(n),e){case"html":if(!(e=t.documentElement))throw Error(i(452));return e;case"head":if(!(e=t.head))throw Error(i(453));return e;case"body":if(!(e=t.body))throw Error(i(454));return e;default:throw Error(i(451))}}var cs=new Map,cc=new Set;function cf(e){return"function"==typeof e.getRootNode?e.getRootNode():e.ownerDocument}var cd={prefetchDNS:function(e){cp("dns-prefetch",e,null)},preconnect:function(e,t){cp("preconnect",e,t)},preload:function(e,t,n){var r=document;if(e&&t&&r){var l='link[rel="preload"][as="'+e5(t)+'"]';"image"===t&&n&&n.imageSrcSet?(l+='[imagesrcset="'+e5(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(l+='[imagesizes="'+e5(n.imageSizes)+'"]')):l+='[href="'+e5(e)+'"]';var a=l;switch(t){case"style":a=cm(e);break;case"script":a=cy(e)}cs.has(a)||(e=u({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),cs.set(a,e),null!==r.querySelector(l)||"style"===t&&r.querySelector(ch(a))||"script"===t&&r.querySelector(cv(a))||(sG(t=r.createElement("link"),"link",e),eI(t),r.head.appendChild(t)))}},preloadModule:function(e,t){var n=document;if(e){var r=t&&"string"==typeof t.as?t.as:"script",l='link[rel="modulepreload"][as="'+e5(r)+'"][href="'+e5(e)+'"]',a=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=cy(e)}if(!cs.has(a)&&(e=u({rel:"modulepreload",href:e},t),cs.set(a,e),null===n.querySelector(l))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(cv(a)))return}sG(r=n.createElement("link"),"link",e),eI(r),n.head.appendChild(r)}}},preinitStyle:function(e,t,n){var r=document;if(e){var l=eA(r).hoistableStyles,a=cm(e);t=t||"default";var o=l.get(a);if(!o){var i={loading:0,preload:null};if(o=r.querySelector(ch(a)))i.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},n),(n=cs.get(a))&&cw(e,n);var s=o=r.createElement("link");eI(s),sG(s,"link",e),s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),s.addEventListener("load",function(){i.loading|=1}),s.addEventListener("error",function(){i.loading|=2}),i.loading|=4,ck(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:i},l.set(a,o)}}},preinitScript:function(e,t){var n=document;if(e){var r=eA(n).hoistableScripts,l=cy(e),a=r.get(l);a||((a=n.querySelector(cv(l)))||(e=u({src:e,async:!0},t),(t=cs.get(l))&&cS(e,t),eI(a=n.createElement("script")),sG(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(l,a))}},preinitModuleScript:function(e,t){var n=document;if(e){var r=eA(n).hoistableScripts,l=cy(e),a=r.get(l);a||((a=n.querySelector(cv(l)))||(e=u({src:e,async:!0,type:"module"},t),(t=cs.get(l))&&cS(e,t),eI(a=n.createElement("script")),sG(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(l,a))}}};function cp(e,t,n){var r=document;if("string"==typeof t&&t){var l=e5(t);l='link[rel="'+e+'"][href="'+l+'"]',"string"==typeof n&&(l+='[crossorigin="'+n+'"]'),cc.has(l)||(cc.add(l),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(l)&&(sG(t=r.createElement("link"),"link",e),eI(t),r.head.appendChild(t)))}}function cm(e){return'href="'+e5(e)+'"'}function ch(e){return'link[rel="stylesheet"]['+e+"]"}function cg(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function cy(e){return'[src="'+e5(e)+'"]'}function cv(e){return"script[async]"+e}function cb(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+e5(n.href)+'"]');if(r)return t.instance=r,eI(r),r;var l=u({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return eI(r=(e.ownerDocument||e).createElement("style")),sG(r,"style",l),ck(r,n.precedence,e),t.instance=r;case"stylesheet":l=cm(n.href);var a=e.querySelector(ch(l));if(a)return t.state.loading|=4,t.instance=a,eI(a),a;r=cg(n),(l=cs.get(l))&&cw(r,l),eI(a=(e.ownerDocument||e).createElement("link"));var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sG(a,"link",r),t.state.loading|=4,ck(a,n.precedence,e),t.instance=a;case"script":if(a=cy(n.src),l=e.querySelector(cv(a)))return t.instance=l,eI(l),l;return r=n,(l=cs.get(a))&&cS(r=u({},n),l),eI(l=(e=e.ownerDocument||e).createElement("script")),sG(l,"link",r),e.head.appendChild(l),t.instance=l;case"void":return null;default:throw Error(i(443,t.type))}else"stylesheet"===t.type&&0==(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,ck(r,n.precedence,e));return t.instance}function ck(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,a=l,o=0;o<r.length;o++){var i=r[o];if(i.dataset.precedence===t)a=i;else if(a!==l)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function cw(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function cS(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var cC=null;function cE(e,t,n){if(null===cC){var r=new Map,l=cC=new Map;l.set(n,r)}else(r=(l=cC).get(n))||(r=new Map,l.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var a=n[l];if(!(a[eT]||a[eE]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(t)||"";o=e+o;var i=r.get(o);i?i.push(a):r.set(o,[a])}}return r}function cx(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}var cz=null;function cP(){}function cN(){if(this.count--,0===this.count){if(this.stylesheets)cL(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var c_=null;function cL(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,c_=new Map,t.forEach(cT,e),c_=null,cN.call(e))}function cT(e,t){if(!(4&t.state.loading)){var n=c_.get(e);if(n)var r=n.get(null);else{n=new Map,c_.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<l.length;a++){var o=l[a];("link"===o.nodeName||"not all"!==o.getAttribute("media"))&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}o=(l=t.instance).getAttribute("data-precedence"),(a=n.get(o)||r)===r&&n.set(null,l),n.set(o,l),this.count++,r=cN.bind(this),l.addEventListener("load",r),l.addEventListener("error",r),a?a.parentNode.insertBefore(l,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(l,e.firstChild),t.state.loading|=4}}var cF=o.Dispatcher;"undefined"!=typeof document&&(cF.current=cd);var cM="function"==typeof reportError?reportError:function(e){console.error(e)};function cO(e){this._internalRoot=e}function cR(e){this._internalRoot=e}function cD(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function cA(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function cI(){}function cU(e,t,n,r,l){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof l){var i=l;l=function(){var e=iD(o);i.call(e)}}iR(t,o,e,l)}else o=function(e,t,n,r,l){if(l){if("function"==typeof r){var a=r;r=function(){var e=iD(o);a.call(e)}}var o=iO(t,r,e,0,null,!1,!1,"",cI,null,null);return e._reactRootContainer=o,e[ez]=o.current,sA(8===e.nodeType?e.parentNode:e),o6(),o}if(cn(e),"function"==typeof r){var i=r;r=function(){var e=iD(u);i.call(e)}}var u=iF(e,0,!1,null,null,!1,!1,"",cI,null,null);return e._reactRootContainer=u,e[ez]=u.current,sA(8===e.nodeType?e.parentNode:e),o6(function(){iR(t,u,n,r)}),u}(n,t,e,l,r);return iD(o)}function cB(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}cR.prototype.render=cO.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));iR(e,t,null,null)},cR.prototype.unmount=cO.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;o6(function(){iR(null,e,null,null)}),t[ez]=null}},cR.prototype.unstable_scheduleHydration=function(e){if(e){var t=ek;e={blockedOn:null,target:e,priority:t};for(var n=0;n<ub.length&&0!==t&&t<ub[n].priority;n++);ub.splice(n,0,e),0===n&&uC(e)}};var cV=o.Dispatcher;o.Events=[eO,eR,eD,tb,tk,o4];var cQ={findFiberByHostInstance:eM,bundleType:0,version:"18.3.0-canary-178c267a4e-20241218",rendererPackageName:"react-dom"},c$={bundleType:cQ.bundleType,version:cQ.version,rendererPackageName:cQ.rendererPackageName,rendererConfig:cQ.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tE(e))?null:e.stateNode},findFiberByHostInstance:cQ.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-canary-178c267a4e-20241218"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var cj=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cj.isDisabled&&cj.supportsFiber)try{el=cj.inject(c$),ea=cj}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!cD(t))throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:v,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!cD(e))throw Error(i(299));var n=!1,r="",l=cM,a=null;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(l=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&(a=t.unstable_transitionCallbacks)),t=iF(e,1,!1,null,null,n,!1,r,l,a,null),e[ez]=t.current,cF.current=cd,sA(8===e.nodeType?e.parentNode:e),new cO(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(i(188));throw Error(i(268,e=Object.keys(e).join(",")))}return e=null===(e=tE(t))?null:e.stateNode},t.flushSync=function(e){return o6(e)},t.hydrate=function(e,t,n){if(!cA(t))throw Error(i(299));return cU(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!cD(e))throw Error(i(299));var r=!1,l="",a=cM,o=null,u=null;return null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(l=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&(o=n.unstable_transitionCallbacks),void 0!==n.formState&&(u=n.formState)),t=iO(t,null,e,1,null!=n?n:null,r,!1,l,a,o,u),e[ez]=t.current,cF.current=cd,sA(e),new cR(t)},t.preconnect=function(e,t){var n=cV.current;n&&"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,n.preconnect(e,t))},t.prefetchDNS=function(e){var t=cV.current;t&&"string"==typeof e&&t.prefetchDNS(e)},t.preinit=function(e,t){var n=cV.current;if(n&&"string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,l=cB(r,t.crossOrigin),a="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?n.preinitStyle(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:l,integrity:a,fetchPriority:o}):"script"===r&&n.preinitScript(e,{crossOrigin:l,integrity:a,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){var n=cV.current;if(n&&"string"==typeof e){if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=cB(t.as,t.crossOrigin);n.preinitModuleScript(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&n.preinitModuleScript(e)}},t.preload=function(e,t){var n=cV.current;if(n&&"string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,l=cB(r,t.crossOrigin);n.preload(e,r,{crossOrigin:l,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0})}},t.preloadModule=function(e,t){var n=cV.current;if(n&&"string"==typeof e){if(t){var r=cB(t.as,t.crossOrigin);n.preloadModule(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else n.preloadModule(e)}},t.render=function(e,t,n){if(!cA(t))throw Error(i(299));return cU(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!cA(e))throw Error(i(299));return!!e._reactRootContainer&&(o6(function(){cU(null,null,e,!1,function(){e._reactRootContainer=null,e[ez]=null})}),!0)},t.unstable_batchedUpdates=o4,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cA(n))throw Error(i(299));if(null==e||void 0===e._reactInternals)throw Error(i(38));return cU(e,t,n,!1,r)},t.useFormState=function(e,t,n){return c.current.useFormState(e,t,n)},t.useFormStatus=function(){return c.current.useHostTransitionStatus()},t.version="18.3.0-canary-178c267a4e-20241218"}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/framework-b370f160bb96059c.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/framework-b370f160bb96059c.js new file mode 100644 index 00000000..c249da40 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/framework-b370f160bb96059c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[774],{64448:function(e,n,t){var r,l,a,u,o,i,s=t(67294),c=t(63840);function f(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d=new Set,p={};function m(e,n){h(e,n),h(e+"Capture",n)}function h(e,n){for(p[e]=n,e=0;e<n.length;e++)d.add(n[e])}var g=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),v=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,b={},k={};function w(e,n,t,r,l,a,u){this.acceptsBooleans=2===n||3===n||4===n,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=a,this.removeEmptyString=u}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){S[e]=new w(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];S[n]=new w(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){S[e]=new w(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){S[e]=new w(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){S[e]=new w(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){S[e]=new w(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){S[e]=new w(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){S[e]=new w(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){S[e]=new w(e,5,!1,e.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function E(e){return e[1].toUpperCase()}function _(e,n,t,r){var l,a=S.hasOwnProperty(n)?S[n]:null;(null!==a?0!==a.type:r||!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&(function(e,n,t,r){if(null==n||function(e,n,t,r){if(null!==t&&0===t.type)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==t)return!t.acceptsBooleans;return"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return!1}}(e,n,t,r))return!0;if(r)return!1;if(null!==t)switch(t.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}(n,t,a,r)&&(t=null),r||null===a?(l=n,(!!v.call(k,l)||!v.call(b,l)&&(y.test(l)?k[l]=!0:(b[l]=!0,!1)))&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t))):a.mustUseProperty?e[a.propertyName]=null===t?3!==a.type&&"":t:(n=a.attributeName,r=a.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(a=a.type)||4===a&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(x,E);S[n]=new w(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(x,E);S[n]=new w(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(x,E);S[n]=new w(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){S[e]=new w(e,1,!1,e.toLowerCase(),null,!1,!1)}),S.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){S[e]=new w(e,1,!1,e.toLowerCase(),null,!0,!0)});var C=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),N=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),M=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),U=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var V=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var $=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}var j,B=Object.assign;function H(e){if(void 0===j)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);j=n&&n[1]||""}return"\n"+j+e}var W=!1;function Q(e,n){if(!e||W)return"";W=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n){if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(n){if(n&&r&&"string"==typeof n.stack){for(var l=n.stack.split("\n"),a=r.stack.split("\n"),u=l.length-1,o=a.length-1;1<=u&&0<=o&&l[u]!==a[o];)o--;for(;1<=u&&0<=o;u--,o--)if(l[u]!==a[o]){if(1!==u||1!==o)do if(u--,0>--o||l[u]!==a[o]){var i="\n"+l[u].replace(" at new "," at ");return e.displayName&&i.includes("<anonymous>")&&(i=i.replace("<anonymous>",e.displayName)),i}while(1<=u&&0<=o);break}}}finally{W=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?H(e):""}function q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var n=K(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&void 0!==t&&"function"==typeof t.get&&"function"==typeof t.set){var l=t.get,a=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}(e))}function X(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==t&&(n.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}}function Z(e,n){var t=n.checked;return B({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function J(e,n){var t=null==n.defaultValue?"":n.defaultValue,r=null!=n.checked?n.checked:n.defaultChecked;t=q(null!=n.value?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:"checkbox"===n.type||"radio"===n.type?null!=n.checked:null!=n.value}}function ee(e,n){null!=(n=n.checked)&&_(e,"checked",n,!1)}function en(e,n){ee(e,n);var t=q(n.value),r=n.type;if(null!=t)"number"===r?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===r||"reset"===r){e.removeAttribute("value");return}n.hasOwnProperty("value")?er(e,n.type,t):n.hasOwnProperty("defaultValue")&&er(e,n.type,q(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function et(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!("submit"!==r&&"reset"!==r||void 0!==n.value&&null!==n.value))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}""!==(t=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function er(e,n,t){("number"!==n||G(e.ownerDocument)!==e)&&(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var el=Array.isArray;function ea(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l<t.length;l++)n["$"+t[l]]=!0;for(t=0;t<e.length;t++)l=n.hasOwnProperty("$"+e[t].value),e[t].selected!==l&&(e[t].selected=l),l&&r&&(e[t].defaultSelected=!0)}else{for(l=0,t=""+q(t),n=null;l<e.length;l++){if(e[l].value===t){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}null!==n||e[l].disabled||(n=e[l])}null!==n&&(n.selected=!0)}}function eu(e,n){if(null!=n.dangerouslySetInnerHTML)throw Error(f(91));return B({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eo(e,n){var t=n.value;if(null==t){if(t=n.children,n=n.defaultValue,null!=t){if(null!=n)throw Error(f(92));if(el(t)){if(1<t.length)throw Error(f(93));t=t[0]}n=t}null==n&&(n=""),t=n}e._wrapperState={initialValue:q(t)}}function ei(e,n){var t=q(n.value),r=q(n.defaultValue);null!=t&&((t=""+t)!==e.value&&(e.value=t),null==n.defaultValue&&e.defaultValue!==t&&(e.defaultValue=t)),null!=r&&(e.defaultValue=""+r)}function es(e){var n=e.textContent;n===e._wrapperState.initialValue&&""!==n&&null!==n&&(e.value=n)}function ec(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ef(e,n){return null==e||"http://www.w3.org/1999/xhtml"===e?ec(n):"http://www.w3.org/2000/svg"===e&&"foreignObject"===n?"http://www.w3.org/1999/xhtml":e}var ed,ep,em=(ed=function(e,n){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=n;else{for((ep=ep||document.createElement("div")).innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=ep.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,t,r){MSApp.execUnsafeLocalFunction(function(){return ed(e,n,t,r)})}:ed);function eh(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType){t.nodeValue=n;return}}e.textContent=n}var eg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ev=["Webkit","ms","Moz","O"];function ey(e,n,t){return null==n||"boolean"==typeof n||""===n?"":t||"number"!=typeof n||0===n||eg.hasOwnProperty(e)&&eg[e]?(""+n).trim():n+"px"}function eb(e,n){for(var t in e=e.style,n)if(n.hasOwnProperty(t)){var r=0===t.indexOf("--"),l=ey(t,n[t],r);"float"===t&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}Object.keys(eg).forEach(function(e){ev.forEach(function(n){eg[n=n+e.charAt(0).toUpperCase()+e.substring(1)]=eg[e]})});var ek=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ew(e,n){if(n){if(ek[e]&&(null!=n.children||null!=n.dangerouslySetInnerHTML))throw Error(f(137,e));if(null!=n.dangerouslySetInnerHTML){if(null!=n.children)throw Error(f(60));if("object"!=typeof n.dangerouslySetInnerHTML||!("__html"in n.dangerouslySetInnerHTML))throw Error(f(61))}if(null!=n.style&&"object"!=typeof n.style)throw Error(f(62))}}function eS(e,n){if(-1===e.indexOf("-"))return"string"==typeof n.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ex=null;function eE(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var e_=null,eC=null,eP=null;function eN(e){if(e=rD(e)){if("function"!=typeof e_)throw Error(f(280));var n=e.stateNode;n&&(n=rU(n),e_(e.stateNode,e.type,n))}}function ez(e){eC?eP?eP.push(e):eP=[e]:eC=e}function eT(){if(eC){var e=eC,n=eP;if(eP=eC=null,eN(e),n)for(e=0;e<n.length;e++)eN(n[e])}}function eL(e,n){return e(n)}function eR(){}var eM=!1;function eF(e,n,t){if(eM)return e(n,t);eM=!0;try{return eL(e,n,t)}finally{eM=!1,(null!==eC||null!==eP)&&(eR(),eT())}}function eO(e,n){var t=e.stateNode;if(null===t)return null;var r=rU(t);if(null===r)return null;switch(t=r[n],n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break;default:e=!1}if(e)return null;if(t&&"function"!=typeof t)throw Error(f(231,n,typeof t));return t}var eD=!1;if(g)try{var eI={};Object.defineProperty(eI,"passive",{get:function(){eD=!0}}),window.addEventListener("test",eI,eI),window.removeEventListener("test",eI,eI)}catch(e){eD=!1}function eU(e,n,t,r,l,a,u,o,i){var s=Array.prototype.slice.call(arguments,3);try{n.apply(t,s)}catch(e){this.onError(e)}}var eV=!1,e$=null,eA=!1,ej=null,eB={onError:function(e){eV=!0,e$=e}};function eH(e,n,t,r,l,a,u,o,i){eV=!1,e$=null,eU.apply(eB,arguments)}function eW(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do 0!=(4098&(n=e).flags)&&(t=n.return),e=n.return;while(e)}return 3===n.tag?t:null}function eQ(e){if(13===e.tag){var n=e.memoizedState;if(null===n&&null!==(e=e.alternate)&&(n=e.memoizedState),null!==n)return n.dehydrated}return null}function eq(e){if(eW(e)!==e)throw Error(f(188))}function eK(e){return null!==(e=function(e){var n=e.alternate;if(!n){if(null===(n=eW(e)))throw Error(f(188));return n!==e?null:e}for(var t=e,r=n;;){var l=t.return;if(null===l)break;var a=l.alternate;if(null===a){if(null!==(r=l.return)){t=r;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===t)return eq(l),e;if(a===r)return eq(l),n;a=a.sibling}throw Error(f(188))}if(t.return!==r.return)t=l,r=a;else{for(var u=!1,o=l.child;o;){if(o===t){u=!0,t=l,r=a;break}if(o===r){u=!0,r=l,t=a;break}o=o.sibling}if(!u){for(o=a.child;o;){if(o===t){u=!0,t=a,r=l;break}if(o===r){u=!0,r=a,t=l;break}o=o.sibling}if(!u)throw Error(f(189))}}if(t.alternate!==r)throw Error(f(190))}if(3!==t.tag)throw Error(f(188));return t.stateNode.current===t?e:n}(e))?function e(n){if(5===n.tag||6===n.tag)return n;for(n=n.child;null!==n;){var t=e(n);if(null!==t)return t;n=n.sibling}return null}(e):null}var eY=c.unstable_scheduleCallback,eX=c.unstable_cancelCallback,eG=c.unstable_shouldYield,eZ=c.unstable_requestPaint,eJ=c.unstable_now,e0=c.unstable_getCurrentPriorityLevel,e1=c.unstable_ImmediatePriority,e2=c.unstable_UserBlockingPriority,e3=c.unstable_NormalPriority,e4=c.unstable_LowPriority,e8=c.unstable_IdlePriority,e6=null,e5=null,e9=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(e7(e)/ne|0)|0},e7=Math.log,ne=Math.LN2,nn=64,nt=4194304;function nr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nl(e,n){var t=e.pendingLanes;if(0===t)return 0;var r=0,l=e.suspendedLanes,a=e.pingedLanes,u=268435455&t;if(0!==u){var o=u&~l;0!==o?r=nr(o):0!=(a&=u)&&(r=nr(a))}else 0!=(u=t&~l)?r=nr(u):0!==a&&(r=nr(a));if(0===r)return 0;if(0!==n&&n!==r&&0==(n&l)&&((l=r&-r)>=(a=n&-n)||16===l&&0!=(4194240&a)))return n;if(0!=(4&r)&&(r|=16&t),0!==(n=e.entangledLanes))for(e=e.entanglements,n&=r;0<n;)l=1<<(t=31-e9(n)),r|=e[t],n&=~l;return r}function na(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function nu(){var e=nn;return 0==(4194240&(nn<<=1))&&(nn=64),e}function no(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function ni(e,n,t){e.pendingLanes|=n,536870912!==n&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[n=31-e9(n)]=t}function ns(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-e9(t),l=1<<r;l&n|e[r]&n&&(e[r]|=n),t&=~l}}var nc=0;function nf(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var nd,np,nm,nh,ng,nv=!1,ny=[],nb=null,nk=null,nw=null,nS=new Map,nx=new Map,nE=[],n_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function nC(e,n){switch(e){case"focusin":case"focusout":nb=null;break;case"dragenter":case"dragleave":nk=null;break;case"mouseover":case"mouseout":nw=null;break;case"pointerover":case"pointerout":nS.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":nx.delete(n.pointerId)}}function nP(e,n,t,r,l,a){return null===e||e.nativeEvent!==a?(e={blockedOn:n,domEventName:t,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},null!==n&&null!==(n=rD(n))&&np(n)):(e.eventSystemFlags|=r,n=e.targetContainers,null!==l&&-1===n.indexOf(l)&&n.push(l)),e}function nN(e){var n=rO(e.target);if(null!==n){var t=eW(n);if(null!==t){if(13===(n=t.tag)){if(null!==(n=eQ(t))){e.blockedOn=n,ng(e.priority,function(){nm(t)});return}}else if(3===n&&t.stateNode.current.memoizedState.isDehydrated){e.blockedOn=3===t.tag?t.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nz(e){if(null!==e.blockedOn)return!1;for(var n=e.targetContainers;0<n.length;){var t=n$(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(null!==t)return null!==(n=rD(t))&&np(n),e.blockedOn=t,!1;var r=new(t=e.nativeEvent).constructor(t.type,t);ex=r,t.target.dispatchEvent(r),ex=null,n.shift()}return!0}function nT(e,n,t){nz(e)&&t.delete(n)}function nL(){nv=!1,null!==nb&&nz(nb)&&(nb=null),null!==nk&&nz(nk)&&(nk=null),null!==nw&&nz(nw)&&(nw=null),nS.forEach(nT),nx.forEach(nT)}function nR(e,n){e.blockedOn===n&&(e.blockedOn=null,nv||(nv=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,nL)))}function nM(e){function n(n){return nR(n,e)}if(0<ny.length){nR(ny[0],e);for(var t=1;t<ny.length;t++){var r=ny[t];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==nb&&nR(nb,e),null!==nk&&nR(nk,e),null!==nw&&nR(nw,e),nS.forEach(n),nx.forEach(n),t=0;t<nE.length;t++)(r=nE[t]).blockedOn===e&&(r.blockedOn=null);for(;0<nE.length&&null===(t=nE[0]).blockedOn;)nN(t),null===t.blockedOn&&nE.shift()}var nF=C.ReactCurrentBatchConfig,nO=!0;function nD(e,n,t,r){var l=nc,a=nF.transition;nF.transition=null;try{nc=1,nU(e,n,t,r)}finally{nc=l,nF.transition=a}}function nI(e,n,t,r){var l=nc,a=nF.transition;nF.transition=null;try{nc=4,nU(e,n,t,r)}finally{nc=l,nF.transition=a}}function nU(e,n,t,r){if(nO){var l=n$(e,n,t,r);if(null===l)ro(e,n,r,nV,t),nC(e,r);else if(function(e,n,t,r,l){switch(n){case"focusin":return nb=nP(nb,e,n,t,r,l),!0;case"dragenter":return nk=nP(nk,e,n,t,r,l),!0;case"mouseover":return nw=nP(nw,e,n,t,r,l),!0;case"pointerover":var a=l.pointerId;return nS.set(a,nP(nS.get(a)||null,e,n,t,r,l)),!0;case"gotpointercapture":return a=l.pointerId,nx.set(a,nP(nx.get(a)||null,e,n,t,r,l)),!0}return!1}(l,e,n,t,r))r.stopPropagation();else if(nC(e,r),4&n&&-1<n_.indexOf(e)){for(;null!==l;){var a=rD(l);if(null!==a&&nd(a),null===(a=n$(e,n,t,r))&&ro(e,n,r,nV,t),a===l)break;l=a}null!==l&&r.stopPropagation()}else ro(e,n,r,null,t)}}var nV=null;function n$(e,n,t,r){if(nV=null,null!==(e=rO(e=eE(r)))){if(null===(n=eW(e)))e=null;else if(13===(t=n.tag)){if(null!==(e=eQ(n)))return e;e=null}else if(3===t){if(n.stateNode.current.memoizedState.isDehydrated)return 3===n.tag?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}return nV=e,null}function nA(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(e0()){case e1:return 1;case e2:return 4;case e3:case e4:return 16;case e8:return 536870912;default:return 16}default:return 16}}var nj=null,nB=null,nH=null;function nW(){if(nH)return nH;var e,n,t=nB,r=t.length,l="value"in nj?nj.value:nj.textContent,a=l.length;for(e=0;e<r&&t[e]===l[e];e++);var u=r-e;for(n=1;n<=u&&t[r-n]===l[a-n];n++);return nH=l.slice(e,1<n?1-n:void 0)}function nQ(e){var n=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===n&&(e=13):e=n,10===e&&(e=13),32<=e||13===e?e:0}function nq(){return!0}function nK(){return!1}function nY(e){function n(n,t,r,l,a){for(var u in this._reactName=n,this._targetInst=r,this.type=t,this.nativeEvent=l,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(l):l[u]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?nq:nK,this.isPropagationStopped=nK,this}return B(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nq)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nq)},persist:function(){},isPersistent:nq}),n}var nX,nG,nZ,nJ={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},n0=nY(nJ),n1=B({},nJ,{view:0,detail:0}),n2=nY(n1),n3=B({},n1,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tl,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nZ&&(nZ&&"mousemove"===e.type?(nX=e.screenX-nZ.screenX,nG=e.screenY-nZ.screenY):nG=nX=0,nZ=e),nX)},movementY:function(e){return"movementY"in e?e.movementY:nG}}),n4=nY(n3),n8=nY(B({},n3,{dataTransfer:0})),n6=nY(B({},n1,{relatedTarget:0})),n5=nY(B({},nJ,{animationName:0,elapsedTime:0,pseudoElement:0})),n9=nY(B({},nJ,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),n7=nY(B({},nJ,{data:0})),te={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},tt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tr(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):!!(e=tt[e])&&!!n[e]}function tl(){return tr}var ta=nY(B({},n1,{key:function(e){if(e.key){var n=te[e.key]||e.key;if("Unidentified"!==n)return n}return"keypress"===e.type?13===(e=nQ(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?tn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tl,charCode:function(e){return"keypress"===e.type?nQ(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nQ(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),tu=nY(B({},n3,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),to=nY(B({},n1,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tl})),ti=nY(B({},nJ,{propertyName:0,elapsedTime:0,pseudoElement:0})),ts=nY(B({},n3,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),tc=[9,13,27,32],tf=g&&"CompositionEvent"in window,td=null;g&&"documentMode"in document&&(td=document.documentMode);var tp=g&&"TextEvent"in window&&!td,tm=g&&(!tf||td&&8<td&&11>=td),th=!1;function tg(e,n){switch(e){case"keyup":return -1!==tc.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tv(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ty=!1,tb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tk(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!tb[e.type]:"textarea"===n}function tw(e,n,t,r){ez(r),0<(n=rs(n,"onChange")).length&&(t=new n0("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var tS=null,tx=null;function tE(e){rn(e,0)}function t_(e){if(X(rI(e)))return e}function tC(e,n){if("change"===e)return n}var tP=!1;if(g){if(g){var tN="oninput"in document;if(!tN){var tz=document.createElement("div");tz.setAttribute("oninput","return;"),tN="function"==typeof tz.oninput}r=tN}else r=!1;tP=r&&(!document.documentMode||9<document.documentMode)}function tT(){tS&&(tS.detachEvent("onpropertychange",tL),tx=tS=null)}function tL(e){if("value"===e.propertyName&&t_(tx)){var n=[];tw(n,tx,e,eE(e)),eF(tE,n)}}function tR(e,n,t){"focusin"===e?(tT(),tS=n,tx=t,tS.attachEvent("onpropertychange",tL)):"focusout"===e&&tT()}function tM(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return t_(tx)}function tF(e,n){if("click"===e)return t_(n)}function tO(e,n){if("input"===e||"change"===e)return t_(n)}var tD="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n};function tI(e,n){if(tD(e,n))return!0;if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(r=0;r<t.length;r++){var l=t[r];if(!v.call(n,l)||!tD(e[l],n[l]))return!1}return!0}function tU(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tV(e,n){var t,r=tU(e);for(e=0;r;){if(3===r.nodeType){if(t=e+r.textContent.length,e<=n&&t>=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tU(r)}}function t$(){for(var e=window,n=G();n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(e){t=!1}if(t)e=n.contentWindow;else break;n=G(e.document)}return n}function tA(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var tj=g&&"documentMode"in document&&11>=document.documentMode,tB=null,tH=null,tW=null,tQ=!1;function tq(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;tQ||null==tB||tB!==G(r)||(r="selectionStart"in(r=tB)&&tA(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},tW&&tI(tW,r)||(tW=r,0<(r=rs(tH,"onSelect")).length&&(n=new n0("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=tB)))}function tK(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var tY={animationend:tK("Animation","AnimationEnd"),animationiteration:tK("Animation","AnimationIteration"),animationstart:tK("Animation","AnimationStart"),transitionend:tK("Transition","TransitionEnd")},tX={},tG={};function tZ(e){if(tX[e])return tX[e];if(!tY[e])return e;var n,t=tY[e];for(n in t)if(t.hasOwnProperty(n)&&n in tG)return tX[e]=t[n];return e}g&&(tG=document.createElement("div").style,"AnimationEvent"in window||(delete tY.animationend.animation,delete tY.animationiteration.animation,delete tY.animationstart.animation),"TransitionEvent"in window||delete tY.transitionend.transition);var tJ=tZ("animationend"),t0=tZ("animationiteration"),t1=tZ("animationstart"),t2=tZ("transitionend"),t3=new Map,t4="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function t8(e,n){t3.set(e,n),m(n,[e])}for(var t6=0;t6<t4.length;t6++){var t5=t4[t6];t8(t5.toLowerCase(),"on"+(t5[0].toUpperCase()+t5.slice(1)))}t8(tJ,"onAnimationEnd"),t8(t0,"onAnimationIteration"),t8(t1,"onAnimationStart"),t8("dblclick","onDoubleClick"),t8("focusin","onFocus"),t8("focusout","onBlur"),t8(t2,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),m("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),m("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),m("onBeforeInput",["compositionend","keypress","textInput","paste"]),m("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),m("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var t9="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),t7=new Set("cancel close invalid load scroll toggle".split(" ").concat(t9));function re(e,n,t){var r=e.type||"unknown-event";e.currentTarget=t,function(e,n,t,r,l,a,u,o,i){if(eH.apply(this,arguments),eV){if(eV){var s=e$;eV=!1,e$=null}else throw Error(f(198));eA||(eA=!0,ej=s)}}(r,n,void 0,e),e.currentTarget=null}function rn(e,n){n=0!=(4&n);for(var t=0;t<e.length;t++){var r=e[t],l=r.event;r=r.listeners;e:{var a=void 0;if(n)for(var u=r.length-1;0<=u;u--){var o=r[u],i=o.instance,s=o.currentTarget;if(o=o.listener,i!==a&&l.isPropagationStopped())break e;re(l,o,s),a=i}else for(u=0;u<r.length;u++){if(i=(o=r[u]).instance,s=o.currentTarget,o=o.listener,i!==a&&l.isPropagationStopped())break e;re(l,o,s),a=i}}}if(eA)throw e=ej,eA=!1,ej=null,e}function rt(e,n){var t=n[rR];void 0===t&&(t=n[rR]=new Set);var r=e+"__bubble";t.has(r)||(ru(n,e,2,!1),t.add(r))}function rr(e,n,t){var r=0;n&&(r|=4),ru(t,e,r,n)}var rl="_reactListening"+Math.random().toString(36).slice(2);function ra(e){if(!e[rl]){e[rl]=!0,d.forEach(function(n){"selectionchange"!==n&&(t7.has(n)||rr(n,!1,e),rr(n,!0,e))});var n=9===e.nodeType?e:e.ownerDocument;null===n||n[rl]||(n[rl]=!0,rr("selectionchange",!1,n))}}function ru(e,n,t,r){switch(nA(n)){case 1:var l=nD;break;case 4:l=nI;break;default:l=nU}t=l.bind(null,n,t,e),l=void 0,eD&&("touchstart"===n||"touchmove"===n||"wheel"===n)&&(l=!0),r?void 0!==l?e.addEventListener(n,t,{capture:!0,passive:l}):e.addEventListener(n,t,!0):void 0!==l?e.addEventListener(n,t,{passive:l}):e.addEventListener(n,t,!1)}function ro(e,n,t,r,l){var a=r;if(0==(1&n)&&0==(2&n)&&null!==r)e:for(;;){if(null===r)return;var u=r.tag;if(3===u||4===u){var o=r.stateNode.containerInfo;if(o===l||8===o.nodeType&&o.parentNode===l)break;if(4===u)for(u=r.return;null!==u;){var i=u.tag;if((3===i||4===i)&&((i=u.stateNode.containerInfo)===l||8===i.nodeType&&i.parentNode===l))return;u=u.return}for(;null!==o;){if(null===(u=rO(o)))return;if(5===(i=u.tag)||6===i){r=a=u;continue e}o=o.parentNode}}r=r.return}eF(function(){var r=a,l=eE(t),u=[];e:{var o=t3.get(e);if(void 0!==o){var i=n0,s=e;switch(e){case"keypress":if(0===nQ(t))break e;case"keydown":case"keyup":i=ta;break;case"focusin":s="focus",i=n6;break;case"focusout":s="blur",i=n6;break;case"beforeblur":case"afterblur":i=n6;break;case"click":if(2===t.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":i=n4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":i=n8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":i=to;break;case tJ:case t0:case t1:i=n5;break;case t2:i=ti;break;case"scroll":i=n2;break;case"wheel":i=ts;break;case"copy":case"cut":case"paste":i=n9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":i=tu}var c=0!=(4&n),f=!c&&"scroll"===e,d=c?null!==o?o+"Capture":null:o;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==d&&null!=(h=eO(m,d))&&c.push(ri(m,h,p))),f)break;m=m.return}0<c.length&&(o=new i(o,s,null,t,l),u.push({event:o,listeners:c}))}}if(0==(7&n)){if(o="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e,!(o&&t!==ex&&(s=t.relatedTarget||t.fromElement)&&(rO(s)||s[rL]))&&(i||o)&&(o=l.window===l?l:(o=l.ownerDocument)?o.defaultView||o.parentWindow:window,i?(s=t.relatedTarget||t.toElement,i=r,null!==(s=s?rO(s):null)&&(f=eW(s),s!==f||5!==s.tag&&6!==s.tag)&&(s=null)):(i=null,s=r),i!==s)){if(c=n4,h="onMouseLeave",d="onMouseEnter",m="mouse",("pointerout"===e||"pointerover"===e)&&(c=tu,h="onPointerLeave",d="onPointerEnter",m="pointer"),f=null==i?o:rI(i),p=null==s?o:rI(s),(o=new c(h,m+"leave",i,t,l)).target=f,o.relatedTarget=p,h=null,rO(l)===r&&((c=new c(d,m+"enter",s,t,l)).target=p,c.relatedTarget=f,h=c),f=h,i&&s)n:{for(c=i,d=s,m=0,p=c;p;p=rc(p))m++;for(p=0,h=d;h;h=rc(h))p++;for(;0<m-p;)c=rc(c),m--;for(;0<p-m;)d=rc(d),p--;for(;m--;){if(c===d||null!==d&&c===d.alternate)break n;c=rc(c),d=rc(d)}c=null}else c=null;null!==i&&rf(u,o,i,c,!1),null!==s&&null!==f&&rf(u,f,s,c,!0)}e:{if("select"===(i=(o=r?rI(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===i&&"file"===o.type)var g,v=tC;else if(tk(o)){if(tP)v=tO;else{v=tM;var y=tR}}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(v=tF);if(v&&(v=v(e,r))){tw(u,v,t,l);break e}y&&y(e,o,r),"focusout"===e&&(y=o._wrapperState)&&y.controlled&&"number"===o.type&&er(o,"number",o.value)}switch(y=r?rI(r):window,e){case"focusin":(tk(y)||"true"===y.contentEditable)&&(tB=y,tH=r,tW=null);break;case"focusout":tW=tH=tB=null;break;case"mousedown":tQ=!0;break;case"contextmenu":case"mouseup":case"dragend":tQ=!1,tq(u,t,l);break;case"selectionchange":if(tj)break;case"keydown":case"keyup":tq(u,t,l)}if(tf)n:{switch(e){case"compositionstart":var b="onCompositionStart";break n;case"compositionend":b="onCompositionEnd";break n;case"compositionupdate":b="onCompositionUpdate";break n}b=void 0}else ty?tg(e,t)&&(b="onCompositionEnd"):"keydown"===e&&229===t.keyCode&&(b="onCompositionStart");b&&(tm&&"ko"!==t.locale&&(ty||"onCompositionStart"!==b?"onCompositionEnd"===b&&ty&&(g=nW()):(nB="value"in(nj=l)?nj.value:nj.textContent,ty=!0)),0<(y=rs(r,b)).length&&(b=new n7(b,e,null,t,l),u.push({event:b,listeners:y}),g?b.data=g:null!==(g=tv(t))&&(b.data=g))),(g=tp?function(e,n){switch(e){case"compositionend":return tv(n);case"keypress":if(32!==n.which)return null;return th=!0," ";case"textInput":return" "===(e=n.data)&&th?null:e;default:return null}}(e,t):function(e,n){if(ty)return"compositionend"===e||!tf&&tg(e,n)?(e=nW(),nH=nB=nj=null,ty=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return tm&&"ko"!==n.locale?null:n.data}}(e,t))&&0<(r=rs(r,"onBeforeInput")).length&&(l=new n7("onBeforeInput","beforeinput",null,t,l),u.push({event:l,listeners:r}),l.data=g)}rn(u,n)})}function ri(e,n,t){return{instance:e,listener:n,currentTarget:t}}function rs(e,n){for(var t=n+"Capture",r=[];null!==e;){var l=e,a=l.stateNode;5===l.tag&&null!==a&&(l=a,null!=(a=eO(e,t))&&r.unshift(ri(e,a,l)),null!=(a=eO(e,n))&&r.push(ri(e,a,l))),e=e.return}return r}function rc(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag);return e||null}function rf(e,n,t,r,l){for(var a=n._reactName,u=[];null!==t&&t!==r;){var o=t,i=o.alternate,s=o.stateNode;if(null!==i&&i===r)break;5===o.tag&&null!==s&&(o=s,l?null!=(i=eO(t,a))&&u.unshift(ri(t,i,o)):l||null!=(i=eO(t,a))&&u.push(ri(t,i,o))),t=t.return}0!==u.length&&e.push({event:n,listeners:u})}var rd=/\r\n?/g,rp=/\u0000|\uFFFD/g;function rm(e){return("string"==typeof e?e:""+e).replace(rd,"\n").replace(rp,"")}function rh(e,n,t){if(n=rm(n),rm(e)!==n&&t)throw Error(f(425))}function rg(){}var rv=null,ry=null;function rb(e,n){return"textarea"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}var rk="function"==typeof setTimeout?setTimeout:void 0,rw="function"==typeof clearTimeout?clearTimeout:void 0,rS="function"==typeof Promise?Promise:void 0,rx="function"==typeof queueMicrotask?queueMicrotask:void 0!==rS?function(e){return rS.resolve(null).then(e).catch(rE)}:rk;function rE(e){setTimeout(function(){throw e})}function r_(e,n){var t=n,r=0;do{var l=t.nextSibling;if(e.removeChild(t),l&&8===l.nodeType){if("/$"===(t=l.data)){if(0===r){e.removeChild(l),nM(n);return}r--}else"$"!==t&&"$?"!==t&&"$!"!==t||r++}t=l}while(t);nM(n)}function rC(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break;if(8===n){if("$"===(n=e.data)||"$!"===n||"$?"===n)break;if("/$"===n)return null}}return e}function rP(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if("$"===t||"$!"===t||"$?"===t){if(0===n)return e;n--}else"/$"===t&&n++}e=e.previousSibling}return null}var rN=Math.random().toString(36).slice(2),rz="__reactFiber$"+rN,rT="__reactProps$"+rN,rL="__reactContainer$"+rN,rR="__reactEvents$"+rN,rM="__reactListeners$"+rN,rF="__reactHandles$"+rN;function rO(e){var n=e[rz];if(n)return n;for(var t=e.parentNode;t;){if(n=t[rL]||t[rz]){if(t=n.alternate,null!==n.child||null!==t&&null!==t.child)for(e=rP(e);null!==e;){if(t=e[rz])return t;e=rP(e)}return n}t=(e=t).parentNode}return null}function rD(e){return(e=e[rz]||e[rL])&&(5===e.tag||6===e.tag||13===e.tag||3===e.tag)?e:null}function rI(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(f(33))}function rU(e){return e[rT]||null}var rV=[],r$=-1;function rA(e){return{current:e}}function rj(e){0>r$||(e.current=rV[r$],rV[r$]=null,r$--)}function rB(e,n){rV[++r$]=e.current,e.current=n}var rH={},rW=rA(rH),rQ=rA(!1),rq=rH;function rK(e,n){var t=e.type.contextTypes;if(!t)return rH;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in t)a[l]=n[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),a}function rY(e){return null!=(e=e.childContextTypes)}function rX(){rj(rQ),rj(rW)}function rG(e,n,t){if(rW.current!==rH)throw Error(f(168));rB(rW,n),rB(rQ,t)}function rZ(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,"function"!=typeof r.getChildContext)return t;for(var l in r=r.getChildContext())if(!(l in n))throw Error(f(108,function(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=n.render).displayName||e.name||"",n.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return function e(n){if(null==n)return null;if("function"==typeof n)return n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case z:return"Fragment";case N:return"Portal";case L:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case D:return"SuspenseList"}if("object"==typeof n)switch(n.$$typeof){case M:return(n.displayName||"Context")+".Consumer";case R:return(n._context.displayName||"Context")+".Provider";case F:var t=n.render;return(n=n.displayName)||(n=""!==(n=t.displayName||t.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case I:return null!==(t=n.displayName||null)?t:e(n.type)||"Memo";case U:t=n._payload,n=n._init;try{return e(n(t))}catch(e){}}return null}(n);case 8:return n===T?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof n)return n.displayName||n.name||null;if("string"==typeof n)return n}return null}(e)||"Unknown",l));return B({},t,r)}function rJ(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rH,rq=rW.current,rB(rW,e),rB(rQ,rQ.current),!0}function r0(e,n,t){var r=e.stateNode;if(!r)throw Error(f(169));t?(e=rZ(e,n,rq),r.__reactInternalMemoizedMergedChildContext=e,rj(rQ),rj(rW),rB(rW,e)):rj(rQ),rB(rQ,t)}var r1=null,r2=!1,r3=!1;function r4(e){null===r1?r1=[e]:r1.push(e)}function r8(){if(!r3&&null!==r1){r3=!0;var e=0,n=nc;try{var t=r1;for(nc=1;e<t.length;e++){var r=t[e];do r=r(!0);while(null!==r)}r1=null,r2=!1}catch(n){throw null!==r1&&(r1=r1.slice(e+1)),eY(e1,r8),n}finally{nc=n,r3=!1}}return null}var r6=[],r5=0,r9=null,r7=0,le=[],ln=0,lt=null,lr=1,ll="";function la(e,n){r6[r5++]=r7,r6[r5++]=r9,r9=e,r7=n}function lu(e,n,t){le[ln++]=lr,le[ln++]=ll,le[ln++]=lt,lt=e;var r=lr;e=ll;var l=32-e9(r)-1;r&=~(1<<l),t+=1;var a=32-e9(n)+l;if(30<a){var u=l-l%5;a=(r&(1<<u)-1).toString(32),r>>=u,l-=u,lr=1<<32-e9(n)+l|t<<l|r,ll=a+e}else lr=1<<a|t<<l|r,ll=e}function lo(e){null!==e.return&&(la(e,1),lu(e,1,0))}function li(e){for(;e===r9;)r9=r6[--r5],r6[r5]=null,r7=r6[--r5],r6[r5]=null;for(;e===lt;)lt=le[--ln],le[ln]=null,ll=le[--ln],le[ln]=null,lr=le[--ln],le[ln]=null}var ls=null,lc=null,lf=!1,ld=null;function lp(e,n){var t=oq(5,null,null,0);t.elementType="DELETED",t.stateNode=n,t.return=e,null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)}function lm(e,n){switch(e.tag){case 5:var t=e.type;return null!==(n=1!==n.nodeType||t.toLowerCase()!==n.nodeName.toLowerCase()?null:n)&&(e.stateNode=n,ls=e,lc=rC(n.firstChild),!0);case 6:return null!==(n=""===e.pendingProps||3!==n.nodeType?null:n)&&(e.stateNode=n,ls=e,lc=null,!0);case 13:return null!==(n=8!==n.nodeType?null:n)&&(t=null!==lt?{id:lr,overflow:ll}:null,e.memoizedState={dehydrated:n,treeContext:t,retryLane:1073741824},(t=oq(18,null,null,0)).stateNode=n,t.return=e,e.child=t,ls=e,lc=null,!0);default:return!1}}function lh(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function lg(e){if(lf){var n=lc;if(n){var t=n;if(!lm(e,n)){if(lh(e))throw Error(f(418));n=rC(t.nextSibling);var r=ls;n&&lm(e,n)?lp(r,t):(e.flags=-4097&e.flags|2,lf=!1,ls=e)}}else{if(lh(e))throw Error(f(418));e.flags=-4097&e.flags|2,lf=!1,ls=e}}}function lv(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ls=e}function ly(e){if(e!==ls)return!1;if(!lf)return lv(e),lf=!0,!1;if((n=3!==e.tag)&&!(n=5!==e.tag)&&(n="head"!==(n=e.type)&&"body"!==n&&!rb(e.type,e.memoizedProps)),n&&(n=lc)){if(lh(e))throw lb(),Error(f(418));for(;n;)lp(e,n),n=rC(n.nextSibling)}if(lv(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(f(317));e:{for(n=0,e=e.nextSibling;e;){if(8===e.nodeType){var n,t=e.data;if("/$"===t){if(0===n){lc=rC(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++}e=e.nextSibling}lc=null}}else lc=ls?rC(e.stateNode.nextSibling):null;return!0}function lb(){for(var e=lc;e;)e=rC(e.nextSibling)}function lk(){lc=ls=null,lf=!1}function lw(e){null===ld?ld=[e]:ld.push(e)}var lS=C.ReactCurrentBatchConfig;function lx(e,n){if(e&&e.defaultProps)for(var t in n=B({},n),e=e.defaultProps)void 0===n[t]&&(n[t]=e[t]);return n}var lE=rA(null),l_=null,lC=null,lP=null;function lN(){lP=lC=l_=null}function lz(e){var n=lE.current;rj(lE),e._currentValue=n}function lT(e,n,t){for(;null!==e;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,null!==r&&(r.childLanes|=n)):null!==r&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function lL(e,n){l_=e,lP=lC=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&n)&&(uu=!0),e.firstContext=null)}function lR(e){var n=e._currentValue;if(lP!==e){if(e={context:e,memoizedValue:n,next:null},null===lC){if(null===l_)throw Error(f(308));lC=e,l_.dependencies={lanes:0,firstContext:e}}else lC=lC.next=e}return n}var lM=null;function lF(e){null===lM?lM=[e]:lM.push(e)}function lO(e,n,t,r){var l=n.interleaved;return null===l?(t.next=t,lF(n)):(t.next=l.next,l.next=t),n.interleaved=t,lD(e,r)}function lD(e,n){e.lanes|=n;var t=e.alternate;for(null!==t&&(t.lanes|=n),t=e,e=e.return;null!==e;)e.childLanes|=n,null!==(t=e.alternate)&&(t.childLanes|=n),t=e,e=e.return;return 3===t.tag?t.stateNode:null}var lI=!1;function lU(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lV(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function l$(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function lA(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&u3)){var l=r.pending;return null===l?n.next=n:(n.next=l.next,l.next=n),r.pending=n,lD(e,t)}return null===(l=r.interleaved)?(n.next=n,lF(r)):(n.next=l.next,l.next=n),r.interleaved=n,lD(e,t)}function lj(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194240&t))){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,ns(e,t)}}function lB(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var l=null,a=null;if(null!==(t=t.firstBaseUpdate)){do{var u={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};null===a?l=a=u:a=a.next=u,t=t.next}while(null!==t);null===a?l=a=n:a=a.next=n}else l=a=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=t;return}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function lH(e,n,t,r){var l=e.updateQueue;lI=!1;var a=l.firstBaseUpdate,u=l.lastBaseUpdate,o=l.shared.pending;if(null!==o){l.shared.pending=null;var i=o,s=i.next;i.next=null,null===u?a=s:u.next=s,u=i;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==u&&(null===o?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=i)}if(null!==a){var f=l.baseState;for(u=0,c=s=i=null,o=a;;){var d=o.lane,p=o.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,h=o;switch(d=n,p=t,h.tag){case 1:if("function"==typeof(m=h.payload)){f=m.call(p,f,d);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(d="function"==typeof(m=h.payload)?m.call(p,f,d):m))break e;f=B({},f,d);break e;case 2:lI=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=l.effects)?l.effects=[o]:d.push(o))}else p={eventTime:p,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(s=c=p,i=f):c=c.next=p,u|=d;if(null===(o=o.next)){if(null===(o=l.shared.pending))break;o=(d=o).next,d.next=null,l.lastBaseUpdate=d,l.shared.pending=null}}if(null===c&&(i=f),l.baseState=i,l.firstBaseUpdate=s,l.lastBaseUpdate=c,null!==(n=l.shared.interleaved)){l=n;do u|=l.lane,l=l.next;while(l!==n)}else null===a&&(l.shared.lanes=0);on|=u,e.lanes=u,e.memoizedState=f}}function lW(e,n,t){if(e=n.effects,n.effects=null,null!==e)for(n=0;n<e.length;n++){var r=e[n],l=r.callback;if(null!==l){if(r.callback=null,r=t,"function"!=typeof l)throw Error(f(191,l));l.call(r)}}}var lQ=(new s.Component).refs;function lq(e,n,t,r){t=null==(t=t(r,n=e.memoizedState))?n:B({},n,t),e.memoizedState=t,0===e.lanes&&(e.updateQueue.baseState=t)}var lK={isMounted:function(e){return!!(e=e._reactInternals)&&eW(e)===e},enqueueSetState:function(e,n,t){e=e._reactInternals;var r=ob(),l=ok(e),a=l$(r,l);a.payload=n,null!=t&&(a.callback=t),null!==(n=lA(e,a,l))&&(ow(n,e,l,r),lj(n,e,l))},enqueueReplaceState:function(e,n,t){e=e._reactInternals;var r=ob(),l=ok(e),a=l$(r,l);a.tag=1,a.payload=n,null!=t&&(a.callback=t),null!==(n=lA(e,a,l))&&(ow(n,e,l,r),lj(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var t=ob(),r=ok(e),l=l$(t,r);l.tag=2,null!=n&&(l.callback=n),null!==(n=lA(e,l,r))&&(ow(n,e,r,t),lj(n,e,r))}};function lY(e,n,t,r,l,a,u){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,u):!n.prototype||!n.prototype.isPureReactComponent||!tI(t,r)||!tI(l,a)}function lX(e,n,t){var r=!1,l=rH,a=n.contextType;return"object"==typeof a&&null!==a?a=lR(a):(l=rY(n)?rq:rW.current,a=(r=null!=(r=n.contextTypes))?rK(e,l):rH),n=new n(t,a),e.memoizedState=null!==n.state&&void 0!==n.state?n.state:null,n.updater=lK,e.stateNode=n,n._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),n}function lG(e,n,t,r){e=n.state,"function"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,r),"function"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,r),n.state!==e&&lK.enqueueReplaceState(n,n.state,null)}function lZ(e,n,t,r){var l=e.stateNode;l.props=t,l.state=e.memoizedState,l.refs=lQ,lU(e);var a=n.contextType;"object"==typeof a&&null!==a?l.context=lR(a):(a=rY(n)?rq:rW.current,l.context=rK(e,a)),l.state=e.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(lq(e,n,a,t),l.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(n=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),n!==l.state&&lK.enqueueReplaceState(l,l.state,null),lH(e,t,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function lJ(e,n,t){if(null!==(e=t.ref)&&"function"!=typeof e&&"object"!=typeof e){if(t._owner){if(t=t._owner){if(1!==t.tag)throw Error(f(309));var r=t.stateNode}if(!r)throw Error(f(147,e));var l=r,a=""+e;return null!==n&&null!==n.ref&&"function"==typeof n.ref&&n.ref._stringRef===a?n.ref:((n=function(e){var n=l.refs;n===lQ&&(n=l.refs={}),null===e?delete n[a]:n[a]=e})._stringRef=a,n)}if("string"!=typeof e)throw Error(f(284));if(!t._owner)throw Error(f(290,e))}return e}function l0(e,n){throw Error(f(31,"[object Object]"===(e=Object.prototype.toString.call(n))?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function l1(e){return(0,e._init)(e._payload)}function l2(e){function n(n,t){if(e){var r=n.deletions;null===r?(n.deletions=[t],n.flags|=16):r.push(t)}}function t(t,r){if(!e)return null;for(;null!==r;)n(t,r),r=r.sibling;return null}function r(e,n){for(e=new Map;null!==n;)null!==n.key?e.set(n.key,n):e.set(n.index,n),n=n.sibling;return e}function l(e,n){return(e=oY(e,n)).index=0,e.sibling=null,e}function a(n,t,r){return(n.index=r,e)?null!==(r=n.alternate)?(r=r.index)<t?(n.flags|=2,t):r:(n.flags|=2,t):(n.flags|=1048576,t)}function u(n){return e&&null===n.alternate&&(n.flags|=2),n}function o(e,n,t,r){return null===n||6!==n.tag?(n=oJ(t,e.mode,r)).return=e:(n=l(n,t)).return=e,n}function i(e,n,t,r){var a=t.type;return a===z?c(e,n,t.props.children,r,t.key):(null!==n&&(n.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===U&&l1(a)===n.type)?(r=l(n,t.props)).ref=lJ(e,n,t):(r=oX(t.type,t.key,t.props,null,e.mode,r)).ref=lJ(e,n,t),r.return=e,r)}function s(e,n,t,r){return null===n||4!==n.tag||n.stateNode.containerInfo!==t.containerInfo||n.stateNode.implementation!==t.implementation?(n=o0(t,e.mode,r)).return=e:(n=l(n,t.children||[])).return=e,n}function c(e,n,t,r,a){return null===n||7!==n.tag?(n=oG(t,e.mode,r,a)).return=e:(n=l(n,t)).return=e,n}function d(e,n,t){if("string"==typeof n&&""!==n||"number"==typeof n)return(n=oJ(""+n,e.mode,t)).return=e,n;if("object"==typeof n&&null!==n){switch(n.$$typeof){case P:return(t=oX(n.type,n.key,n.props,null,e.mode,t)).ref=lJ(e,null,n),t.return=e,t;case N:return(n=o0(n,e.mode,t)).return=e,n;case U:return d(e,(0,n._init)(n._payload),t)}if(el(n)||A(n))return(n=oG(n,e.mode,t,null)).return=e,n;l0(e,n)}return null}function p(e,n,t,r){var l=null!==n?n.key:null;if("string"==typeof t&&""!==t||"number"==typeof t)return null!==l?null:o(e,n,""+t,r);if("object"==typeof t&&null!==t){switch(t.$$typeof){case P:return t.key===l?i(e,n,t,r):null;case N:return t.key===l?s(e,n,t,r):null;case U:return p(e,n,(l=t._init)(t._payload),r)}if(el(t)||A(t))return null!==l?null:c(e,n,t,r,null);l0(e,t)}return null}function m(e,n,t,r,l){if("string"==typeof r&&""!==r||"number"==typeof r)return o(n,e=e.get(t)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case P:return i(n,e=e.get(null===r.key?t:r.key)||null,r,l);case N:return s(n,e=e.get(null===r.key?t:r.key)||null,r,l);case U:return m(e,n,t,(0,r._init)(r._payload),l)}if(el(r)||A(r))return c(n,e=e.get(t)||null,r,l,null);l0(n,r)}return null}return function o(i,s,c,h){if("object"==typeof c&&null!==c&&c.type===z&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case P:e:{for(var g=c.key,v=s;null!==v;){if(v.key===g){if((g=c.type)===z){if(7===v.tag){t(i,v.sibling),(s=l(v,c.props.children)).return=i,i=s;break e}}else if(v.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===U&&l1(g)===v.type){t(i,v.sibling),(s=l(v,c.props)).ref=lJ(i,v,c),s.return=i,i=s;break e}t(i,v);break}n(i,v),v=v.sibling}c.type===z?((s=oG(c.props.children,i.mode,h,c.key)).return=i,i=s):((h=oX(c.type,c.key,c.props,null,i.mode,h)).ref=lJ(i,s,c),h.return=i,i=h)}return u(i);case N:e:{for(v=c.key;null!==s;){if(s.key===v){if(4===s.tag&&s.stateNode.containerInfo===c.containerInfo&&s.stateNode.implementation===c.implementation){t(i,s.sibling),(s=l(s,c.children||[])).return=i,i=s;break e}t(i,s);break}n(i,s),s=s.sibling}(s=o0(c,i.mode,h)).return=i,i=s}return u(i);case U:return o(i,s,(v=c._init)(c._payload),h)}if(el(c))return function(l,u,o,i){for(var s=null,c=null,f=u,h=u=0,g=null;null!==f&&h<o.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var v=p(l,f,o[h],i);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&n(l,f),u=a(v,u,h),null===c?s=v:c.sibling=v,c=v,f=g}if(h===o.length)return t(l,f),lf&&la(l,h),s;if(null===f){for(;h<o.length;h++)null!==(f=d(l,o[h],i))&&(u=a(f,u,h),null===c?s=f:c.sibling=f,c=f);return lf&&la(l,h),s}for(f=r(l,f);h<o.length;h++)null!==(g=m(f,l,h,o[h],i))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),u=a(g,u,h),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach(function(e){return n(l,e)}),lf&&la(l,h),s}(i,s,c,h);if(A(c))return function(l,u,o,i){var s=A(o);if("function"!=typeof s)throw Error(f(150));if(null==(o=s.call(o)))throw Error(f(151));for(var c=s=null,h=u,g=u=0,v=null,y=o.next();null!==h&&!y.done;g++,y=o.next()){h.index>g?(v=h,h=null):v=h.sibling;var b=p(l,h,y.value,i);if(null===b){null===h&&(h=v);break}e&&h&&null===b.alternate&&n(l,h),u=a(b,u,g),null===c?s=b:c.sibling=b,c=b,h=v}if(y.done)return t(l,h),lf&&la(l,g),s;if(null===h){for(;!y.done;g++,y=o.next())null!==(y=d(l,y.value,i))&&(u=a(y,u,g),null===c?s=y:c.sibling=y,c=y);return lf&&la(l,g),s}for(h=r(l,h);!y.done;g++,y=o.next())null!==(y=m(h,l,g,y.value,i))&&(e&&null!==y.alternate&&h.delete(null===y.key?g:y.key),u=a(y,u,g),null===c?s=y:c.sibling=y,c=y);return e&&h.forEach(function(e){return n(l,e)}),lf&&la(l,g),s}(i,s,c,h);l0(i,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==s&&6===s.tag?(t(i,s.sibling),(s=l(s,c)).return=i):(t(i,s),(s=oJ(c,i.mode,h)).return=i),u(i=s)):t(i,s)}}var l3=l2(!0),l4=l2(!1),l8={},l6=rA(l8),l5=rA(l8),l9=rA(l8);function l7(e){if(e===l8)throw Error(f(174));return e}function ae(e,n){switch(rB(l9,n),rB(l5,e),rB(l6,l8),e=n.nodeType){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ef(null,"");break;default:n=ef(n=(e=8===e?n.parentNode:n).namespaceURI||null,e=e.tagName)}rj(l6),rB(l6,n)}function an(){rj(l6),rj(l5),rj(l9)}function at(e){l7(l9.current);var n=l7(l6.current),t=ef(n,e.type);n!==t&&(rB(l5,e),rB(l6,t))}function ar(e){l5.current===e&&(rj(l6),rj(l5))}var al=rA(0);function aa(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||"$?"===t.data||"$!"===t.data))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(128&n.flags))return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var au=[];function ao(){for(var e=0;e<au.length;e++)au[e]._workInProgressVersionPrimary=null;au.length=0}var ai=C.ReactCurrentDispatcher,as=C.ReactCurrentBatchConfig,ac=0,af=null,ad=null,ap=null,am=!1,ah=!1,ag=0,av=0;function ay(){throw Error(f(321))}function ab(e,n){if(null===n)return!1;for(var t=0;t<n.length&&t<e.length;t++)if(!tD(e[t],n[t]))return!1;return!0}function ak(e,n,t,r,l,a){if(ac=a,af=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ai.current=null===e||null===e.memoizedState?a3:a4,e=t(r,l),ah){a=0;do{if(ah=!1,ag=0,25<=a)throw Error(f(301));a+=1,ap=ad=null,n.updateQueue=null,ai.current=a8,e=t(r,l)}while(ah)}if(ai.current=a2,n=null!==ad&&null!==ad.next,ac=0,ap=ad=af=null,am=!1,n)throw Error(f(300));return e}function aw(){var e=0!==ag;return ag=0,e}function aS(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ap?af.memoizedState=ap=e:ap=ap.next=e,ap}function ax(){if(null===ad){var e=af.alternate;e=null!==e?e.memoizedState:null}else e=ad.next;var n=null===ap?af.memoizedState:ap.next;if(null!==n)ap=n,ad=e;else{if(null===e)throw Error(f(310));e={memoizedState:(ad=e).memoizedState,baseState:ad.baseState,baseQueue:ad.baseQueue,queue:ad.queue,next:null},null===ap?af.memoizedState=ap=e:ap=ap.next=e}return ap}function aE(e,n){return"function"==typeof n?n(e):n}function a_(e){var n=ax(),t=n.queue;if(null===t)throw Error(f(311));t.lastRenderedReducer=e;var r=ad,l=r.baseQueue,a=t.pending;if(null!==a){if(null!==l){var u=l.next;l.next=a.next,a.next=u}r.baseQueue=l=a,t.pending=null}if(null!==l){a=l.next,r=r.baseState;var o=u=null,i=null,s=a;do{var c=s.lane;if((ac&c)===c)null!==i&&(i=i.next={lane:0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),r=s.hasEagerState?s.eagerState:e(r,s.action);else{var d={lane:c,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null};null===i?(o=i=d,u=r):i=i.next=d,af.lanes|=c,on|=c}s=s.next}while(null!==s&&s!==a);null===i?u=r:i.next=o,tD(r,n.memoizedState)||(uu=!0),n.memoizedState=r,n.baseState=u,n.baseQueue=i,t.lastRenderedState=r}if(null!==(e=t.interleaved)){l=e;do a=l.lane,af.lanes|=a,on|=a,l=l.next;while(l!==e)}else null===l&&(t.lanes=0);return[n.memoizedState,t.dispatch]}function aC(e){var n=ax(),t=n.queue;if(null===t)throw Error(f(311));t.lastRenderedReducer=e;var r=t.dispatch,l=t.pending,a=n.memoizedState;if(null!==l){t.pending=null;var u=l=l.next;do a=e(a,u.action),u=u.next;while(u!==l);tD(a,n.memoizedState)||(uu=!0),n.memoizedState=a,null===n.baseQueue&&(n.baseState=a),t.lastRenderedState=a}return[a,r]}function aP(){}function aN(e,n){var t=af,r=ax(),l=n(),a=!tD(r.memoizedState,l);if(a&&(r.memoizedState=l,uu=!0),r=r.queue,a$(aL.bind(null,t,r,e),[e]),r.getSnapshot!==n||a||null!==ap&&1&ap.memoizedState.tag){if(t.flags|=2048,aO(9,aT.bind(null,t,r,l,n),void 0,null),null===u4)throw Error(f(349));0!=(30&ac)||az(t,n,l)}return l}function az(e,n,t){e.flags|=16384,e={getSnapshot:n,value:t},null===(n=af.updateQueue)?(n={lastEffect:null,stores:null},af.updateQueue=n,n.stores=[e]):null===(t=n.stores)?n.stores=[e]:t.push(e)}function aT(e,n,t,r){n.value=t,n.getSnapshot=r,aR(n)&&aM(e)}function aL(e,n,t){return t(function(){aR(n)&&aM(e)})}function aR(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!tD(e,t)}catch(e){return!0}}function aM(e){var n=lD(e,1);null!==n&&ow(n,e,1,-1)}function aF(e){var n=aS();return"function"==typeof e&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:aE,lastRenderedState:e},n.queue=e,e=e.dispatch=aZ.bind(null,af,e),[n.memoizedState,e]}function aO(e,n,t,r){return e={tag:e,create:n,destroy:t,deps:r,next:null},null===(n=af.updateQueue)?(n={lastEffect:null,stores:null},af.updateQueue=n,n.lastEffect=e.next=e):null===(t=n.lastEffect)?n.lastEffect=e.next=e:(r=t.next,t.next=e,e.next=r,n.lastEffect=e),e}function aD(){return ax().memoizedState}function aI(e,n,t,r){var l=aS();af.flags|=e,l.memoizedState=aO(1|n,t,void 0,void 0===r?null:r)}function aU(e,n,t,r){var l=ax();r=void 0===r?null:r;var a=void 0;if(null!==ad){var u=ad.memoizedState;if(a=u.destroy,null!==r&&ab(r,u.deps)){l.memoizedState=aO(n,t,a,r);return}}af.flags|=e,l.memoizedState=aO(1|n,t,a,r)}function aV(e,n){return aI(8390656,8,e,n)}function a$(e,n){return aU(2048,8,e,n)}function aA(e,n){return aU(4,2,e,n)}function aj(e,n){return aU(4,4,e,n)}function aB(e,n){return"function"==typeof n?(n(e=e()),function(){n(null)}):null!=n?(e=e(),n.current=e,function(){n.current=null}):void 0}function aH(e,n,t){return t=null!=t?t.concat([e]):null,aU(4,4,aB.bind(null,n,e),t)}function aW(){}function aQ(e,n){var t=ax();n=void 0===n?null:n;var r=t.memoizedState;return null!==r&&null!==n&&ab(n,r[1])?r[0]:(t.memoizedState=[e,n],e)}function aq(e,n){var t=ax();n=void 0===n?null:n;var r=t.memoizedState;return null!==r&&null!==n&&ab(n,r[1])?r[0]:(e=e(),t.memoizedState=[e,n],e)}function aK(e,n,t){return 0==(21&ac)?(e.baseState&&(e.baseState=!1,uu=!0),e.memoizedState=t):(tD(t,n)||(t=nu(),af.lanes|=t,on|=t,e.baseState=!0),n)}function aY(e,n){var t=nc;nc=0!==t&&4>t?t:4,e(!0);var r=as.transition;as.transition={};try{e(!1),n()}finally{nc=t,as.transition=r}}function aX(){return ax().memoizedState}function aG(e,n,t){var r=ok(e);t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},aJ(e)?a0(n,t):null!==(t=lO(e,n,t,r))&&(ow(t,e,r,ob()),a1(t,n,r))}function aZ(e,n,t){var r=ok(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(aJ(e))a0(n,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=n.lastRenderedReducer))try{var u=n.lastRenderedState,o=a(u,t);if(l.hasEagerState=!0,l.eagerState=o,tD(o,u)){var i=n.interleaved;null===i?(l.next=l,lF(n)):(l.next=i.next,i.next=l),n.interleaved=l;return}}catch(e){}finally{}null!==(t=lO(e,n,l,r))&&(ow(t,e,r,l=ob()),a1(t,n,r))}}function aJ(e){var n=e.alternate;return e===af||null!==n&&n===af}function a0(e,n){ah=am=!0;var t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function a1(e,n,t){if(0!=(4194240&t)){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,ns(e,t)}}var a2={readContext:lR,useCallback:ay,useContext:ay,useEffect:ay,useImperativeHandle:ay,useInsertionEffect:ay,useLayoutEffect:ay,useMemo:ay,useReducer:ay,useRef:ay,useState:ay,useDebugValue:ay,useDeferredValue:ay,useTransition:ay,useMutableSource:ay,useSyncExternalStore:ay,useId:ay,unstable_isNewReconciler:!1},a3={readContext:lR,useCallback:function(e,n){return aS().memoizedState=[e,void 0===n?null:n],e},useContext:lR,useEffect:aV,useImperativeHandle:function(e,n,t){return t=null!=t?t.concat([e]):null,aI(4194308,4,aB.bind(null,n,e),t)},useLayoutEffect:function(e,n){return aI(4194308,4,e,n)},useInsertionEffect:function(e,n){return aI(4,2,e,n)},useMemo:function(e,n){var t=aS();return n=void 0===n?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=aS();return n=void 0!==t?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=aG.bind(null,af,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},aS().memoizedState=e},useState:aF,useDebugValue:aW,useDeferredValue:function(e){return aS().memoizedState=e},useTransition:function(){var e=aF(!1),n=e[0];return e=aY.bind(null,e[1]),aS().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=af,l=aS();if(lf){if(void 0===t)throw Error(f(407));t=t()}else{if(t=n(),null===u4)throw Error(f(349));0!=(30&ac)||az(r,n,t)}l.memoizedState=t;var a={value:t,getSnapshot:n};return l.queue=a,aV(aL.bind(null,r,a,e),[e]),r.flags|=2048,aO(9,aT.bind(null,r,a,t,n),void 0,null),t},useId:function(){var e=aS(),n=u4.identifierPrefix;if(lf){var t=ll,r=lr;n=":"+n+"R"+(t=(r&~(1<<32-e9(r)-1)).toString(32)+t),0<(t=ag++)&&(n+="H"+t.toString(32)),n+=":"}else n=":"+n+"r"+(t=av++).toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},a4={readContext:lR,useCallback:aQ,useContext:lR,useEffect:a$,useImperativeHandle:aH,useInsertionEffect:aA,useLayoutEffect:aj,useMemo:aq,useReducer:a_,useRef:aD,useState:function(){return a_(aE)},useDebugValue:aW,useDeferredValue:function(e){return aK(ax(),ad.memoizedState,e)},useTransition:function(){return[a_(aE)[0],ax().memoizedState]},useMutableSource:aP,useSyncExternalStore:aN,useId:aX,unstable_isNewReconciler:!1},a8={readContext:lR,useCallback:aQ,useContext:lR,useEffect:a$,useImperativeHandle:aH,useInsertionEffect:aA,useLayoutEffect:aj,useMemo:aq,useReducer:aC,useRef:aD,useState:function(){return aC(aE)},useDebugValue:aW,useDeferredValue:function(e){var n=ax();return null===ad?n.memoizedState=e:aK(n,ad.memoizedState,e)},useTransition:function(){return[aC(aE)[0],ax().memoizedState]},useMutableSource:aP,useSyncExternalStore:aN,useId:aX,unstable_isNewReconciler:!1};function a6(e,n){try{var t="",r=n;do t+=function(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=Q(e.type,!1);case 11:return e=Q(e.type.render,!1);case 1:return e=Q(e.type,!0);default:return""}}(r),r=r.return;while(r);var l=t}catch(e){l="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:n,stack:l,digest:null}}function a5(e,n,t){return{value:e,source:null,stack:null!=t?t:null,digest:null!=n?n:null}}function a9(e,n){try{console.error(n.value)}catch(e){setTimeout(function(){throw e})}}var a7="function"==typeof WeakMap?WeakMap:Map;function ue(e,n,t){(t=l$(-1,t)).tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){os||(os=!0,oc=r),a9(e,n)},t}function un(e,n,t){(t=l$(-1,t)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=n.value;t.payload=function(){return r(l)},t.callback=function(){a9(e,n)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(t.callback=function(){a9(e,n),"function"!=typeof r&&(null===of?of=new Set([this]):of.add(this));var t=n.stack;this.componentDidCatch(n.value,{componentStack:null!==t?t:""})}),t}function ut(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new a7;var l=new Set;r.set(n,l)}else void 0===(l=r.get(n))&&(l=new Set,r.set(n,l));l.has(t)||(l.add(t),e=oj.bind(null,e,n,t),n.then(e,e))}function ur(e){do{var n;if((n=13===e.tag)&&(n=null===(n=e.memoizedState)||null!==n.dehydrated),n)return e;e=e.return}while(null!==e);return null}function ul(e,n,t,r,l){return 0==(1&e.mode)?e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,1===t.tag&&(null===t.alternate?t.tag=17:((n=l$(-1,1)).tag=2,lA(t,n,1))),t.lanes|=1):(e.flags|=65536,e.lanes=l),e}var ua=C.ReactCurrentOwner,uu=!1;function uo(e,n,t,r){n.child=null===e?l4(n,null,t,r):l3(n,e.child,t,r)}function ui(e,n,t,r,l){t=t.render;var a=n.ref;return(lL(n,l),r=ak(e,n,t,r,a,l),t=aw(),null===e||uu)?(lf&&t&&lo(n),n.flags|=1,uo(e,n,r,l),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,uP(e,n,l))}function us(e,n,t,r,l){if(null===e){var a=t.type;return"function"!=typeof a||oK(a)||void 0!==a.defaultProps||null!==t.compare||void 0!==t.defaultProps?((e=oX(t.type,null,r,n,n.mode,l)).ref=n.ref,e.return=n,n.child=e):(n.tag=15,n.type=a,uc(e,n,a,r,l))}if(a=e.child,0==(e.lanes&l)){var u=a.memoizedProps;if((t=null!==(t=t.compare)?t:tI)(u,r)&&e.ref===n.ref)return uP(e,n,l)}return n.flags|=1,(e=oY(a,r)).ref=n.ref,e.return=n,n.child=e}function uc(e,n,t,r,l){if(null!==e){var a=e.memoizedProps;if(tI(a,r)&&e.ref===n.ref){if(uu=!1,n.pendingProps=r=a,0==(e.lanes&l))return n.lanes=e.lanes,uP(e,n,l);0!=(131072&e.flags)&&(uu=!0)}}return up(e,n,t,r,l)}function uf(e,n,t){var r=n.pendingProps,l=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode){if(0==(1&n.mode))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},rB(u9,u5),u5|=t;else{if(0==(1073741824&t))return e=null!==a?a.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,rB(u9,u5),u5|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:t,rB(u9,u5),u5|=r}}else null!==a?(r=a.baseLanes|t,n.memoizedState=null):r=t,rB(u9,u5),u5|=r;return uo(e,n,l,t),n.child}function ud(e,n){var t=n.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function up(e,n,t,r,l){var a=rY(t)?rq:rW.current;return(a=rK(n,a),lL(n,l),t=ak(e,n,t,r,a,l),r=aw(),null===e||uu)?(lf&&r&&lo(n),n.flags|=1,uo(e,n,t,l),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,uP(e,n,l))}function um(e,n,t,r,l){if(rY(t)){var a=!0;rJ(n)}else a=!1;if(lL(n,l),null===n.stateNode)uC(e,n),lX(n,t,r),lZ(n,t,r,l),r=!0;else if(null===e){var u=n.stateNode,o=n.memoizedProps;u.props=o;var i=u.context,s=t.contextType;s="object"==typeof s&&null!==s?lR(s):rK(n,s=rY(t)?rq:rW.current);var c=t.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof u.getSnapshotBeforeUpdate;f||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(o!==r||i!==s)&&lG(n,u,r,s),lI=!1;var d=n.memoizedState;u.state=d,lH(n,r,u,l),i=n.memoizedState,o!==r||d!==i||rQ.current||lI?("function"==typeof c&&(lq(n,t,c,r),i=n.memoizedState),(o=lI||lY(n,t,o,r,d,i,s))?(f||"function"!=typeof u.UNSAFE_componentWillMount&&"function"!=typeof u.componentWillMount||("function"==typeof u.componentWillMount&&u.componentWillMount(),"function"==typeof u.UNSAFE_componentWillMount&&u.UNSAFE_componentWillMount()),"function"==typeof u.componentDidMount&&(n.flags|=4194308)):("function"==typeof u.componentDidMount&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=i),u.props=r,u.state=i,u.context=s,r=o):("function"==typeof u.componentDidMount&&(n.flags|=4194308),r=!1)}else{u=n.stateNode,lV(e,n),o=n.memoizedProps,s=n.type===n.elementType?o:lx(n.type,o),u.props=s,f=n.pendingProps,d=u.context,i="object"==typeof(i=t.contextType)&&null!==i?lR(i):rK(n,i=rY(t)?rq:rW.current);var p=t.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof u.getSnapshotBeforeUpdate)||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(o!==f||d!==i)&&lG(n,u,r,i),lI=!1,d=n.memoizedState,u.state=d,lH(n,r,u,l);var m=n.memoizedState;o!==f||d!==m||rQ.current||lI?("function"==typeof p&&(lq(n,t,p,r),m=n.memoizedState),(s=lI||lY(n,t,s,r,d,m,i)||!1)?(c||"function"!=typeof u.UNSAFE_componentWillUpdate&&"function"!=typeof u.componentWillUpdate||("function"==typeof u.componentWillUpdate&&u.componentWillUpdate(r,m,i),"function"==typeof u.UNSAFE_componentWillUpdate&&u.UNSAFE_componentWillUpdate(r,m,i)),"function"==typeof u.componentDidUpdate&&(n.flags|=4),"function"==typeof u.getSnapshotBeforeUpdate&&(n.flags|=1024)):("function"!=typeof u.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=4),"function"!=typeof u.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=m),u.props=r,u.state=m,u.context=i,r=s):("function"!=typeof u.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=4),"function"!=typeof u.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=1024),r=!1)}return uh(e,n,t,r,a,l)}function uh(e,n,t,r,l,a){ud(e,n);var u=0!=(128&n.flags);if(!r&&!u)return l&&r0(n,t,!1),uP(e,n,a);r=n.stateNode,ua.current=n;var o=u&&"function"!=typeof t.getDerivedStateFromError?null:r.render();return n.flags|=1,null!==e&&u?(n.child=l3(n,e.child,null,a),n.child=l3(n,null,o,a)):uo(e,n,o,a),n.memoizedState=r.state,l&&r0(n,t,!0),n.child}function ug(e){var n=e.stateNode;n.pendingContext?rG(e,n.pendingContext,n.pendingContext!==n.context):n.context&&rG(e,n.context,!1),ae(e,n.containerInfo)}function uv(e,n,t,r,l){return lk(),lw(l),n.flags|=256,uo(e,n,t,r),n.child}var uy={dehydrated:null,treeContext:null,retryLane:0};function ub(e){return{baseLanes:e,cachePool:null,transitions:null}}function uk(e,n,t){var r,l=n.pendingProps,a=al.current,u=!1,o=0!=(128&n.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(u=!0,n.flags&=-129):(null===e||null!==e.memoizedState)&&(a|=1),rB(al,1&a),null===e)return(lg(n),null!==(e=n.memoizedState)&&null!==(e=e.dehydrated))?(0==(1&n.mode)?n.lanes=1:"$!"===e.data?n.lanes=8:n.lanes=1073741824,null):(o=l.children,e=l.fallback,u?(l=n.mode,u=n.child,o={mode:"hidden",children:o},0==(1&l)&&null!==u?(u.childLanes=0,u.pendingProps=o):u=oZ(o,l,0,null),e=oG(e,l,t,null),u.return=n,e.return=n,u.sibling=e,n.child=u,n.child.memoizedState=ub(t),n.memoizedState=uy,e):uw(n,o));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,n,t,r,l,a,u){if(t)return 256&n.flags?(n.flags&=-257,uS(e,n,u,r=a5(Error(f(422))))):null!==n.memoizedState?(n.child=e.child,n.flags|=128,null):(a=r.fallback,l=n.mode,r=oZ({mode:"visible",children:r.children},l,0,null),a=oG(a,l,u,null),a.flags|=2,r.return=n,a.return=n,r.sibling=a,n.child=r,0!=(1&n.mode)&&l3(n,e.child,null,u),n.child.memoizedState=ub(u),n.memoizedState=uy,a);if(0==(1&n.mode))return uS(e,n,u,null);if("$!"===l.data){if(r=l.nextSibling&&l.nextSibling.dataset)var o=r.dgst;return r=o,uS(e,n,u,r=a5(a=Error(f(419)),r,void 0))}if(o=0!=(u&e.childLanes),uu||o){if(null!==(r=u4)){switch(u&-u){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}0!==(l=0!=(l&(r.suspendedLanes|u))?0:l)&&l!==a.retryLane&&(a.retryLane=l,lD(e,l),ow(r,e,l,-1))}return oF(),uS(e,n,u,r=a5(Error(f(421))))}return"$?"===l.data?(n.flags|=128,n.child=e.child,n=oH.bind(null,e),l._reactRetry=n,null):(e=a.treeContext,lc=rC(l.nextSibling),ls=n,lf=!0,ld=null,null!==e&&(le[ln++]=lr,le[ln++]=ll,le[ln++]=lt,lr=e.id,ll=e.overflow,lt=n),n=uw(n,r.children),n.flags|=4096,n)}(e,n,o,l,r,a,t);if(u){u=l.fallback,o=n.mode,r=(a=e.child).sibling;var i={mode:"hidden",children:l.children};return 0==(1&o)&&n.child!==a?((l=n.child).childLanes=0,l.pendingProps=i,n.deletions=null):(l=oY(a,i)).subtreeFlags=14680064&a.subtreeFlags,null!==r?u=oY(r,u):(u=oG(u,o,t,null),u.flags|=2),u.return=n,l.return=n,l.sibling=u,n.child=l,l=u,u=n.child,o=null===(o=e.child.memoizedState)?ub(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},u.memoizedState=o,u.childLanes=e.childLanes&~t,n.memoizedState=uy,l}return e=(u=e.child).sibling,l=oY(u,{mode:"visible",children:l.children}),0==(1&n.mode)&&(l.lanes=t),l.return=n,l.sibling=null,null!==e&&(null===(t=n.deletions)?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=l,n.memoizedState=null,l}function uw(e,n){return(n=oZ({mode:"visible",children:n},e.mode,0,null)).return=e,e.child=n}function uS(e,n,t,r){return null!==r&&lw(r),l3(n,e.child,null,t),e=uw(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ux(e,n,t){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n),lT(e.return,n,t)}function uE(e,n,t,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(a.isBackwards=n,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=t,a.tailMode=l)}function u_(e,n,t){var r=n.pendingProps,l=r.revealOrder,a=r.tail;if(uo(e,n,r.children,t),0!=(2&(r=al.current)))r=1&r|2,n.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=n.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ux(e,t,n);else if(19===e.tag)ux(e,t,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(rB(al,r),0==(1&n.mode))n.memoizedState=null;else switch(l){case"forwards":for(l=null,t=n.child;null!==t;)null!==(e=t.alternate)&&null===aa(e)&&(l=t),t=t.sibling;null===(t=l)?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),uE(n,!1,l,t,a);break;case"backwards":for(t=null,l=n.child,n.child=null;null!==l;){if(null!==(e=l.alternate)&&null===aa(e)){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}uE(n,!0,t,null,a);break;case"together":uE(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function uC(e,n){0==(1&n.mode)&&null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2)}function uP(e,n,t){if(null!==e&&(n.dependencies=e.dependencies),on|=n.lanes,0==(t&n.childLanes))return null;if(null!==e&&n.child!==e.child)throw Error(f(153));if(null!==n.child){for(t=oY(e=n.child,e.pendingProps),n.child=t,t.return=n;null!==e.sibling;)e=e.sibling,(t=t.sibling=oY(e,e.pendingProps)).return=n;t.sibling=null}return n.child}function uN(e,n){if(!lf)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?n||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function uz(e){var n=null!==e.alternate&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;null!==l;)t|=l.lanes|l.childLanes,r|=14680064&l.subtreeFlags,r|=14680064&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}l=function(e,n){for(var t=n.child;null!==t;){if(5===t.tag||6===t.tag)e.appendChild(t.stateNode);else if(4!==t.tag&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},a=function(){},u=function(e,n,t,r){var l=e.memoizedProps;if(l!==r){e=n.stateNode,l7(l6.current);var a,u=null;switch(t){case"input":l=Z(e,l),r=Z(e,r),u=[];break;case"select":l=B({},l,{value:void 0}),r=B({},r,{value:void 0}),u=[];break;case"textarea":l=eu(e,l),r=eu(e,r),u=[];break;default:"function"!=typeof l.onClick&&"function"==typeof r.onClick&&(e.onclick=rg)}for(s in ew(t,r),t=null,l)if(!r.hasOwnProperty(s)&&l.hasOwnProperty(s)&&null!=l[s]){if("style"===s){var o=l[s];for(a in o)o.hasOwnProperty(a)&&(t||(t={}),t[a]="")}else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(p.hasOwnProperty(s)?u||(u=[]):(u=u||[]).push(s,null))}for(s in r){var i=r[s];if(o=null!=l?l[s]:void 0,r.hasOwnProperty(s)&&i!==o&&(null!=i||null!=o)){if("style"===s){if(o){for(a in o)!o.hasOwnProperty(a)||i&&i.hasOwnProperty(a)||(t||(t={}),t[a]="");for(a in i)i.hasOwnProperty(a)&&o[a]!==i[a]&&(t||(t={}),t[a]=i[a])}else t||(u||(u=[]),u.push(s,t)),t=i}else"dangerouslySetInnerHTML"===s?(i=i?i.__html:void 0,o=o?o.__html:void 0,null!=i&&o!==i&&(u=u||[]).push(s,i)):"children"===s?"string"!=typeof i&&"number"!=typeof i||(u=u||[]).push(s,""+i):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(p.hasOwnProperty(s)?(null!=i&&"onScroll"===s&&rt("scroll",e),u||o===i||(u=[])):(u=u||[]).push(s,i))}}t&&(u=u||[]).push("style",t);var s=u;(n.updateQueue=s)&&(n.flags|=4)}},o=function(e,n,t,r){t!==r&&(n.flags|=4)};var uT=!1,uL=!1,uR="function"==typeof WeakSet?WeakSet:Set,uM=null;function uF(e,n){var t=e.ref;if(null!==t){if("function"==typeof t)try{t(null)}catch(t){oA(e,n,t)}else t.current=null}}function uO(e,n,t){try{t()}catch(t){oA(e,n,t)}}var uD=!1;function uI(e,n,t){var r=n.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,void 0!==a&&uO(n,t,a)}l=l.next}while(l!==r)}}function uU(e,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function uV(e){var n=e.ref;if(null!==n){var t=e.stateNode;e.tag,e=t,"function"==typeof n?n(e):n.current=e}}function u$(e){return 5===e.tag||3===e.tag||4===e.tag}function uA(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||u$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags||null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}var uj=null,uB=!1;function uH(e,n,t){for(t=t.child;null!==t;)uW(e,n,t),t=t.sibling}function uW(e,n,t){if(e5&&"function"==typeof e5.onCommitFiberUnmount)try{e5.onCommitFiberUnmount(e6,t)}catch(e){}switch(t.tag){case 5:uL||uF(t,n);case 6:var r=uj,l=uB;uj=null,uH(e,n,t),uj=r,uB=l,null!==uj&&(uB?(e=uj,t=t.stateNode,8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)):uj.removeChild(t.stateNode));break;case 18:null!==uj&&(uB?(e=uj,t=t.stateNode,8===e.nodeType?r_(e.parentNode,t):1===e.nodeType&&r_(e,t),nM(e)):r_(uj,t.stateNode));break;case 4:r=uj,l=uB,uj=t.stateNode.containerInfo,uB=!0,uH(e,n,t),uj=r,uB=l;break;case 0:case 11:case 14:case 15:if(!uL&&null!==(r=t.updateQueue)&&null!==(r=r.lastEffect)){l=r=r.next;do{var a=l,u=a.destroy;a=a.tag,void 0!==u&&(0!=(2&a)?uO(t,n,u):0!=(4&a)&&uO(t,n,u)),l=l.next}while(l!==r)}uH(e,n,t);break;case 1:if(!uL&&(uF(t,n),"function"==typeof(r=t.stateNode).componentWillUnmount))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(e){oA(t,n,e)}uH(e,n,t);break;case 21:default:uH(e,n,t);break;case 22:1&t.mode?(uL=(r=uL)||null!==t.memoizedState,uH(e,n,t),uL=r):uH(e,n,t)}}function uQ(e){var n=e.updateQueue;if(null!==n){e.updateQueue=null;var t=e.stateNode;null===t&&(t=e.stateNode=new uR),n.forEach(function(n){var r=oW.bind(null,e,n);t.has(n)||(t.add(n),n.then(r,r))})}}function uq(e,n){var t=n.deletions;if(null!==t)for(var r=0;r<t.length;r++){var l=t[r];try{var a=n,u=a;e:for(;null!==u;){switch(u.tag){case 5:uj=u.stateNode,uB=!1;break e;case 3:case 4:uj=u.stateNode.containerInfo,uB=!0;break e}u=u.return}if(null===uj)throw Error(f(160));uW(e,a,l),uj=null,uB=!1;var o=l.alternate;null!==o&&(o.return=null),l.return=null}catch(e){oA(l,n,e)}}if(12854&n.subtreeFlags)for(n=n.child;null!==n;)uK(n,e),n=n.sibling}function uK(e,n){var t=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(uq(n,e),uY(e),4&r){try{uI(3,e,e.return),uU(3,e)}catch(n){oA(e,e.return,n)}try{uI(5,e,e.return)}catch(n){oA(e,e.return,n)}}break;case 1:uq(n,e),uY(e),512&r&&null!==t&&uF(t,t.return);break;case 5:if(uq(n,e),uY(e),512&r&&null!==t&&uF(t,t.return),32&e.flags){var l=e.stateNode;try{eh(l,"")}catch(n){oA(e,e.return,n)}}if(4&r&&null!=(l=e.stateNode)){var a=e.memoizedProps,u=null!==t?t.memoizedProps:a,o=e.type,i=e.updateQueue;if(e.updateQueue=null,null!==i)try{"input"===o&&"radio"===a.type&&null!=a.name&&ee(l,a),eS(o,u);var s=eS(o,a);for(u=0;u<i.length;u+=2){var c=i[u],d=i[u+1];"style"===c?eb(l,d):"dangerouslySetInnerHTML"===c?em(l,d):"children"===c?eh(l,d):_(l,c,d,s)}switch(o){case"input":en(l,a);break;case"textarea":ei(l,a);break;case"select":var p=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!a.multiple;var m=a.value;null!=m?ea(l,!!a.multiple,m,!1):!!a.multiple!==p&&(null!=a.defaultValue?ea(l,!!a.multiple,a.defaultValue,!0):ea(l,!!a.multiple,a.multiple?[]:"",!1))}l[rT]=a}catch(n){oA(e,e.return,n)}}break;case 6:if(uq(n,e),uY(e),4&r){if(null===e.stateNode)throw Error(f(162));l=e.stateNode,a=e.memoizedProps;try{l.nodeValue=a}catch(n){oA(e,e.return,n)}}break;case 3:if(uq(n,e),uY(e),4&r&&null!==t&&t.memoizedState.isDehydrated)try{nM(n.containerInfo)}catch(n){oA(e,e.return,n)}break;case 4:default:uq(n,e),uY(e);break;case 13:uq(n,e),uY(e),8192&(l=e.child).flags&&(a=null!==l.memoizedState,l.stateNode.isHidden=a,a&&(null===l.alternate||null===l.alternate.memoizedState)&&(ou=eJ())),4&r&&uQ(e);break;case 22:if(c=null!==t&&null!==t.memoizedState,1&e.mode?(uL=(s=uL)||c,uq(n,e),uL=s):uq(n,e),uY(e),8192&r){if(s=null!==e.memoizedState,(e.stateNode.isHidden=s)&&!c&&0!=(1&e.mode))for(uM=e,c=e.child;null!==c;){for(d=uM=c;null!==uM;){switch(m=(p=uM).child,p.tag){case 0:case 11:case 14:case 15:uI(4,p,p.return);break;case 1:uF(p,p.return);var h=p.stateNode;if("function"==typeof h.componentWillUnmount){r=p,t=p.return;try{n=r,h.props=n.memoizedProps,h.state=n.memoizedState,h.componentWillUnmount()}catch(e){oA(r,t,e)}}break;case 5:uF(p,p.return);break;case 22:if(null!==p.memoizedState){uG(d);continue}}null!==m?(m.return=p,uM=m):uG(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{l=d.stateNode,s?(a=l.style,"function"==typeof a.setProperty?a.setProperty("display","none","important"):a.display="none"):(o=d.stateNode,u=null!=(i=d.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=ey("display",u))}catch(n){oA(e,e.return,n)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=s?"":d.memoizedProps}catch(n){oA(e,e.return,n)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:uq(n,e),uY(e),4&r&&uQ(e);case 21:}}function uY(e){var n=e.flags;if(2&n){try{e:{for(var t=e.return;null!==t;){if(u$(t)){var r=t;break e}t=t.return}throw Error(f(160))}switch(r.tag){case 5:var l=r.stateNode;32&r.flags&&(eh(l,""),r.flags&=-33);var a=uA(e);!function e(n,t,r){var l=n.tag;if(5===l||6===l)n=n.stateNode,t?r.insertBefore(n,t):r.appendChild(n);else if(4!==l&&null!==(n=n.child))for(e(n,t,r),n=n.sibling;null!==n;)e(n,t,r),n=n.sibling}(e,a,l);break;case 3:case 4:var u=r.stateNode.containerInfo,o=uA(e);!function e(n,t,r){var l=n.tag;if(5===l||6===l)n=n.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(n,t):r.insertBefore(n,t):(8===r.nodeType?(t=r.parentNode).insertBefore(n,r):(t=r).appendChild(n),null!=(r=r._reactRootContainer)||null!==t.onclick||(t.onclick=rg));else if(4!==l&&null!==(n=n.child))for(e(n,t,r),n=n.sibling;null!==n;)e(n,t,r),n=n.sibling}(e,o,u);break;default:throw Error(f(161))}}catch(n){oA(e,e.return,n)}e.flags&=-3}4096&n&&(e.flags&=-4097)}function uX(e){for(;null!==uM;){var n=uM;if(0!=(8772&n.flags)){var t=n.alternate;try{if(0!=(8772&n.flags))switch(n.tag){case 0:case 11:case 15:uL||uU(5,n);break;case 1:var r=n.stateNode;if(4&n.flags&&!uL){if(null===t)r.componentDidMount();else{var l=n.elementType===n.type?t.memoizedProps:lx(n.type,t.memoizedProps);r.componentDidUpdate(l,t.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}}var a=n.updateQueue;null!==a&&lW(n,a,r);break;case 3:var u=n.updateQueue;if(null!==u){if(t=null,null!==n.child)switch(n.child.tag){case 5:case 1:t=n.child.stateNode}lW(n,u,t)}break;case 5:var o=n.stateNode;if(null===t&&4&n.flags){t=o;var i=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":i.autoFocus&&t.focus();break;case"img":i.src&&(t.src=i.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===n.memoizedState){var s=n.alternate;if(null!==s){var c=s.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&nM(d)}}}break;default:throw Error(f(163))}uL||512&n.flags&&uV(n)}catch(e){oA(n,n.return,e)}}if(n===e){uM=null;break}if(null!==(t=n.sibling)){t.return=n.return,uM=t;break}uM=n.return}}function uG(e){for(;null!==uM;){var n=uM;if(n===e){uM=null;break}var t=n.sibling;if(null!==t){t.return=n.return,uM=t;break}uM=n.return}}function uZ(e){for(;null!==uM;){var n=uM;try{switch(n.tag){case 0:case 11:case 15:var t=n.return;try{uU(4,n)}catch(e){oA(n,t,e)}break;case 1:var r=n.stateNode;if("function"==typeof r.componentDidMount){var l=n.return;try{r.componentDidMount()}catch(e){oA(n,l,e)}}var a=n.return;try{uV(n)}catch(e){oA(n,a,e)}break;case 5:var u=n.return;try{uV(n)}catch(e){oA(n,u,e)}}}catch(e){oA(n,n.return,e)}if(n===e){uM=null;break}var o=n.sibling;if(null!==o){o.return=n.return,uM=o;break}uM=n.return}}var uJ=Math.ceil,u0=C.ReactCurrentDispatcher,u1=C.ReactCurrentOwner,u2=C.ReactCurrentBatchConfig,u3=0,u4=null,u8=null,u6=0,u5=0,u9=rA(0),u7=0,oe=null,on=0,ot=0,or=0,ol=null,oa=null,ou=0,oo=1/0,oi=null,os=!1,oc=null,of=null,od=!1,op=null,om=0,oh=0,og=null,ov=-1,oy=0;function ob(){return 0!=(6&u3)?eJ():-1!==ov?ov:ov=eJ()}function ok(e){return 0==(1&e.mode)?1:0!=(2&u3)&&0!==u6?u6&-u6:null!==lS.transition?(0===oy&&(oy=nu()),oy):0!==(e=nc)?e:e=void 0===(e=window.event)?16:nA(e.type)}function ow(e,n,t,r){if(50<oh)throw oh=0,og=null,Error(f(185));ni(e,t,r),(0==(2&u3)||e!==u4)&&(e===u4&&(0==(2&u3)&&(ot|=t),4===u7&&oC(e,u6)),oS(e,r),1===t&&0===u3&&0==(1&n.mode)&&(oo=eJ()+500,r2&&r8()))}function oS(e,n){var t,r=e.callbackNode;!function(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var u=31-e9(a),o=1<<u,i=l[u];-1===i?(0==(o&t)||0!=(o&r))&&(l[u]=function(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;default:return -1}}(o,n)):i<=n&&(e.expiredLanes|=o),a&=~o}}(e,n);var l=nl(e,e===u4?u6:0);if(0===l)null!==r&&eX(r),e.callbackNode=null,e.callbackPriority=0;else if(n=l&-l,e.callbackPriority!==n){if(null!=r&&eX(r),1===n)0===e.tag?(t=oP.bind(null,e),r2=!0,r4(t)):r4(oP.bind(null,e)),rx(function(){0==(6&u3)&&r8()}),r=null;else{switch(nf(l)){case 1:r=e1;break;case 4:r=e2;break;case 16:default:r=e3;break;case 536870912:r=e8}r=eY(r,ox.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function ox(e,n){if(ov=-1,oy=0,0!=(6&u3))throw Error(f(327));var t=e.callbackNode;if(oV()&&e.callbackNode!==t)return null;var r=nl(e,e===u4?u6:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||n)n=oO(e,r);else{n=r;var l=u3;u3|=2;var a=oM();for((u4!==e||u6!==n)&&(oi=null,oo=eJ()+500,oL(e,n));;)try{!function(){for(;null!==u8&&!eG();)oD(u8)}();break}catch(n){oR(e,n)}lN(),u0.current=a,u3=l,null!==u8?n=0:(u4=null,u6=0,n=u7)}if(0!==n){if(2===n&&0!==(l=na(e))&&(r=l,n=oE(e,l)),1===n)throw t=oe,oL(e,0),oC(e,r),oS(e,eJ()),t;if(6===n)oC(e,r);else{if(l=e.current.alternate,0==(30&r)&&!function(e){for(var n=e;;){if(16384&n.flags){var t=n.updateQueue;if(null!==t&&null!==(t=t.stores))for(var r=0;r<t.length;r++){var l=t[r],a=l.getSnapshot;l=l.value;try{if(!tD(a(),l))return!1}catch(e){return!1}}}if(t=n.child,16384&n.subtreeFlags&&null!==t)t.return=n,n=t;else{if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}(l)&&(2===(n=oO(e,r))&&0!==(a=na(e))&&(r=a,n=oE(e,a)),1===n))throw t=oe,oL(e,0),oC(e,r),oS(e,eJ()),t;switch(e.finishedWork=l,e.finishedLanes=r,n){case 0:case 1:throw Error(f(345));case 2:case 5:oU(e,oa,oi);break;case 3:if(oC(e,r),(130023424&r)===r&&10<(n=ou+500-eJ())){if(0!==nl(e,0))break;if(((l=e.suspendedLanes)&r)!==r){ob(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=rk(oU.bind(null,e,oa,oi),n);break}oU(e,oa,oi);break;case 4:if(oC(e,r),(4194240&r)===r)break;for(l=-1,n=e.eventTimes;0<r;){var u=31-e9(r);a=1<<u,(u=n[u])>l&&(l=u),r&=~a}if(r=l,10<(r=(120>(r=eJ()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*uJ(r/1960))-r)){e.timeoutHandle=rk(oU.bind(null,e,oa,oi),r);break}oU(e,oa,oi);break;default:throw Error(f(329))}}}return oS(e,eJ()),e.callbackNode===t?ox.bind(null,e):null}function oE(e,n){var t=ol;return e.current.memoizedState.isDehydrated&&(oL(e,n).flags|=256),2!==(e=oO(e,n))&&(n=oa,oa=t,null!==n&&o_(n)),e}function o_(e){null===oa?oa=e:oa.push.apply(oa,e)}function oC(e,n){for(n&=~or,n&=~ot,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var t=31-e9(n),r=1<<t;e[t]=-1,n&=~r}}function oP(e){if(0!=(6&u3))throw Error(f(327));oV();var n=nl(e,0);if(0==(1&n))return oS(e,eJ()),null;var t=oO(e,n);if(0!==e.tag&&2===t){var r=na(e);0!==r&&(n=r,t=oE(e,r))}if(1===t)throw t=oe,oL(e,0),oC(e,n),oS(e,eJ()),t;if(6===t)throw Error(f(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,oU(e,oa,oi),oS(e,eJ()),null}function oN(e,n){var t=u3;u3|=1;try{return e(n)}finally{0===(u3=t)&&(oo=eJ()+500,r2&&r8())}}function oz(e){null!==op&&0===op.tag&&0==(6&u3)&&oV();var n=u3;u3|=1;var t=u2.transition,r=nc;try{if(u2.transition=null,nc=1,e)return e()}finally{nc=r,u2.transition=t,0==(6&(u3=n))&&r8()}}function oT(){u5=u9.current,rj(u9)}function oL(e,n){e.finishedWork=null,e.finishedLanes=0;var t=e.timeoutHandle;if(-1!==t&&(e.timeoutHandle=-1,rw(t)),null!==u8)for(t=u8.return;null!==t;){var r=t;switch(li(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&rX();break;case 3:an(),rj(rQ),rj(rW),ao();break;case 5:ar(r);break;case 4:an();break;case 13:case 19:rj(al);break;case 10:lz(r.type._context);break;case 22:case 23:oT()}t=t.return}if(u4=e,u8=e=oY(e.current,null),u6=u5=n,u7=0,oe=null,or=ot=on=0,oa=ol=null,null!==lM){for(n=0;n<lM.length;n++)if(null!==(r=(t=lM[n]).interleaved)){t.interleaved=null;var l=r.next,a=t.pending;if(null!==a){var u=a.next;a.next=l,r.next=u}t.pending=r}lM=null}return e}function oR(e,n){for(;;){var t=u8;try{if(lN(),ai.current=a2,am){for(var r=af.memoizedState;null!==r;){var l=r.queue;null!==l&&(l.pending=null),r=r.next}am=!1}if(ac=0,ap=ad=af=null,ah=!1,ag=0,u1.current=null,null===t||null===t.return){u7=1,oe=n,u8=null;break}e:{var a=e,u=t.return,o=t,i=n;if(n=u6,o.flags|=32768,null!==i&&"object"==typeof i&&"function"==typeof i.then){var s=i,c=o,d=c.tag;if(0==(1&c.mode)&&(0===d||11===d||15===d)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var m=ur(u);if(null!==m){m.flags&=-257,ul(m,u,o,a,n),1&m.mode&&ut(a,s,n),n=m,i=s;var h=n.updateQueue;if(null===h){var g=new Set;g.add(i),n.updateQueue=g}else h.add(i);break e}if(0==(1&n)){ut(a,s,n),oF();break e}i=Error(f(426))}else if(lf&&1&o.mode){var v=ur(u);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),ul(v,u,o,a,n),lw(a6(i,o));break e}}a=i=a6(i,o),4!==u7&&(u7=2),null===ol?ol=[a]:ol.push(a),a=u;do{switch(a.tag){case 3:a.flags|=65536,n&=-n,a.lanes|=n;var y=ue(a,i,n);lB(a,y);break e;case 1:o=i;var b=a.type,k=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==k&&"function"==typeof k.componentDidCatch&&(null===of||!of.has(k)))){a.flags|=65536,n&=-n,a.lanes|=n;var w=un(a,o,n);lB(a,w);break e}}a=a.return}while(null!==a)}oI(t)}catch(e){n=e,u8===t&&null!==t&&(u8=t=t.return);continue}break}}function oM(){var e=u0.current;return u0.current=a2,null===e?a2:e}function oF(){(0===u7||3===u7||2===u7)&&(u7=4),null===u4||0==(268435455&on)&&0==(268435455&ot)||oC(u4,u6)}function oO(e,n){var t=u3;u3|=2;var r=oM();for((u4!==e||u6!==n)&&(oi=null,oL(e,n));;)try{!function(){for(;null!==u8;)oD(u8)}();break}catch(n){oR(e,n)}if(lN(),u3=t,u0.current=r,null!==u8)throw Error(f(261));return u4=null,u6=0,u7}function oD(e){var n=i(e.alternate,e,u5);e.memoizedProps=e.pendingProps,null===n?oI(e):u8=n,u1.current=null}function oI(e){var n=e;do{var t=n.alternate;if(e=n.return,0==(32768&n.flags)){if(null!==(t=function(e,n,t){var r=n.pendingProps;switch(li(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return uz(n),null;case 1:case 17:return rY(n.type)&&rX(),uz(n),null;case 3:return r=n.stateNode,an(),rj(rQ),rj(rW),ao(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===e||null===e.child)&&(ly(n)?n.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&n.flags)||(n.flags|=1024,null!==ld&&(o_(ld),ld=null))),a(e,n),uz(n),null;case 5:ar(n);var i=l7(l9.current);if(t=n.type,null!==e&&null!=n.stateNode)u(e,n,t,r,i),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(null===n.stateNode)throw Error(f(166));return uz(n),null}if(e=l7(l6.current),ly(n)){r=n.stateNode,t=n.type;var s=n.memoizedProps;switch(r[rz]=n,r[rT]=s,e=0!=(1&n.mode),t){case"dialog":rt("cancel",r),rt("close",r);break;case"iframe":case"object":case"embed":rt("load",r);break;case"video":case"audio":for(i=0;i<t9.length;i++)rt(t9[i],r);break;case"source":rt("error",r);break;case"img":case"image":case"link":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"input":J(r,s),rt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},rt("invalid",r);break;case"textarea":eo(r,s),rt("invalid",r)}for(var c in ew(t,s),i=null,s)if(s.hasOwnProperty(c)){var d=s[c];"children"===c?"string"==typeof d?r.textContent!==d&&(!0!==s.suppressHydrationWarning&&rh(r.textContent,d,e),i=["children",d]):"number"==typeof d&&r.textContent!==""+d&&(!0!==s.suppressHydrationWarning&&rh(r.textContent,d,e),i=["children",""+d]):p.hasOwnProperty(c)&&null!=d&&"onScroll"===c&&rt("scroll",r)}switch(t){case"input":Y(r),et(r,s,!0);break;case"textarea":Y(r),es(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=rg)}r=i,n.updateQueue=r,null!==r&&(n.flags|=4)}else{c=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ec(t)),"http://www.w3.org/1999/xhtml"===e?"script"===t?((e=c.createElement("div")).innerHTML="<script></script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(t,{is:r.is}):(e=c.createElement(t),"select"===t&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,t),e[rz]=n,e[rT]=r,l(e,n,!1,!1),n.stateNode=e;e:{switch(c=eS(t,r),t){case"dialog":rt("cancel",e),rt("close",e),i=r;break;case"iframe":case"object":case"embed":rt("load",e),i=r;break;case"video":case"audio":for(i=0;i<t9.length;i++)rt(t9[i],e);i=r;break;case"source":rt("error",e),i=r;break;case"img":case"image":case"link":rt("error",e),rt("load",e),i=r;break;case"details":rt("toggle",e),i=r;break;case"input":J(e,r),i=Z(e,r),rt("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=B({},r,{value:void 0}),rt("invalid",e);break;case"textarea":eo(e,r),i=eu(e,r),rt("invalid",e)}for(s in ew(t,i),d=i)if(d.hasOwnProperty(s)){var m=d[s];"style"===s?eb(e,m):"dangerouslySetInnerHTML"===s?null!=(m=m?m.__html:void 0)&&em(e,m):"children"===s?"string"==typeof m?("textarea"!==t||""!==m)&&eh(e,m):"number"==typeof m&&eh(e,""+m):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(p.hasOwnProperty(s)?null!=m&&"onScroll"===s&&rt("scroll",e):null!=m&&_(e,s,m,c))}switch(t){case"input":Y(e),et(e,r,!1);break;case"textarea":Y(e),es(e);break;case"option":null!=r.value&&e.setAttribute("value",""+q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ea(e,!!r.multiple,s,!1):null!=r.defaultValue&&ea(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=rg)}switch(t){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(n.flags|=4)}null!==n.ref&&(n.flags|=512,n.flags|=2097152)}return uz(n),null;case 6:if(e&&null!=n.stateNode)o(e,n,e.memoizedProps,r);else{if("string"!=typeof r&&null===n.stateNode)throw Error(f(166));if(t=l7(l9.current),l7(l6.current),ly(n)){if(r=n.stateNode,t=n.memoizedProps,r[rz]=n,(s=r.nodeValue!==t)&&null!==(e=ls))switch(e.tag){case 3:rh(r.nodeValue,t,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&rh(r.nodeValue,t,0!=(1&e.mode))}s&&(n.flags|=4)}else(r=(9===t.nodeType?t:t.ownerDocument).createTextNode(r))[rz]=n,n.stateNode=r}return uz(n),null;case 13:if(rj(al),r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(lf&&null!==lc&&0!=(1&n.mode)&&0==(128&n.flags))lb(),lk(),n.flags|=98560,s=!1;else if(s=ly(n),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(f(318));if(!(s=null!==(s=n.memoizedState)?s.dehydrated:null))throw Error(f(317));s[rz]=n}else lk(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;uz(n),s=!1}else null!==ld&&(o_(ld),ld=null),s=!0;if(!s)return 65536&n.flags?n:null}if(0!=(128&n.flags))return n.lanes=t,n;return(r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(n.child.flags|=8192,0!=(1&n.mode)&&(null===e||0!=(1&al.current)?0===u7&&(u7=3):oF())),null!==n.updateQueue&&(n.flags|=4),uz(n),null;case 4:return an(),a(e,n),null===e&&ra(n.stateNode.containerInfo),uz(n),null;case 10:return lz(n.type._context),uz(n),null;case 19:if(rj(al),null===(s=n.memoizedState))return uz(n),null;if(r=0!=(128&n.flags),null===(c=s.rendering)){if(r)uN(s,!1);else{if(0!==u7||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(c=aa(e))){for(n.flags|=128,uN(s,!1),null!==(r=c.updateQueue)&&(n.updateQueue=r,n.flags|=4),n.subtreeFlags=0,r=t,t=n.child;null!==t;)s=t,e=r,s.flags&=14680066,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),t=t.sibling;return rB(al,1&al.current|2),n.child}e=e.sibling}null!==s.tail&&eJ()>oo&&(n.flags|=128,r=!0,uN(s,!1),n.lanes=4194304)}}else{if(!r){if(null!==(e=aa(c))){if(n.flags|=128,r=!0,null!==(t=e.updateQueue)&&(n.updateQueue=t,n.flags|=4),uN(s,!0),null===s.tail&&"hidden"===s.tailMode&&!c.alternate&&!lf)return uz(n),null}else 2*eJ()-s.renderingStartTime>oo&&1073741824!==t&&(n.flags|=128,r=!0,uN(s,!1),n.lanes=4194304)}s.isBackwards?(c.sibling=n.child,n.child=c):(null!==(t=s.last)?t.sibling=c:n.child=c,s.last=c)}if(null!==s.tail)return n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=eJ(),n.sibling=null,t=al.current,rB(al,r?1&t|2:1&t),n;return uz(n),null;case 22:case 23:return oT(),r=null!==n.memoizedState,null!==e&&null!==e.memoizedState!==r&&(n.flags|=8192),r&&0!=(1&n.mode)?0!=(1073741824&u5)&&(uz(n),6&n.subtreeFlags&&(n.flags|=8192)):uz(n),null;case 24:case 25:return null}throw Error(f(156,n.tag))}(t,n,u5))){u8=t;return}}else{if(null!==(t=function(e,n){switch(li(n),n.tag){case 1:return rY(n.type)&&rX(),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return an(),rj(rQ),rj(rW),ao(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 5:return ar(n),null;case 13:if(rj(al),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(f(340));lk()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return rj(al),null;case 4:return an(),null;case 10:return lz(n.type._context),null;case 22:case 23:return oT(),null;default:return null}}(t,n))){t.flags&=32767,u8=t;return}if(null!==e)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{u7=6,u8=null;return}}if(null!==(n=n.sibling)){u8=n;return}u8=n=e}while(null!==n);0===u7&&(u7=5)}function oU(e,n,t){var r=nc,l=u2.transition;try{u2.transition=null,nc=1,function(e,n,t,r){do oV();while(null!==op);if(0!=(6&u3))throw Error(f(327));t=e.finishedWork;var l=e.finishedLanes;if(null!==t){if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error(f(177));e.callbackNode=null,e.callbackPriority=0;var a=t.lanes|t.childLanes;if(function(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<t;){var l=31-e9(t),a=1<<l;n[l]=0,r[l]=-1,e[l]=-1,t&=~a}}(e,a),e===u4&&(u8=u4=null,u6=0),0==(2064&t.subtreeFlags)&&0==(2064&t.flags)||od||(od=!0,u=e3,o=function(){return oV(),null},eY(u,o)),a=0!=(15990&t.flags),0!=(15990&t.subtreeFlags)||a){a=u2.transition,u2.transition=null;var u,o,i,s,c,d=nc;nc=1;var p=u3;u3|=4,u1.current=null,function(e,n){if(rv=nO,tA(e=t$())){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(r&&0!==r.rangeCount){t=r.anchorNode;var l,a=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{t.nodeType,u.nodeType}catch(e){t=null;break e}var o=0,i=-1,s=-1,c=0,d=0,p=e,m=null;n:for(;;){for(;p!==t||0!==a&&3!==p.nodeType||(i=o+a),p!==u||0!==r&&3!==p.nodeType||(s=o+r),3===p.nodeType&&(o+=p.nodeValue.length),null!==(l=p.firstChild);)m=p,p=l;for(;;){if(p===e)break n;if(m===t&&++c===a&&(i=o),m===u&&++d===r&&(s=o),null!==(l=p.nextSibling))break;m=(p=m).parentNode}p=l}t=-1===i||-1===s?null:{start:i,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(ry={focusedElem:e,selectionRange:t},nO=!1,uM=n;null!==uM;)if(e=(n=uM).child,0!=(1028&n.subtreeFlags)&&null!==e)e.return=n,uM=e;else for(;null!==uM;){n=uM;try{var h=n.alternate;if(0!=(1024&n.flags))switch(n.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var g=h.memoizedProps,v=h.memoizedState,y=n.stateNode,b=y.getSnapshotBeforeUpdate(n.elementType===n.type?g:lx(n.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=n.stateNode.containerInfo;1===k.nodeType?k.textContent="":9===k.nodeType&&k.documentElement&&k.removeChild(k.documentElement);break;default:throw Error(f(163))}}catch(e){oA(n,n.return,e)}if(null!==(e=n.sibling)){e.return=n.return,uM=e;break}uM=n.return}h=uD,uD=!1}(e,t),uK(t,e),function(e){var n=t$(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&function e(n,t){return!!n&&!!t&&(n===t||(!n||3!==n.nodeType)&&(t&&3===t.nodeType?e(n,t.parentNode):"contains"in n?n.contains(t):!!n.compareDocumentPosition&&!!(16&n.compareDocumentPosition(t))))}(t.ownerDocument.documentElement,t)){if(null!==r&&tA(t)){if(n=r.start,void 0===(e=r.end)&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if((e=(n=t.ownerDocument||document)&&n.defaultView||window).getSelection){e=e.getSelection();var l=t.textContent.length,a=Math.min(r.start,l);r=void 0===r.end?a:Math.min(r.end,l),!e.extend&&a>r&&(l=r,r=a,a=l),l=tV(t,a);var u=tV(t,r);l&&u&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&((n=n.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)1===e.nodeType&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t<n.length;t++)(e=n[t]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}(ry),nO=!!rv,ry=rv=null,e.current=t,i=t,s=e,c=l,uM=i,function e(n,t,r){for(var l=0!=(1&n.mode);null!==uM;){var a=uM,u=a.child;if(22===a.tag&&l){var o=null!==a.memoizedState||uT;if(!o){var i=a.alternate,s=null!==i&&null!==i.memoizedState||uL;i=uT;var c=uL;if(uT=o,(uL=s)&&!c)for(uM=a;null!==uM;)s=(o=uM).child,22===o.tag&&null!==o.memoizedState?uZ(a):null!==s?(s.return=o,uM=s):uZ(a);for(;null!==u;)uM=u,e(u,t,r),u=u.sibling;uM=a,uT=i,uL=c}uX(n,t,r)}else 0!=(8772&a.subtreeFlags)&&null!==u?(u.return=a,uM=u):uX(n,t,r)}}(i,s,c),eZ(),u3=p,nc=d,u2.transition=a}else e.current=t;if(od&&(od=!1,op=e,om=l),0===(a=e.pendingLanes)&&(of=null),function(e){if(e5&&"function"==typeof e5.onCommitFiberRoot)try{e5.onCommitFiberRoot(e6,e,void 0,128==(128&e.current.flags))}catch(e){}}(t.stateNode,r),oS(e,eJ()),null!==n)for(r=e.onRecoverableError,t=0;t<n.length;t++)r((l=n[t]).value,{componentStack:l.stack,digest:l.digest});if(os)throw os=!1,e=oc,oc=null,e;0!=(1&om)&&0!==e.tag&&oV(),0!=(1&(a=e.pendingLanes))?e===og?oh++:(oh=0,og=e):oh=0,r8()}}(e,n,t,r)}finally{u2.transition=l,nc=r}return null}function oV(){if(null!==op){var e=nf(om),n=u2.transition,t=nc;try{if(u2.transition=null,nc=16>e?16:e,null===op)var r=!1;else{if(e=op,op=null,om=0,0!=(6&u3))throw Error(f(331));var l=u3;for(u3|=4,uM=e.current;null!==uM;){var a=uM,u=a.child;if(0!=(16&uM.flags)){var o=a.deletions;if(null!==o){for(var i=0;i<o.length;i++){var s=o[i];for(uM=s;null!==uM;){var c=uM;switch(c.tag){case 0:case 11:case 15:uI(8,c,a)}var d=c.child;if(null!==d)d.return=c,uM=d;else for(;null!==uM;){var p=(c=uM).sibling,m=c.return;if(!function e(n){var t=n.alternate;null!==t&&(n.alternate=null,e(t)),n.child=null,n.deletions=null,n.sibling=null,5===n.tag&&null!==(t=n.stateNode)&&(delete t[rz],delete t[rT],delete t[rR],delete t[rM],delete t[rF]),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}(c),c===s){uM=null;break}if(null!==p){p.return=m,uM=p;break}uM=m}}}var h=a.alternate;if(null!==h){var g=h.child;if(null!==g){h.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}uM=a}}if(0!=(2064&a.subtreeFlags)&&null!==u)u.return=a,uM=u;else for(;null!==uM;){if(a=uM,0!=(2048&a.flags))switch(a.tag){case 0:case 11:case 15:uI(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,uM=y;break}uM=a.return}}var b=e.current;for(uM=b;null!==uM;){var k=(u=uM).child;if(0!=(2064&u.subtreeFlags)&&null!==k)k.return=u,uM=k;else for(u=b;null!==uM;){if(o=uM,0!=(2048&o.flags))try{switch(o.tag){case 0:case 11:case 15:uU(9,o)}}catch(e){oA(o,o.return,e)}if(o===u){uM=null;break}var w=o.sibling;if(null!==w){w.return=o.return,uM=w;break}uM=o.return}}if(u3=l,r8(),e5&&"function"==typeof e5.onPostCommitFiberRoot)try{e5.onPostCommitFiberRoot(e6,e)}catch(e){}r=!0}return r}finally{nc=t,u2.transition=n}}return!1}function o$(e,n,t){n=ue(e,n=a6(t,n),1),e=lA(e,n,1),n=ob(),null!==e&&(ni(e,1,n),oS(e,n))}function oA(e,n,t){if(3===e.tag)o$(e,e,t);else for(;null!==n;){if(3===n.tag){o$(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===of||!of.has(r))){e=un(n,e=a6(t,e),1),n=lA(n,e,1),e=ob(),null!==n&&(ni(n,1,e),oS(n,e));break}}n=n.return}}function oj(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),n=ob(),e.pingedLanes|=e.suspendedLanes&t,u4===e&&(u6&t)===t&&(4===u7||3===u7&&(130023424&u6)===u6&&500>eJ()-ou?oL(e,0):or|=t),oS(e,n)}function oB(e,n){0===n&&(0==(1&e.mode)?n=1:(n=nt,0==(130023424&(nt<<=1))&&(nt=4194304)));var t=ob();null!==(e=lD(e,n))&&(ni(e,n,t),oS(e,t))}function oH(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),oB(e,t)}function oW(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(f(314))}null!==r&&r.delete(n),oB(e,t)}function oQ(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oq(e,n,t,r){return new oQ(e,n,t,r)}function oK(e){return!(!(e=e.prototype)||!e.isReactComponent)}function oY(e,n){var t=e.alternate;return null===t?((t=oq(e.tag,n,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=14680064&e.flags,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function oX(e,n,t,r,l,a){var u=2;if(r=e,"function"==typeof e)oK(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case z:return oG(t.children,l,a,n);case T:u=8,l|=8;break;case L:return(e=oq(12,t,n,2|l)).elementType=L,e.lanes=a,e;case O:return(e=oq(13,t,n,l)).elementType=O,e.lanes=a,e;case D:return(e=oq(19,t,n,l)).elementType=D,e.lanes=a,e;case V:return oZ(t,l,a,n);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case R:u=10;break e;case M:u=9;break e;case F:u=11;break e;case I:u=14;break e;case U:u=16,r=null;break e}throw Error(f(130,null==e?e:typeof e,""))}return(n=oq(u,t,n,l)).elementType=e,n.type=r,n.lanes=a,n}function oG(e,n,t,r){return(e=oq(7,e,r,n)).lanes=t,e}function oZ(e,n,t,r){return(e=oq(22,e,r,n)).elementType=V,e.lanes=t,e.stateNode={isHidden:!1},e}function oJ(e,n,t){return(e=oq(6,e,null,n)).lanes=t,e}function o0(e,n,t){return(n=oq(4,null!==e.children?e.children:[],e.key,n)).lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function o1(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=no(0),this.expirationTimes=no(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=no(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function o2(e,n,t,r,l,a,u,o,i){return e=new o1(e,n,t,o,i),1===n?(n=1,!0===a&&(n|=8)):n=0,a=oq(3,null,null,n),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},lU(a),e}function o3(e){if(!e)return rH;e=e._reactInternals;e:{if(eW(e)!==e||1!==e.tag)throw Error(f(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(rY(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(null!==n);throw Error(f(171))}if(1===e.tag){var t=e.type;if(rY(t))return rZ(e,t,n)}return n}function o4(e,n,t,r,l,a,u,o,i){return(e=o2(t,r,!0,e,l,a,u,o,i)).context=o3(null),t=e.current,(a=l$(r=ob(),l=ok(t))).callback=null!=n?n:null,lA(t,a,l),e.current.lanes=l,ni(e,l,r),oS(e,r),e}function o8(e,n,t,r){var l=n.current,a=ob(),u=ok(l);return t=o3(t),null===n.context?n.context=t:n.pendingContext=t,(n=l$(a,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(n.callback=r),null!==(e=lA(l,n,u))&&(ow(e,l,u,a),lj(e,l,u)),u}function o6(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function o5(e,n){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t<n?t:n}}function o9(e,n){o5(e,n),(e=e.alternate)&&o5(e,n)}i=function(e,n,t){if(null!==e){if(e.memoizedProps!==n.pendingProps||rQ.current)uu=!0;else{if(0==(e.lanes&t)&&0==(128&n.flags))return uu=!1,function(e,n,t){switch(n.tag){case 3:ug(n),lk();break;case 5:at(n);break;case 1:rY(n.type)&&rJ(n);break;case 4:ae(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;rB(lE,r._currentValue),r._currentValue=l;break;case 13:if(null!==(r=n.memoizedState)){if(null!==r.dehydrated)return rB(al,1&al.current),n.flags|=128,null;if(0!=(t&n.child.childLanes))return uk(e,n,t);return rB(al,1&al.current),null!==(e=uP(e,n,t))?e.sibling:null}rB(al,1&al.current);break;case 19:if(r=0!=(t&n.childLanes),0!=(128&e.flags)){if(r)return u_(e,n,t);n.flags|=128}if(null!==(l=n.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),rB(al,al.current),!r)return null;break;case 22:case 23:return n.lanes=0,uf(e,n,t)}return uP(e,n,t)}(e,n,t);uu=0!=(131072&e.flags)}}else uu=!1,lf&&0!=(1048576&n.flags)&&lu(n,r7,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;uC(e,n),e=n.pendingProps;var l=rK(n,rW.current);lL(n,t),l=ak(null,n,r,e,l,t);var a=aw();return n.flags|=1,"object"==typeof l&&null!==l&&"function"==typeof l.render&&void 0===l.$$typeof?(n.tag=1,n.memoizedState=null,n.updateQueue=null,rY(r)?(a=!0,rJ(n)):a=!1,n.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,lU(n),l.updater=lK,n.stateNode=l,l._reactInternals=n,lZ(n,r,e,t),n=uh(null,n,r,!0,a,t)):(n.tag=0,lf&&a&&lo(n),uo(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(uC(e,n),e=n.pendingProps,r=(l=r._init)(r._payload),n.type=r,l=n.tag=function(e){if("function"==typeof e)return oK(e)?1:0;if(null!=e){if((e=e.$$typeof)===F)return 11;if(e===I)return 14}return 2}(r),e=lx(r,e),l){case 0:n=up(null,n,r,e,t);break e;case 1:n=um(null,n,r,e,t);break e;case 11:n=ui(null,n,r,e,t);break e;case 14:n=us(null,n,r,lx(r.type,e),t);break e}throw Error(f(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:lx(r,l),up(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:lx(r,l),um(e,n,r,l,t);case 3:e:{if(ug(n),null===e)throw Error(f(387));r=n.pendingProps,l=(a=n.memoizedState).element,lV(e,n),lH(n,r,null,t);var u=n.memoizedState;if(r=u.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=a,n.memoizedState=a,256&n.flags){l=a6(Error(f(423)),n),n=uv(e,n,r,t,l);break e}if(r!==l){l=a6(Error(f(424)),n),n=uv(e,n,r,t,l);break e}for(lc=rC(n.stateNode.containerInfo.firstChild),ls=n,lf=!0,ld=null,t=l4(n,null,r,t),n.child=t;t;)t.flags=-3&t.flags|4096,t=t.sibling}else{if(lk(),r===l){n=uP(e,n,t);break e}uo(e,n,r,t)}n=n.child}return n;case 5:return at(n),null===e&&lg(n),r=n.type,l=n.pendingProps,a=null!==e?e.memoizedProps:null,u=l.children,rb(r,l)?u=null:null!==a&&rb(r,a)&&(n.flags|=32),ud(e,n),uo(e,n,u,t),n.child;case 6:return null===e&&lg(n),null;case 13:return uk(e,n,t);case 4:return ae(n,n.stateNode.containerInfo),r=n.pendingProps,null===e?n.child=l3(n,null,r,t):uo(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:lx(r,l),ui(e,n,r,l,t);case 7:return uo(e,n,n.pendingProps,t),n.child;case 8:case 12:return uo(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,a=n.memoizedProps,u=l.value,rB(lE,r._currentValue),r._currentValue=u,null!==a){if(tD(a.value,u)){if(a.children===l.children&&!rQ.current){n=uP(e,n,t);break e}}else for(null!==(a=n.child)&&(a.return=n);null!==a;){var o=a.dependencies;if(null!==o){u=a.child;for(var i=o.firstContext;null!==i;){if(i.context===r){if(1===a.tag){(i=l$(-1,t&-t)).tag=2;var s=a.updateQueue;if(null!==s){var c=(s=s.shared).pending;null===c?i.next=i:(i.next=c.next,c.next=i),s.pending=i}}a.lanes|=t,null!==(i=a.alternate)&&(i.lanes|=t),lT(a.return,t,n),o.lanes|=t;break}i=i.next}}else if(10===a.tag)u=a.type===n.type?null:a.child;else if(18===a.tag){if(null===(u=a.return))throw Error(f(341));u.lanes|=t,null!==(o=u.alternate)&&(o.lanes|=t),lT(u,t,n),u=a.sibling}else u=a.child;if(null!==u)u.return=a;else for(u=a;null!==u;){if(u===n){u=null;break}if(null!==(a=u.sibling)){a.return=u.return,u=a;break}u=u.return}a=u}}uo(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,lL(n,t),r=r(l=lR(l)),n.flags|=1,uo(e,n,r,t),n.child;case 14:return l=lx(r=n.type,n.pendingProps),l=lx(r.type,l),us(e,n,r,l,t);case 15:return uc(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:lx(r,l),uC(e,n),n.tag=1,rY(r)?(e=!0,rJ(n)):e=!1,lL(n,t),lX(n,r,l),lZ(n,r,l,t),uh(null,n,r,!0,e,t);case 19:return u_(e,n,t);case 22:return uf(e,n,t)}throw Error(f(156,n.tag))};var o7="function"==typeof reportError?reportError:function(e){console.error(e)};function ie(e){this._internalRoot=e}function it(e){this._internalRoot=e}function ir(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function il(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ia(){}function iu(e,n,t,r,l){var a=t._reactRootContainer;if(a){var u=a;if("function"==typeof l){var o=l;l=function(){var e=o6(u);o.call(e)}}o8(n,u,e,l)}else u=function(e,n,t,r,l){if(l){if("function"==typeof r){var a=r;r=function(){var e=o6(u);a.call(e)}}var u=o4(n,r,e,0,null,!1,!1,"",ia);return e._reactRootContainer=u,e[rL]=u.current,ra(8===e.nodeType?e.parentNode:e),oz(),u}for(;l=e.lastChild;)e.removeChild(l);if("function"==typeof r){var o=r;r=function(){var e=o6(i);o.call(e)}}var i=o2(e,0,!1,null,null,!1,!1,"",ia);return e._reactRootContainer=i,e[rL]=i.current,ra(8===e.nodeType?e.parentNode:e),oz(function(){o8(n,i,t,r)}),i}(t,n,e,l,r);return o6(u)}it.prototype.render=ie.prototype.render=function(e){var n=this._internalRoot;if(null===n)throw Error(f(409));o8(e,n,null,null)},it.prototype.unmount=ie.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var n=e.containerInfo;oz(function(){o8(null,e,null,null)}),n[rL]=null}},it.prototype.unstable_scheduleHydration=function(e){if(e){var n=nh();e={blockedOn:null,target:e,priority:n};for(var t=0;t<nE.length&&0!==n&&n<nE[t].priority;t++);nE.splice(t,0,e),0===t&&nN(e)}},nd=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var t=nr(n.pendingLanes);0!==t&&(ns(n,1|t),oS(n,eJ()),0==(6&u3)&&(oo=eJ()+500,r8()))}break;case 13:oz(function(){var n=lD(e,1);null!==n&&ow(n,e,1,ob())}),o9(e,1)}},np=function(e){if(13===e.tag){var n=lD(e,134217728);null!==n&&ow(n,e,134217728,ob()),o9(e,134217728)}},nm=function(e){if(13===e.tag){var n=ok(e),t=lD(e,n);null!==t&&ow(t,e,n,ob()),o9(e,n)}},nh=function(){return nc},ng=function(e,n){var t=nc;try{return nc=e,n()}finally{nc=t}},e_=function(e,n,t){switch(n){case"input":if(en(e,t),n=t.name,"radio"===t.type&&null!=n){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<t.length;n++){var r=t[n];if(r!==e&&r.form===e.form){var l=rU(r);if(!l)throw Error(f(90));X(r),en(r,l)}}}break;case"textarea":ei(e,t);break;case"select":null!=(n=t.value)&&ea(e,!!t.multiple,n,!1)}},eL=oN,eR=oz;var io={findFiberByHostInstance:rO,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ii={bundleType:io.bundleType,version:io.version,rendererPackageName:io.rendererPackageName,rendererConfig:io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=eK(e))?null:e.stateNode},findFiberByHostInstance:io.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!is.isDisabled&&is.supportsFiber)try{e6=is.inject(ii),e5=is}catch(e){}}n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={usingClientEntryPoint:!1,Events:[rD,rI,rU,ez,eT,oN]},n.createPortal=function(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ir(n))throw Error(f(200));return function(e,n,t){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:N,key:null==r?null:""+r,children:e,containerInfo:n,implementation:t}}(e,n,null,t)},n.createRoot=function(e,n){if(!ir(e))throw Error(f(299));var t=!1,r="",l=o7;return null!=n&&(!0===n.unstable_strictMode&&(t=!0),void 0!==n.identifierPrefix&&(r=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),n=o2(e,1,!1,null,null,t,!1,r,l),e[rL]=n.current,ra(8===e.nodeType?e.parentNode:e),new ie(n)},n.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var n=e._reactInternals;if(void 0===n){if("function"==typeof e.render)throw Error(f(188));throw Error(f(268,e=Object.keys(e).join(",")))}return e=null===(e=eK(n))?null:e.stateNode},n.flushSync=function(e){return oz(e)},n.hydrate=function(e,n,t){if(!il(n))throw Error(f(200));return iu(null,e,n,!0,t)},n.hydrateRoot=function(e,n,t){if(!ir(e))throw Error(f(405));var r=null!=t&&t.hydratedSources||null,l=!1,a="",u=o7;if(null!=t&&(!0===t.unstable_strictMode&&(l=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onRecoverableError&&(u=t.onRecoverableError)),n=o4(n,null,e,1,null!=t?t:null,l,!1,a,u),e[rL]=n.current,ra(e),r)for(e=0;e<r.length;e++)l=(l=(t=r[e])._getVersion)(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,l]:n.mutableSourceEagerHydrationData.push(t,l);return new it(n)},n.render=function(e,n,t){if(!il(n))throw Error(f(200));return iu(null,e,n,!1,t)},n.unmountComponentAtNode=function(e){if(!il(e))throw Error(f(40));return!!e._reactRootContainer&&(oz(function(){iu(null,null,e,!1,function(){e._reactRootContainer=null,e[rL]=null})}),!0)},n.unstable_batchedUpdates=oN,n.unstable_renderSubtreeIntoContainer=function(e,n,t,r){if(!il(t))throw Error(f(200));if(null==e||void 0===e._reactInternals)throw Error(f(38));return iu(e,n,t,!1,r)},n.version="18.2.0-next-9e3b772b8-20220608"},20745:function(e,n,t){var r=t(73935);n.createRoot=r.createRoot,n.hydrateRoot=r.hydrateRoot},73935:function(e,n,t){!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=t(64448)},75251:function(e,n,t){var r=t(67294),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,t){var r,a={},s=null,c=null;for(r in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(c=n.ref),n)u.call(n,r)&&!i.hasOwnProperty(r)&&(a[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===a[r]&&(a[r]=n[r]);return{$$typeof:l,type:e,key:s,ref:c,props:a,_owner:o.current}}n.Fragment=a,n.jsx=s,n.jsxs=s},72408:function(e,n){var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function v(e,n,t){this.props=e,this.context=n,this.refs=g,this.updater=t||m}function y(){}function b(e,n,t){this.props=e,this.context=n,this.refs=g,this.updater=t||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,n){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var k=b.prototype=new y;k.constructor=b,h(k,v.prototype),k.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,x={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function _(e,n,r){var l,a={},u=null,o=null;if(null!=n)for(l in void 0!==n.ref&&(o=n.ref),void 0!==n.key&&(u=""+n.key),n)S.call(n,l)&&!E.hasOwnProperty(l)&&(a[l]=n[l]);var i=arguments.length-2;if(1===i)a.children=r;else if(1<i){for(var s=Array(i),c=0;c<i;c++)s[c]=arguments[c+2];a.children=s}if(e&&e.defaultProps)for(l in i=e.defaultProps)void 0===a[l]&&(a[l]=i[l]);return{$$typeof:t,type:e,key:u,ref:o,props:a,_owner:x.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var P=/\/+/g;function N(e,n){var t,r;return"object"==typeof e&&null!==e&&null!=e.key?(t=""+e.key,r={"=":"=0",":":"=2"},"$"+t.replace(/[=:]/g,function(e){return r[e]})):n.toString(36)}function z(e,n,l){if(null==e)return e;var a=[],u=0;return!function e(n,l,a,u,o){var i,s,c,f=typeof n;("undefined"===f||"boolean"===f)&&(n=null);var d=!1;if(null===n)d=!0;else switch(f){case"string":case"number":d=!0;break;case"object":switch(n.$$typeof){case t:case r:d=!0}}if(d)return o=o(d=n),n=""===u?"."+N(d,0):u,w(o)?(a="",null!=n&&(a=n.replace(P,"$&/")+"/"),e(o,l,a,"",function(e){return e})):null!=o&&(C(o)&&(i=o,s=a+(!o.key||d&&d.key===o.key?"":(""+o.key).replace(P,"$&/")+"/")+n,o={$$typeof:t,type:i.type,key:s,ref:i.ref,props:i.props,_owner:i._owner}),l.push(o)),1;if(d=0,u=""===u?".":u+":",w(n))for(var m=0;m<n.length;m++){var h=u+N(f=n[m],m);d+=e(f,l,a,h,o)}else if("function"==typeof(h=null===(c=n)||"object"!=typeof c?null:"function"==typeof(c=p&&c[p]||c["@@iterator"])?c:null))for(n=h.call(n),m=0;!(f=n.next()).done;)h=u+N(f=f.value,m++),d+=e(f,l,a,h,o);else if("object"===f)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(l=String(n))?"object with keys {"+Object.keys(n).join(", ")+"}":l)+"). If you meant to render a collection of children, use an array instead.");return d}(e,a,"","",function(e){return n.call(l,e,u++)}),a}function T(e){if(-1===e._status){var n=e._result;(n=n()).then(function(n){(0===e._status||-1===e._status)&&(e._status=1,e._result=n)},function(n){(0===e._status||-1===e._status)&&(e._status=2,e._result=n)}),-1===e._status&&(e._status=0,e._result=n)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},R={transition:null};n.Children={map:z,forEach:function(e,n,t){z(e,function(){n.apply(this,arguments)},t)},count:function(e){var n=0;return z(e,function(){n++}),n},toArray:function(e){return z(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},n.Component=v,n.Fragment=l,n.Profiler=u,n.PureComponent=b,n.StrictMode=a,n.Suspense=c,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:R,ReactCurrentOwner:x},n.cloneElement=function(e,n,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var l=h({},e.props),a=e.key,u=e.ref,o=e._owner;if(null!=n){if(void 0!==n.ref&&(u=n.ref,o=x.current),void 0!==n.key&&(a=""+n.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(s in n)S.call(n,s)&&!E.hasOwnProperty(s)&&(l[s]=void 0===n[s]&&void 0!==i?i[s]:n[s])}var s=arguments.length-2;if(1===s)l.children=r;else if(1<s){i=Array(s);for(var c=0;c<s;c++)i[c]=arguments[c+2];l.children=i}return{$$typeof:t,type:e.type,key:a,ref:u,props:l,_owner:o}},n.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},n.createElement=_,n.createFactory=function(e){var n=_.bind(null,e);return n.type=e,n},n.createRef=function(){return{current:null}},n.forwardRef=function(e){return{$$typeof:s,render:e}},n.isValidElement=C,n.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},n.memo=function(e,n){return{$$typeof:f,type:e,compare:void 0===n?null:n}},n.startTransition=function(e){var n=R.transition;R.transition={};try{e()}finally{R.transition=n}},n.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},n.useCallback=function(e,n){return L.current.useCallback(e,n)},n.useContext=function(e){return L.current.useContext(e)},n.useDebugValue=function(){},n.useDeferredValue=function(e){return L.current.useDeferredValue(e)},n.useEffect=function(e,n){return L.current.useEffect(e,n)},n.useId=function(){return L.current.useId()},n.useImperativeHandle=function(e,n,t){return L.current.useImperativeHandle(e,n,t)},n.useInsertionEffect=function(e,n){return L.current.useInsertionEffect(e,n)},n.useLayoutEffect=function(e,n){return L.current.useLayoutEffect(e,n)},n.useMemo=function(e,n){return L.current.useMemo(e,n)},n.useReducer=function(e,n,t){return L.current.useReducer(e,n,t)},n.useRef=function(e){return L.current.useRef(e)},n.useState=function(e){return L.current.useState(e)},n.useSyncExternalStore=function(e,n,t){return L.current.useSyncExternalStore(e,n,t)},n.useTransition=function(){return L.current.useTransition()},n.version="18.2.0"},67294:function(e,n,t){e.exports=t(72408)},85893:function(e,n,t){e.exports=t(75251)},60053:function(e,n){function t(e,n){var t=e.length;for(e.push(n);0<t;){var r=t-1>>>1,l=e[r];if(0<a(l,n))e[r]=n,e[t]=l,t=r;else break}}function r(e){return 0===e.length?null:e[0]}function l(e){if(0===e.length)return null;var n=e[0],t=e.pop();if(t!==n){e[0]=t;for(var r=0,l=e.length,u=l>>>1;r<u;){var o=2*(r+1)-1,i=e[o],s=o+1,c=e[s];if(0>a(i,t))s<l&&0>a(c,i)?(e[r]=c,e[s]=t,r=s):(e[r]=i,e[o]=t,r=o);else if(s<l&&0>a(c,t))e[r]=c,e[s]=t,r=s;else break}}return n}function a(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if("object"==typeof performance&&"function"==typeof performance.now){var u,o=performance;n.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();n.unstable_now=function(){return i.now()-s}}var c=[],f=[],d=1,p=null,m=3,h=!1,g=!1,v=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,k="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var n=r(f);null!==n;){if(null===n.callback)l(f);else if(n.startTime<=e)l(f),n.sortIndex=n.expirationTime,t(c,n);else break;n=r(f)}}function S(e){if(v=!1,w(e),!g){if(null!==r(c))g=!0,M(x);else{var n=r(f);null!==n&&F(S,n.startTime-e)}}}function x(e,t){g=!1,v&&(v=!1,b(C),C=-1),h=!0;var a=m;try{for(w(t),p=r(c);null!==p&&(!(p.expirationTime>t)||e&&!z());){var u=p.callback;if("function"==typeof u){p.callback=null,m=p.priorityLevel;var o=u(p.expirationTime<=t);t=n.unstable_now(),"function"==typeof o?p.callback=o:p===r(c)&&l(c),w(t)}else l(c);p=r(c)}if(null!==p)var i=!0;else{var s=r(f);null!==s&&F(S,s.startTime-t),i=!1}return i}finally{p=null,m=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E=!1,_=null,C=-1,P=5,N=-1;function z(){return!(n.unstable_now()-N<P)}function T(){if(null!==_){var e=n.unstable_now();N=e;var t=!0;try{t=_(!0,e)}finally{t?u():(E=!1,_=null)}}else E=!1}if("function"==typeof k)u=function(){k(T)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,R=L.port2;L.port1.onmessage=T,u=function(){R.postMessage(null)}}else u=function(){y(T,0)};function M(e){_=e,E||(E=!0,u())}function F(e,t){C=y(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){g||h||(g=!0,M(x))},n.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return r(c)},n.unstable_next=function(e){switch(m){case 1:case 2:case 3:var n=3;break;default:n=m}var t=m;m=n;try{return e()}finally{m=t}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=m;m=e;try{return n()}finally{m=t}},n.unstable_scheduleCallback=function(e,l,a){var u=n.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?u+a:u,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=a+o,e={id:d++,callback:l,priorityLevel:e,startTime:a,expirationTime:o,sortIndex:-1},a>u?(e.sortIndex=a,t(f,e),null===r(c)&&e===r(f)&&(v?(b(C),C=-1):v=!0,F(S,a-u))):(e.sortIndex=o,t(c,e),g||h||(g=!0,M(x))),e},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(e){var n=m;return function(){var t=m;m=n;try{return e.apply(this,arguments)}finally{m=t}}}},63840:function(e,n,t){e.exports=t(60053)}}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/main-app-475d6efe4080647d.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/main-app-475d6efe4080647d.js new file mode 100644 index 00000000..47508fc7 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/main-app-475d6efe4080647d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[744],{20169:function(e,n,t){Promise.resolve().then(t.t.bind(t,12846,23)),Promise.resolve().then(t.t.bind(t,19107,23)),Promise.resolve().then(t.t.bind(t,61060,23)),Promise.resolve().then(t.t.bind(t,4707,23)),Promise.resolve().then(t.t.bind(t,80,23)),Promise.resolve().then(t.t.bind(t,36423,23))}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[971,117],function(){return n(54278),n(20169)}),_N_E=e.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/main-c87e1d923aba61fd.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/main-c87e1d923aba61fd.js new file mode 100644 index 00000000..4ec87cb1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/main-c87e1d923aba61fd.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{84878:function(e,t){"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},40037:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},41412:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});let n=r(77652),o=r(68796);function a(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,"/ui"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},28878:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(68796);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53721:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSocketUrl",{enumerable:!0,get:function(){return o}});let n=r(3349);function o(e){let t=(0,n.normalizedAssetPrefix)(e),r=function(e){let t=window.location.protocol;try{t=new URL(e).protocol}catch(e){}return"http:"===t?"ws:":"wss:"}(e||"");if(URL.canParse(t))return t.replace(/^http/,"ws");let{hostname:o,port:a}=window.location;return r+"//"+o+(a?":"+a:"")+t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},45303:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{addMessageListener:function(){return i},connectHMR:function(){return s},sendMessage:function(){return u}});let o=r(53721),a=[];function i(e){a.push(e)}function u(e){if(n&&n.readyState===n.OPEN)return n.send(e)}let l=0;function s(e){!function t(){let r;function i(){if(n.onerror=null,n.onclose=null,n.close(),++l>25){window.location.reload();return}clearTimeout(r),r=setTimeout(t,l>5?5e3:1e3)}n&&n.close();let u=(0,o.getSocketUrl)(e.assetPrefix);(n=new window.WebSocket(""+u+e.path)).onopen=function(){l=0,window.console.log("[HMR] connected")},n.onerror=i,n.onclose=i,n.onmessage=function(e){let t=JSON.parse(e.data);for(let e of a)e(t)}}()}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},97193:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});let r=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},71838:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let n=r(25298);function o(e){return(0,n.pathHasPrefix)(e,"/ui")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52071:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DOMAttributeNames:function(){return n},default:function(){return i},isEqualNode:function(){return a}});let n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function o(e){let{type:t,props:r}=e,o=document.createElement(t);for(let e in r){if(!r.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===r[e])continue;let a=n[e]||e.toLowerCase();"script"===t&&("async"===a||"defer"===a||"noModule"===a)?o[a]=!!r[e]:o.setAttribute(a,r[e])}let{children:a,dangerouslySetInnerHTML:i}=r;return i?o.innerHTML=i.__html||"":a&&(o.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):""),o}function a(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let r=t.getAttribute("nonce");if(r&&!e.getAttribute("nonce")){let n=t.cloneNode(!0);return n.setAttribute("nonce",""),n.nonce=r,r===e.nonce&&e.isEqualNode(n)}}return e.isEqualNode(t)}function i(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let n=t.title?t.title[0]:null,o="";if(n){let{children:e}=n.props;o="string"==typeof e?e:Array.isArray(e)?e.join(""):""}o!==document.title&&(document.title=o),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]"),i=Number(n.content),u=[];for(let t=0,r=n.previousElementSibling;t<i;t++,r=(null==r?void 0:r.previousElementSibling)||null){var l;(null==r?void 0:null==(l=r.tagName)?void 0:l.toLowerCase())===e&&u.push(r)}let s=t.map(o).filter(e=>{for(let t=0,r=u.length;t<r;t++)if(a(u[t],e))return u.splice(t,1),!1;return!0});u.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),s.forEach(e=>r.insertBefore(e,n)),n.content=(i-u.length+s.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24500:function(e,t,r){"use strict";let n,o,a,i,u,l,s,c,f,d,p,h;Object.defineProperty(t,"__esModule",{value:!0});let m=r(61757);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{emitter:function(){return z},hydrate:function(){return ef},initialize:function(){return $},router:function(){return n},version:function(){return G}});let _=r(38754),g=r(85893);r(40037);let y=_._(r(67294)),b=_._(r(20745)),P=r(20077),v=_._(r(58967)),E=r(37171),S=r(12179),O=r(31735),j=r(38600),w=r(45758),R=r(45782),T=r(1493),M=_._(r(52071)),x=_._(r(21413)),I=_._(r(65736)),C=r(63622),A=r(37253),L=r(80676),N=r(98261),D=r(91566),k=r(71838),U=r(3068),F=r(82488),B=r(10213),H=_._(r(36920)),W=_._(r(57930)),q=_._(r(95179)),G="14.2.21",z=(0,v.default)(),V=e=>[].slice.call(e),X=!1;class Y extends y.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),n.isSsr&&(o.isFallback||o.nextExport&&((0,O.isDynamicRoute)(n.pathname)||location.search||X)||o.props&&o.props.__N_SSG&&(location.search||X))&&n.replace(n.pathname+"?"+String((0,j.assign)((0,j.urlQueryToSearchParams)(n.query),new URLSearchParams(location.search))),a,{_h:1,shallow:!o.isFallback&&!X}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function $(e){void 0===e&&(e={}),W.default.onSpanEnd(q.default),o=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=o,h=o.defaultLocale;let t=o.assetPrefix||"";if(self.__next_set_public_path__(""+t+"/_next/"),(0,w.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:o.runtimeConfig||{}}),a=(0,R.getURL)(),(0,k.hasBasePath)(a)&&(a=(0,D.removeBasePath)(a)),o.scriptLoader){let{initScriptLoader:e}=r(95026);e(o.scriptLoader)}i=new x.default(o.buildId,t);let s=e=>{let[t,r]=e;return i.routeLoader.onEntrypoint(t,r)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(l=(0,M.default)()).getIsSsr=()=>n.isSsr,u=document.getElementById("__next"),{assetPrefix:t}}function K(e,t){return(0,g.jsx)(e,{...t})}function J(e){var t;let{children:r}=e,o=y.default.useMemo(()=>(0,F.adaptForAppRouterInstance)(n),[]);return(0,g.jsx)(Y,{fn:e=>Z({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e)),children:(0,g.jsx)(U.AppRouterContext.Provider,{value:o,children:(0,g.jsx)(B.SearchParamsContext.Provider,{value:(0,F.adaptForSearchParams)(n),children:(0,g.jsx)(F.PathnameContextProviderAdapter,{router:n,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t,children:(0,g.jsx)(B.PathParamsContext.Provider,{value:(0,F.adaptForPathParams)(n),children:(0,g.jsx)(E.RouterContext.Provider,{value:(0,A.makePublicRouterInstance)(n),children:(0,g.jsx)(P.HeadManagerContext.Provider,{value:l,children:(0,g.jsx)(N.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/ui/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1},children:r})})})})})})})})}let Q=e=>t=>{let r={...t,Component:p,err:o.err,router:n};return(0,g.jsx)(J,{children:K(e,r)})};function Z(e){let{App:t,err:u}=e;return console.error(u),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),i.loadPage("/_error").then(n=>{let{page:o,styleSheets:a}=n;return(null==s?void 0:s.Component)===o?Promise.resolve().then(()=>m._(r(18529))).then(n=>Promise.resolve().then(()=>m._(r(48141))).then(r=>(t=r.default,e.App=t,n))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:o,styleSheets:a}}).then(r=>{var i;let{ErrorComponent:l,styleSheets:s}=r,c=Q(t),f={Component:l,AppTree:c,router:n,ctx:{err:u,pathname:o.page,query:o.query,asPath:a,AppTree:c}};return Promise.resolve((null==(i=e.props)?void 0:i.err)?e.props:(0,R.loadGetInitialProps)(t,f)).then(t=>es({...e,err:u,Component:l,styleSheets:s,props:t}))})}function ee(e){let{callback:t}=e;return y.default.useLayoutEffect(()=>t(),[t]),null}let et={navigationStart:"navigationStart",beforeRender:"beforeRender",afterRender:"afterRender",afterHydrate:"afterHydrate",routeChange:"routeChange"},er={hydration:"Next.js-hydration",beforeHydration:"Next.js-before-hydration",routeChangeToRender:"Next.js-route-change-to-render",render:"Next.js-render"},en=null,eo=!0;function ea(){[et.beforeRender,et.afterHydrate,et.afterRender,et.routeChange].forEach(e=>performance.clearMarks(e))}function ei(){R.ST&&(performance.mark(et.afterHydrate),performance.getEntriesByName(et.beforeRender,"mark").length&&(performance.measure(er.beforeHydration,et.navigationStart,et.beforeRender),performance.measure(er.hydration,et.beforeRender,et.afterHydrate)),d&&performance.getEntriesByName(er.hydration).forEach(d),ea())}function eu(){if(!R.ST)return;performance.mark(et.afterRender);let e=performance.getEntriesByName(et.routeChange,"mark");e.length&&(performance.getEntriesByName(et.beforeRender,"mark").length&&(performance.measure(er.routeChangeToRender,e[0].name,et.beforeRender),performance.measure(er.render,et.beforeRender,et.afterRender),d&&(performance.getEntriesByName(er.render).forEach(d),performance.getEntriesByName(er.routeChangeToRender).forEach(d))),ea(),[er.routeChangeToRender,er.render].forEach(e=>performance.clearMeasures(e)))}function el(e){let{callbacks:t,children:r}=e;return y.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),y.default.useEffect(()=>{(0,I.default)(d)},[]),r}function es(e){let t,{App:r,Component:o,props:a,err:i}=e,l="initial"in e?void 0:e.styleSheets;o=o||s.Component;let f={...a=a||s.props,Component:o,err:i,router:n};s=f;let d=!1,p=new Promise((e,r)=>{c&&c(),t=()=>{c=null,e()},c=()=>{d=!0,c=null;let e=Error("Cancel rendering route");e.cancelled=!0,r(e)}});function h(){t()}!function(){if(!l)return;let e=new Set(V(document.querySelectorAll("style[data-n-href]")).map(e=>e.getAttribute("data-n-href"))),t=document.querySelector("noscript[data-n-css]"),r=null==t?void 0:t.getAttribute("data-n-css");l.forEach(t=>{let{href:n,text:o}=t;if(!e.has(n)){let e=document.createElement("style");e.setAttribute("data-n-href",n),e.setAttribute("media","x"),r&&e.setAttribute("nonce",r),document.head.appendChild(e),e.appendChild(document.createTextNode(o))}})}();let m=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(ee,{callback:function(){if(l&&!d){let e=new Set(l.map(e=>e.href)),t=V(document.querySelectorAll("style[data-n-href]")),r=t.map(e=>e.getAttribute("data-n-href"));for(let n=0;n<r.length;++n)e.has(r[n])?t[n].removeAttribute("media"):t[n].setAttribute("media","x");let n=document.querySelector("noscript[data-n-css]");n&&l.forEach(e=>{let{href:t}=e,r=document.querySelector('style[data-n-href="'+t+'"]');r&&(n.parentNode.insertBefore(r,n.nextSibling),n=r)}),V(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:r}=e.scroll;(0,S.handleSmoothScroll)(()=>{window.scrollTo(t,r)})}}}),(0,g.jsxs)(J,{children:[K(r,f),(0,g.jsx)(T.Portal,{type:"next-route-announcer",children:(0,g.jsx)(C.RouteAnnouncer,{})})]})]});return!function(e,t){R.ST&&performance.mark(et.beforeRender);let r=t(eo?ei:eu);en?(0,y.default.startTransition)(()=>{en.render(r)}):(en=b.default.hydrateRoot(e,r,{onRecoverableError:H.default}),eo=!1)}(u,e=>(0,g.jsx)(el,{callbacks:[e,h],children:m})),p}async function ec(e){if(e.err&&(void 0===e.Component||!e.isHydratePass)){await Z(e);return}try{await es(e)}catch(r){let t=(0,L.getProperError)(r);if(t.cancelled)throw t;await Z({...e,err:t})}}async function ef(e){let t=o.err;try{let e=await i.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:r}=e;f=t,r&&r.reportWebVitals&&(d=e=>{let t,{id:n,name:o,startTime:a,value:i,duration:u,entryType:l,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:n||f,name:o,startTime:a||t,value:null==i?u:i,label:"mark"===l||"measure"===l?"custom":"web-vital"};c&&(d.attribution=c),r.reportWebVitals(d)});let n=await i.routeLoader.whenEntrypoint(o.page);if("error"in n)throw n.error;p=n.component}catch(e){t=(0,L.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(o.dynamicIds),n=(0,A.createRouter)(o.page,o.query,a,{initialProps:o.props,pageLoader:i,App:f,Component:p,wrapApp:Q,err:t,isFallback:!!o.isFallback,subscription:(e,t,r)=>ec(Object.assign({},e,{App:t,scroll:r})),locale:o.locale,locales:o.locales,defaultLocale:h,domainLocales:o.domainLocales,isPreview:o.isPreview}),X=await n._initialMatchesMiddlewarePromise;let r={App:f,initial:!0,Component:p,props:o.props,err:t,isHydratePass:!0};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),ec(r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},62288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(99151);let n=r(24500);window.next={version:n.version,get router(){return n.router},emitter:n.emitter},(0,n.initialize)({}).then(()=>(0,n.hydrate)()).catch(console.error),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},68796:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return a}});let n=r(33575),o=r(80626),a=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:a}=(0,o.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+a};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(85575);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,n.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},21413:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=r(38754),o=r(41412),a=r(37399),i=n._(r(20116)),u=r(28878),l=r(31735),s=r(62757),c=r(33575),f=r(32856);r(45104);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:r,locale:n}=e,{pathname:f,query:d,search:p}=(0,s.parseRelativeUrl)(r),{pathname:h}=(0,s.parseRelativeUrl)(t),m=(0,c.removeTrailingSlash)(f);if("/"!==m[0])throw Error('Route name should start with a "/", got "'+m+'"');return(e=>{let t=(0,i.default)((0,c.removeTrailingSlash)((0,u.addLocale)(e,n)),".json");return(0,o.addBasePath)("/_next/data/"+this.buildId+t+p,!0)})(e.skipInterpolation?h:(0,l.isDynamicRoute)(m)?(0,a.interpolateAs)(f,h,d).result:m)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65736:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let o=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let a=!1;function i(e){n&&n(e)}let u=e=>{if(n=e,!a)for(let e of(a=!0,o))try{let t;t||(t=r(78018)),t["on"+e](i)}catch(t){console.warn("Failed to track "+e+" web-vital",t)}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1493:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return a}});let n=r(67294),o=r(73935),a=e=>{let{children:t,type:r}=e,[a,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=document.createElement(r);return document.body.appendChild(e),i(e),()=>{document.body.removeChild(e)}},[r]),a?(0,o.createPortal)(t,a):null};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91566:function(e,t,r){"use strict";function n(e){return(e=e.slice(3)).startsWith("/")||(e="/"+e),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(71838),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14509:function(e,t,r){"use strict";function n(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}}),r(80626),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66078:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},64813:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(38600),o=r(5058),a=r(12795),i=r(45782),u=r(68796),l=r(65853),s=r(72189),c=r(37399);function f(e,t,r){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,u.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:u}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(r,u)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RouteAnnouncer:function(){return l},default:function(){return s}});let n=r(38754),o=r(85893),a=n._(r(67294)),i=r(37253),u={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},l=()=>{let{asPath:e}=(0,i.useRouter)(),[t,r]=a.default.useState(""),n=a.default.useRef(e);return a.default.useEffect(()=>{if(n.current!==e){if(n.current=e,document.title)r(document.title);else{var t;let n=document.querySelector("h1");r((null!=(t=null==n?void 0:n.innerText)?t:null==n?void 0:n.textContent)||e)}}},[e]),(0,o.jsx)("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:u,children:t})},s=l;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},32856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createRouteLoader:function(){return m},getClientBuildManifest:function(){return p},isAssetError:function(){return s},markAssetError:function(){return l}}),r(38754),r(20116);let n=r(92518),o=r(66078),a=r(84878);function i(e,t,r){let n,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);let a=new Promise(e=>{n=e});return t.set(e,o={resolve:n,future:a}),r?r().then(e=>(n(e),e)).catch(r=>{throw t.delete(e),r}):a}let u=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,u,{})}function s(e){return e&&u in e}let c=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),f=()=>(0,a.getDeploymentIdQueryOrEmptyString)();function d(e,t,r){return new Promise((n,a)=>{let i=!1;e.then(e=>{i=!0,n(e)}).catch(a),(0,o.requestIdleCallback)(()=>setTimeout(()=>{i||a(r)},t))})}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):d(new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}}),3800,l(Error("Failed to load client build manifest")))}function h(e,t){return p().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let o=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:o.filter(e=>e.endsWith(".js")).map(e=>(0,n.__unsafeCreateTrustedScriptURL)(e)+f()),css:o.filter(e=>e.endsWith(".css")).map(e=>e+f())}})}function m(e){let t=new Map,r=new Map,n=new Map,a=new Map;function u(e){{var t;let n=r.get(e.toString());return n||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),n=new Promise((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),n))}}function s(e){let t=n.get(e);return t||n.set(e,t=fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>i(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),a.delete(e))})},loadRoute(r,n){return i(r,a,()=>{let o;return d(h(e,r).then(e=>{let{scripts:n,css:o}=e;return Promise.all([t.has(r)?[]:Promise.all(n.map(u)),Promise.all(o.map(s))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,n=Object.assign({styles:r},t);return"error"in t?t:n}).catch(e=>{if(n)throw e;return{error:e}}).finally(()=>null==o?void 0:o())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():h(e,t).then(e=>Promise.all(c?e.scripts.map(e=>{var t,r,n;return t=e.toString(),r="script",new Promise((e,o)=>{if(document.querySelector('\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]'))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=e,n.onerror=()=>o(l(Error("Failed to prefetch: "+t))),n.href=t,document.head.appendChild(n)})}):[])).then(()=>{(0,o.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},37253:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return a.default},createRouter:function(){return m},default:function(){return p},makePublicRouterInstance:function(){return _},useRouter:function(){return h},withRouter:function(){return l.default}});let n=r(38754),o=n._(r(67294)),a=n._(r(29668)),i=r(37171),u=n._(r(80676)),l=n._(r(538)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return s.router}Object.defineProperty(s,"events",{get:()=>a.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get:()=>d()[e]})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return d()[e](...r)}}),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach(e=>{s.ready(()=>{a.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let o="on"+e.charAt(0).toUpperCase()+e.substring(1);if(s[o])try{s[o](...r)}catch(e){console.error("Error when running the Router event: "+o),console.error((0,u.default)(e)?e.message+"\n"+e.stack:e+"")}})})});let p=s;function h(){let e=o.default.useContext(i.RouterContext);if(!e)throw Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");return e}function m(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.router=new a.default(...t),s.readyCallbacks.forEach(e=>e()),s.readyCallbacks=[],s.router}function _(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=a.default.events,f.forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return e[r](...n)}}),t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95026:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return _},initScriptLoader:function(){return g}});let n=r(38754),o=r(61757),a=r(85893),i=n._(r(73935)),u=o._(r(67294)),l=r(20077),s=r(52071),c=r(66078),f=new Map,d=new Set,p=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],h=e=>{if(i.default.preinit){e.forEach(e=>{i.default.preinit(e,{as:"style"})});return}{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},m=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:o=null,dangerouslySetInnerHTML:a,children:i="",strategy:u="afterInteractive",onError:l,stylesheets:c}=e,m=r||t;if(m&&d.has(m))return;if(f.has(t)){d.add(m),f.get(t).then(n,l);return}let _=()=>{o&&o(),d.add(m)},g=document.createElement("script"),y=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),_()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[r,n]of(a?(g.innerHTML=a.__html||"",_()):i?(g.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",_()):t&&(g.src=t,f.set(t,y)),Object.entries(e))){if(void 0===n||p.includes(r))continue;let e=s.DOMAttributeNames[r]||r.toLowerCase();g.setAttribute(e,n)}"worker"===u&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",u),c&&h(c),document.body.appendChild(g)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))}):m(e)}function g(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function y(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:o=null,strategy:s="afterInteractive",onError:f,stylesheets:p,...h}=e,{updateScripts:_,scripts:g,getIsSsr:y,appDir:b,nonce:P}=(0,u.useContext)(l.HeadManagerContext),v=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let e=t||r;v.current||(o&&e&&d.has(e)&&o(),v.current=!0)},[o,t,r]);let E=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{!E.current&&("afterInteractive"===s?m(e):"lazyOnload"===s&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))})),E.current=!0)},[e,s]),("beforeInteractive"===s||"worker"===s)&&(_?(g[s]=(g[s]||[]).concat([{id:t,src:r,onLoad:n,onReady:o,onError:f,...h}]),_(g)):y&&y()?d.add(t||r):y&&!y()&&m(e)),b){if(p&&p.forEach(e=>{i.default.preinit(e,{as:"style"})}),"beforeInteractive"===s)return r?(i.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:P,crossOrigin:h.crossOrigin}:{as:"script",nonce:P,crossOrigin:h.crossOrigin}),(0,a.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...h,id:t}])+")"}})):(h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...h,id:t}])+")"}}));"afterInteractive"===s&&r&&i.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:P,crossOrigin:h.crossOrigin}:{as:"script",nonce:P,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let b=y;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95179:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(45303);function o(e){if("ended"!==e.state.state)throw Error("Expected span to be ended");(0,n.sendMessage)(JSON.stringify({event:"span-end",startTime:e.startTime,endTime:e.state.endTime,spanName:e.name,attributes:e.attributes}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},57930:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(38754)._(r(58967));class o{end(e){if("ended"===this.state.state)throw Error("Span has already ended");this.state={state:"ended",endTime:null!=e?e:Date.now()},this.onSpanEnd(this)}constructor(e,t,r){var n,o;this.name=e,this.attributes=null!=(n=t.attributes)?n:{},this.startTime=null!=(o=t.startTime)?o:Date.now(),this.onSpanEnd=r,this.state={state:"inprogress"}}}class a{startSpan(e,t){return new o(e,t,this.handleSpanEnd)}onSpanEnd(e){return this._emitter.on("spanend",e),()=>{this._emitter.off("spanend",e)}}constructor(){this._emitter=(0,n.default)(),this.handleSpanEnd=e=>{this._emitter.emit("spanend",e)}}}let i=new a;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92518:function(e,t){"use strict";let r;function n(e){var t;return(null==(t=function(){if(void 0===r){var e;r=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return r}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99151:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(84878),self.__next_set_public_path__=e=>{r.p=e},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},538:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}}),r(38754);let n=r(85893);r(67294);let o=r(37253);function a(e){function t(t){return(0,n.jsx)(e,{router:(0,o.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},48141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(38754),o=r(85893),a=n._(r(67294)),i=r(45782);async function u(e){let{Component:t,ctx:r}=e;return{pageProps:await (0,i.loadGetInitialProps)(t,r)}}class l extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}l.origGetInitialProps=u,l.getInitialProps=u,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},18529:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let n=r(38754),o=r(85893),a=n._(r(67294)),i=n._(r(50494)),u={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}let s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class c extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||u[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:s.error,children:[(0,o.jsx)(i.default,{children:(0,o.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:s.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:s.h1,children:e}):null,(0,o.jsx)("div",{style:s.wrap,children:(0,o.jsxs)("h2",{style:s.h2,children:[this.props.title||e?r:(0,o.jsx)(o.Fragment,{children:"Application error: a client-side exception has occurred (see the browser console for more information)"}),"."]})})]})]})}}c.displayName="ErrorPage",c.getInitialProps=l,c.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return n}});let n=r(38754)._(r(67294)).default.createContext({})},98579:function(e,t){"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},3068:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return u}});let n=r(38754)._(r(67294)),o=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(null),u=n.default.createContext(null),l=n.default.createContext(new Set)},69970:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return r}});class r{static from(e,t){void 0===t&&(t=1e-4);let n=new r(e.length,t);for(let t of e)n.add(t);return n}export(){return{numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray}}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){this.getHashValues(e).forEach(e=>{this.bitArray[e]=1})}contains(e){return this.getHashValues(e).every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let n=function(e){let t=0;for(let r=0;r<e.length;r++)t=Math.imul(t^e.charCodeAt(r),1540483477),t^=t>>>13,t=Math.imul(t,1540483477);return t>>>0}(""+e+r)%this.numBits;t.push(n)}return t}constructor(e,t=1e-4){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},45104:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{APP_BUILD_MANIFEST:function(){return y},APP_CLIENT_INTERNALS:function(){return $},APP_PATHS_MANIFEST:function(){return m},APP_PATH_ROUTES_MANIFEST:function(){return _},AUTOMATIC_FONT_OPTIMIZATION_MANIFEST:function(){return C},BARREL_OPTIMIZATION_PREFIX:function(){return H},BLOCKED_PAGES:function(){return D},BUILD_ID_FILE:function(){return N},BUILD_MANIFEST:function(){return g},CLIENT_PUBLIC_FILES_PATH:function(){return k},CLIENT_REFERENCE_MANIFEST:function(){return W},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return J},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return X},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return K},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return Q},COMPILER_INDEXES:function(){return a},COMPILER_NAMES:function(){return o},CONFIG_FILES:function(){return L},DEFAULT_RUNTIME_WEBPACK:function(){return et},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return eu},DEV_CLIENT_PAGES_MANIFEST:function(){return T},DEV_MIDDLEWARE_MANIFEST:function(){return x},EDGE_RUNTIME_WEBPACK:function(){return er},EDGE_UNSUPPORTED_NODE_APIS:function(){return ep},EXPORT_DETAIL:function(){return S},EXPORT_MARKER:function(){return E},FUNCTIONS_CONFIG_MANIFEST:function(){return b},GOOGLE_FONT_PROVIDER:function(){return ea},IMAGES_MANIFEST:function(){return w},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return V},MIDDLEWARE_BUILD_MANIFEST:function(){return G},MIDDLEWARE_MANIFEST:function(){return M},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return n.default},NEXT_BUILTIN_DOCUMENT:function(){return B},NEXT_FONT_MANIFEST:function(){return v},OPTIMIZED_FONT_PROVIDERS:function(){return ei},PAGES_MANIFEST:function(){return h},PHASE_DEVELOPMENT_SERVER:function(){return f},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return p},PHASE_PRODUCTION_BUILD:function(){return s},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return d},PRERENDER_MANIFEST:function(){return O},REACT_LOADABLE_MANIFEST:function(){return I},ROUTES_MANIFEST:function(){return j},RSC_MODULE_TYPES:function(){return ed},SERVER_DIRECTORY:function(){return A},SERVER_FILES_MANIFEST:function(){return R},SERVER_PROPS_ID:function(){return eo},SERVER_REFERENCE_MANIFEST:function(){return q},STATIC_PROPS_ID:function(){return en},STATIC_STATUS_PAGES:function(){return es},STRING_LITERAL_DROP_BUNDLE:function(){return F},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return P},SYSTEM_ENTRYPOINTS:function(){return eh},TRACE_OUTPUT_VERSION:function(){return ec},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ef},UNDERSCORE_NOT_FOUND_ROUTE:function(){return i},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return u}});let n=r(38754)._(r(60979)),o={client:"client",server:"server",edgeServer:"edge-server"},a={[o.client]:0,[o.server]:1,[o.edgeServer]:2},i="/_not-found",u=""+i+"/page",l="phase-export",s="phase-production-build",c="phase-production-server",f="phase-development-server",d="phase-test",p="phase-info",h="pages-manifest.json",m="app-paths-manifest.json",_="app-path-routes-manifest.json",g="build-manifest.json",y="app-build-manifest.json",b="functions-config-manifest.json",P="subresource-integrity-manifest",v="next-font-manifest",E="export-marker.json",S="export-detail.json",O="prerender-manifest.json",j="routes-manifest.json",w="images-manifest.json",R="required-server-files.json",T="_devPagesManifest.json",M="middleware-manifest.json",x="_devMiddlewareManifest.json",I="react-loadable-manifest.json",C="font-manifest.json",A="server",L=["next.config.js","next.config.mjs"],N="BUILD_ID",D=["/_document","/_app","/_error"],k="public",U="static",F="__NEXT_DROP_CLIENT_FILE__",B="__NEXT_BUILTIN_DOCUMENT__",H="__barrel_optimize__",W="client-reference-manifest",q="server-reference-manifest",G="middleware-build-manifest",z="middleware-react-loadable-manifest",V="interception-route-rewrite-manifest",X="main",Y=""+X+"-app",$="app-pages-internals",K="react-refresh",J="amp",Q="webpack",Z="polyfills",ee=Symbol(Z),et="webpack-runtime",er="edge-runtime-webpack",en="__N_SSG",eo="__N_SSP",ea="https://fonts.googleapis.com/",ei=[{url:ea,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],eu={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},es=["/500"],ec=1,ef=6e3,ed={client:"client",server:"server"},ep=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eh=new Set([X,K,J,Y]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34592:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(e){return r.test(e)?e.replace(n,"\\$&"):e}},20077:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(38754)._(r(67294)).default.createContext({})},50494:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return m},defaultHead:function(){return f}});let n=r(38754),o=r(61757),a=r(85893),i=o._(r(67294)),u=n._(r(3657)),l=r(75010),s=r(20077),c=r(98579);function f(e){void 0===e&&(e=!1);let t=[(0,a.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function d(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(79784);let p=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:r}=t;return e.reduce(d,[]).reverse().concat(f(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return o=>{let a=!0,i=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){i=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?a=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?a=!1:t.add(o.type);break;case"meta":for(let e=0,t=p.length;e<t;e++){let t=p[e];if(o.props.hasOwnProperty(t)){if("charSet"===t)r.has(t)?a=!1:r.add(t);else{let e=o.props[t],r=n[t]||new Set;("name"!==t||!i)&&r.has(e)?a=!1:(r.add(e),n[t]=r)}}}}return a}}()).reverse().map((e,t)=>{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,i.default.cloneElement(e,t)}return i.default.cloneElement(e,{key:n})})}let m=function(e){let{children:t}=e,r=(0,i.useContext)(l.AmpStateContext),n=(0,i.useContext)(s.HeadManagerContext);return(0,a.jsx)(u.default,{reduceComponentsToState:h,headManager:n,inAmpMode:(0,c.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},10213:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathParamsContext:function(){return i},PathnameContext:function(){return a},SearchParamsContext:function(){return o}});let n=r(67294),o=(0,n.createContext)(null),a=(0,n.createContext)(null),i=(0,n.createContext)(null)},91623:function(e,t){"use strict";function r(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}})},98261:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=r(38754)._(r(67294)),o=r(64666),a=n.default.createContext(o.imageConfigDefault)},64666:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],unoptimized:!1}},58299:function(e,t){"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},85575:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},58967:function(e,t){"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e[t]||[]).slice().map(e=>{e(...n)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},60979:function(e){"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},3349:function(e,t){"use strict";function r(e){let t=(null==e?void 0:e.replace(/^\/+|\/+$/g,""))||!1;if(!t)return"";if(URL.canParse(t)){let e=new URL(t).toString();return e.endsWith("/")?e.slice(0,-1):e}return"/"+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizedAssetPrefix",{enumerable:!0,get:function(){return r}})},75876:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return a}});let n=r(72189),o=r(24212);function a(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},75078:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},24212:function(e,t){"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},37171:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(38754)._(r(67294)).default.createContext(null)},82488:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathnameContextProviderAdapter:function(){return p},adaptForAppRouterInstance:function(){return c},adaptForPathParams:function(){return d},adaptForSearchParams:function(){return f}});let n=r(61757),o=r(85893),a=n._(r(67294)),i=r(10213),u=r(72189),l=r(4232),s=r(36309);function c(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},fastRefresh(){},push(t,r){let{scroll:n}=void 0===r?{}:r;e.push(t,void 0,{scroll:n})},replace(t,r){let{scroll:n}=void 0===r?{}:r;e.replace(t,void 0,{scroll:n})},prefetch(t){e.prefetch(t)}}}function f(e){return e.isReady&&e.query?(0,l.asPathToSearchParams)(e.asPath):new URLSearchParams}function d(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys((0,s.getRouteRegex)(e.pathname).groups))t[r]=e.query[r];return t}function p(e){let{children:t,router:r,...n}=e,l=(0,a.useRef)(n.isAutoExport),s=(0,a.useMemo)(()=>{let e;let t=l.current;if(t&&(l.current=!1),(0,u.isDynamicRoute)(r.pathname)&&(r.isFallback||t&&!r.isReady))return null;try{e=new URL(r.asPath,"http://f")}catch(e){return"/"}return e.pathname},[r.asPath,r.isFallback,r.isReady,r.pathname]);return(0,o.jsx)(i.PathnameContext.Provider,{value:s,children:t})}},29668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createKey:function(){return q},default:function(){return V},matchesMiddleware:function(){return N}});let n=r(38754),o=r(61757),a=r(33575),i=r(32856),u=r(95026),l=o._(r(80676)),s=r(75876),c=r(91623),f=n._(r(58967)),d=r(45782),p=r(31735),h=r(62757);r(72431);let m=r(43323),_=r(36309),g=r(5058);r(97193);let y=r(80626),b=r(28878),P=r(14509),v=r(91566),E=r(41412),S=r(71838),O=r(64813),j=r(79423),w=r(58754),R=r(15604),T=r(9012),M=r(65853),x=r(6312),I=r(12795),C=r(37399),A=r(12179);function L(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function N(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,y.parsePath)(e.asPath),n=(0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,o=(0,E.addBasePath)((0,b.addLocale)(n,e.locale));return t.some(e=>new RegExp(e.regexp).test(o))}function D(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function k(e,t,r){let[n,o]=(0,O.resolveHref)(e,t,!0),a=(0,d.getLocationOrigin)(),i=n.startsWith(a),u=o&&o.startsWith(a);n=D(n),o=o?D(o):o;let l=i?n:(0,E.addBasePath)(n),s=r?D((0,O.resolveHref)(e,r)):o||n;return{url:l,as:u?s:(0,E.addBasePath)(s)}}function U(e,t){let r=(0,a.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,_.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,a.removeTrailingSlash)(e))}async function F(e){if(!await N(e)||!e.fetchData)return null;let t=await e.fetchData(),r=await function(e,t,r){let n={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!1},o=t.headers.get("x-nextjs-rewrite"),u=o||t.headers.get("x-nextjs-matched-path"),l=t.headers.get("x-matched-path");if(!l||u||l.includes("__next_data_catchall")||l.includes("/_error")||l.includes("/404")||(u=l),u){if(u.startsWith("/")){let t=(0,h.parseRelativeUrl)(u),l=(0,w.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),s=(0,a.removeTrailingSlash)(l.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,i.getClientBuildManifest)()]).then(a=>{let[i,{__rewrites:u}]=a,f=(0,b.addLocale)(l.pathname,l.locale);if((0,p.isDynamicRoute)(f)||!o&&i.includes((0,c.normalizeLocalePath)((0,v.removeBasePath)(f),r.router.locales).pathname)){let r=(0,w.getNextPathnameInfo)((0,h.parseRelativeUrl)(e).pathname,{nextConfig:n,parseData:!0});f=(0,E.addBasePath)(r.pathname),t.pathname=f}if(!i.includes(s)){let e=U(s,i);e!==s&&(s=e)}let d=i.includes(s)?s:U((0,c.normalizeLocalePath)((0,v.removeBasePath)(t.pathname),r.router.locales).pathname,i);if((0,p.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,_.getRouteRegex)(d))(f);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,y.parsePath)(e);return Promise.resolve({type:"redirect-external",destination:""+(0,R.formatNextPathnameInfo)({...(0,w.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""})+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,y.parsePath)(s),t=(0,R.formatNextPathnameInfo)({...(0,w.getNextPathnameInfo)(e.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}let B=Symbol("SSG_DATA_NOT_FOUND");function H(e){try{return JSON.parse(e)}catch(e){return null}}function W(e){let{dataHref:t,inflightCache:r,isPrefetch:n,hasMiddleware:o,isServerRender:a,parseJSON:u,persistCache:l,isBackground:s,unstable_skipClientCache:c}=e,{href:f}=new URL(t,window.location.href),d=e=>{var s;return(function e(t,r,n){return fetch(t,{credentials:"same-origin",method:n.method||"GET",headers:Object.assign({},n.headers,{"x-nextjs-data":"1"})}).then(o=>!o.ok&&r>1&&o.status>=500?e(t,r-1,n):o)})(t,a?3:1,{headers:Object.assign({},n?{purpose:"prefetch"}:{},n&&o?{"x-middleware-prefetch":"1"}:{}),method:null!=(s=null==e?void 0:e.method)?s:"GET"}).then(r=>r.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:t,response:r,text:"",json:{},cacheKey:f}:r.text().then(e=>{if(!r.ok){if(o&&[301,302,307,308].includes(r.status))return{dataHref:t,response:r,text:e,json:{},cacheKey:f};if(404===r.status){var n;if(null==(n=H(e))?void 0:n.notFound)return{dataHref:t,json:{notFound:B},response:r,text:e,cacheKey:f}}let u=Error("Failed to load static props");throw a||(0,i.markAssetError)(u),u}return{dataHref:t,json:u?H(e):null,response:r,text:e,cacheKey:f}})).then(e=>(l&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[f],e)).catch(e=>{throw c||delete r[f],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,i.markAssetError)(e),e})};return c&&l?d({}).then(e=>("no-cache"!==e.response.headers.get("x-middleware-cache")&&(r[f]=Promise.resolve(e)),e)):void 0!==r[f]?r[f]:r[f]=d(s?{method:"HEAD"}:{})}function q(){return Math.random().toString(36).slice(2,10)}function G(e){let{url:t,router:r}=e;if(t===(0,E.addBasePath)((0,b.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let z=e=>{let{route:t,router:r}=e,n=!1,o=r.clc=()=>{n=!0};return()=>{if(n){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}o===r.clc&&(r.clc=null)}};class V{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,n){{let l=!1,s=!1;for(let c of[e,t])if(c){let t=(0,a.removeTrailingSlash)(new URL(c,"http://n").pathname),f=(0,E.addBasePath)((0,b.addLocale)(t,r||this.locale));if(t!==(0,a.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var o,i,u;for(let e of(l=l||!!(null==(o=this._bfl_s)?void 0:o.contains(t))||!!(null==(i=this._bfl_s)?void 0:i.contains(f)),[t,f])){let t=e.split("/");for(let e=0;!s&&e<t.length+1;e++){let r=t.slice(0,e).join("/");if(r&&(null==(u=this._bfl_d)?void 0:u.contains(r))){s=!0;break}}}if(l||s){if(n)return!0;return G({url:(0,E.addBasePath)((0,b.addLocale)(e,r||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}}}}return!1}async change(e,t,r,n,o){var s,c,f,O,j,w,R,x,A;let D,F;if(!(0,M.isLocalURL)(t))return G({url:t,router:this}),!1;let H=1===n._h;H||n.shallow||await this._bfl(r,void 0,n.locale);let W=H||n._shouldResolveHref||(0,y.parsePath)(t).pathname===(0,y.parsePath)(r).pathname,q={...this.state},z=!0!==this.isReady;this.isReady=!0;let X=this.isSsr;if(H||(this.isSsr=!1),H&&this.clc)return!1;let Y=q.locale;d.ST&&performance.mark("routeChange");let{shallow:$=!1,scroll:K=!0}=n,J={shallow:$};this._inFlightRoute&&this.clc&&(X||V.events.emit("routeChangeError",L(),this._inFlightRoute,J),this.clc(),this.clc=null),r=(0,E.addBasePath)((0,b.addLocale)((0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,n.locale,this.defaultLocale));let Q=(0,P.removeLocale)((0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,q.locale);this._inFlightRoute=r;let Z=Y!==q.locale;if(!H&&this.onlyAHashChange(Q)&&!Z){q.asPath=Q,V.events.emit("hashChangeStart",r,J),this.changeState(e,t,r,{...n,scroll:!1}),K&&this.scrollToHash(Q);try{await this.set(q,this.components[q.route],null)}catch(e){throw(0,l.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,J),e}return V.events.emit("hashChangeComplete",r,J),!0}let ee=(0,h.parseRelativeUrl)(t),{pathname:et,query:er}=ee;try{[D,{__rewrites:F}]=await Promise.all([this.pageLoader.getPageList(),(0,i.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return G({url:r,router:this}),!1}this.urlIsNew(Q)||Z||(e="replaceState");let en=r;et=et?(0,a.removeTrailingSlash)((0,v.removeBasePath)(et)):et;let eo=(0,a.removeTrailingSlash)(et),ea=r.startsWith("/")&&(0,h.parseRelativeUrl)(r).pathname;if(null==(s=this.components[et])?void 0:s.__appRouter)return G({url:r,router:this}),new Promise(()=>{});let ei=!!(ea&&eo!==ea&&(!(0,p.isDynamicRoute)(eo)||!(0,m.getRouteMatcher)((0,_.getRouteRegex)(eo))(ea))),eu=!n.shallow&&await N({asPath:r,locale:q.locale,router:this});if(H&&eu&&(W=!1),W&&"/_error"!==et&&(n._shouldResolveHref=!0,ee.pathname=U(et,D),ee.pathname===et||(et=ee.pathname,ee.pathname=(0,E.addBasePath)(et),eu||(t=(0,g.formatWithValidation)(ee)))),!(0,M.isLocalURL)(r))return G({url:r,router:this}),!1;en=(0,P.removeLocale)((0,v.removeBasePath)(en),q.locale),eo=(0,a.removeTrailingSlash)(et);let el=!1;if((0,p.isDynamicRoute)(eo)){let e=(0,h.parseRelativeUrl)(en),n=e.pathname,o=(0,_.getRouteRegex)(eo);el=(0,m.getRouteMatcher)(o)(n);let a=eo===n,i=a?(0,C.interpolateAs)(eo,n,er):{};if(el&&(!a||i.result))a?r=(0,g.formatWithValidation)(Object.assign({},e,{pathname:i.result,query:(0,I.omit)(er,i.params)})):Object.assign(er,el);else{let e=Object.keys(o.groups).filter(e=>!er[e]&&!o.groups[e].optional);if(e.length>0&&!eu)throw Error((a?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+n+") is incompatible with the `href` value ("+eo+"). ")+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}}H||V.events.emit("routeChangeStart",r,J);let es="/404"===this.pathname||"/_error"===this.pathname;try{let a=await this.getRouteInfo({route:eo,pathname:et,query:er,as:r,resolvedAs:en,routeProps:J,locale:q.locale,isPreview:q.isPreview,hasMiddleware:eu,unstable_skipClientCache:n.unstable_skipClientCache,isQueryUpdating:H&&!this.isFallback,isMiddlewareRewrite:ei});if(H||n.shallow||await this._bfl(r,"resolvedAs"in a?a.resolvedAs:void 0,q.locale),"route"in a&&eu){eo=et=a.route||eo,J.shallow||(er=Object.assign({},a.query||{},er));let e=(0,S.hasBasePath)(ee.pathname)?(0,v.removeBasePath)(ee.pathname):ee.pathname;if(el&&et!==e&&Object.keys(el).forEach(e=>{el&&er[e]===el[e]&&delete er[e]}),(0,p.isDynamicRoute)(et)){let e=!J.shallow&&a.resolvedAs?a.resolvedAs:(0,E.addBasePath)((0,b.addLocale)(new URL(r,location.href).pathname,q.locale),!0);(0,S.hasBasePath)(e)&&(e=(0,v.removeBasePath)(e));let t=(0,_.getRouteRegex)(et),n=(0,m.getRouteMatcher)(t)(new URL(e,location.href).pathname);n&&Object.assign(er,n)}}if("type"in a){if("redirect-internal"===a.type)return this.change(e,a.newUrl,a.newAs,n);return G({url:a.destination,router:this}),new Promise(()=>{})}let i=a.Component;if(i&&i.unstable_scriptLoader&&[].concat(i.unstable_scriptLoader()).forEach(e=>{(0,u.handleClientScriptLoad)(e.props)}),(a.__N_SSG||a.__N_SSP)&&a.props){if(a.props.pageProps&&a.props.pageProps.__N_REDIRECT){n.locale=!1;let t=a.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==a.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,h.parseRelativeUrl)(t);r.pathname=U(r.pathname,D);let{url:o,as:a}=k(this,t,t);return this.change(e,o,a,n)}return G({url:t,router:this}),new Promise(()=>{})}if(q.isPreview=!!a.props.__N_PREVIEW,a.props.notFound===B){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(a=await this.getRouteInfo({route:e,pathname:e,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:q.locale,isPreview:q.isPreview,isNotFound:!0}),"type"in a)throw Error("Unexpected middleware effect on /404")}}H&&"/_error"===this.pathname&&(null==(f=self.__NEXT_DATA__.props)?void 0:null==(c=f.pageProps)?void 0:c.statusCode)===500&&(null==(O=a.props)?void 0:O.pageProps)&&(a.props.pageProps.statusCode=500);let s=n.shallow&&q.route===(null!=(j=a.route)?j:eo),d=null!=(w=n.scroll)?w:!H&&!s,g=null!=o?o:d?{x:0,y:0}:null,y={...q,route:eo,pathname:et,query:er,asPath:Q,isFallback:!1};if(H&&es){if(a=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:q.locale,isPreview:q.isPreview,isQueryUpdating:H&&!this.isFallback}),"type"in a)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(x=self.__NEXT_DATA__.props)?void 0:null==(R=x.pageProps)?void 0:R.statusCode)===500&&(null==(A=a.props)?void 0:A.pageProps)&&(a.props.pageProps.statusCode=500);try{await this.set(y,a,g)}catch(e){throw(0,l.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,J),e}return!0}if(V.events.emit("beforeHistoryChange",r,J),this.changeState(e,t,r,n),!(H&&!g&&!z&&!Z&&(0,T.compareRouterStates)(y,this.state))){try{await this.set(y,a,g)}catch(e){if(e.cancelled)a.error=a.error||e;else throw e}if(a.error)throw H||V.events.emit("routeChangeError",a.error,Q,J),a.error;H||V.events.emit("routeChangeComplete",r,J),d&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,l.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n){void 0===n&&(n={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,key:this._key="pushState"!==e?this._key:q()},"",r))}async handleRouteInfoError(e,t,r,n,o,a){if(console.error(e),e.cancelled)throw e;if((0,i.isAssetError)(e)||a)throw V.events.emit("routeChangeError",e,n,o),G({url:n,router:this}),L();try{let n;let{page:o,styleSheets:a}=await this.fetchComponent("/_error"),i={props:n,Component:o,styleSheets:a,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(o,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError((0,l.default)(e)?e:Error(e+""),t,r,n,o,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:n,as:o,resolvedAs:i,routeProps:u,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:h,isMiddlewareRewrite:m,isNotFound:_}=e,y=t;try{var b,P,E,S;let e=this.components[y];if(u.shallow&&e&&this.route===y)return e;let t=z({route:y,router:this});f&&(e=void 0);let l=!e||"initial"in e?void 0:e,O={dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),skipInterpolation:!0,asPath:_?"/404":i,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:h?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:h},w=h&&!m?null:await F({fetchData:()=>W(O),asPath:_?"/404":i,locale:s,router:this}).catch(e=>{if(h)return null;throw e});if(w&&("/_error"===r||"/404"===r)&&(w.effect=void 0),h&&(w?w.json=self.__NEXT_DATA__.props:w={json:self.__NEXT_DATA__.props}),t(),(null==w?void 0:null==(b=w.effect)?void 0:b.type)==="redirect-internal"||(null==w?void 0:null==(P=w.effect)?void 0:P.type)==="redirect-external")return w.effect;if((null==w?void 0:null==(E=w.effect)?void 0:E.type)==="rewrite"){let t=(0,a.removeTrailingSlash)(w.effect.resolvedHref),o=await this.pageLoader.getPageList();if((!h||o.includes(t))&&(y=t,r=w.effect.resolvedHref,n={...n,...w.effect.parsedAs.query},i=(0,v.removeBasePath)((0,c.normalizeLocalePath)(w.effect.parsedAs.pathname,this.locales).pathname),e=this.components[y],u.shallow&&e&&this.route===y&&!f))return{...e,route:y}}if((0,j.isAPIRoute)(y))return G({url:o,router:this}),new Promise(()=>{});let R=l||await this.fetchComponent(y).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),T=null==w?void 0:null==(S=w.response)?void 0:S.headers.get("x-middleware-skip"),M=R.__N_SSG||R.__N_SSP;T&&(null==w?void 0:w.dataHref)&&delete this.sdc[w.dataHref];let{props:x,cacheKey:I}=await this._getData(async()=>{if(M){if((null==w?void 0:w.json)&&!T)return{cacheKey:w.cacheKey,props:w.json};let e=(null==w?void 0:w.dataHref)?w.dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),asPath:i,locale:s}),t=await W({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:T?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(R.Component,{pathname:r,query:n,asPath:o,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return R.__N_SSP&&O.dataHref&&I&&delete this.sdc[I],this.isPreview||!R.__N_SSG||h||W(Object.assign({},O,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),x.pageProps=Object.assign({},x.pageProps),R.props=x,R.route=y,R.query=n,R.resolvedAs=i,this.components[y]=R,R}catch(e){return this.handleRouteInfoError((0,l.getProperError)(e),r,n,o,u)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#",2),[n,o]=e.split("#",2);return!!o&&t===n&&r===o||t===n&&r!==o}scrollToHash(e){let[,t=""]=e.split("#",2);(0,A.handleSmoothScroll)(()=>{if(""===t||"top"===t){window.scrollTo(0,0);return}let e=decodeURIComponent(t),r=document.getElementById(e);if(r){r.scrollIntoView();return}let n=document.getElementsByName(e)[0];n&&n.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(e)})}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){if(void 0===t&&(t=e),void 0===r&&(r={}),(0,x.isBot)(window.navigator.userAgent))return;let n=(0,h.parseRelativeUrl)(e),o=n.pathname,{pathname:i,query:u}=n,l=i,s=await this.pageLoader.getPageList(),c=t,f=void 0!==r.locale?r.locale||void 0:this.locale,d=await N({asPath:t,locale:f,router:this});n.pathname=U(n.pathname,s),(0,p.isDynamicRoute)(n.pathname)&&(i=n.pathname,n.pathname=i,Object.assign(u,(0,m.getRouteMatcher)((0,_.getRouteRegex)(n.pathname))((0,y.parsePath)(t).pathname)||{}),d||(e=(0,g.formatWithValidation)(n)));let b=await F({fetchData:()=>W({dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:l,query:u}),skipInterpolation:!0,asPath:c,locale:f}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:f,router:this});if((null==b?void 0:b.effect.type)==="rewrite"&&(n.pathname=b.effect.resolvedHref,i=b.effect.resolvedHref,u={...u,...b.effect.parsedAs.query},c=b.effect.parsedAs.pathname,e=(0,g.formatWithValidation)(n)),(null==b?void 0:b.effect.type)==="redirect-external")return;let P=(0,a.removeTrailingSlash)(i);await this._bfl(t,c,r.locale,!0)&&(this.components[o]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(P).then(t=>!!t&&W({dataHref:(null==b?void 0:b.json)?null==b?void 0:b.dataHref:this.pageLoader.getDataHref({href:e,asPath:c,locale:f}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](P)])}async fetchComponent(e){let t=z({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return W({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,(0,d.loadGetInitialProps)(r,{AppTree:n,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,n,{initialProps:o,pageLoader:i,App:u,wrapApp:l,Component:s,err:c,subscription:f,isFallback:m,locale:_,locales:y,defaultLocale:b,domainLocales:P,isPreview:v}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=q(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let n=e.state;if(!n){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,g.formatWithValidation)({pathname:(0,E.addBasePath)(e),query:t}),(0,d.getURL)());return}if(n.__NA){window.location.reload();return}if(!n.__N||r&&this.locale===n.options.locale&&n.as===this.asPath)return;let{url:o,as:a,options:i,key:u}=n;this._key=u;let{pathname:l}=(0,h.parseRelativeUrl)(o);(!this.isSsr||a!==(0,E.addBasePath)(this.asPath)||l!==(0,E.addBasePath)(this.pathname))&&(!this._bps||this._bps(n))&&this.change("replaceState",o,a,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale,_h:0}),t)};let S=(0,a.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:c,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP}),this.components["/_app"]={Component:u,styleSheets:[]};{let{BloomFilter:e}=r(69970),t={numItems:5,errorRate:1e-4,numBits:96,numHashes:14,bitArray:[1,1,0,0,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,1,1,1,1,0,0,1,1,1,1,0,1,1,1,0,0,0,1,0,1,1,1,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,1,1,1,1,0,1,0,1,0,0,1,1,0,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,1,0,1,1,0,1,1,1,0]},n={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==n?void 0:n.numHashes)&&(this._bfl_d=new e(n.numItems,n.errorRate),this._bfl_d.import(n))}this.events=V.events,this.pageLoader=i;let O=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="/ui",this.sub=f,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!O&&!self.location.search),this.state={route:S,pathname:e,query:t,asPath:O?e:n,isPreview:!!v,locale:void 0,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!n.startsWith("//")){let r={locale:_},o=(0,d.getURL)();this._initialMatchesMiddlewarePromise=N({router:this,locale:_,asPath:o}).then(a=>(r._shouldResolveHref=n!==e,this.changeState("replaceState",a?o:(0,g.formatWithValidation)({pathname:(0,E.addBasePath)(e),query:t}),o,r),a))}window.addEventListener("popstate",this.onPopState)}}V.events=(0,f.default)()},68043:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return a}});let n=r(77652),o=r(25298);function a(e,t,r,a){if(!t||t===r)return e;let i=e.toLowerCase();return!a&&((0,o.pathHasPrefix)(i,"/api")||(0,o.pathHasPrefix)(i,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},77652:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(80626);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+t+r+o+a}},96152:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return o}});let n=r(80626);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+r+t+o+a}},42340:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return a},normalizeRscURL:function(){return i}});let n=r(75078),o=r(73737);function a(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function i(e){return e.replace(/\.rsc($|\?)/,"$1")}},4232:function(e,t){"use strict";function r(e){return new URL(e,"http://n").searchParams}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"asPathToSearchParams",{enumerable:!0,get:function(){return r}})},9012:function(e,t){"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=r.length;n--;){let o=r[n];if("query"===o){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let n=r.length;n--;){let o=r[n];if(!t.query.hasOwnProperty(o)||e.query[o]!==t.query[o])return!1}}else if(!t.hasOwnProperty(o)||e[o]!==t[o])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},15604:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return u}});let n=r(33575),o=r(77652),a=r(96152),i=r(68043);function u(e){let t=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,a.addPathSuffix)((0,o.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,o.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,a.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},5058:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}});let n=r(61757)._(r(38600)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",l=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(s+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let c=e.search||l&&"?"+l||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),u&&"#"!==u[0]&&(u="#"+u),c&&"?"!==c[0]&&(c="?"+c),""+a+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+u}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return a(e)}},20116:function(e,t){"use strict";function r(e,t){return void 0===t&&(t=""),("/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:e)+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},58754:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});let n=r(91623),o=r(43691),a=r(25298);function i(e,t){var r,i;let{basePath:u,i18n:l,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},c={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};u&&(0,a.pathHasPrefix)(c.pathname,u)&&(c.pathname=(0,o.removePathPrefix)(c.pathname,u),c.basePath=u);let f=c.pathname;if(c.pathname.startsWith("/_next/data/")&&c.pathname.endsWith(".json")){let e=c.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];c.buildId=r,f="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(c.pathname=f)}if(l){let e=t.i18nProvider?t.i18nProvider.analyze(c.pathname):(0,n.normalizeLocalePath)(c.pathname,l.locales);c.locale=e.detectedLocale,c.pathname=null!=(i=e.pathname)?i:c.pathname,!e.detectedLocale&&c.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(f):(0,n.normalizeLocalePath)(f,l.locales)).detectedLocale&&(c.locale=e.detectedLocale)}return c}},12179:function(e,t){"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},72189:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(317),o=r(31735)},37399:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let n=r(43323),o=r(36309);function a(e,t,r){let a="",i=(0,o.getRouteRegex)(e),u=i.groups,l=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;a=e;let s=Object.keys(u);return s.every(e=>{let t=l[e]||"",{repeat:r,optional:n}=u[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(a=a.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:s,result:a}}},6312:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},31735:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let n=r(92407),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},65853:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(45782),o=r(71838);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},12795:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},80626:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r<t);return n||t>-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},62757:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return a}});let n=r(45782),o=r(38600);function a(e,t){let r=new URL((0,n.getLocationOrigin)()),a=t?new URL(t,r):e.startsWith(".")?new URL(window.location.href):r,{pathname:i,searchParams:u,search:l,hash:s,href:c,origin:f}=new URL(e,a);if(f!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,o.searchParamsToUrlQuery)(u),search:l,hash:s,href:c.slice(r.origin.length)}}},25298:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(80626);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},38600:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,o]=e;Array.isArray(o)?o.forEach(e=>t.append(r,n(e))):t.set(r,n(o))}),t}function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.forEach(t=>{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},43691:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return o}});let n=r(25298);function o(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},33575:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},43323:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(45782);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},i={};return Object.keys(r).forEach(e=>{let t=r[e],n=o[t.pos];void 0!==n&&(i[e]=~n.indexOf("/")?n.split("/").map(e=>a(e)):t.repeat?[a(n)]:a(n))}),i}}},36309:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return d},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});let n=r(92407),o=r(34592),a=r(33575);function i(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function u(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),r={},u=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&a){let{key:e,optional:n,repeat:l}=i(a[1]);return r[e]={pos:u++,repeat:l,optional:n},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!a)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=i(a[1]);return r[e]={pos:u++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=u(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:a,keyPrefix:u}=e,{key:l,optional:s,repeat:c}=i(n),f=l.replace(/\W/g,"");u&&(f=""+u+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=r()),u?a[f]=""+u+l:a[f]=l;let p=t?(0,o.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function c(e,t){let r;let i=(0,a.removeTrailingSlash)(e).slice(1).split("/"),u=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:i.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&a){let[r]=e.split(a[0]);return s({getSafeRouteKey:u,interceptionMarker:r,segment:a[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return a?s({getSafeRouteKey:u,segment:a[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function f(e,t){let r=c(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function d(e,t){let{parameterizedRoute:r}=u(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=c(e,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function a(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},45758:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},setConfig:function(){return o}});let n=()=>r;function o(e){r=e}},73737:function(e,t){"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});let n="__PAGE__",o="__DEFAULT__"},3657:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(67294),o=n.useLayoutEffect,a=n.useEffect;function i(e){let{headManager:t,reduceComponentsToState:r}=e;function i(){if(t&&t.mountedInstances){let o=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(o,e))}}return o(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},45782:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return g},NormalizeError:function(){return m},PageNotFoundError:function(){return _},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return a},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return b}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return r||(r=!0,t=e(...o)),t}}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>o.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class _ extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},79784:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},78018:function(e){var t,r,n,o,a,i,u,l,s,c,f,d,p,h,m,_,g,y,b,P,v,E,S,O,j,w,R,T,M,x,I,C,A,L,N,D,k,U,F,B,H,W,q,G,z,V;(t={}).d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},void 0!==t&&(t.ab="//"),r={},t.r(r),t.d(r,{getCLS:function(){return S},getFCP:function(){return P},getFID:function(){return x},getINP:function(){return W},getLCP:function(){return G},getTTFB:function(){return V},onCLS:function(){return S},onFCP:function(){return P},onFID:function(){return x},onINP:function(){return W},onLCP:function(){return G},onTTFB:function(){return V}}),l=-1,s=function(e){addEventListener("pageshow",function(t){t.persisted&&(l=t.timeStamp,e(t))},!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},f=function(){var e=c();return e&&e.activationStart||0},d=function(e,t){var r=c(),n="navigate";return l>=0?n="back-forward-cache":r&&(n=document.prerendering||f()>0?"prerender":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},p=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){t(e.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},h=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},m=function(e,t,r,n){var o,a;return function(i){var u;t.value>=0&&(i||n)&&((a=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=a,t.rating=(u=t.value)>r[1]?"poor":u>r[0]?"needs-improvement":"good",e(t))}},_=-1,g=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(){h(function(e){_=e.timeStamp},!0)},b=function(){return _<0&&(_=g(),y(),s(function(){setTimeout(function(){_=g(),y()},0)})),{get firstHiddenTime(){return _}}},P=function(e,t){t=t||{};var r,n=[1800,3e3],o=b(),a=d("FCP"),i=function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(l&&l.disconnect(),e.startTime<o.firstHiddenTime&&(a.value=e.startTime-f(),a.entries.push(e),r(!0)))})},u=window.performance&&window.performance.getEntriesByName&&window.performance.getEntriesByName("first-contentful-paint")[0],l=u?null:p("paint",i);(u||l)&&(r=m(e,a,n,t.reportAllChanges),u&&i([u]),s(function(o){r=m(e,a=d("FCP"),n,t.reportAllChanges),requestAnimationFrame(function(){requestAnimationFrame(function(){a.value=performance.now()-o.timeStamp,r(!0)})})}))},v=!1,E=-1,S=function(e,t){t=t||{};var r=[.1,.25];v||(P(function(e){E=e.value}),v=!0);var n,o=function(t){E>-1&&e(t)},a=d("CLS",0),i=0,u=[],l=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,u.push(e)):(i=e.value,u=[e]),i>a.value&&(a.value=i,a.entries=u,n())}})},c=p("layout-shift",l);c&&(n=m(o,a,r,t.reportAllChanges),h(function(){l(c.takeRecords()),n(!0)}),s(function(){i=0,E=-1,n=m(o,a=d("CLS",0),r,t.reportAllChanges)}))},O={passive:!0,capture:!0},j=new Date,w=function(e,t){n||(n=t,o=e,a=new Date,M(removeEventListener),R())},R=function(){if(o>=0&&o<a-j){var e={entryType:"first-input",name:n.type,target:n.target,cancelable:n.cancelable,startTime:n.timeStamp,processingStart:n.timeStamp+o};i.forEach(function(t){t(e)}),i=[]}},T=function(e){if(e.cancelable){var t,r,n,o=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){w(o,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,O),removeEventListener("pointercancel",r,O)},addEventListener("pointerup",t,O),addEventListener("pointercancel",r,O)):w(o,e)}},M=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,T,O)})},x=function(e,t){t=t||{};var r,a=[100,300],u=b(),l=d("FID"),c=function(e){e.startTime<u.firstHiddenTime&&(l.value=e.processingStart-e.startTime,l.entries.push(e),r(!0))},f=function(e){e.forEach(c)},_=p("first-input",f);r=m(e,l,a,t.reportAllChanges),_&&h(function(){f(_.takeRecords()),_.disconnect()},!0),_&&s(function(){r=m(e,l=d("FID"),a,t.reportAllChanges),i=[],o=-1,n=null,M(addEventListener),i.push(c),R()})},I=0,C=1/0,A=0,L=function(e){e.forEach(function(e){e.interactionId&&(C=Math.min(C,e.interactionId),I=(A=Math.max(A,e.interactionId))?(A-C)/7+1:0)})},N=function(){return u?I:performance.interactionCount||0},D=function(){"interactionCount"in performance||u||(u=p("event",L,{type:"event",buffered:!0,durationThreshold:0}))},k=0,U=function(){return N()-k},F=[],B={},H=function(e){var t=F[F.length-1],r=B[e.interactionId];if(r||F.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};B[n.id]=n,F.push(n)}F.sort(function(e,t){return t.latency-e.latency}),F.splice(10).forEach(function(e){delete B[e.id]})}},W=function(e,t){t=t||{};var r=[200,500];D();var n,o=d("INP"),a=function(e){e.forEach(function(e){e.interactionId&&H(e),"first-input"!==e.entryType||F.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||H(e)});var t,r=(t=Math.min(F.length-1,Math.floor(U()/50)),F[t]);r&&r.latency!==o.value&&(o.value=r.latency,o.entries=r.entries,n())},i=p("event",a,{durationThreshold:t.durationThreshold||40});n=m(e,o,r,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),h(function(){a(i.takeRecords()),o.value<0&&U()>0&&(o.value=0,o.entries=[]),n(!0)}),s(function(){F=[],k=N(),n=m(e,o=d("INP"),r,t.reportAllChanges)}))},q={},G=function(e,t){t=t||{};var r,n=[2500,4e3],o=b(),a=d("LCP"),i=function(e){var t=e[e.length-1];if(t){var n=t.startTime-f();n<o.firstHiddenTime&&(a.value=n,a.entries=[t],r())}},u=p("largest-contentful-paint",i);if(u){r=m(e,a,n,t.reportAllChanges);var l=function(){q[a.id]||(i(u.takeRecords()),u.disconnect(),q[a.id]=!0,r(!0))};["keydown","click"].forEach(function(e){addEventListener(e,l,{once:!0,capture:!0})}),h(l,!0),s(function(o){r=m(e,a=d("LCP"),n,t.reportAllChanges),requestAnimationFrame(function(){requestAnimationFrame(function(){a.value=performance.now()-o.timeStamp,q[a.id]=!0,r(!0)})})})}},z=function e(t){document.prerendering?addEventListener("prerenderingchange",function(){return e(t)},!0):"complete"!==document.readyState?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},V=function(e,t){t=t||{};var r=[800,1800],n=d("TTFB"),o=m(e,n,r,t.reportAllChanges);z(function(){var a=c();if(a){if(n.value=Math.max(a.responseStart-f(),0),n.value<0||n.value>performance.now())return;n.entries=[a],o(!0),s(function(){(o=m(e,n=d("TTFB",0),r,t.reportAllChanges))(!0)})}})},e.exports=r},79423:function(e,t){"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},80676:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return a}});let n=r(58299);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function a(e){return o(e)?e:Error((0,n.isPlainObject)(e)?JSON.stringify(e):e+"")}},92407:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return a}});let n=r(42340),o=["(..)(..)","(.)","(..)","(...)"];function a(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function i(e){let t,r,a;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,a]=e.split(r,2);break}if(!t||!r||!a)throw Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":a="/"===t?`/${a}`:t+"/"+a;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);a=t.split("/").slice(0,-1).concat(a).join("/");break;case"(...)":a="/"+a;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);a=i.slice(0,-2).concat(a).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:a}}},72431:function(){},38754:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},61757:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}return o.default=e,r&&r.set(e,o),o}r.r(t),r.d(t,{_:function(){return o},_interop_require_wildcard:function(){return o}})}},function(e){e.O(0,[774],function(){return e(e.s=62288)}),_N_E=e.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/pages/_app-15e2daefa259f0b5.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/pages/_app-15e2daefa259f0b5.js new file mode 100644 index 00000000..ac148c7b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/pages/_app-15e2daefa259f0b5.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{41597:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return u(48141)}])}},function(n){var _=function(_){return n(n.s=_)};n.O(0,[774,179],function(){return _(41597),_(37253)}),_N_E=n.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/pages/_error-28b803cb2479b966.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/pages/_error-28b803cb2479b966.js new file mode 100644 index 00000000..34202ab5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/pages/_error-28b803cb2479b966.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{81981:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(18529)}])}},function(n){n.O(0,[888,774,179],function(){return n(n.s=81981)}),_N_E=n.O()}]);
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/polyfills-42372ed130431b0a.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/polyfills-42372ed130431b0a.js new file mode 100644 index 00000000..ab422b94 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/polyfills-42372ed130431b0a.js @@ -0,0 +1 @@ +!function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r,n,o=function(t){return t&&t.Math===Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),s=!a(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),c=Function.prototype.call,f=s?c.bind(c):function(){return c.apply(c,arguments)},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p=h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l,v={f:p},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g=Function.prototype,y=g.call,m=s&&g.bind.bind(y,y),b=s?m:function(t){return function(){return y.apply(t,arguments)}},w=b({}.toString),S=b("".slice),E=function(t){return S(w(t),8,-1)},O=Object,x=b("".split),R=a(function(){return!O("z").propertyIsEnumerable(0)})?function(t){return"String"===E(t)?x(t,""):O(t)}:O,P=function(t){return null==t},A=TypeError,j=function(t){if(P(t))throw new A("Can't call method on "+t);return t},k=function(t){return R(j(t))},I="object"==typeof document&&document.all,T=void 0===I&&void 0!==I?function(t){return"function"==typeof t||t===I}:function(t){return"function"==typeof t},M=function(t){return"object"==typeof t?null!==t:T(t)},L=function(t,e){return arguments.length<2?T(r=i[t])?r:void 0:i[t]&&i[t][e];var r},U=b({}.isPrototypeOf),N=i.navigator,C=N&&N.userAgent,_=C?String(C):"",F=i.process,B=i.Deno,D=F&&F.versions||B&&B.version,z=D&&D.v8;z&&(n=(r=z.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&_&&(!(r=_.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=_.match(/Chrome\/(\d+)/))&&(n=+r[1]);var W=n,q=i.String,H=!!Object.getOwnPropertySymbols&&!a(function(){var t=Symbol("symbol detection");return!q(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41}),$=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,K=Object,G=$?function(t){return"symbol"==typeof t}:function(t){var e=L("Symbol");return T(e)&&U(e.prototype,K(t))},V=String,Y=function(t){try{return V(t)}catch(t){return"Object"}},X=TypeError,J=function(t){if(T(t))return t;throw new X(Y(t)+" is not a function")},Q=function(t,e){var r=t[e];return P(r)?void 0:J(r)},Z=TypeError,tt=Object.defineProperty,et=function(t,e){try{tt(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},rt=e(function(t){var e="__core-js_shared__",r=t.exports=i[e]||et(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})}),nt=function(t,e){return rt[t]||(rt[t]=e||{})},ot=Object,it=function(t){return ot(j(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},st=0,ct=Math.random(),ft=b(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++st+ct,36)},ht=i.Symbol,pt=nt("wks"),vt=$?ht.for||ht:ht&&ht.withoutSetter||lt,dt=function(t){return ut(pt,t)||(pt[t]=H&&ut(ht,t)?ht[t]:vt("Symbol."+t)),pt[t]},gt=TypeError,yt=dt("toPrimitive"),mt=function(t,e){if(!M(t)||G(t))return t;var r,n=Q(t,yt);if(n){if(void 0===e&&(e="default"),r=f(n,t,e),!M(r)||G(r))return r;throw new gt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!M(n=f(r,t)))return n;if(T(r=t.valueOf)&&!M(n=f(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!M(n=f(r,t)))return n;throw new Z("Can't convert object to primitive value")}(t,e)},bt=function(t){var e=mt(t,"string");return G(e)?e:e+""},wt=i.document,St=M(wt)&&M(wt.createElement),Et=function(t){return St?wt.createElement(t):{}},Ot=!u&&!a(function(){return 7!==Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a}),xt=Object.getOwnPropertyDescriptor,Rt={f:u?xt:function(t,e){if(t=k(t),e=bt(e),Ot)try{return xt(t,e)}catch(t){}if(ut(t,e))return d(!f(v.f,t,e),t[e])}},Pt=u&&a(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),At=String,jt=TypeError,kt=function(t){if(M(t))return t;throw new jt(At(t)+" is not an object")},It=TypeError,Tt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Lt="enumerable",Ut="configurable",Nt="writable",Ct={f:u?Pt?function(t,e,r){if(kt(t),e=bt(e),kt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Nt in r&&!r[Nt]){var n=Mt(t,e);n&&n[Nt]&&(t[e]=r.value,r={configurable:Ut in r?r[Ut]:n[Ut],enumerable:Lt in r?r[Lt]:n[Lt],writable:!1})}return Tt(t,e,r)}:Tt:function(t,e,r){if(kt(t),e=bt(e),kt(r),Ot)try{return Tt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new It("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_t=u?function(t,e,r){return Ct.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,Bt=u&&Object.getOwnPropertyDescriptor,Dt=ut(Ft,"name"),zt={EXISTS:Dt,PROPER:Dt&&"something"===function(){}.name,CONFIGURABLE:Dt&&(!u||u&&Bt(Ft,"name").configurable)},Wt=b(Function.toString);T(rt.inspectSource)||(rt.inspectSource=function(t){return Wt(t)});var qt,Ht,$t,Kt=rt.inspectSource,Gt=i.WeakMap,Vt=T(Gt)&&/native code/.test(String(Gt)),Yt=nt("keys"),Xt=function(t){return Yt[t]||(Yt[t]=lt(t))},Jt={},Qt="Object already initialized",Zt=i.TypeError;if(Vt||rt.state){var te=rt.state||(rt.state=new(0,i.WeakMap));te.get=te.get,te.has=te.has,te.set=te.set,qt=function(t,e){if(te.has(t))throw new Zt(Qt);return e.facade=t,te.set(t,e),e},Ht=function(t){return te.get(t)||{}},$t=function(t){return te.has(t)}}else{var ee=Xt("state");Jt[ee]=!0,qt=function(t,e){if(ut(t,ee))throw new Zt(Qt);return e.facade=t,_t(t,ee,e),e},Ht=function(t){return ut(t,ee)?t[ee]:{}},$t=function(t){return ut(t,ee)}}var re,ne={set:qt,get:Ht,has:$t,enforce:function(t){return $t(t)?Ht(t):qt(t,{})},getterFor:function(t){return function(e){var r;if(!M(e)||(r=Ht(e)).type!==t)throw new Zt("Incompatible receiver, "+t+" required");return r}}},oe=e(function(t){var e=zt.CONFIGURABLE,r=ne.enforce,n=ne.get,o=String,i=Object.defineProperty,s=b("".slice),c=b("".replace),f=b([].join),l=u&&!a(function(){return 8!==i(function(){},"length",{value:8}).length}),h=String(String).split("String"),p=t.exports=function(t,n,a){"Symbol("===s(o(n),0,7)&&(n="["+c(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!ut(t,"name")||e&&t.name!==n)&&(u?i(t,"name",{value:n,configurable:!0}):t.name=n),l&&a&&ut(a,"arity")&&t.length!==a.arity&&i(t,"length",{value:a.arity});try{a&&ut(a,"constructor")&&a.constructor?u&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=r(t);return ut(p,"source")||(p.source=f(h,"string"==typeof n?n:"")),t};Function.prototype.toString=p(function(){return T(this)&&n(this).source||Kt(this)},"toString")}),ie=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&oe(r,i,n),n.global)o?t[e]=r:et(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ct.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ae=Math.ceil,ue=Math.floor,se=Math.trunc||function(t){var e=+t;return(e>0?ue:ae)(e)},ce=function(t){var e=+t;return e!=e||0===e?0:se(e)},fe=Math.max,le=Math.min,he=function(t,e){var r=ce(t);return r<0?fe(r+e,0):le(r,e)},pe=Math.min,ve=function(t){var e=ce(t);return e>0?pe(e,9007199254740991):0},de=function(t){return ve(t.length)},ge=function(t){return function(e,r,n){var o=k(e),i=de(o);if(0===i)return!t&&-1;var a,u=he(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},ye={includes:ge(!0),indexOf:ge(!1)},me=ye.indexOf,be=b([].push),we=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!ut(Jt,r)&&ut(n,r)&&be(i,r);for(;e.length>o;)ut(n,r=e[o++])&&(~me(i,r)||be(i,r));return i},Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=Se.concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(t){return we(t,Ee)}},xe={f:Object.getOwnPropertySymbols},Re=b([].concat),Pe=L("Reflect","ownKeys")||function(t){var e=Oe.f(kt(t)),r=xe.f;return r?Re(e,r(t)):e},Ae=function(t,e,r){for(var n=Pe(e),o=Ct.f,i=Rt.f,a=0;a<n.length;a++){var u=n[a];ut(t,u)||r&&ut(r,u)||o(t,u,i(e,u))}},je=/#|\.prototype\./,ke=function(t,e){var r=Te[Ie(t)];return r===Le||r!==Me&&(T(e)?a(e):!!e)},Ie=ke.normalize=function(t){return String(t).replace(je,".").toLowerCase()},Te=ke.data={},Me=ke.NATIVE="N",Le=ke.POLYFILL="P",Ue=ke,Ne=Rt.f,Ce=function(t,e){var r,n,o,a,u,s=t.target,c=t.global,f=t.stat;if(r=c?i:f?i[s]||et(s,{}):i[s]&&i[s].prototype)for(n in e){if(a=e[n],o=t.dontCallGetSet?(u=Ne(r,n))&&u.value:r[n],!Ue(c?n:s+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof a==typeof o)continue;Ae(a,o)}(t.sham||o&&o.sham)&&_t(a,"sham",!0),ie(r,n,a,t)}},_e=Object.keys||function(t){return we(t,Se)},Fe=u&&!Pt?Object.defineProperties:function(t,e){kt(t);for(var r,n=k(e),o=_e(e),i=o.length,a=0;i>a;)Ct.f(t,r=o[a++],n[r]);return t},Be={f:Fe},De=L("document","documentElement"),ze="prototype",We="script",qe=Xt("IE_PROTO"),He=function(){},$e=function(t){return"<"+We+">"+t+"</"+We+">"},Ke=function(t){t.write($e("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ge=function(){try{re=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Ge="undefined"!=typeof document?document.domain&&re?Ke(re):(e=Et("iframe"),r="java"+We+":",e.style.display="none",De.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write($e("document.F=Object")),t.close(),t.F):Ke(re);for(var n=Se.length;n--;)delete Ge[ze][Se[n]];return Ge()};Jt[qe]=!0;var Ve=Object.create||function(t,e){var r;return null!==t?(He[ze]=kt(t),r=new He,He[ze]=null,r[qe]=t):r=Ge(),void 0===e?r:Be.f(r,e)},Ye=Ct.f,Xe=dt("unscopables"),Je=Array.prototype;void 0===Je[Xe]&&Ye(Je,Xe,{configurable:!0,value:Ve(null)});var Qe=function(t){Je[Xe][t]=!0};Ce({target:"Array",proto:!0},{at:function(t){var e=it(this),r=de(e),n=ce(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:e[o]}}),Qe("at");var Ze=function(t,e){return b(i[t].prototype[e])},tr=(Ze("Array","at"),TypeError),er=function(t,e){if(!delete t[e])throw new tr("Cannot delete property "+Y(e)+" of "+Y(t))},rr=Math.min,nr=[].copyWithin||function(t,e){var r=it(this),n=de(r),o=he(t,n),i=he(e,n),a=arguments.length>2?arguments[2]:void 0,u=rr((void 0===a?n:he(a,n))-i,n-o),s=1;for(i<o&&o<i+u&&(s=-1,i+=u-1,o+=u-1);u-- >0;)i in r?r[o]=r[i]:er(r,o),o+=s,i+=s;return r};Ce({target:"Array",proto:!0},{copyWithin:nr}),Qe("copyWithin"),Ze("Array","copyWithin"),Ce({target:"Array",proto:!0},{fill:function(t){for(var e=it(this),r=de(e),n=arguments.length,o=he(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:he(i,r);a>o;)e[o++]=t;return e}}),Qe("fill"),Ze("Array","fill");var or=function(t){if("Function"===E(t))return b(t)},ir=or(or.bind),ar=function(t,e){return J(t),void 0===e?t:s?ir(t,e):function(){return t.apply(e,arguments)}},ur=Array.isArray||function(t){return"Array"===E(t)},sr={};sr[dt("toStringTag")]="z";var cr="[object z]"===String(sr),fr=dt("toStringTag"),lr=Object,hr="Arguments"===E(function(){return arguments}()),pr=cr?E:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=lr(t),fr))?r:hr?E(e):"Object"===(n=E(e))&&T(e.callee)?"Arguments":n},vr=function(){},dr=L("Reflect","construct"),gr=/^\s*(?:class|function)\b/,yr=b(gr.exec),mr=!gr.test(vr),br=function(t){if(!T(t))return!1;try{return dr(vr,[],t),!0}catch(t){return!1}},wr=function(t){if(!T(t))return!1;switch(pr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!yr(gr,Kt(t))}catch(t){return!0}};wr.sham=!0;var Sr=!dr||a(function(){var t;return br(br.call)||!br(Object)||!br(function(){t=!0})||t})?wr:br,Er=dt("species"),Or=Array,xr=function(t,e){return new(function(t){var e;return ur(t)&&(Sr(e=t.constructor)&&(e===Or||ur(e.prototype))||M(e)&&null===(e=e[Er]))&&(e=void 0),void 0===e?Or:e}(t))(0===e?0:e)},Rr=b([].push),Pr=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,f,l){for(var h,p,v=it(s),d=R(v),g=de(d),y=ar(c,f),m=0,b=l||xr,w=e?b(s,g):r||a?b(s,0):void 0;g>m;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:Rr(w,h)}else switch(t){case 4:return!1;case 7:Rr(w,h)}return i?-1:n||o?o:w}},Ar={forEach:Pr(0),map:Pr(1),filter:Pr(2),some:Pr(3),every:Pr(4),find:Pr(5),findIndex:Pr(6),filterReject:Pr(7)},jr=Ar.find,kr="find",Ir=!0;kr in[]&&Array(1)[kr](function(){Ir=!1}),Ce({target:"Array",proto:!0,forced:Ir},{find:function(t){return jr(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe(kr),Ze("Array","find");var Tr=Ar.findIndex,Mr="findIndex",Lr=!0;Mr in[]&&Array(1)[Mr](function(){Lr=!1}),Ce({target:"Array",proto:!0,forced:Lr},{findIndex:function(t){return Tr(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe(Mr),Ze("Array","findIndex");var Ur=TypeError,Nr=function(t){if(t>9007199254740991)throw Ur("Maximum allowed index exceeded");return t},Cr=function(t,e,r,n,o,i,a,u){for(var s,c,f=o,l=0,h=!!a&&ar(a,u);l<n;)l in r&&(s=h?h(r[l],l,e):r[l],i>0&&ur(s)?(c=de(s),f=Cr(t,e,s,c,f,i-1)-1):(Nr(f+1),t[f]=s),f++),l++;return f},_r=Cr;Ce({target:"Array",proto:!0},{flatMap:function(t){var e,r=it(this),n=de(r);return J(t),(e=xr(r,0)).length=_r(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}}),Qe("flatMap"),Ze("Array","flatMap"),Ce({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=it(this),r=de(e),n=xr(e,0);return n.length=_r(n,e,e,r,0,void 0===t?1:ce(t)),n}}),Qe("flat"),Ze("Array","flat");var Fr,Br,Dr,zr=String,Wr=function(t){if("Symbol"===pr(t))throw new TypeError("Cannot convert a Symbol value to a string");return zr(t)},qr=b("".charAt),Hr=b("".charCodeAt),$r=b("".slice),Kr=function(t){return function(e,r){var n,o,i=Wr(j(e)),a=ce(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Hr(i,a))<55296||n>56319||a+1===u||(o=Hr(i,a+1))<56320||o>57343?t?qr(i,a):n:t?$r(i,a,a+2):o-56320+(n-55296<<10)+65536}},Gr={codeAt:Kr(!1),charAt:Kr(!0)},Vr=!a(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Yr=Xt("IE_PROTO"),Xr=Object,Jr=Xr.prototype,Qr=Vr?Xr.getPrototypeOf:function(t){var e=it(t);if(ut(e,Yr))return e[Yr];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof Xr?Jr:null},Zr=dt("iterator"),tn=!1;[].keys&&("next"in(Dr=[].keys())?(Br=Qr(Qr(Dr)))!==Object.prototype&&(Fr=Br):tn=!0);var en=!M(Fr)||a(function(){var t={};return Fr[Zr].call(t)!==t});en&&(Fr={}),T(Fr[Zr])||ie(Fr,Zr,function(){return this});var rn={IteratorPrototype:Fr,BUGGY_SAFARI_ITERATORS:tn},nn=Ct.f,on=dt("toStringTag"),an=function(t,e,r){t&&!r&&(t=t.prototype),t&&!ut(t,on)&&nn(t,on,{configurable:!0,value:e})},un={},sn=rn.IteratorPrototype,cn=function(){return this},fn=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ve(sn,{next:d(+!n,r)}),an(t,o,!1),un[o]=cn,t},ln=function(t,e,r){try{return b(J(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},hn=String,pn=TypeError,vn=function(t){if(function(t){return M(t)||null===t}(t))return t;throw new pn("Can't set "+hn(t)+" as a prototype")},dn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=ln(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return j(r),vn(n),M(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),gn=zt.PROPER,yn=zt.CONFIGURABLE,mn=rn.IteratorPrototype,bn=rn.BUGGY_SAFARI_ITERATORS,wn=dt("iterator"),Sn="keys",En="values",On="entries",xn=function(){return this},Rn=function(t,e,r,n,o,i,a){fn(r,e,n);var u,s,c,l=function(t){if(t===o&&g)return g;if(!bn&&t&&t in v)return v[t];switch(t){case Sn:case En:case On:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",p=!1,v=t.prototype,d=v[wn]||v["@@iterator"]||o&&v[o],g=!bn&&d||l(o),y="Array"===e&&v.entries||d;if(y&&(u=Qr(y.call(new t)))!==Object.prototype&&u.next&&(Qr(u)!==mn&&(dn?dn(u,mn):T(u[wn])||ie(u,wn,xn)),an(u,h,!0)),gn&&o===En&&d&&d.name!==En&&(yn?_t(v,"name",En):(p=!0,g=function(){return f(d,this)})),o)if(s={values:l(En),keys:i?g:l(Sn),entries:l(On)},a)for(c in s)(bn||p||!(c in v))&&ie(v,c,s[c]);else Ce({target:e,proto:!0,forced:bn||p},s);return v[wn]!==g&&ie(v,wn,g,{name:o}),un[e]=g,s},Pn=function(t,e){return{value:t,done:e}},An=Gr.charAt,jn="String Iterator",kn=ne.set,In=ne.getterFor(jn);Rn(String,"String",function(t){kn(this,{type:jn,string:Wr(t),index:0})},function(){var t,e=In(this),r=e.string,n=e.index;return n>=r.length?Pn(void 0,!0):(t=An(r,n),e.index+=t.length,Pn(t,!1))});var Tn=function(t,e,r){var n,o;kt(t);try{if(!(n=Q(t,"return"))){if("throw"===e)throw r;return r}n=f(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return kt(n),r},Mn=function(t,e,r,n){try{return n?e(kt(r)[0],r[1]):e(r)}catch(e){Tn(t,"throw",e)}},Ln=dt("iterator"),Un=Array.prototype,Nn=function(t){return void 0!==t&&(un.Array===t||Un[Ln]===t)},Cn=function(t,e,r){u?Ct.f(t,e,d(0,r)):t[e]=r},_n=dt("iterator"),Fn=function(t){if(!P(t))return Q(t,_n)||Q(t,"@@iterator")||un[pr(t)]},Bn=TypeError,Dn=function(t,e){var r=arguments.length<2?Fn(t):e;if(J(r))return kt(f(r,t));throw new Bn(Y(t)+" is not iterable")},zn=Array,Wn=function(t){var e=it(t),r=Sr(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=ar(o,n>2?arguments[2]:void 0));var a,u,s,c,l,h,p=Fn(e),v=0;if(!p||this===zn&&Nn(p))for(a=de(e),u=r?new this(a):zn(a);a>v;v++)h=i?o(e[v],v):e[v],Cn(u,v,h);else for(u=r?new this:[],l=(c=Dn(e,p)).next;!(s=f(l,c)).done;v++)h=i?Mn(c,o,[s.value,v],!0):s.value,Cn(u,v,h);return u.length=v,u},qn=dt("iterator"),Hn=!1;try{var $n=0,Kn={next:function(){return{done:!!$n++}},return:function(){Hn=!0}};Kn[qn]=function(){return this},Array.from(Kn,function(){throw 2})}catch(t){}var Gn=function(t,e){try{if(!e&&!Hn)return!1}catch(t){return!1}var r=!1;try{var n={};n[qn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Vn=!Gn(function(t){Array.from(t)});Ce({target:"Array",stat:!0,forced:Vn},{from:Wn});var Yn=i,Xn=ye.includes,Jn=a(function(){return!Array(1).includes()});Ce({target:"Array",proto:!0,forced:Jn},{includes:function(t){return Xn(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe("includes"),Ze("Array","includes");var Qn=Ct.f,Zn="Array Iterator",to=ne.set,eo=ne.getterFor(Zn),ro=Rn(Array,"Array",function(t,e){to(this,{type:Zn,target:k(t),index:0,kind:e})},function(){var t=eo(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Pn(void 0,!0);switch(t.kind){case"keys":return Pn(r,!1);case"values":return Pn(e[r],!1)}return Pn([r,e[r]],!1)},"values"),no=un.Arguments=un.Array;if(Qe("keys"),Qe("values"),Qe("entries"),u&&"values"!==no.name)try{Qn(no,"name",{value:"values"})}catch(t){}cr||ie(Object.prototype,"toString",cr?{}.toString:function(){return"[object "+pr(this)+"]"},{unsafe:!0}),Ze("Array","values");var oo=Array,io=a(function(){function t(){}return!(oo.of.call(t)instanceof t)});Ce({target:"Array",stat:!0,forced:io},{of:function(){for(var t=0,e=arguments.length,r=new(Sr(this)?this:oo)(e);e>t;)Cn(r,t,arguments[t++]);return r.length=e,r}});var ao=dt("hasInstance"),uo=Function.prototype;ao in uo||Ct.f(uo,ao,{value:oe(function(t){if(!T(this)||!M(t))return!1;var e=this.prototype;return M(e)?U(e,t):t instanceof this},ao)}),dt("hasInstance");var so=function(t,e,r){return r.get&&oe(r.get,e,{getter:!0}),r.set&&oe(r.set,e,{setter:!0}),Ct.f(t,e,r)},co=zt.EXISTS,fo=Function.prototype,lo=b(fo.toString),ho=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,po=b(ho.exec);u&&!co&&so(fo,"name",{configurable:!0,get:function(){try{return po(ho,lo(this))[1]}catch(t){return""}}});var vo=b([].slice),go=Oe.f,yo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mo={f:function(t){return yo&&"Window"===E(t)?function(t){try{return go(t)}catch(t){return vo(yo)}}(t):go(k(t))}},bo=a(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),wo=Object.isExtensible,So=a(function(){wo(1)})||bo?function(t){return!!M(t)&&(!bo||"ArrayBuffer"!==E(t))&&(!wo||wo(t))}:wo,Eo=!a(function(){return Object.isExtensible(Object.preventExtensions({}))}),Oo=e(function(t){var e=Ct.f,r=!1,n=lt("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},r=!0;var t=Oe.f,e=b([].splice),o={};o[n]=1,t(o).length&&(Oe.f=function(r){for(var o=t(r),i=0,a=o.length;i<a;i++)if(o[i]===n){e(o,i,1);break}return o},Ce({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:mo.f}))},fastKey:function(t,e){if(!M(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!ut(t,n)){if(!So(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!ut(t,n)){if(!So(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Eo&&r&&So(t)&&!ut(t,n)&&i(t),t}};Jt[n]=!0}),xo=TypeError,Ro=function(t,e){this.stopped=t,this.result=e},Po=Ro.prototype,Ao=function(t,e,r){var n,o,i,a,u,s,c,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),d=ar(e,r&&r.that),g=function(t){return n&&Tn(n,"normal",t),new Ro(!0,t)},y=function(t){return l?(kt(t),v?d(t[0],t[1],g):d(t[0],t[1])):v?d(t,g):d(t)};if(h)n=t.iterator;else if(p)n=t;else{if(!(o=Fn(t)))throw new xo(Y(t)+" is not iterable");if(Nn(o)){for(i=0,a=de(t);a>i;i++)if((u=y(t[i]))&&U(Po,u))return u;return new Ro(!1)}n=Dn(t,o)}for(s=h?t.next:n.next;!(c=f(s,n)).done;){try{u=y(c.value)}catch(t){Tn(n,"throw",t)}if("object"==typeof u&&u&&U(Po,u))return u}return new Ro(!1)},jo=TypeError,ko=function(t,e){if(U(e,t))return t;throw new jo("Incorrect invocation")},Io=function(t,e,r){var n,o;return dn&&T(n=e.constructor)&&n!==r&&M(o=n.prototype)&&o!==r.prototype&&dn(t,o),t},To=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),u=n?"set":"add",s=i[t],c=s&&s.prototype,f=s,l={},h=function(t){var e=b(c[t]);ie(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!M(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!M(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!M(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Ue(t,!T(s)||!(o||c.forEach&&!a(function(){(new s).entries().next()}))))f=r.getConstructor(e,t,n,u),Oo.enable();else if(Ue(t,!0)){var p=new f,v=p[u](o?{}:-0,1)!==p,d=a(function(){p.has(1)}),g=Gn(function(t){new s(t)}),y=!o&&a(function(){for(var t=new s,e=5;e--;)t[u](e,e);return!t.has(-0)});g||((f=e(function(t,e){ko(t,c);var r=Io(new s,t,f);return P(e)||Ao(e,r[u],{that:r,AS_ENTRIES:n}),r})).prototype=c,c.constructor=f),(d||y)&&(h("delete"),h("has"),n&&h("get")),(y||v)&&h(u),o&&c.clear&&delete c.clear}return l[t]=f,Ce({global:!0,constructor:!0,forced:f!==s},l),an(f,t),o||r.setStrong(f,t,n),f},Mo=function(t,e,r){for(var n in e)ie(t,n,e[n],r);return t},Lo=dt("species"),Uo=function(t){var e=L(t);u&&e&&!e[Lo]&&so(e,Lo,{configurable:!0,get:function(){return this}})},No=Oo.fastKey,Co=ne.set,_o=ne.getterFor,Fo={getConstructor:function(t,e,r,n){var o=t(function(t,o){ko(t,i),Co(t,{type:e,index:Ve(null),first:null,last:null,size:0}),u||(t.size=0),P(o)||Ao(o,t[n],{that:t,AS_ENTRIES:r})}),i=o.prototype,a=_o(e),s=function(t,e,r){var n,o,i=a(t),s=c(t,e);return s?s.value=r:(i.last=s={index:o=No(e,!0),key:e,value:r,previous:n=i.last,next:null,removed:!1},i.first||(i.first=s),n&&(n.next=s),u?i.size++:t.size++,"F"!==o&&(i.index[o]=s)),t},c=function(t,e){var r,n=a(t),o=No(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return Mo(i,{clear:function(){for(var t=a(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=Ve(null),u?t.size=0:this.size=0},delete:function(t){var e=this,r=a(e),n=c(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),u?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=a(this),n=ar(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),Mo(i,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),u&&so(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=_o(e),i=_o(n);Rn(t,e,function(t,e){Co(this,{type:n,target:t,state:o(t),kind:e,last:null})},function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?Pn("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,Pn(void 0,!0))},r?"entries":"values",!r,!0),Uo(e)}};To("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fo);var Bo=Map.prototype,Do={Map:Map,set:b(Bo.set),get:b(Bo.get),has:b(Bo.has),remove:b(Bo.delete),proto:Bo},zo=Do.Map,Wo=Do.has,qo=Do.get,Ho=Do.set,$o=b([].push),Ko=a(function(){return 1!==zo.groupBy("ab",function(t){return t}).get("a").length});Ce({target:"Map",stat:!0,forced:Ko},{groupBy:function(t,e){j(t),J(e);var r=new zo,n=0;return Ao(t,function(t){var o=e(t,n++);Wo(r,o)?$o(qo(r,o),t):Ho(r,o,[t])}),r}});var Go={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vo=Et("span").classList,Yo=Vo&&Vo.constructor&&Vo.constructor.prototype,Xo=Yo===Object.prototype?void 0:Yo,Jo=dt("iterator"),Qo=ro.values,Zo=function(t,e){if(t){if(t[Jo]!==Qo)try{_t(t,Jo,Qo)}catch(e){t[Jo]=Qo}if(an(t,e,!0),Go[e])for(var r in ro)if(t[r]!==ro[r])try{_t(t,r,ro[r])}catch(e){t[r]=ro[r]}}};for(var ti in Go)Zo(i[ti]&&i[ti].prototype,ti);Zo(Xo,"DOMTokenList");var ei=function(t,e,r){return function(n){var o=it(n),i=arguments.length,a=i>1?arguments[1]:void 0,u=void 0!==a,s=u?ar(a,i>2?arguments[2]:void 0):void 0,c=new t,f=0;return Ao(o,function(t){var n=u?s(t,f++):t;r?e(c,kt(n)[0],n[1]):e(c,n)}),c}};Ce({target:"Map",stat:!0,forced:!0},{from:ei(Do.Map,Do.set,!0)});var ri=function(t,e,r){return function(){for(var n=new t,o=arguments.length,i=0;i<o;i++){var a=arguments[i];r?e(n,kt(a)[0],a[1]):e(n,a)}return n}};Ce({target:"Map",stat:!0,forced:!0},{of:ri(Do.Map,Do.set,!0)});var ni=Do.has,oi=function(t){return ni(t),t},ii=Do.remove;Ce({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=oi(this),r=!0,n=0,o=arguments.length;n<o;n++)t=ii(e,arguments[n]),r=r&&t;return!!r}});var ai=Do.get,ui=Do.has,si=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,o=oi(this);return ui(o,t)?(r=ai(o,t),"update"in e&&(r=e.update(r,t,o),si(o,t,r)),r):(n=e.insert(t,o),si(o,t,n),n)}});var ci=function(t,e,r){for(var n,o,i=r?t:t.iterator,a=t.next;!(n=f(a,i)).done;)if(void 0!==(o=e(n.value)))return o},fi=Do.Map,li=Do.proto,hi=b(li.forEach),pi=b(li.entries),vi=pi(new fi).next,di=function(t,e,r){return r?ci({iterator:pi(t),next:vi},function(t){return e(t[1],t[0])}):hi(t,e)};Ce({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0);return!1!==di(e,function(t,n){if(!r(t,n,e))return!1},!0)}});var gi=Do.Map,yi=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new gi;return di(e,function(t,o){r(t,o,e)&&yi(n,o,t)}),n}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=di(e,function(t,n){if(r(t,n,e))return{value:t}},!0);return n&&n.value}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=di(e,function(t,n){if(r(t,n,e))return{key:n}},!0);return n&&n.key}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===di(oi(this),function(e){if((r=e)===(n=t)||r!=r&&n!=n)return!0;var r,n},!0)}});var mi=Do.Map;Ce({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(T(this)?this:mi);J(e);var n=J(r.set);return Ao(t,function(t){f(n,r,e(t),t)}),r}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=di(oi(this),function(e,r){if(e===t)return{key:r}},!0);return e&&e.key}});var bi=Do.Map,wi=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new bi;return di(e,function(t,o){wi(n,r(t,o,e),t)}),n}});var Si=Do.Map,Ei=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new Si;return di(e,function(t,o){Ei(n,o,r(t,o,e))}),n}});var Oi=Do.set;Ce({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=oi(this),r=arguments.length,n=0;n<r;)Ao(arguments[n++],function(t,r){Oi(e,t,r)},{AS_ENTRIES:!0});return e}});var xi=TypeError;Ce({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=oi(this),r=arguments.length<2,n=r?void 0:arguments[1];if(J(t),di(e,function(o,i){r?(r=!1,n=o):n=t(n,o,i,e)}),r)throw new xi("Reduce of empty map with no initial value");return n}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0);return!0===di(e,function(t,n){if(r(t,n,e))return!0},!0)}});var Ri=TypeError,Pi=Do.get,Ai=Do.has,ji=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=oi(this),n=arguments.length;J(e);var o=Ai(r,t);if(!o&&n<3)throw new Ri("Updating absent value");var i=o?Pi(r,t):J(n>2?arguments[2]:void 0)(t,r);return ji(r,t,e(i,t,r)),r}});var ki=TypeError,Ii=function(t,e){var r,n=kt(this),o=J(n.get),i=J(n.has),a=J(n.set),u=arguments.length>2?arguments[2]:void 0;if(!T(e)&&!T(u))throw new ki("At least one callback required");return f(i,n,t)?(r=f(o,n,t),T(e)&&(r=e(r),f(a,n,t,r))):T(u)&&(r=u(),f(a,n,t,r)),r};Ce({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ii}),Ce({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ii});var Ti=b(1..valueOf),Mi="\t\n\v\f\r \u2028\u2029\ufeff",Li=b("".replace),Ui=RegExp("^["+Mi+"]+"),Ni=RegExp("(^|[^"+Mi+"])["+Mi+"]+$"),Ci=function(t){return function(e){var r=Wr(j(e));return 1&t&&(r=Li(r,Ui,"")),2&t&&(r=Li(r,Ni,"$1")),r}},_i={start:Ci(1),end:Ci(2),trim:Ci(3)},Fi=Oe.f,Bi=Rt.f,Di=Ct.f,zi=_i.trim,Wi="Number",qi=i[Wi],Hi=qi.prototype,$i=i.TypeError,Ki=b("".slice),Gi=b("".charCodeAt),Vi=Ue(Wi,!qi(" 0o1")||!qi("0b1")||qi("+0x1")),Yi=function(t){var e,r=arguments.length<1?0:qi(function(t){var e=mt(t,"number");return"bigint"==typeof e?e:function(t){var e,r,n,o,i,a,u,s,c=mt(t,"number");if(G(c))throw new $i("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=zi(c),43===(e=Gi(c,0))||45===e){if(88===(r=Gi(c,2))||120===r)return NaN}else if(48===e){switch(Gi(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=Ki(c,2)).length,u=0;u<a;u++)if((s=Gi(i,u))<48||s>o)return NaN;return parseInt(i,n)}return+c}(e)}(t));return U(Hi,e=this)&&a(function(){Ti(e)})?Io(Object(r),this,Yi):r};Yi.prototype=Hi,Vi&&(Hi.constructor=Yi),Ce({global:!0,constructor:!0,wrap:!0,forced:Vi},{Number:Yi}),Vi&&function(t,e){for(var r,n=u?Fi(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)ut(e,r=n[o])&&!ut(t,r)&&Di(t,r,Bi(e,r))}(Yn[Wi],qi),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)});var Xi=i.isFinite;Ce({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&Xi(t)}});var Ji=Math.floor,Qi=Number.isInteger||function(t){return!M(t)&&isFinite(t)&&Ji(t)===t};Ce({target:"Number",stat:!0},{isInteger:Qi}),Ce({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var Zi=Math.abs;Ce({target:"Number",stat:!0},{isSafeInteger:function(t){return Qi(t)&&Zi(t)<=9007199254740991}}),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var ta=_i.trim,ea=b("".charAt),ra=i.parseFloat,na=i.Symbol,oa=na&&na.iterator,ia=1/ra(Mi+"-0")!=-Infinity||oa&&!a(function(){ra(Object(oa))})?function(t){var e=ta(Wr(t)),r=ra(e);return 0===r&&"-"===ea(e,0)?-0:r}:ra;Ce({target:"Number",stat:!0,forced:Number.parseFloat!==ia},{parseFloat:ia});var aa=_i.trim,ua=i.parseInt,sa=i.Symbol,ca=sa&&sa.iterator,fa=/^[+-]?0x/i,la=b(fa.exec),ha=8!==ua(Mi+"08")||22!==ua(Mi+"0x16")||ca&&!a(function(){ua(Object(ca))})?function(t,e){var r=aa(Wr(t));return ua(r,e>>>0||(la(fa,r)?16:10))}:ua;Ce({target:"Number",stat:!0,forced:Number.parseInt!==ha},{parseInt:ha});var pa=b(v.f),va=b([].push),da=u&&a(function(){var t=Object.create(null);return t[2]=2,!pa(t,2)}),ga=function(t){return function(e){for(var r,n=k(e),o=_e(n),i=da&&null===Qr(n),a=o.length,s=0,c=[];a>s;)r=o[s++],u&&!(i?r in n:pa(n,r))||va(c,t?[r,n[r]]:n[r]);return c}},ya={entries:ga(!0),values:ga(!1)},ma=ya.entries;Ce({target:"Object",stat:!0},{entries:function(t){return ma(t)}}),Ce({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=Rt.f,i=Pe(n),a={},u=0;i.length>u;)void 0!==(r=o(n,e=i[u++]))&&Cn(a,e,r);return a}});var ba=a(function(){_e(1)});Ce({target:"Object",stat:!0,forced:ba},{keys:function(t){return _e(it(t))}});var wa=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};Ce({target:"Object",stat:!0},{is:wa});var Sa=ya.values;Ce({target:"Object",stat:!0},{values:function(t){return Sa(t)}}),Ce({target:"Object",stat:!0},{hasOwn:ut});var Ea=Function.prototype,Oa=Ea.apply,xa=Ea.call,Ra="object"==typeof Reflect&&Reflect.apply||(s?xa.bind(Oa):function(){return xa.apply(Oa,arguments)}),Pa=!a(function(){Reflect.apply(function(){})});Ce({target:"Reflect",stat:!0,forced:Pa},{apply:function(t,e,r){return Ra(J(t),e,kt(r))}});var Aa=Function,ja=b([].concat),ka=b([].join),Ia={},Ta=s?Aa.bind:function(t){var e=J(this),r=e.prototype,n=vo(arguments,1),o=function(){var r=ja(n,vo(arguments));return this instanceof o?function(t,e,r){if(!ut(Ia,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Ia[e]=Aa("C,a","return new C("+ka(n,",")+")")}return Ia[e](t,r)}(e,r.length,r):e.apply(t,r)};return M(r)&&(o.prototype=r),o},Ma=TypeError,La=function(t){if(Sr(t))return t;throw new Ma(Y(t)+" is not a constructor")},Ua=L("Reflect","construct"),Na=Object.prototype,Ca=[].push,_a=a(function(){function t(){}return!(Ua(function(){},[],t)instanceof t)}),Fa=!a(function(){Ua(function(){})}),Ba=_a||Fa;Ce({target:"Reflect",stat:!0,forced:Ba,sham:Ba},{construct:function(t,e){La(t),kt(e);var r=arguments.length<3?t:La(arguments[2]);if(Fa&&!_a)return Ua(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return Ra(Ca,n,e),new(Ra(Ta,t,n))}var o=r.prototype,i=Ve(M(o)?o:Na),a=Ra(t,i,e);return M(a)?a:i}});var Da=a(function(){Reflect.defineProperty(Ct.f({},1,{value:1}),1,{value:2})});Ce({target:"Reflect",stat:!0,forced:Da,sham:!u},{defineProperty:function(t,e,r){kt(t);var n=bt(e);kt(r);try{return Ct.f(t,n,r),!0}catch(t){return!1}}});var za=Rt.f;Ce({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=za(kt(t),e);return!(r&&!r.configurable)&&delete t[e]}});var Wa=function(t){return void 0!==t&&(ut(t,"value")||ut(t,"writable"))};Ce({target:"Reflect",stat:!0},{get:function t(e,r){var n,o,i=arguments.length<3?e:arguments[2];return kt(e)===i?e[r]:(n=Rt.f(e,r))?Wa(n)?n.value:void 0===n.get?void 0:f(n.get,i):M(o=Qr(e))?t(o,r,i):void 0}}),Ce({target:"Reflect",stat:!0,sham:!u},{getOwnPropertyDescriptor:function(t,e){return Rt.f(kt(t),e)}}),Ce({target:"Reflect",stat:!0,sham:!Vr},{getPrototypeOf:function(t){return Qr(kt(t))}}),Ce({target:"Reflect",stat:!0},{has:function(t,e){return e in t}}),Ce({target:"Reflect",stat:!0},{isExtensible:function(t){return kt(t),So(t)}}),Ce({target:"Reflect",stat:!0},{ownKeys:Pe}),Ce({target:"Reflect",stat:!0,sham:!Eo},{preventExtensions:function(t){kt(t);try{var e=L("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}});var qa=a(function(){var t=function(){},e=Ct.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)});Ce({target:"Reflect",stat:!0,forced:qa},{set:function t(e,r,n){var o,i,a,u=arguments.length<4?e:arguments[3],s=Rt.f(kt(e),r);if(!s){if(M(i=Qr(e)))return t(i,r,n,u);s=d(0)}if(Wa(s)){if(!1===s.writable||!M(u))return!1;if(o=Rt.f(u,r)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,Ct.f(u,r,o)}else Ct.f(u,r,d(0,n))}else{if(void 0===(a=s.set))return!1;f(a,u,n)}return!0}}),dn&&Ce({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){kt(t),vn(e);try{return dn(t,e),!0}catch(t){return!1}}}),Ce({global:!0},{Reflect:{}}),an(i.Reflect,"Reflect",!0);var Ha=Oo.getWeakData,$a=ne.set,Ka=ne.getterFor,Ga=Ar.find,Va=Ar.findIndex,Ya=b([].splice),Xa=0,Ja=function(t){return t.frozen||(t.frozen=new Qa)},Qa=function(){this.entries=[]},Za=function(t,e){return Ga(t.entries,function(t){return t[0]===e})};Qa.prototype={get:function(t){var e=Za(this,t);if(e)return e[1]},has:function(t){return!!Za(this,t)},set:function(t,e){var r=Za(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=Va(this.entries,function(e){return e[0]===t});return~e&&Ya(this.entries,e,1),!!~e}};var tu,eu={getConstructor:function(t,e,r,n){var o=t(function(t,o){ko(t,i),$a(t,{type:e,id:Xa++,frozen:null}),P(o)||Ao(o,t[n],{that:t,AS_ENTRIES:r})}),i=o.prototype,a=Ka(e),u=function(t,e,r){var n=a(t),o=Ha(kt(e),!0);return!0===o?Ja(n).set(e,r):o[n.id]=r,t};return Mo(i,{delete:function(t){var e=a(this);if(!M(t))return!1;var r=Ha(t);return!0===r?Ja(e).delete(t):r&&ut(r,e.id)&&delete r[e.id]},has:function(t){var e=a(this);if(!M(t))return!1;var r=Ha(t);return!0===r?Ja(e).has(t):r&&ut(r,e.id)}}),Mo(i,r?{get:function(t){var e=a(this);if(M(t)){var r=Ha(t);if(!0===r)return Ja(e).get(t);if(r)return r[e.id]}},set:function(t,e){return u(this,t,e)}}:{add:function(t){return u(this,t,!0)}}),o}},ru=ne.enforce,nu=Object,ou=Array.isArray,iu=nu.isExtensible,au=nu.isFrozen,uu=nu.isSealed,su=nu.freeze,cu=nu.seal,fu=!i.ActiveXObject&&"ActiveXObject"in i,lu=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},hu=To("WeakMap",lu,eu),pu=hu.prototype,vu=b(pu.set);if(Vt)if(fu){tu=eu.getConstructor(lu,"WeakMap",!0),Oo.enable();var du=b(pu.delete),gu=b(pu.has),yu=b(pu.get);Mo(pu,{delete:function(t){if(M(t)&&!iu(t)){var e=ru(this);return e.frozen||(e.frozen=new tu),du(this,t)||e.frozen.delete(t)}return du(this,t)},has:function(t){if(M(t)&&!iu(t)){var e=ru(this);return e.frozen||(e.frozen=new tu),gu(this,t)||e.frozen.has(t)}return gu(this,t)},get:function(t){if(M(t)&&!iu(t)){var e=ru(this);return e.frozen||(e.frozen=new tu),gu(this,t)?yu(this,t):e.frozen.get(t)}return yu(this,t)},set:function(t,e){if(M(t)&&!iu(t)){var r=ru(this);r.frozen||(r.frozen=new tu),gu(this,t)?vu(this,t,e):r.frozen.set(t,e)}else vu(this,t,e);return this}})}else Eo&&a(function(){var t=su([]);return vu(new hu,t,1),!au(t)})&&Mo(pu,{set:function(t,e){var r;return ou(t)&&(au(t)?r=su:uu(t)&&(r=cu)),vu(this,t,e),r&&r(t),this}});var mu=L("Map"),bu=L("WeakMap"),wu=b([].push),Su=nt("metadata"),Eu=Su.store||(Su.store=new bu),Ou=function(t,e,r){var n=Eu.get(t);if(!n){if(!r)return;Eu.set(t,n=new mu)}var o=n.get(e);if(!o){if(!r)return;n.set(e,o=new mu)}return o},xu={store:Eu,getMap:Ou,has:function(t,e,r){var n=Ou(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=Ou(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){Ou(r,n,!0).set(t,e)},keys:function(t,e){var r=Ou(t,e,!1),n=[];return r&&r.forEach(function(t,e){wu(n,e)}),n},toKey:function(t){return void 0===t||"symbol"==typeof t?t:String(t)}},Ru=xu.toKey,Pu=xu.set;Ce({target:"Reflect",stat:!0},{defineMetadata:function(t,e,r){var n=arguments.length<4?void 0:Ru(arguments[3]);Pu(t,e,kt(r),n)}});var Au=xu.toKey,ju=xu.getMap,ku=xu.store;Ce({target:"Reflect",stat:!0},{deleteMetadata:function(t,e){var r=arguments.length<3?void 0:Au(arguments[2]),n=ju(kt(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var o=ku.get(e);return o.delete(r),!!o.size||ku.delete(e)}});var Iu=xu.has,Tu=xu.get,Mu=xu.toKey,Lu=function(t,e,r){if(Iu(t,e,r))return Tu(t,e,r);var n=Qr(e);return null!==n?Lu(t,n,r):void 0};Ce({target:"Reflect",stat:!0},{getMetadata:function(t,e){var r=arguments.length<3?void 0:Mu(arguments[2]);return Lu(t,kt(e),r)}});var Uu=Do.Map,Nu=Do.has,Cu=Do.set,_u=b([].push),Fu=b(function(t){var e,r,n,o=it(this),i=de(o),a=[],u=new Uu,s=P(t)?function(t){return t}:J(t);for(e=0;e<i;e++)n=s(r=o[e]),Nu(u,n)||Cu(u,n,r);return di(u,function(t){_u(a,t)}),a}),Bu=b([].concat),Du=xu.keys,zu=xu.toKey,Wu=function(t,e){var r=Du(t,e),n=Qr(t);if(null===n)return r;var o=Wu(n,e);return o.length?r.length?Fu(Bu(r,o)):o:r};Ce({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var e=arguments.length<2?void 0:zu(arguments[1]);return Wu(kt(t),e)}});var qu=xu.get,Hu=xu.toKey;Ce({target:"Reflect",stat:!0},{getOwnMetadata:function(t,e){var r=arguments.length<3?void 0:Hu(arguments[2]);return qu(t,kt(e),r)}});var $u=xu.keys,Ku=xu.toKey;Ce({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var e=arguments.length<2?void 0:Ku(arguments[1]);return $u(kt(t),e)}});var Gu=xu.has,Vu=xu.toKey,Yu=function(t,e,r){if(Gu(t,e,r))return!0;var n=Qr(e);return null!==n&&Yu(t,n,r)};Ce({target:"Reflect",stat:!0},{hasMetadata:function(t,e){var r=arguments.length<3?void 0:Vu(arguments[2]);return Yu(t,kt(e),r)}});var Xu=xu.has,Ju=xu.toKey;Ce({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,e){var r=arguments.length<3?void 0:Ju(arguments[2]);return Xu(t,kt(e),r)}});var Qu=xu.toKey,Zu=xu.set;Ce({target:"Reflect",stat:!0},{metadata:function(t,e){return function(r,n){Zu(t,e,kt(r),Qu(n))}}});var ts=dt("match"),es=function(t){var e;return M(t)&&(void 0!==(e=t[ts])?!!e:"RegExp"===E(t))},rs=function(){var t=kt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},ns=RegExp.prototype,os=function(t){var e=t.flags;return void 0!==e||"flags"in ns||ut(t,"flags")||!U(ns,t)?e:f(rs,t)},is=i.RegExp,as=a(function(){var t=is("a","y");return t.lastIndex=2,null!==t.exec("abcd")}),us=as||a(function(){return!is("a","y").sticky}),ss=as||a(function(){var t=is("^r","gy");return t.lastIndex=2,null!==t.exec("str")}),cs={BROKEN_CARET:ss,MISSED_STICKY:us,UNSUPPORTED_Y:as},fs=Ct.f,ls=function(t,e,r){r in t||fs(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})},hs=i.RegExp,ps=a(function(){var t=hs(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}),vs=i.RegExp,ds=a(function(){var t=vs("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),gs=Oe.f,ys=ne.enforce,ms=dt("match"),bs=i.RegExp,ws=bs.prototype,Ss=i.SyntaxError,Es=b(ws.exec),Os=b("".charAt),xs=b("".replace),Rs=b("".indexOf),Ps=b("".slice),As=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,js=/a/g,ks=/a/g,Is=new bs(js)!==js,Ts=cs.MISSED_STICKY,Ms=cs.UNSUPPORTED_Y,Ls=u&&(!Is||Ts||ps||ds||a(function(){return ks[ms]=!1,bs(js)!==js||bs(ks)===ks||"/a/i"!==String(bs(js,"i"))}));if(Ue("RegExp",Ls)){for(var Us=function(t,e){var r,n,o,i,a,u,s=U(ws,this),c=es(t),f=void 0===e,l=[],h=t;if(!s&&c&&f&&t.constructor===Us)return t;if((c||U(ws,t))&&(t=t.source,f&&(e=os(h))),t=void 0===t?"":Wr(t),e=void 0===e?"":Wr(e),h=t,ps&&"dotAll"in js&&(n=!!e&&Rs(e,"s")>-1)&&(e=xs(e,/s/g,"")),r=e,Ts&&"sticky"in js&&(o=!!e&&Rs(e,"y")>-1)&&Ms&&(e=xs(e,/y/g,"")),ds&&(i=function(t){for(var e,r=t.length,n=0,o="",i=[],a=Ve(null),u=!1,s=!1,c=0,f="";n<=r;n++){if("\\"===(e=Os(t,n)))e+=Os(t,++n);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:if(o+=e,"?:"===Ps(t,n+1,n+3))continue;Es(As,Ps(t,n+1))&&(n+=2,s=!0),c++;continue;case">"===e&&s:if(""===f||ut(a,f))throw new Ss("Invalid capture group name");a[f]=!0,i[i.length]=[f,c],s=!1,f="";continue}s?f+=e:o+=e}return[o,i]}(t),t=i[0],l=i[1]),a=Io(bs(t,e),s?this:ws,Us),(n||o||l.length)&&(u=ys(a),n&&(u.dotAll=!0,u.raw=Us(function(t){for(var e,r=t.length,n=0,o="",i=!1;n<=r;n++)"\\"!==(e=Os(t,n))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+Os(t,++n);return o}(t),r)),o&&(u.sticky=!0),l.length&&(u.groups=l)),t!==h)try{_t(a,"source",""===h?"(?:)":h)}catch(t){}return a},Ns=gs(bs),Cs=0;Ns.length>Cs;)ls(Us,bs,Ns[Cs++]);ws.constructor=Us,Us.prototype=ws,ie(i,"RegExp",Us,{constructor:!0})}Uo("RegExp");var _s=zt.PROPER,Fs="toString",Bs=RegExp.prototype,Ds=Bs[Fs];(a(function(){return"/a/b"!==Ds.call({source:"a",flags:"b"})})||_s&&Ds.name!==Fs)&&ie(Bs,Fs,function(){var t=kt(this);return"/"+Wr(t.source)+"/"+Wr(os(t))},{unsafe:!0});var zs=ne.get,Ws=RegExp.prototype,qs=TypeError;u&&ps&&so(Ws,"dotAll",{configurable:!0,get:function(){if(this!==Ws){if("RegExp"===E(this))return!!zs(this).dotAll;throw new qs("Incompatible receiver, RegExp required")}}});var Hs=ne.get,$s=nt("native-string-replace",String.prototype.replace),Ks=RegExp.prototype.exec,Gs=Ks,Vs=b("".charAt),Ys=b("".indexOf),Xs=b("".replace),Js=b("".slice),Qs=function(){var t=/a/,e=/b*/g;return f(Ks,t,"a"),f(Ks,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Zs=cs.BROKEN_CARET,tc=void 0!==/()??/.exec("")[1];(Qs||tc||Zs||ps||ds)&&(Gs=function(t){var e,r,n,o,i,a,u,s=this,c=Hs(s),l=Wr(t),h=c.raw;if(h)return h.lastIndex=s.lastIndex,e=f(Gs,h,l),s.lastIndex=h.lastIndex,e;var p=c.groups,v=Zs&&s.sticky,d=f(rs,s),g=s.source,y=0,m=l;if(v&&(d=Xs(d,"y",""),-1===Ys(d,"g")&&(d+="g"),m=Js(l,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==Vs(l,s.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,y++),r=new RegExp("^(?:"+g+")",d)),tc&&(r=new RegExp("^"+g+"$(?!\\s)",d)),Qs&&(n=s.lastIndex),o=f(Ks,v?r:s,m),v?o?(o.input=Js(o.input,y),o[0]=Js(o[0],y),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:Qs&&o&&(s.lastIndex=s.global?o.index+o[0].length:n),tc&&o&&o.length>1&&f($s,o[0],r,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&p)for(o.groups=a=Ve(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ec=Gs;Ce({target:"RegExp",proto:!0,forced:/./.exec!==ec},{exec:ec});var rc=i.RegExp,nc=rc.prototype;u&&a(function(){var t=!0;try{rc(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",o=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(i.hasIndices="d"),i)o(a,i[a]);return Object.getOwnPropertyDescriptor(nc,"flags").get.call(e)!==n||r!==n})&&so(nc,"flags",{configurable:!0,get:rs});var oc=ne.get,ic=RegExp.prototype,ac=TypeError;u&&cs.MISSED_STICKY&&so(ic,"sticky",{configurable:!0,get:function(){if(this!==ic){if("RegExp"===E(this))return!!oc(this).sticky;throw new ac("Incompatible receiver, RegExp required")}}});var uc,sc,cc=(uc=!1,(sc=/[ac]/).exec=function(){return uc=!0,/./.exec.apply(this,arguments)},!0===sc.test("abc")&&uc),fc=/./.test;Ce({target:"RegExp",proto:!0,forced:!cc},{test:function(t){var e=kt(this),r=Wr(t),n=e.exec;if(!T(n))return f(fc,e,r);var o=f(n,e,r);return null!==o&&(kt(o),!0)}});var lc=dt("species"),hc=RegExp.prototype,pc=function(t,e,r,n){var o=dt(t),i=!a(function(){var e={};return e[o]=function(){return 7},7!==""[t](e)}),u=i&&!a(function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[lc]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e});if(!i||!u||r){var s=/./[o],c=e(o,""[t],function(t,e,r,n,o){var a=e.exec;return a===ec||a===hc.exec?i&&!o?{done:!0,value:f(s,e,r,n)}:{done:!0,value:f(t,r,e,n)}:{done:!1}});ie(String.prototype,t,c[0]),ie(hc,o,c[1])}n&&_t(hc[o],"sham",!0)},vc=Gr.charAt,dc=function(t,e,r){return e+(r?vc(t,e).length:1)},gc=TypeError,yc=function(t,e){var r=t.exec;if(T(r)){var n=f(r,t,e);return null!==n&&kt(n),n}if("RegExp"===E(t))return f(ec,t,e);throw new gc("RegExp#exec called on incompatible receiver")};pc("match",function(t,e,r){return[function(e){var r=j(this),n=P(e)?void 0:Q(e,t);return n?f(n,e,r):new RegExp(e)[t](Wr(r))},function(t){var n=kt(this),o=Wr(t),i=r(e,n,o);if(i.done)return i.value;if(!n.global)return yc(n,o);var a=n.unicode;n.lastIndex=0;for(var u,s=[],c=0;null!==(u=yc(n,o));){var f=Wr(u[0]);s[c]=f,""===f&&(n.lastIndex=dc(o,ve(n.lastIndex),a)),c++}return 0===c?null:s}]});var mc=Math.floor,bc=b("".charAt),wc=b("".replace),Sc=b("".slice),Ec=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Oc=/\$([$&'`]|\d{1,2})/g,xc=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,s=Oc;return void 0!==o&&(o=it(o),s=Ec),wc(i,s,function(i,s){var c;switch(bc(s,0)){case"$":return"$";case"&":return t;case"`":return Sc(e,0,r);case"'":return Sc(e,a);case"<":c=o[Sc(s,1,-1)];break;default:var f=+s;if(0===f)return i;if(f>u){var l=mc(f/10);return 0===l?i:l<=u?void 0===n[l-1]?bc(s,1):n[l-1]+bc(s,1):i}c=n[f-1]}return void 0===c?"":c})},Rc=dt("replace"),Pc=Math.max,Ac=Math.min,jc=b([].concat),kc=b([].push),Ic=b("".indexOf),Tc=b("".slice),Mc="$0"==="a".replace(/./,"$0"),Lc=!!/./[Rc]&&""===/./[Rc]("a","$0"),Uc=!a(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")});pc("replace",function(t,e,r){var n=Lc?"$":"$0";return[function(t,r){var n=j(this),o=P(t)?void 0:Q(t,Rc);return o?f(o,t,n,r):f(e,Wr(n),t,r)},function(t,o){var i=kt(this),a=Wr(t);if("string"==typeof o&&-1===Ic(o,n)&&-1===Ic(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var s=T(o);s||(o=Wr(o));var c,f=i.global;f&&(c=i.unicode,i.lastIndex=0);for(var l,h=[];null!==(l=yc(i,a))&&(kc(h,l),f);)""===Wr(l[0])&&(i.lastIndex=dc(a,ve(i.lastIndex),c));for(var p,v="",d=0,g=0;g<h.length;g++){for(var y,m=Wr((l=h[g])[0]),b=Pc(Ac(ce(l.index),a.length),0),w=[],S=1;S<l.length;S++)kc(w,void 0===(p=l[S])?p:String(p));var E=l.groups;if(s){var O=jc([m],w,b,a);void 0!==E&&kc(O,E),y=Wr(Ra(o,void 0,O))}else y=xc(m,a,b,w,E,o);b>=d&&(v+=Tc(a,d,b)+y,d=b+m.length)}return v+Tc(a,d)}]},!Uc||!Mc||Lc),pc("search",function(t,e,r){return[function(e){var r=j(this),n=P(e)?void 0:Q(e,t);return n?f(n,e,r):new RegExp(e)[t](Wr(r))},function(t){var n=kt(this),o=Wr(t),i=r(e,n,o);if(i.done)return i.value;var a=n.lastIndex;wa(a,0)||(n.lastIndex=0);var u=yc(n,o);return wa(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]});var Nc=dt("species"),Cc=function(t,e){var r,n=kt(t).constructor;return void 0===n||P(r=kt(n)[Nc])?e:La(r)},_c=cs.UNSUPPORTED_Y,Fc=Math.min,Bc=b([].push),Dc=b("".slice),zc=!a(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),Wc="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;pc("split",function(t,e,r){var n="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:f(e,this,t,r)}:e;return[function(e,r){var o=j(this),i=P(e)?void 0:Q(e,t);return i?f(i,e,o,r):f(n,Wr(o),e,r)},function(t,o){var i=kt(this),a=Wr(t);if(!Wc){var u=r(n,i,a,o,n!==e);if(u.done)return u.value}var s=Cc(i,RegExp),c=i.unicode,f=new s(_c?"^(?:"+i.source+")":i,(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(_c?"g":"y")),l=void 0===o?4294967295:o>>>0;if(0===l)return[];if(0===a.length)return null===yc(f,a)?[a]:[];for(var h=0,p=0,v=[];p<a.length;){f.lastIndex=_c?0:p;var d,g=yc(f,_c?Dc(a,p):a);if(null===g||(d=Fc(ve(f.lastIndex+(_c?p:0)),a.length))===h)p=dc(a,p,c);else{if(Bc(v,Dc(a,h,p)),v.length===l)return v;for(var y=1;y<=g.length-1;y++)if(Bc(v,g[y]),v.length===l)return v;p=h=d}}return Bc(v,Dc(a,h)),v}]},Wc||!zc,_c);var qc=TypeError,Hc=RangeError,$c=function(t){var e=Wr(j(this)),r="",n=ce(t);if(n<0||Infinity===n)throw new Hc("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r},Kc=b($c),Gc=b("".slice),Vc=Math.ceil,Yc=function(t){return function(e,r,n){var o,i,a=Wr(j(e)),u=ve(r),s=a.length,c=void 0===n?" ":Wr(n);return u<=s||""===c?a:((i=Kc(c,Vc((o=u-s)/c.length))).length>o&&(i=Gc(i,0,o)),t?a+i:i+a)}},Xc={start:Yc(!1),end:Yc(!0)},Jc=Xc.start,Qc=Array,Zc=RegExp.escape,tf=b("".charAt),ef=b("".charCodeAt),rf=b(1.1.toString),nf=b([].join),of=/^[0-9a-z]/i,af=/^[$()*+./?[\\\]^{|}]/,uf=RegExp("^[!\"#%&',\\-:;<=>@`~"+Mi+"]"),sf=b(of.exec),cf={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"},ff=function(t){var e=rf(ef(t,0),16);return e.length<3?"\\x"+Jc(e,2,"0"):"\\u"+Jc(e,4,"0")},lf=!Zc||"\\x61b"!==Zc("ab");Ce({target:"RegExp",stat:!0,forced:lf},{escape:function(t){!function(t){if("string"==typeof t)return t;throw new qc("Argument is not a string")}(t);for(var e=t.length,r=Qc(e),n=0;n<e;n++){var o=tf(t,n);if(0===n&&sf(of,o))r[n]=ff(o);else if(ut(cf,o))r[n]="\\"+cf[o];else if(sf(af,o))r[n]="\\"+o;else if(sf(uf,o))r[n]=ff(o);else{var i=ef(o,0);55296!=(63488&i)?r[n]=o:i>=56320||n+1>=e||56320!=(64512&ef(t,n+1))?r[n]=ff(o):(r[n]=o,r[++n]=tf(t,n))}}return nf(r,"")}}),To("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fo);var hf=Set.prototype,pf={Set:Set,add:b(hf.add),has:b(hf.has),remove:b(hf.delete),proto:hf},vf=pf.has,df=function(t){return vf(t),t},gf=pf.Set,yf=pf.proto,mf=b(yf.forEach),bf=b(yf.keys),wf=bf(new gf).next,Sf=function(t,e,r){return r?ci({iterator:bf(t),next:wf},e):mf(t,e)},Ef=pf.Set,Of=pf.add,xf=function(t){var e=new Ef;return Sf(t,function(t){Of(e,t)}),e},Rf=ln(pf.proto,"size","get")||function(t){return t.size},Pf="Invalid size",Af=RangeError,jf=TypeError,kf=Math.max,If=function(t,e){this.set=t,this.size=kf(e,0),this.has=J(t.has),this.keys=J(t.keys)};If.prototype={getIterator:function(){return{iterator:t=kt(f(this.keys,this.set)),next:t.next,done:!1};var t},includes:function(t){return f(this.has,this.set,t)}};var Tf=function(t){kt(t);var e=+t.size;if(e!=e)throw new jf(Pf);var r=ce(e);if(r<0)throw new Af(Pf);return new If(t,r)},Mf=pf.has,Lf=pf.remove,Uf=function(t){var e=df(this),r=Tf(t),n=xf(e);return Rf(e)<=r.size?Sf(e,function(t){r.includes(t)&&Lf(n,t)}):ci(r.getIterator(),function(t){Mf(e,t)&&Lf(n,t)}),n},Nf=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Cf=function(t){var e=L("Set");try{(new e)[t](Nf(0));try{return(new e)[t](Nf(-1)),!1}catch(t){return!0}}catch(t){return!1}};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("difference")},{difference:Uf});var _f=pf.Set,Ff=pf.add,Bf=pf.has,Df=function(t){var e=df(this),r=Tf(t),n=new _f;return Rf(e)>r.size?ci(r.getIterator(),function(t){Bf(e,t)&&Ff(n,t)}):Sf(e,function(t){r.includes(t)&&Ff(n,t)}),n},zf=!Cf("intersection")||a(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});Ce({target:"Set",proto:!0,real:!0,forced:zf},{intersection:Df});var Wf=pf.has,qf=function(t){var e=df(this),r=Tf(t);if(Rf(e)<=r.size)return!1!==Sf(e,function(t){if(r.includes(t))return!1},!0);var n=r.getIterator();return!1!==ci(n,function(t){if(Wf(e,t))return Tn(n,"normal",!1)})};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isDisjointFrom")},{isDisjointFrom:qf});var Hf=function(t){var e=df(this),r=Tf(t);return!(Rf(e)>r.size)&&!1!==Sf(e,function(t){if(!r.includes(t))return!1},!0)};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isSubsetOf")},{isSubsetOf:Hf});var $f=pf.has,Kf=function(t){var e=df(this),r=Tf(t);if(Rf(e)<r.size)return!1;var n=r.getIterator();return!1!==ci(n,function(t){if(!$f(e,t))return Tn(n,"normal",!1)})};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isSupersetOf")},{isSupersetOf:Kf});var Gf=pf.add,Vf=pf.has,Yf=pf.remove,Xf=function(t){var e=df(this),r=Tf(t).getIterator(),n=xf(e);return ci(r,function(t){Vf(e,t)?Yf(n,t):Gf(n,t)}),n};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("symmetricDifference")},{symmetricDifference:Xf});var Jf=pf.add,Qf=function(t){var e=df(this),r=Tf(t).getIterator(),n=xf(e);return ci(r,function(t){Jf(n,t)}),n};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("union")},{union:Qf}),Ce({target:"Set",stat:!0,forced:!0},{from:ei(pf.Set,pf.add,!1)}),Ce({target:"Set",stat:!0,forced:!0},{of:ri(pf.Set,pf.add,!1)});var Zf=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=df(this),e=0,r=arguments.length;e<r;e++)Zf(t,arguments[e]);return t}});var tl=pf.remove;Ce({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=df(this),r=!0,n=0,o=arguments.length;n<o;n++)t=tl(e,arguments[n]),r=r&&t;return!!r}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0);return!1!==Sf(e,function(t){if(!r(t,t,e))return!1},!0)}});var el=dt("iterator"),rl=Object,nl=L("Set"),ol=function(t){return function(t){return M(t)&&"number"==typeof t.size&&T(t.has)&&T(t.keys)}(t)?t:function(t){if(P(t))return!1;var e=rl(t);return void 0!==e[el]||"@@iterator"in e||ut(un,pr(e))}(t)?new nl(t):t};Ce({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return f(Uf,this,ol(t))}});var il=pf.Set,al=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new il;return Sf(e,function(t){r(t,t,e)&&al(n,t)}),n}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=Sf(e,function(t){if(r(t,t,e))return{value:t}},!0);return n&&n.value}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return f(Df,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return f(qf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return f(Hf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return f(Kf,this,ol(t))}});var ul=b([].join),sl=b([].push);Ce({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=df(this),r=void 0===t?",":Wr(t),n=[];return Sf(e,function(t){sl(n,t)}),ul(n,r)}});var cl=pf.Set,fl=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new cl;return Sf(e,function(t){fl(n,r(t,t,e))}),n}});var ll=TypeError;Ce({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=df(this),r=arguments.length<2,n=r?void 0:arguments[1];if(J(t),Sf(e,function(o){r?(r=!1,n=o):n=t(n,o,o,e)}),r)throw new ll("Reduce of empty set with no initial value");return n}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0);return!0===Sf(e,function(t){if(r(t,t,e))return!0},!0)}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return f(Xf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return f(Qf,this,ol(t))}});var hl=dt("species"),pl=dt("isConcatSpreadable"),vl=W>=51||!a(function(){var t=[];return t[pl]=!1,t.concat()[0]!==t}),dl=function(t){if(!M(t))return!1;var e=t[pl];return void 0!==e?!!e:ur(t)},gl=!(vl&&(W>=51||!a(function(){var t=[];return(t.constructor={})[hl]=function(){return{foo:1}},1!==t.concat(Boolean).foo})));Ce({target:"Array",proto:!0,arity:1,forced:gl},{concat:function(t){var e,r,n,o,i,a=it(this),u=xr(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(dl(i=-1===e?a:arguments[e]))for(o=de(i),Nr(s+o),r=0;r<o;r++,s++)r in i&&Cn(u,s,i[r]);else Nr(s+1),Cn(u,s++,i);return u.length=s,u}});var yl={f:dt},ml=Ct.f,bl=function(t){var e=Yn.Symbol||(Yn.Symbol={});ut(e,t)||ml(e,t,{value:yl.f(t)})},wl=function(){var t=L("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=dt("toPrimitive");e&&!e[n]&&ie(e,n,function(t){return f(r,this)},{arity:1})},Sl=Ar.forEach,El=Xt("hidden"),Ol="Symbol",xl="prototype",Rl=ne.set,Pl=ne.getterFor(Ol),Al=Object[xl],jl=i.Symbol,kl=jl&&jl[xl],Il=i.RangeError,Tl=i.TypeError,Ml=i.QObject,Ll=Rt.f,Ul=Ct.f,Nl=mo.f,Cl=v.f,_l=b([].push),Fl=nt("symbols"),Bl=nt("op-symbols"),Dl=nt("wks"),zl=!Ml||!Ml[xl]||!Ml[xl].findChild,Wl=function(t,e,r){var n=Ll(Al,e);n&&delete Al[e],Ul(t,e,r),n&&t!==Al&&Ul(Al,e,n)},ql=u&&a(function(){return 7!==Ve(Ul({},"a",{get:function(){return Ul(this,"a",{value:7}).a}})).a})?Wl:Ul,Hl=function(t,e){var r=Fl[t]=Ve(kl);return Rl(r,{type:Ol,tag:t,description:e}),u||(r.description=e),r},$l=function(t,e,r){t===Al&&$l(Bl,e,r),kt(t);var n=bt(e);return kt(r),ut(Fl,n)?(r.enumerable?(ut(t,El)&&t[El][n]&&(t[El][n]=!1),r=Ve(r,{enumerable:d(0,!1)})):(ut(t,El)||Ul(t,El,d(1,Ve(null))),t[El][n]=!0),ql(t,n,r)):Ul(t,n,r)},Kl=function(t,e){kt(t);var r=k(e),n=_e(r).concat(Xl(r));return Sl(n,function(e){u&&!f(Gl,r,e)||$l(t,e,r[e])}),t},Gl=function(t){var e=bt(t),r=f(Cl,this,e);return!(this===Al&&ut(Fl,e)&&!ut(Bl,e))&&(!(r||!ut(this,e)||!ut(Fl,e)||ut(this,El)&&this[El][e])||r)},Vl=function(t,e){var r=k(t),n=bt(e);if(r!==Al||!ut(Fl,n)||ut(Bl,n)){var o=Ll(r,n);return!o||!ut(Fl,n)||ut(r,El)&&r[El][n]||(o.enumerable=!0),o}},Yl=function(t){var e=Nl(k(t)),r=[];return Sl(e,function(t){ut(Fl,t)||ut(Jt,t)||_l(r,t)}),r},Xl=function(t){var e=t===Al,r=Nl(e?Bl:k(t)),n=[];return Sl(r,function(t){!ut(Fl,t)||e&&!ut(Al,t)||_l(n,Fl[t])}),n};H||(jl=function(){if(U(kl,this))throw new Tl("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Wr(arguments[0]):void 0,e=lt(t),r=function(t){var n=void 0===this?i:this;n===Al&&f(r,Bl,t),ut(n,El)&&ut(n[El],e)&&(n[El][e]=!1);var o=d(1,t);try{ql(n,e,o)}catch(t){if(!(t instanceof Il))throw t;Wl(n,e,o)}};return u&&zl&&ql(Al,e,{configurable:!0,set:r}),Hl(e,t)},ie(kl=jl[xl],"toString",function(){return Pl(this).tag}),ie(jl,"withoutSetter",function(t){return Hl(lt(t),t)}),v.f=Gl,Ct.f=$l,Be.f=Kl,Rt.f=Vl,Oe.f=mo.f=Yl,xe.f=Xl,yl.f=function(t){return Hl(dt(t),t)},u&&(so(kl,"description",{configurable:!0,get:function(){return Pl(this).description}}),ie(Al,"propertyIsEnumerable",Gl,{unsafe:!0}))),Ce({global:!0,constructor:!0,wrap:!0,forced:!H,sham:!H},{Symbol:jl}),Sl(_e(Dl),function(t){bl(t)}),Ce({target:Ol,stat:!0,forced:!H},{useSetter:function(){zl=!0},useSimple:function(){zl=!1}}),Ce({target:"Object",stat:!0,forced:!H,sham:!u},{create:function(t,e){return void 0===e?Ve(t):Kl(Ve(t),e)},defineProperty:$l,defineProperties:Kl,getOwnPropertyDescriptor:Vl}),Ce({target:"Object",stat:!0,forced:!H},{getOwnPropertyNames:Yl}),wl(),an(jl,Ol),Jt[El]=!0;var Jl=H&&!!Symbol.for&&!!Symbol.keyFor,Ql=nt("string-to-symbol-registry"),Zl=nt("symbol-to-string-registry");Ce({target:"Symbol",stat:!0,forced:!Jl},{for:function(t){var e=Wr(t);if(ut(Ql,e))return Ql[e];var r=L("Symbol")(e);return Ql[e]=r,Zl[r]=e,r}});var th=nt("symbol-to-string-registry");Ce({target:"Symbol",stat:!0,forced:!Jl},{keyFor:function(t){if(!G(t))throw new TypeError(Y(t)+" is not a symbol");if(ut(th,t))return th[t]}});var eh=b([].push),rh=String,nh=L("JSON","stringify"),oh=b(/./.exec),ih=b("".charAt),ah=b("".charCodeAt),uh=b("".replace),sh=b(1..toString),ch=/[\uD800-\uDFFF]/g,fh=/^[\uD800-\uDBFF]$/,lh=/^[\uDC00-\uDFFF]$/,hh=!H||a(function(){var t=L("Symbol")("stringify detection");return"[null]"!==nh([t])||"{}"!==nh({a:t})||"{}"!==nh(Object(t))}),ph=a(function(){return'"\\udf06\\ud834"'!==nh("\udf06\ud834")||'"\\udead"'!==nh("\udead")}),vh=function(t,e){var r=vo(arguments),n=function(t){if(T(t))return t;if(ur(t)){for(var e=t.length,r=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?eh(r,o):"number"!=typeof o&&"Number"!==E(o)&&"String"!==E(o)||eh(r,Wr(o))}var i=r.length,a=!0;return function(t,e){if(a)return a=!1,e;if(ur(this))return e;for(var n=0;n<i;n++)if(r[n]===t)return e}}}(e);if(T(n)||void 0!==t&&!G(t))return r[1]=function(t,e){if(T(n)&&(e=f(n,this,rh(t),e)),!G(e))return e},Ra(nh,null,r)},dh=function(t,e,r){var n=ih(r,e-1),o=ih(r,e+1);return oh(fh,t)&&!oh(lh,o)||oh(lh,t)&&!oh(fh,n)?"\\u"+sh(ah(t,0),16):t};nh&&Ce({target:"JSON",stat:!0,arity:3,forced:hh||ph},{stringify:function(t,e,r){var n=vo(arguments),o=Ra(hh?vh:nh,null,n);return ph&&"string"==typeof o?uh(o,ch,dh):o}});var gh=!H||a(function(){xe.f(1)});Ce({target:"Object",stat:!0,forced:gh},{getOwnPropertySymbols:function(t){var e=xe.f;return e?e(it(t)):[]}}),bl("asyncIterator");var yh=i.Symbol,mh=yh&&yh.prototype;if(u&&T(yh)&&(!("description"in mh)||void 0!==yh().description)){var bh={},wh=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:Wr(arguments[0]),e=U(mh,this)?new yh(t):void 0===t?yh():yh(t);return""===t&&(bh[e]=!0),e};Ae(wh,yh),wh.prototype=mh,mh.constructor=wh;var Sh="Symbol(description detection)"===String(yh("description detection")),Eh=b(mh.valueOf),Oh=b(mh.toString),xh=/^Symbol\((.*)\)[^)]+$/,Rh=b("".replace),Ph=b("".slice);so(mh,"description",{configurable:!0,get:function(){var t=Eh(this);if(ut(bh,t))return"";var e=Oh(t),r=Sh?Ph(e,7,-1):Rh(e,xh,"$1");return""===r?void 0:r}}),Ce({global:!0,constructor:!0,forced:!0},{Symbol:wh})}bl("hasInstance"),bl("isConcatSpreadable"),bl("iterator"),bl("match"),bl("matchAll"),bl("replace"),bl("search"),bl("species"),bl("split"),bl("toPrimitive"),wl(),bl("toStringTag"),an(L("Symbol"),"Symbol"),bl("unscopables"),an(i.JSON,"JSON",!0),an(Math,"Math",!0);var Ah=Ct.f,jh=dt("metadata"),kh=Function.prototype;void 0===kh[jh]&&Ah(kh,jh,{value:null});var Ih=Ct.f,Th=Rt.f,Mh=i.Symbol;if(bl("asyncDispose"),Mh){var Lh=Th(Mh,"asyncDispose");Lh.enumerable&&Lh.configurable&&Lh.writable&&Ih(Mh,"asyncDispose",{value:Lh.value,enumerable:!1,configurable:!1,writable:!1})}var Uh=Ct.f,Nh=Rt.f,Ch=i.Symbol;if(bl("dispose"),Ch){var _h=Nh(Ch,"dispose");_h.enumerable&&_h.configurable&&_h.writable&&Uh(Ch,"dispose",{value:_h.value,enumerable:!1,configurable:!1,writable:!1})}bl("metadata");var Fh=L("Symbol"),Bh=Fh.keyFor,Dh=b(Fh.prototype.valueOf),zh=Fh.isRegisteredSymbol||function(t){try{return void 0!==Bh(Dh(t))}catch(t){return!1}};Ce({target:"Symbol",stat:!0},{isRegisteredSymbol:zh});for(var Wh=L("Symbol"),qh=Wh.isWellKnownSymbol,Hh=L("Object","getOwnPropertyNames"),$h=b(Wh.prototype.valueOf),Kh=nt("wks"),Gh=0,Vh=Hh(Wh),Yh=Vh.length;Gh<Yh;Gh++)try{var Xh=Vh[Gh];G(Wh[Xh])&&dt(Xh)}catch(t){}var Jh=function(t){if(qh&&qh(t))return!0;try{for(var e=$h(t),r=0,n=Hh(Kh),o=n.length;r<o;r++)if(Kh[n[r]]==e)return!0}catch(t){}return!1};Ce({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Jh}),bl("customMatcher"),bl("observable"),Ce({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:zh}),Ce({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Jh}),bl("matcher"),bl("metadataKey"),bl("patternMatch"),bl("replaceAll"),yl.f("asyncIterator");var Qh=Gr.codeAt;Ce({target:"String",proto:!0},{codePointAt:function(t){return Qh(this,t)}}),Ze("String","codePointAt");var Zh=TypeError,tp=function(t){if(es(t))throw new Zh("The method doesn't accept regular expressions");return t},ep=dt("match"),rp=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[ep]=!1,"/./"[t](e)}catch(t){}}return!1},np=Rt.f,op=or("".slice),ip=Math.min,ap=rp("endsWith"),up=!ap&&!!function(){var t=np(String.prototype,"endsWith");return t&&!t.writable}();Ce({target:"String",proto:!0,forced:!up&&!ap},{endsWith:function(t){var e=Wr(j(this));tp(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,o=void 0===r?n:ip(ve(r),n),i=Wr(t);return op(e,o-i.length,o)===i}}),Ze("String","endsWith");var sp=RangeError,cp=String.fromCharCode,fp=String.fromCodePoint,lp=b([].join);Ce({target:"String",stat:!0,arity:1,forced:!!fp&&1!==fp.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,o=0;n>o;){if(e=+arguments[o++],he(e,1114111)!==e)throw new sp(e+" is not a valid code point");r[o]=e<65536?cp(e):cp(55296+((e-=65536)>>10),e%1024+56320)}return lp(r,"")}});var hp=b("".indexOf);Ce({target:"String",proto:!0,forced:!rp("includes")},{includes:function(t){return!!~hp(Wr(j(this)),Wr(tp(t)),arguments.length>1?arguments[1]:void 0)}}),Ze("String","includes"),b(un.String);var pp=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(_),vp=Xc.start;Ce({target:"String",proto:!0,forced:pp},{padStart:function(t){return vp(this,t,arguments.length>1?arguments[1]:void 0)}}),Ze("String","padStart");var dp=Xc.end;Ce({target:"String",proto:!0,forced:pp},{padEnd:function(t){return dp(this,t,arguments.length>1?arguments[1]:void 0)}}),Ze("String","padEnd");var gp=b([].push),yp=b([].join);Ce({target:"String",stat:!0},{raw:function(t){var e=k(it(t).raw),r=de(e);if(!r)return"";for(var n=arguments.length,o=[],i=0;;){if(gp(o,Wr(e[i++])),i===r)return yp(o,"");i<n&&gp(o,Wr(arguments[i]))}}}),Ce({target:"String",proto:!0},{repeat:$c}),Ze("String","repeat");var mp=Rt.f,bp=or("".slice),wp=Math.min,Sp=rp("startsWith"),Ep=!Sp&&!!function(){var t=mp(String.prototype,"startsWith");return t&&!t.writable}();Ce({target:"String",proto:!0,forced:!Ep&&!Sp},{startsWith:function(t){var e=Wr(j(this));tp(t);var r=ve(wp(arguments.length>1?arguments[1]:void 0,e.length)),n=Wr(t);return bp(e,r,r+n.length)===n}}),Ze("String","startsWith");var Op=zt.PROPER,xp=function(t){return a(function(){return!!Mi[t]()||"
"!=="
"[t]()||Op&&Mi[t].name!==t})},Rp=_i.start,Pp=xp("trimStart")?function(){return Rp(this)}:"".trimStart;Ce({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Pp},{trimLeft:Pp}),Ce({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==Pp},{trimStart:Pp}),Ze("String","trimLeft");var Ap=_i.end,jp=xp("trimEnd")?function(){return Ap(this)}:"".trimEnd;Ce({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==jp},{trimRight:jp}),Ce({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==jp},{trimEnd:jp}),Ze("String","trimRight");var kp=Object.getOwnPropertyDescriptor,Ip=function(t){if(!u)return i[t];var e=kp(i,t);return e&&e.value},Tp=dt("iterator"),Mp=!a(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach(function(t,r){e.delete("b"),n+=r+t}),r.delete("a",2),r.delete("b",void 0),!e.size&&!u||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Tp]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}),Lp=TypeError,Up=function(t,e){if(t<e)throw new Lp("Not enough arguments");return t},Np=Math.floor,Cp=function(t,e){var r=t.length;if(r<8)for(var n,o,i=1;i<r;){for(o=i,n=t[i];o&&e(t[o-1],n)>0;)t[o]=t[--o];o!==i++&&(t[o]=n)}else for(var a=Np(r/2),u=Cp(vo(t,0,a),e),s=Cp(vo(t,a),e),c=u.length,f=s.length,l=0,h=0;l<c||h<f;)t[l+h]=l<c&&h<f?e(u[l],s[h])<=0?u[l++]:s[h++]:l<c?u[l++]:s[h++];return t},_p=Cp,Fp=dt("iterator"),Bp="URLSearchParams",Dp=Bp+"Iterator",zp=ne.set,Wp=ne.getterFor(Bp),qp=ne.getterFor(Dp),Hp=Ip("fetch"),$p=Ip("Request"),Kp=Ip("Headers"),Gp=$p&&$p.prototype,Vp=Kp&&Kp.prototype,Yp=i.TypeError,Xp=i.encodeURIComponent,Jp=String.fromCharCode,Qp=L("String","fromCodePoint"),Zp=parseInt,tv=b("".charAt),ev=b([].join),rv=b([].push),nv=b("".replace),ov=b([].shift),iv=b([].splice),av=b("".split),uv=b("".slice),sv=b(/./.exec),cv=/\+/g,fv=/^[0-9a-f]+$/i,lv=function(t,e){var r=uv(t,e,e+2);return sv(fv,r)?Zp(r,16):NaN},hv=function(t){for(var e=0,r=128;r>0&&0!=(t&r);r>>=1)e++;return e},pv=function(t){var e=null;switch(t.length){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return e>1114111?null:e},vv=function(t){for(var e=(t=nv(t,cv," ")).length,r="",n=0;n<e;){var o=tv(t,n);if("%"===o){if("%"===tv(t,n+1)||n+3>e){r+="%",n++;continue}var i=lv(t,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=hv(i);if(0===a)o=Jp(i);else{if(1===a||a>4){r+="�",n++;continue}for(var u=[i],s=1;s<a&&!(3+ ++n>e||"%"!==tv(t,n));){var c=lv(t,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;rv(u,c),n+=2,s++}if(u.length!==a){r+="�";continue}var f=pv(u);null===f?r+="�":o=Qp(f)}}r+=o,n++}return r},dv=/[!'()~]|%20/g,gv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},yv=function(t){return gv[t]},mv=function(t){return nv(Xp(t),dv,yv)},bv=fn(function(t,e){zp(this,{type:Dp,target:Wp(t).entries,index:0,kind:e})},Bp,function(){var t=qp(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Pn(void 0,!0);var n=e[r];switch(t.kind){case"keys":return Pn(n.key,!1);case"values":return Pn(n.value,!1)}return Pn([n.key,n.value],!1)},!0),wv=function(t){this.entries=[],this.url=null,void 0!==t&&(M(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===tv(t,0)?uv(t,1):t:Wr(t)))};wv.prototype={type:Bp,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,a,u,s=this.entries,c=Fn(t);if(c)for(r=(e=Dn(t,c)).next;!(n=f(r,e)).done;){if(o=Dn(kt(n.value)),(a=f(i=o.next,o)).done||(u=f(i,o)).done||!f(i,o).done)throw new Yp("Expected sequence with length 2");rv(s,{key:Wr(a.value),value:Wr(u.value)})}else for(var l in t)ut(t,l)&&rv(s,{key:l,value:Wr(t[l])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,o=av(t,"&"),i=0;i<o.length;)(e=o[i++]).length&&(r=av(e,"="),rv(n,{key:vv(ov(r)),value:vv(ev(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],rv(r,mv(t.key)+"="+mv(t.value));return ev(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Sv=function(){ko(this,Ev);var t=zp(this,new wv(arguments.length>0?arguments[0]:void 0));u||(this.size=t.entries.length)},Ev=Sv.prototype;if(Mo(Ev,{append:function(t,e){var r=Wp(this);Up(arguments.length,2),rv(r.entries,{key:Wr(t),value:Wr(e)}),u||this.length++,r.updateURL()},delete:function(t){for(var e=Wp(this),r=Up(arguments.length,1),n=e.entries,o=Wr(t),i=r<2?void 0:arguments[1],a=void 0===i?i:Wr(i),s=0;s<n.length;){var c=n[s];if(c.key!==o||void 0!==a&&c.value!==a)s++;else if(iv(n,s,1),void 0!==a)break}u||(this.size=n.length),e.updateURL()},get:function(t){var e=Wp(this).entries;Up(arguments.length,1);for(var r=Wr(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){var e=Wp(this).entries;Up(arguments.length,1);for(var r=Wr(t),n=[],o=0;o<e.length;o++)e[o].key===r&&rv(n,e[o].value);return n},has:function(t){for(var e=Wp(this).entries,r=Up(arguments.length,1),n=Wr(t),o=r<2?void 0:arguments[1],i=void 0===o?o:Wr(o),a=0;a<e.length;){var u=e[a++];if(u.key===n&&(void 0===i||u.value===i))return!0}return!1},set:function(t,e){var r=Wp(this);Up(arguments.length,1);for(var n,o=r.entries,i=!1,a=Wr(t),s=Wr(e),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?iv(o,c--,1):(i=!0,n.value=s));i||rv(o,{key:a,value:s}),u||(this.size=o.length),r.updateURL()},sort:function(){var t=Wp(this);_p(t.entries,function(t,e){return t.key>e.key?1:-1}),t.updateURL()},forEach:function(t){for(var e,r=Wp(this).entries,n=ar(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new bv(this,"keys")},values:function(){return new bv(this,"values")},entries:function(){return new bv(this,"entries")}},{enumerable:!0}),ie(Ev,Fp,Ev.entries,{name:"entries"}),ie(Ev,"toString",function(){return Wp(this).serialize()},{enumerable:!0}),u&&so(Ev,"size",{get:function(){return Wp(this).entries.length},configurable:!0,enumerable:!0}),an(Sv,Bp),Ce({global:!0,constructor:!0,forced:!Mp},{URLSearchParams:Sv}),!Mp&&T(Kp)){var Ov=b(Vp.has),xv=b(Vp.set),Rv=function(t){if(M(t)){var e,r=t.body;if(pr(r)===Bp)return e=t.headers?new Kp(t.headers):new Kp,Ov(e,"content-type")||xv(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ve(t,{body:d(0,Wr(r)),headers:d(0,e)})}return t};if(T(Hp)&&Ce({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return Hp(t,arguments.length>1?Rv(arguments[1]):{})}}),T($p)){var Pv=function(t){return ko(this,Gp),new $p(t,arguments.length>1?Rv(arguments[1]):{})};Gp.constructor=Pv,Pv.prototype=Gp,Ce({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Pv})}}var Av={URLSearchParams:Sv,getState:Wp},jv=URLSearchParams,kv=jv.prototype,Iv=b(kv.append),Tv=b(kv.delete),Mv=b(kv.forEach),Lv=b([].push),Uv=new jv("a=1&a=2&b=3");Uv.delete("a",1),Uv.delete("b",void 0),Uv+""!="a=2"&&ie(kv,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return Tv(this,t);var n=[];Mv(this,function(t,e){Lv(n,{key:e,value:t})}),Up(e,1);for(var o,i=Wr(t),a=Wr(r),u=0,s=0,c=!1,f=n.length;u<f;)o=n[u++],c||o.key===i?(c=!0,Tv(this,o.key)):s++;for(;s<f;)(o=n[s++]).key===i&&o.value===a||Iv(this,o.key,o.value)},{enumerable:!0,unsafe:!0});var Nv=URLSearchParams,Cv=Nv.prototype,_v=b(Cv.getAll),Fv=b(Cv.has),Bv=new Nv("a=1");!Bv.has("a",2)&&Bv.has("a",void 0)||ie(Cv,"has",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return Fv(this,t);var n=_v(this,t);Up(e,1);for(var o=Wr(r),i=0;i<n.length;)if(n[i++]===o)return!0;return!1},{enumerable:!0,unsafe:!0});var Dv=URLSearchParams.prototype,zv=b(Dv.forEach);u&&!("size"in Dv)&&so(Dv,"size",{get:function(){var t=0;return zv(this,function(){t++}),t},configurable:!0,enumerable:!0});var Wv,qv=Object.assign,Hv=Object.defineProperty,$v=b([].concat),Kv=!qv||a(function(){if(u&&1!==qv({b:1},qv(Hv({},"a",{enumerable:!0,get:function(){Hv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!==qv({},t)[r]||_e(qv({},e)).join("")!==n})?function(t,e){for(var r=it(t),n=arguments.length,o=1,i=xe.f,a=v.f;n>o;)for(var s,c=R(arguments[o++]),l=i?$v(_e(c),i(c)):_e(c),h=l.length,p=0;h>p;)s=l[p++],u&&!f(a,c,s)||(r[s]=c[s]);return r}:qv,Gv=2147483647,Vv=/[^\0-\u007E]/,Yv=/[.\u3002\uFF0E\uFF61]/g,Xv="Overflow: input needs wider integers to process",Jv=RangeError,Qv=b(Yv.exec),Zv=Math.floor,td=String.fromCharCode,ed=b("".charCodeAt),rd=b([].join),nd=b([].push),od=b("".replace),id=b("".split),ad=b("".toLowerCase),ud=function(t){return t+22+75*(t<26)},sd=function(t,e,r){var n=0;for(t=r?Zv(t/700):t>>1,t+=Zv(t/e);t>455;)t=Zv(t/35),n+=36;return Zv(n+36*t/(t+38))},cd=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=ed(t,r++);if(o>=55296&&o<=56319&&r<n){var i=ed(t,r++);56320==(64512&i)?nd(e,((1023&o)<<10)+(1023&i)+65536):(nd(e,o),r--)}else nd(e,o)}return e}(t);var r,n,o=t.length,i=128,a=0,u=72;for(r=0;r<t.length;r++)(n=t[r])<128&&nd(e,td(n));var s=e.length,c=s;for(s&&nd(e,"-");c<o;){var f=Gv;for(r=0;r<t.length;r++)(n=t[r])>=i&&n<f&&(f=n);var l=c+1;if(f-i>Zv((Gv-a)/l))throw new Jv(Xv);for(a+=(f-i)*l,i=f,r=0;r<t.length;r++){if((n=t[r])<i&&++a>Gv)throw new Jv(Xv);if(n===i){for(var h=a,p=36;;){var v=p<=u?1:p>=u+26?26:p-u;if(h<v)break;var d=h-v,g=36-v;nd(e,td(ud(v+d%g))),h=Zv(d/g),p+=36}nd(e,td(ud(h))),u=sd(a,l,c===s),a=0,c++}}a++,i++}return rd(e,"")},fd=Gr.codeAt,ld=ne.set,hd=ne.getterFor("URL"),pd=Av.URLSearchParams,vd=Av.getState,dd=i.URL,gd=i.TypeError,yd=i.parseInt,md=Math.floor,bd=Math.pow,wd=b("".charAt),Sd=b(/./.exec),Ed=b([].join),Od=b(1..toString),xd=b([].pop),Rd=b([].push),Pd=b("".replace),Ad=b([].shift),jd=b("".split),kd=b("".slice),Id=b("".toLowerCase),Td=b([].unshift),Md="Invalid scheme",Ld="Invalid host",Ud="Invalid port",Nd=/[a-z]/i,Cd=/[\d+-.a-z]/i,_d=/\d/,Fd=/^0x/i,Bd=/^[0-7]+$/,Dd=/^\d+$/,zd=/^[\da-f]+$/i,Wd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,qd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Hd=/^[\u0000-\u0020]+/,$d=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Kd=/[\t\n\r]/g,Gd=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)Td(e,t%256),t=md(t/256);return Ed(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=Od(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},Vd={},Yd=Kv({},Vd,{" ":1,'"':1,"<":1,">":1,"`":1}),Xd=Kv({},Yd,{"#":1,"?":1,"{":1,"}":1}),Jd=Kv({},Xd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qd=function(t,e){var r=fd(t,0);return r>32&&r<127&&!ut(e,t)?t:encodeURIComponent(t)},Zd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},tg=function(t,e){var r;return 2===t.length&&Sd(Nd,wd(t,0))&&(":"===(r=wd(t,1))||!e&&"|"===r)},eg=function(t){var e;return t.length>1&&tg(kd(t,0,2))&&(2===t.length||"/"===(e=wd(t,2))||"\\"===e||"?"===e||"#"===e)},rg=function(t){return"."===t||"%2e"===Id(t)},ng={},og={},ig={},ag={},ug={},sg={},cg={},fg={},lg={},hg={},pg={},vg={},dg={},gg={},yg={},mg={},bg={},wg={},Sg={},Eg={},Og={},xg=function(t,e,r){var n,o,i,a=Wr(t);if(e){if(o=this.parse(a))throw new gd(o);this.searchParams=null}else{if(void 0!==r&&(n=new xg(r,!0)),o=this.parse(a,null,n))throw new gd(o);(i=vd(new pd)).bindURL(this),this.searchParams=i}};xg.prototype={type:"URL",parse:function(t,e,r){var n,o,i,a,u,s=this,c=e||ng,f=0,l="",h=!1,p=!1,v=!1;for(t=Wr(t),e||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,t=Pd(t,Hd,""),t=Pd(t,$d,"$1")),t=Pd(t,Kd,""),n=Wn(t);f<=n.length;){switch(o=n[f],c){case ng:if(!o||!Sd(Nd,o)){if(e)return Md;c=ig;continue}l+=Id(o),c=og;break;case og:if(o&&(Sd(Cd,o)||"+"===o||"-"===o||"."===o))l+=Id(o);else{if(":"!==o){if(e)return Md;l="",c=ig,f=0;continue}if(e&&(s.isSpecial()!==ut(Zd,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,e)return void(s.isSpecial()&&Zd[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?c=gg:s.isSpecial()&&r&&r.scheme===s.scheme?c=ag:s.isSpecial()?c=fg:"/"===n[f+1]?(c=ug,f++):(s.cannotBeABaseURL=!0,Rd(s.path,""),c=Sg)}break;case ig:if(!r||r.cannotBeABaseURL&&"#"!==o)return Md;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=vo(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=Og;break}c="file"===r.scheme?gg:sg;continue;case ag:if("/"!==o||"/"!==n[f+1]){c=sg;continue}c=lg,f++;break;case ug:if("/"===o){c=hg;break}c=wg;continue;case sg:if(s.scheme=r.scheme,o===Wv)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())c=cg;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query="",c=Eg;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.path.length--,c=wg;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query=r.query,s.fragment="",c=Og}break;case cg:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=wg;continue}c=hg}else c=lg;break;case fg:if(c=lg,"/"!==o||"/"!==wd(l,f+1))continue;f++;break;case lg:if("/"!==o&&"\\"!==o){c=hg;continue}break;case hg:if("@"===o){h&&(l="%40"+l),h=!0,i=Wn(l);for(var d=0;d<i.length;d++){var g=i[d];if(":"!==g||v){var y=Qd(g,Jd);v?s.password+=y:s.username+=y}else v=!0}l=""}else if(o===Wv||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(h&&""===l)return"Invalid authority";f-=Wn(l).length+1,l="",c=pg}else l+=o;break;case pg:case vg:if(e&&"file"===s.scheme){c=mg;continue}if(":"!==o||p){if(o===Wv||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()){if(s.isSpecial()&&""===l)return Ld;if(e&&""===l&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(l))return a;if(l="",c=bg,e)return;continue}"["===o?p=!0:"]"===o&&(p=!1),l+=o}else{if(""===l)return Ld;if(a=s.parseHost(l))return a;if(l="",c=dg,e===vg)return}break;case dg:if(!Sd(_d,o)){if(o===Wv||"/"===o||"?"===o||"#"===o||"\\"===o&&s.isSpecial()||e){if(""!==l){var m=yd(l,10);if(m>65535)return Ud;s.port=s.isSpecial()&&m===Zd[s.scheme]?null:m,l=""}if(e)return;c=bg;continue}return Ud}l+=o;break;case gg:if(s.scheme="file","/"===o||"\\"===o)c=yg;else{if(!r||"file"!==r.scheme){c=wg;continue}switch(o){case Wv:s.host=r.host,s.path=vo(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=vo(r.path),s.query="",c=Eg;break;case"#":s.host=r.host,s.path=vo(r.path),s.query=r.query,s.fragment="",c=Og;break;default:eg(Ed(vo(n,f),""))||(s.host=r.host,s.path=vo(r.path),s.shortenPath()),c=wg;continue}}break;case yg:if("/"===o||"\\"===o){c=mg;break}r&&"file"===r.scheme&&!eg(Ed(vo(n,f),""))&&(tg(r.path[0],!0)?Rd(s.path,r.path[0]):s.host=r.host),c=wg;continue;case mg:if(o===Wv||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&tg(l))c=wg;else if(""===l){if(s.host="",e)return;c=bg}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),e)return;l="",c=bg}continue}l+=o;break;case bg:if(s.isSpecial()){if(c=wg,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==Wv&&(c=wg,"/"!==o))continue}else s.fragment="",c=Og;else s.query="",c=Eg;break;case wg:if(o===Wv||"/"===o||"\\"===o&&s.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(u=Id(u=l))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||Rd(s.path,"")):rg(l)?"/"===o||"\\"===o&&s.isSpecial()||Rd(s.path,""):("file"===s.scheme&&!s.path.length&&tg(l)&&(s.host&&(s.host=""),l=wd(l,0)+":"),Rd(s.path,l)),l="","file"===s.scheme&&(o===Wv||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)Ad(s.path);"?"===o?(s.query="",c=Eg):"#"===o&&(s.fragment="",c=Og)}else l+=Qd(o,Xd);break;case Sg:"?"===o?(s.query="",c=Eg):"#"===o?(s.fragment="",c=Og):o!==Wv&&(s.path[0]+=Qd(o,Vd));break;case Eg:e||"#"!==o?o!==Wv&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":Qd(o,Vd)):(s.fragment="",c=Og);break;case Og:o!==Wv&&(s.fragment+=Qd(o,Yd))}f++}},parseHost:function(t){var e,r,n;if("["===wd(t,0)){if("]"!==wd(t,t.length-1))return Ld;if(e=function(t){var e,r,n,o,i,a,u,s=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return wd(t,l)};if(":"===h()){if(":"!==wd(t,1))return;l+=2,f=++c}for(;h();){if(8===c)return;if(":"!==h()){for(e=r=0;r<4&&Sd(zd,h());)e=16*e+yd(h(),16),l++,r++;if("."===h()){if(0===r)return;if(l-=r,c>6)return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;l++}if(!Sd(_d,h()))return;for(;Sd(_d,h());){if(i=yd(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}s[c]=256*s[c]+o,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;s[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(a=c-f,c=7;0!==c&&a>0;)u=s[c],s[c--]=s[f+a-1],s[f+--a]=u;else if(8!==c)return;return s}(kd(t,1,-1)),!e)return Ld;this.host=e}else if(this.isSpecial()){if(t=function(t){var e,r,n=[],o=id(od(ad(t),Yv,"."),".");for(e=0;e<o.length;e++)nd(n,Qv(Vv,r=o[e])?"xn--"+cd(r):r);return rd(n,".")}(t),Sd(Wd,t))return Ld;if(e=function(t){var e,r,n,o,i,a,u,s=jd(t,".");if(s.length&&""===s[s.length-1]&&s.length--,(e=s.length)>4)return t;for(r=[],n=0;n<e;n++){if(""===(o=s[n]))return t;if(i=10,o.length>1&&"0"===wd(o,0)&&(i=Sd(Fd,o)?16:8,o=kd(o,8===i?1:2)),""===o)a=0;else{if(!Sd(10===i?Dd:8===i?Bd:zd,o))return t;a=yd(o,i)}Rd(r,a)}for(n=0;n<e;n++)if(a=r[n],n===e-1){if(a>=bd(256,5-e))return null}else if(a>255)return null;for(u=xd(r),n=0;n<r.length;n++)u+=r[n]*bd(256,3-n);return u}(t),null===e)return Ld;this.host=e}else{if(Sd(qd,t))return Ld;for(e="",r=Wn(t),n=0;n<r.length;n++)e+=Qd(r[n],Vd);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return ut(Zd,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"===this.scheme&&1===e&&tg(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,u=t.query,s=t.fragment,c=e+":";return null!==o?(c+="//",t.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Gd(o),null!==i&&(c+=":"+i)):"file"===e&&(c+="//"),c+=t.cannotBeABaseURL?a[0]:a.length?"/"+Ed(a,"/"):"",null!==u&&(c+="?"+u),null!==s&&(c+="#"+s),c},setHref:function(t){var e=this.parse(t);if(e)throw new gd(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new Rg(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+Gd(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(Wr(t)+":",ng)},getUsername:function(){return this.username},setUsername:function(t){var e=Wn(Wr(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<e.length;r++)this.username+=Qd(e[r],Jd)}},getPassword:function(){return this.password},setPassword:function(t){var e=Wn(Wr(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<e.length;r++)this.password+=Qd(e[r],Jd)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?Gd(t):Gd(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,pg)},getHostname:function(){var t=this.host;return null===t?"":Gd(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,vg)},getPort:function(){var t=this.port;return null===t?"":Wr(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=Wr(t))?this.port=null:this.parse(t,dg))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+Ed(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,bg))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""===(t=Wr(t))?this.query=null:("?"===wd(t,0)&&(t=kd(t,1)),this.query="",this.parse(t,Eg)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!==(t=Wr(t))?("#"===wd(t,0)&&(t=kd(t,1)),this.fragment="",this.parse(t,Og)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Rg=function(t){var e=ko(this,Pg),r=Up(arguments.length,1)>1?arguments[1]:void 0,n=ld(e,new xg(t,!1,r));u||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Pg=Rg.prototype,Ag=function(t,e){return{get:function(){return hd(this)[t]()},set:e&&function(t){return hd(this)[e](t)},configurable:!0,enumerable:!0}};if(u&&(so(Pg,"href",Ag("serialize","setHref")),so(Pg,"origin",Ag("getOrigin")),so(Pg,"protocol",Ag("getProtocol","setProtocol")),so(Pg,"username",Ag("getUsername","setUsername")),so(Pg,"password",Ag("getPassword","setPassword")),so(Pg,"host",Ag("getHost","setHost")),so(Pg,"hostname",Ag("getHostname","setHostname")),so(Pg,"port",Ag("getPort","setPort")),so(Pg,"pathname",Ag("getPathname","setPathname")),so(Pg,"search",Ag("getSearch","setSearch")),so(Pg,"searchParams",Ag("getSearchParams")),so(Pg,"hash",Ag("getHash","setHash"))),ie(Pg,"toJSON",function(){return hd(this).serialize()},{enumerable:!0}),ie(Pg,"toString",function(){return hd(this).serialize()},{enumerable:!0}),dd){var jg=dd.createObjectURL,kg=dd.revokeObjectURL;jg&&ie(Rg,"createObjectURL",ar(jg,dd)),kg&&ie(Rg,"revokeObjectURL",ar(kg,dd))}an(Rg,"URL"),Ce({global:!0,constructor:!0,forced:!Mp,sham:!u},{URL:Rg});var Ig=L("URL"),Tg=Mp&&a(function(){Ig.canParse()}),Mg=a(function(){return 1!==Ig.canParse.length});Ce({target:"URL",stat:!0,forced:!Tg||Mg},{canParse:function(t){var e=Up(arguments.length,1),r=Wr(t),n=e<2||void 0===arguments[1]?void 0:Wr(arguments[1]);try{return!!new Ig(r,n)}catch(t){return!1}}});var Lg=L("URL");Ce({target:"URL",stat:!0,forced:!Mp},{parse:function(t){var e=Up(arguments.length,1),r=Wr(t),n=e<2||void 0===arguments[1]?void 0:Wr(arguments[1]);try{return new Lg(r,n)}catch(t){return null}}}),Ce({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return f(URL.prototype.toString,this)}});var Ug=WeakMap.prototype,Ng={WeakMap:WeakMap,set:b(Ug.set),get:b(Ug.get),has:b(Ug.has),remove:b(Ug.delete)},Cg=Ng.has,_g=function(t){return Cg(t),t},Fg=Ng.get,Bg=Ng.has,Dg=Ng.set;Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,o=_g(this);return Bg(o,t)?(r=Fg(o,t),"update"in e&&(r=e.update(r,t,o),Dg(o,t,r)),r):(n=e.insert(t,o),Dg(o,t,n),n)}}),Ce({target:"WeakMap",stat:!0,forced:!0},{from:ei(Ng.WeakMap,Ng.set,!0)}),Ce({target:"WeakMap",stat:!0,forced:!0},{of:ri(Ng.WeakMap,Ng.set,!0)});var zg=Ng.remove;Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=_g(this),r=!0,n=0,o=arguments.length;n<o;n++)t=zg(e,arguments[n]),r=r&&t;return!!r}}),Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{upsert:Ii}),To("WeakSet",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},eu);var Wg=WeakSet.prototype,qg={WeakSet:WeakSet,add:b(Wg.add),has:b(Wg.has),remove:b(Wg.delete)},Hg=qg.has,$g=function(t){return Hg(t),t},Kg=qg.add;Ce({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=$g(this),e=0,r=arguments.length;e<r;e++)Kg(t,arguments[e]);return t}});var Gg=qg.remove;Ce({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=$g(this),r=!0,n=0,o=arguments.length;n<o;n++)t=Gg(e,arguments[n]),r=r&&t;return!!r}}),Ce({target:"WeakSet",stat:!0,forced:!0},{from:ei(qg.WeakSet,qg.add,!1)}),Ce({target:"WeakSet",stat:!0,forced:!0},{of:ri(qg.WeakSet,qg.add,!1)});var Vg=Error,Yg=b("".replace),Xg=String(new Vg("zxcasd").stack),Jg=/\n\s*at [^:]*:[^\n]*/,Qg=Jg.test(Xg),Zg=!a(function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",d(1,7)),7!==t.stack)}),ty=Error.captureStackTrace,ey=dt("toStringTag"),ry=Error,ny=[].push,oy=function(t,e){var r,n,o,i,a,u=U(iy,this);dn?r=dn(new ry,u?Qr(this):iy):(r=u?this:Ve(iy),_t(r,ey,"Error")),void 0!==e&&_t(r,"message",function(t,e){return void 0===t?arguments.length<2?"":e:Wr(t)}(e)),i=r,a=r.stack,Zg&&(ty?ty(i,oy):_t(i,"stack",function(t,e){if(Qg&&"string"==typeof t&&!Vg.prepareStackTrace)for(;e--;)t=Yg(t,Jg,"");return t}(a,1))),arguments.length>2&&(n=r,M(o=arguments[2])&&"cause"in o&&_t(n,"cause",o.cause));var s=[];return Ao(t,ny,{that:s}),_t(r,"errors",s),r};dn?dn(oy,ry):Ae(oy,ry,{name:!0});var iy=oy.prototype=Ve(ry.prototype,{constructor:d(1,oy),message:d(1,""),name:d(1,"AggregateError")});Ce({global:!0,constructor:!0,arity:2},{AggregateError:oy});var ay,uy,sy,cy,fy=function(t){return _.slice(0,t.length)===t},ly=fy("Bun/")?"BUN":fy("Cloudflare-Workers")?"CLOUDFLARE":fy("Deno/")?"DENO":fy("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===E(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST",hy="NODE"===ly,py=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),vy=i.setImmediate,dy=i.clearImmediate,gy=i.process,yy=i.Dispatch,my=i.Function,by=i.MessageChannel,wy=i.String,Sy=0,Ey={},Oy="onreadystatechange";a(function(){ay=i.location});var xy=function(t){if(ut(Ey,t)){var e=Ey[t];delete Ey[t],e()}},Ry=function(t){return function(){xy(t)}},Py=function(t){xy(t.data)},Ay=function(t){i.postMessage(wy(t),ay.protocol+"//"+ay.host)};vy&&dy||(vy=function(t){Up(arguments.length,1);var e=T(t)?t:my(t),r=vo(arguments,1);return Ey[++Sy]=function(){Ra(e,void 0,r)},uy(Sy),Sy},dy=function(t){delete Ey[t]},hy?uy=function(t){gy.nextTick(Ry(t))}:yy&&yy.now?uy=function(t){yy.now(Ry(t))}:by&&!py?(cy=(sy=new by).port2,sy.port1.onmessage=Py,uy=ar(cy.postMessage,cy)):i.addEventListener&&T(i.postMessage)&&!i.importScripts&&ay&&"file:"!==ay.protocol&&!a(Ay)?(uy=Ay,i.addEventListener("message",Py,!1)):uy=Oy in Et("script")?function(t){De.appendChild(Et("script"))[Oy]=function(){De.removeChild(this),xy(t)}}:function(t){setTimeout(Ry(t),0)});var jy={set:vy,clear:dy},ky=function(){this.head=null,this.tail=null};ky.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Iy,Ty,My,Ly,Uy,Ny=ky,Cy=/ipad|iphone|ipod/i.test(_)&&"undefined"!=typeof Pebble,_y=/web0s(?!.*chrome)/i.test(_),Fy=jy.set,By=i.MutationObserver||i.WebKitMutationObserver,Dy=i.document,zy=i.process,Wy=i.Promise,qy=Ip("queueMicrotask");if(!qy){var Hy=new Ny,$y=function(){var t,e;for(hy&&(t=zy.domain)&&t.exit();e=Hy.get();)try{e()}catch(t){throw Hy.head&&Iy(),t}t&&t.enter()};py||hy||_y||!By||!Dy?!Cy&&Wy&&Wy.resolve?((Ly=Wy.resolve(void 0)).constructor=Wy,Uy=ar(Ly.then,Ly),Iy=function(){Uy($y)}):hy?Iy=function(){zy.nextTick($y)}:(Fy=ar(Fy,i),Iy=function(){Fy($y)}):(Ty=!0,My=Dy.createTextNode(""),new By($y).observe(My,{characterData:!0}),Iy=function(){My.data=Ty=!Ty}),qy=function(t){Hy.head||Iy(),Hy.add(t)}}var Ky,Gy,Vy,Yy=qy,Xy=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Jy=i.Promise,Qy=dt("species"),Zy=!1,tm=T(i.PromiseRejectionEvent),em=Ue("Promise",function(){var t=Kt(Jy),e=t!==String(Jy);if(!e&&66===W)return!0;if(!W||W<51||!/native code/.test(t)){var r=new Jy(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((r.constructor={})[Qy]=n,!(Zy=r.then(function(){})instanceof n))return!0}return!(e||"BROWSER"!==ly&&"DENO"!==ly||tm)}),rm={CONSTRUCTOR:em,REJECTION_EVENT:tm,SUBCLASSING:Zy},nm=TypeError,om=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new nm("Bad Promise constructor");e=t,r=n}),this.resolve=J(e),this.reject=J(r)},im={f:function(t){return new om(t)}},am=jy.set,um="Promise",sm=rm.CONSTRUCTOR,cm=rm.REJECTION_EVENT,fm=rm.SUBCLASSING,lm=ne.getterFor(um),hm=ne.set,pm=Jy&&Jy.prototype,vm=Jy,dm=pm,gm=i.TypeError,ym=i.document,mm=i.process,bm=im.f,wm=bm,Sm=!!(ym&&ym.createEvent&&i.dispatchEvent),Em="unhandledrejection",Om=function(t){var e;return!(!M(t)||!T(e=t.then))&&e},xm=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,l=t.domain;try{u?(a||(2===e.rejection&&km(e),e.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===t.promise?c(new gm("Promise-chain cycle")):(n=Om(r))?f(n,r,s,c):s(r)):c(i)}catch(t){l&&!o&&l.exit(),c(t)}},Rm=function(t,e){t.notified||(t.notified=!0,Yy(function(){for(var r,n=t.reactions;r=n.get();)xm(r,t);t.notified=!1,e&&!t.rejection&&Am(t)}))},Pm=function(t,e,r){var n,o;Sm?((n=ym.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),i.dispatchEvent(n)):n={promise:e,reason:r},!cm&&(o=i["on"+t])?o(n):t===Em&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",r)},Am=function(t){f(am,i,function(){var e,r=t.facade,n=t.value;if(jm(t)&&(e=Xy(function(){hy?mm.emit("unhandledRejection",n,r):Pm(Em,r,n)}),t.rejection=hy||jm(t)?2:1,e.error))throw e.value})},jm=function(t){return 1!==t.rejection&&!t.parent},km=function(t){f(am,i,function(){var e=t.facade;hy?mm.emit("rejectionHandled",e):Pm("rejectionhandled",e,t.value)})},Im=function(t,e,r){return function(n){t(e,n,r)}},Tm=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Rm(t,!0))},Mm=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new gm("Promise can't be resolved itself");var n=Om(e);n?Yy(function(){var r={done:!1};try{f(n,e,Im(Mm,r,t),Im(Tm,r,t))}catch(e){Tm(r,e,t)}}):(t.value=e,t.state=1,Rm(t,!1))}catch(e){Tm({done:!1},e,t)}}};if(sm&&(vm=function(t){ko(this,dm),J(t),f(Ky,this);var e=lm(this);try{t(Im(Mm,e),Im(Tm,e))}catch(t){Tm(e,t)}},(Ky=function(t){hm(this,{type:um,done:!1,notified:!1,parent:!1,reactions:new Ny,rejection:!1,state:0,value:null})}).prototype=ie(dm=vm.prototype,"then",function(t,e){var r=lm(this),n=bm(Cc(this,vm));return r.parent=!0,n.ok=!T(t)||t,n.fail=T(e)&&e,n.domain=hy?mm.domain:void 0,0===r.state?r.reactions.add(n):Yy(function(){xm(n,r)}),n.promise}),Gy=function(){var t=new Ky,e=lm(t);this.promise=t,this.resolve=Im(Mm,e),this.reject=Im(Tm,e)},im.f=bm=function(t){return t===vm||void 0===t?new Gy(t):wm(t)},T(Jy)&&pm!==Object.prototype)){Vy=pm.then,fm||ie(pm,"then",function(t,e){var r=this;return new vm(function(t,e){f(Vy,r,t,e)}).then(t,e)},{unsafe:!0});try{delete pm.constructor}catch(t){}dn&&dn(pm,dm)}Ce({global:!0,constructor:!0,wrap:!0,forced:sm},{Promise:vm}),an(vm,um,!1),Uo(um);var Lm=rm.CONSTRUCTOR||!Gn(function(t){Jy.all(t).then(void 0,function(){})});Ce({target:"Promise",stat:!0,forced:Lm},{all:function(t){var e=this,r=im.f(e),n=r.resolve,o=r.reject,i=Xy(function(){var r=J(e.resolve),i=[],a=0,u=1;Ao(t,function(t){var s=a++,c=!1;u++,f(r,e,t).then(function(t){c||(c=!0,i[s]=t,--u||n(i))},o)}),--u||n(i)});return i.error&&o(i.value),r.promise}});var Um=Jy&&Jy.prototype;if(Ce({target:"Promise",proto:!0,forced:rm.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),T(Jy)){var Nm=L("Promise").prototype.catch;Um.catch!==Nm&&ie(Um,"catch",Nm,{unsafe:!0})}Ce({target:"Promise",stat:!0,forced:Lm},{race:function(t){var e=this,r=im.f(e),n=r.reject,o=Xy(function(){var o=J(e.resolve);Ao(t,function(t){f(o,e,t).then(r.resolve,n)})});return o.error&&n(o.value),r.promise}}),Ce({target:"Promise",stat:!0,forced:rm.CONSTRUCTOR},{reject:function(t){var e=im.f(this);return(0,e.reject)(t),e.promise}});var Cm=function(t,e){if(kt(t),M(e)&&e.constructor===t)return e;var r=im.f(t);return(0,r.resolve)(e),r.promise};Ce({target:"Promise",stat:!0,forced:rm.CONSTRUCTOR},{resolve:function(t){return Cm(this,t)}}),Ce({target:"Promise",stat:!0,forced:Lm},{allSettled:function(t){var e=this,r=im.f(e),n=r.resolve,o=r.reject,i=Xy(function(){var r=J(e.resolve),o=[],i=0,a=1;Ao(t,function(t){var u=i++,s=!1;a++,f(r,e,t).then(function(t){s||(s=!0,o[u]={status:"fulfilled",value:t},--a||n(o))},function(t){s||(s=!0,o[u]={status:"rejected",reason:t},--a||n(o))})}),--a||n(o)});return i.error&&o(i.value),r.promise}});var _m="No one promise resolved";Ce({target:"Promise",stat:!0,forced:Lm},{any:function(t){var e=this,r=L("AggregateError"),n=im.f(e),o=n.resolve,i=n.reject,a=Xy(function(){var n=J(e.resolve),a=[],u=0,s=1,c=!1;Ao(t,function(t){var l=u++,h=!1;s++,f(n,e,t).then(function(t){h||c||(c=!0,o(t))},function(t){h||c||(h=!0,a[l]=t,--s||i(new r(a,_m)))})}),--s||i(new r(a,_m))});return a.error&&i(a.value),n.promise}}),Ce({target:"Promise",stat:!0},{withResolvers:function(){var t=im.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Fm=Jy&&Jy.prototype,Bm=!!Jy&&a(function(){Fm.finally.call({then:function(){}},function(){})});if(Ce({target:"Promise",proto:!0,real:!0,forced:Bm},{finally:function(t){var e=Cc(this,L("Promise")),r=T(t);return this.then(r?function(r){return Cm(e,t()).then(function(){return r})}:t,r?function(r){return Cm(e,t()).then(function(){throw r})}:t)}}),T(Jy)){var Dm=L("Promise").prototype.finally;Fm.finally!==Dm&&ie(Fm,"finally",Dm,{unsafe:!0})}var zm=i.Promise,Wm=!1,qm=!zm||!zm.try||Xy(function(){zm.try(function(t){Wm=8===t},8)}).error||!Wm;Ce({target:"Promise",stat:!0,forced:qm},{try:function(t){var e=arguments.length>1?vo(arguments,1):[],r=im.f(this),n=Xy(function(){return Ra(J(t),void 0,e)});return(n.error?r.reject:r.resolve)(n.value),r.promise}}),Ze("Promise","finally");var Hm="URLSearchParams"in self,$m="Symbol"in self&&"iterator"in Symbol,Km="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),Gm="FormData"in self,Vm="ArrayBuffer"in self;if(Vm)var Ym=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xm=ArrayBuffer.isView||function(t){return t&&Ym.indexOf(Object.prototype.toString.call(t))>-1};function Jm(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function Qm(t){return"string"!=typeof t&&(t=String(t)),t}function Zm(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return $m&&(e[Symbol.iterator]=function(){return e}),e}function tb(t){this.map={},t instanceof tb?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function eb(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function rb(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function nb(t){var e=new FileReader,r=rb(e);return e.readAsArrayBuffer(t),r}function ob(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function ib(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:Km&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Gm&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:Hm&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():Vm&&Km&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=ob(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Vm&&(ArrayBuffer.prototype.isPrototypeOf(t)||Xm(t))?this._bodyArrayBuffer=ob(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Hm&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Km&&(this.blob=function(){var t=eb(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?eb(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(nb)}),this.text=function(){var t=eb(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=rb(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Gm&&(this.formData=function(){return this.text().then(sb)}),this.json=function(){return this.text().then(JSON.parse)},this}tb.prototype.append=function(t,e){t=Jm(t),e=Qm(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},tb.prototype.delete=function(t){delete this.map[Jm(t)]},tb.prototype.get=function(t){return t=Jm(t),this.has(t)?this.map[t]:null},tb.prototype.has=function(t){return this.map.hasOwnProperty(Jm(t))},tb.prototype.set=function(t,e){this.map[Jm(t)]=Qm(e)},tb.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},tb.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),Zm(t)},tb.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),Zm(t)},tb.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),Zm(t)},$m&&(tb.prototype[Symbol.iterator]=tb.prototype.entries);var ab=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ub(t,e){var r=(e=e||{}).body;if(t instanceof ub){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new tb(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new tb(e.headers)),this.method=function(t){var e=t.toUpperCase();return ab.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function sb(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function cb(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new tb(e.headers),this.url=e.url||"",this._initBody(t)}ub.prototype.clone=function(){return new ub(this,{body:this._bodyInit})},ib.call(ub.prototype),ib.call(cb.prototype),cb.prototype.clone=function(){return new cb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new tb(this.headers),url:this.url})},cb.error=function(){var t=new cb(null,{status:0,statusText:""});return t.type="error",t};var fb=[301,302,303,307,308];cb.redirect=function(t,e){if(-1===fb.indexOf(e))throw new RangeError("Invalid status code");return new cb(null,{status:e,headers:{location:t}})};var lb=self.DOMException;try{new lb}catch(t){(lb=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),lb.prototype.constructor=lb}function hb(t,e){return new Promise(function(r,n){var o=new ub(t,e);if(o.signal&&o.signal.aborted)return n(new lb("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}i.onload=function(){var t,e,n={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",e=new tb,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL"),r(new cb("response"in i?i.response:i.responseText,n))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.onabort=function(){n(new lb("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&Km&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),o.signal&&(o.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",a)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})}hb.polyfill=!0,self.fetch||(self.fetch=hb,self.Headers=tb,self.Request=ub,self.Response=cb);var pb=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,db=Object.prototype.propertyIsEnumerable,gb=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,n,o=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i<arguments.length;i++){for(var a in r=Object(arguments[i]))vb.call(r,a)&&(o[a]=r[a]);if(pb){n=pb(r);for(var u=0;u<n.length;u++)db.call(r,n[u])&&(o[n[u]]=r[n[u]])}}return o};Object.assign=gb}(); diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/webpack-75a5453f51d60261.js b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/webpack-75a5453f51d60261.js new file mode 100644 index 00000000..b9a1bdca --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/chunks/webpack-75a5453f51d60261.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={id:e,loaded:!1,exports:{}},r=!0;try{a[e].call(n.exports,n,n.exports,d),r=!1}finally{r&&delete l[e]}return n.loaded=!0,n.exports}d.m=a,e=[],d.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u<e.length;u++){for(var n=e[u][0],r=e[u][1],o=e[u][2],c=!0,f=0;f<n.length;f++)i>=o&&Object.keys(d.O).every(function(e){return d.O[e](n[f])})?n.splice(f--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var a=r();void 0!==a&&(t=a)}}return t},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},d.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);d.r(o);var u={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach(function(t){u[t]=function(){return e[t]}});return u.default=function(){return e},d.d(o,u),o},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(t,n){return d.f[n](e,t),t},[]))},d.u=function(e){},d.miniCssF=function(e){},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",d.l=function(e,t,n,u){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var i,c,f=document.getElementsByTagName("script"),a=0;a<f.length;a++){var l=f[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){i=l;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,d.nc&&i.setAttribute("nonce",d.nc),i.setAttribute("data-webpack",o+n),i.src=d.tu(e)),r[e]=[t];var s=function(t,n){i.onerror=i.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),c&&document.head.appendChild(i)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},d.tt=function(){return void 0===u&&(u={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(u=trustedTypes.createPolicy("nextjs#bundler",u))),u},d.tu=function(e){return d.tt().createScriptURL(e)},d.p="/ui/_next/",i={272:0,919:0,986:0},d.f.j=function(e,t){var n=d.o(i,e)?i[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(272|919|986)$/.test(e))i[e]=0;else{var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=d.p+d.u(e),u=Error();d.l(o,function(t){if(d.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}}},d.O.j=function(e){return 0===i[e]},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],f=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)d.o(u,n)&&(d.m[n]=u[n]);if(c)var a=c(d)}for(e&&e(t);f<o.length;f++)r=o[f],d.o(i,r)&&i[r]&&i[r][0](),i[r]=0;return d.O(a)},(f=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),f.push=c.bind(null,f.push.bind(f))}();
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/css/169f9187db1ec37e.css b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/css/169f9187db1ec37e.css new file mode 100644 index 00000000..d816d24a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/css/169f9187db1ec37e.css @@ -0,0 +1,3 @@ +/* +! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com +*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media (forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.right-0{right:0}.right-1{right:.25rem}.right-1\/2{right:50%}.right-10{right:2.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-7{grid-column:span 7/span 7}.col-span-8{grid-column:span 8/span 8}.col-span-9{grid-column:span 9/span 9}.m-0{margin:0}.m-2{margin:.5rem}.m-8{margin:2rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-px{margin-bottom:-1px}.-ml-0{margin-left:0}.-ml-0\.5{margin-left:-.125rem}.-ml-1{margin-left:-.25rem}.-ml-1\.5{margin-left:-.375rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-11{margin-left:2.75rem}.ml-2{margin-left:.5rem}.ml-2\.5{margin-left:.625rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-7{margin-left:1.75rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-2\.5{margin-right:.625rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0{height:0}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-\[100vh\]{height:100vh}.h-\[1px\]{height:1px}.h-\[75vh\]{height:75vh}.h-\[80vh\]{height:80vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-8{max-height:2rem}.max-h-96{max-height:24rem}.max-h-\[228px\]{max-height:228px}.max-h-\[400px\]{max-height:400px}.max-h-\[40vh\]{max-height:40vh}.max-h-\[500px\]{max-height:500px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[75vh\]{max-height:75vh}.max-h-\[90vh\]{max-height:90vh}.min-h-\[400px\]{min-height:400px}.min-h-\[500px\]{min-height:500px}.min-h-\[750px\]{min-height:750px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[160px\]{width:160px}.w-\[400px\]{width:400px}.w-\[500px\]{width:500px}.w-\[90\%\]{width:90%}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-40,.min-w-\[10rem\]{min-width:10rem}.min-w-\[160px\]{min-width:160px}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-6xl{max-width:72rem}.max-w-\[100px\]{max-width:100px}.max-w-\[150px\]{max-width:150px}.max-w-\[15ch\]{max-width:15ch}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-4{--tw-translate-y:-1rem}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x:50%}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.-rotate-180{--tw-rotate:-180deg}.-rotate-180,.-rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.grid-cols-none{grid-template-columns:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.space-x-0\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.125rem * var(--tw-space-x-reverse));margin-left:calc(.125rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.375rem * var(--tw-space-x-reverse));margin-left:calc(.375rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.625rem * var(--tw-space-x-reverse));margin-left:calc(.625rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-tremor-border>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-clip{overflow-x:clip}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-\[1px\]{border-radius:1px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-tremor-default{border-radius:.5rem}.rounded-tremor-full{border-radius:9999px}.rounded-tremor-small{border-radius:.375rem}.rounded-b-tremor-default{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-tremor-default{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-tremor-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-l-tremor-small{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-r-tremor-default{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-r-tremor-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-r-tremor-small{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-tremor-default{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-4{border-bottom-width:4px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-t-\[1px\]{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity))}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity))}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity))}.border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity))}.border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity))}.border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity))}.border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity))}.border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity))}.border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity))}.border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity))}.border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity))}.border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}.border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}.border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity))}.border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity))}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity))}.border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity))}.border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity))}.border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity))}.border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity))}.border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity))}.border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity))}.border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity))}.border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity))}.border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity))}.border-dark-tremor-background{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.border-dark-tremor-border{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-dark-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.border-dark-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}.border-dark-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity))}.border-dark-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}.border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity))}.border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity))}.border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity))}.border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity))}.border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity))}.border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity))}.border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity))}.border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity))}.border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity))}.border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity))}.border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity))}.border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity))}.border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity))}.border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity))}.border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity))}.border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity))}.border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity))}.border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity))}.border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity))}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity))}.border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity))}.border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity))}.border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity))}.border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity))}.border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity))}.border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity))}.border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity))}.border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity))}.border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity))}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}.border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity))}.border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}.border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity))}.border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity))}.border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity))}.border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity))}.border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity))}.border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity))}.border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity))}.border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity))}.border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity))}.border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity))}.border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity))}.border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity))}.border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity))}.border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity))}.border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity))}.border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}.border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity))}.border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity))}.border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity))}.border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity))}.border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity))}.border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity))}.border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity))}.border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity))}.border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity))}.border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity))}.border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity))}.border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity))}.border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity))}.border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity))}.border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity))}.border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity))}.border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity))}.border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity))}.border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity))}.border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity))}.border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity))}.border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity))}.border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity))}.border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity))}.border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity))}.border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity))}.border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity))}.border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity))}.border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}.border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity))}.border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity))}.border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity))}.border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity))}.border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity))}.border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity))}.border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity))}.border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity))}.border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity))}.border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity))}.border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity))}.border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity))}.border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity))}.border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity))}.border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity))}.border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity))}.border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity))}.border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity))}.border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity))}.border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity))}.border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity))}.border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity))}.border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity))}.border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity))}.border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity))}.border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity))}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity))}.border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity))}.border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity))}.border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity))}.border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity))}.border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity))}.border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity))}.border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity))}.border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity))}.border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity))}.border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity))}.border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity))}.border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity))}.border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity))}.border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity))}.border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity))}.border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity))}.border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity))}.border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity))}.border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-tremor-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-tremor-border{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.border-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.border-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.border-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity))}.border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity))}.border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity))}.border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity))}.border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity))}.border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity))}.border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity))}.border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity))}.border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity))}.border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity))}.border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity))}.border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity))}.border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity))}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}.border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity))}.border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity))}.border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity))}.border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity))}.border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity))}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}.border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity))}.border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity))}.border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity))}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity))}.border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity))}.border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity))}.bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity))}.bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity))}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity))}.bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity))}.bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity))}.bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity))}.bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-black\/90{background-color:rgba(0,0,0,.9)}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity))}.bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity))}.bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity))}.bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity))}.bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity))}.bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity))}.bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity))}.bg-dark-tremor-background{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-dark-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-dark-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.bg-dark-tremor-brand-emphasis{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.bg-dark-tremor-brand-faint{--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity))}.bg-dark-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity))}.bg-dark-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity))}.bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity))}.bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity))}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity))}.bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity))}.bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity))}.bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity))}.bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity))}.bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity))}.bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity))}.bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity))}.bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity))}.bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity))}.bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity))}.bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity))}.bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity))}.bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity))}.bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity))}.bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity))}.bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity))}.bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity))}.bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity))}.bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity))}.bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity))}.bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity))}.bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity))}.bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity))}.bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity))}.bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity))}.bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity))}.bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity))}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity))}.bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity))}.bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity))}.bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity))}.bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity))}.bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}.bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity))}.bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity))}.bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity))}.bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity))}.bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity))}.bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity))}.bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity))}.bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}.bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}.bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity))}.bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity))}.bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity))}.bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity))}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity))}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity))}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity))}.bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity))}.bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity))}.bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity))}.bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity))}.bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity))}.bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity))}.bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity))}.bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity))}.bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}.bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity))}.bg-slate-950\/30{background-color:rgba(2,6,23,.3)}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity))}.bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity))}.bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity))}.bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity))}.bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity))}.bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity))}.bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity))}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity))}.bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity))}.bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity))}.bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity))}.bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity))}.bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-tremor-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-tremor-background-emphasis{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-tremor-background-muted{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-tremor-border{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.bg-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(134 136 239/var(--tw-bg-opacity))}.bg-tremor-brand-muted\/50{background-color:rgba(134,136,239,.5)}.bg-tremor-brand-subtle{--tw-bg-opacity:1;background-color:rgb(142 145 235/var(--tw-bg-opacity))}.bg-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}.bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity))}.bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity))}.bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity))}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity))}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity))}.bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity))}.bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity))}.bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity))}.bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity))}.bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity))}.bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity))}.bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity))}.bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity))}.bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity))}.bg-opacity-10{--tw-bg-opacity:0.1}.bg-opacity-20{--tw-bg-opacity:0.2}.bg-opacity-30{--tw-bg-opacity:0.3}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-tremor-background{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-tremor-background{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.fill-amber-100{fill:#fef3c7}.fill-amber-200{fill:#fde68a}.fill-amber-300{fill:#fcd34d}.fill-amber-400{fill:#fbbf24}.fill-amber-50{fill:#fffbeb}.fill-amber-500{fill:#f59e0b}.fill-amber-600{fill:#d97706}.fill-amber-700{fill:#b45309}.fill-amber-800{fill:#92400e}.fill-amber-900{fill:#78350f}.fill-amber-950{fill:#451a03}.fill-blue-100{fill:#dbeafe}.fill-blue-200{fill:#bfdbfe}.fill-blue-300{fill:#93c5fd}.fill-blue-400{fill:#60a5fa}.fill-blue-50{fill:#eff6ff}.fill-blue-500{fill:#3b82f6}.fill-blue-600{fill:#2563eb}.fill-blue-700{fill:#1d4ed8}.fill-blue-800{fill:#1e40af}.fill-blue-900{fill:#1e3a8a}.fill-blue-950{fill:#172554}.fill-cyan-100{fill:#cffafe}.fill-cyan-200{fill:#a5f3fc}.fill-cyan-300{fill:#67e8f9}.fill-cyan-400{fill:#22d3ee}.fill-cyan-50{fill:#ecfeff}.fill-cyan-500{fill:#06b6d4}.fill-cyan-600{fill:#0891b2}.fill-cyan-700{fill:#0e7490}.fill-cyan-800{fill:#155e75}.fill-cyan-900{fill:#164e63}.fill-cyan-950{fill:#083344}.fill-emerald-100{fill:#d1fae5}.fill-emerald-200{fill:#a7f3d0}.fill-emerald-300{fill:#6ee7b7}.fill-emerald-400{fill:#34d399}.fill-emerald-50{fill:#ecfdf5}.fill-emerald-500{fill:#10b981}.fill-emerald-600{fill:#059669}.fill-emerald-700{fill:#047857}.fill-emerald-800{fill:#065f46}.fill-emerald-900{fill:#064e3b}.fill-emerald-950{fill:#022c22}.fill-fuchsia-100{fill:#fae8ff}.fill-fuchsia-200{fill:#f5d0fe}.fill-fuchsia-300{fill:#f0abfc}.fill-fuchsia-400{fill:#e879f9}.fill-fuchsia-50{fill:#fdf4ff}.fill-fuchsia-500{fill:#d946ef}.fill-fuchsia-600{fill:#c026d3}.fill-fuchsia-700{fill:#a21caf}.fill-fuchsia-800{fill:#86198f}.fill-fuchsia-900{fill:#701a75}.fill-fuchsia-950{fill:#4a044e}.fill-gray-100{fill:#f3f4f6}.fill-gray-200{fill:#e5e7eb}.fill-gray-300{fill:#d1d5db}.fill-gray-400{fill:#9ca3af}.fill-gray-50{fill:#f9fafb}.fill-gray-500{fill:#6b7280}.fill-gray-600{fill:#4b5563}.fill-gray-700{fill:#374151}.fill-gray-800{fill:#1f2937}.fill-gray-900{fill:#111827}.fill-gray-950{fill:#030712}.fill-green-100{fill:#dcfce7}.fill-green-200{fill:#bbf7d0}.fill-green-300{fill:#86efac}.fill-green-400{fill:#4ade80}.fill-green-50{fill:#f0fdf4}.fill-green-500{fill:#22c55e}.fill-green-600{fill:#16a34a}.fill-green-700{fill:#15803d}.fill-green-800{fill:#166534}.fill-green-900{fill:#14532d}.fill-green-950{fill:#052e16}.fill-indigo-100{fill:#e0e7ff}.fill-indigo-200{fill:#c7d2fe}.fill-indigo-300{fill:#a5b4fc}.fill-indigo-400{fill:#818cf8}.fill-indigo-50{fill:#eef2ff}.fill-indigo-500{fill:#6366f1}.fill-indigo-600{fill:#4f46e5}.fill-indigo-700{fill:#4338ca}.fill-indigo-800{fill:#3730a3}.fill-indigo-900{fill:#312e81}.fill-indigo-950{fill:#1e1b4b}.fill-lime-100{fill:#ecfccb}.fill-lime-200{fill:#d9f99d}.fill-lime-300{fill:#bef264}.fill-lime-400{fill:#a3e635}.fill-lime-50{fill:#f7fee7}.fill-lime-500{fill:#84cc16}.fill-lime-600{fill:#65a30d}.fill-lime-700{fill:#4d7c0f}.fill-lime-800{fill:#3f6212}.fill-lime-900{fill:#365314}.fill-lime-950{fill:#1a2e05}.fill-neutral-100{fill:#f5f5f5}.fill-neutral-200{fill:#e5e5e5}.fill-neutral-300{fill:#d4d4d4}.fill-neutral-400{fill:#a3a3a3}.fill-neutral-50{fill:#fafafa}.fill-neutral-500{fill:#737373}.fill-neutral-600{fill:#525252}.fill-neutral-700{fill:#404040}.fill-neutral-800{fill:#262626}.fill-neutral-900{fill:#171717}.fill-neutral-950{fill:#0a0a0a}.fill-orange-100{fill:#ffedd5}.fill-orange-200{fill:#fed7aa}.fill-orange-300{fill:#fdba74}.fill-orange-400{fill:#fb923c}.fill-orange-50{fill:#fff7ed}.fill-orange-500{fill:#f97316}.fill-orange-600{fill:#ea580c}.fill-orange-700{fill:#c2410c}.fill-orange-800{fill:#9a3412}.fill-orange-900{fill:#7c2d12}.fill-orange-950{fill:#431407}.fill-pink-100{fill:#fce7f3}.fill-pink-200{fill:#fbcfe8}.fill-pink-300{fill:#f9a8d4}.fill-pink-400{fill:#f472b6}.fill-pink-50{fill:#fdf2f8}.fill-pink-500{fill:#ec4899}.fill-pink-600{fill:#db2777}.fill-pink-700{fill:#be185d}.fill-pink-800{fill:#9d174d}.fill-pink-900{fill:#831843}.fill-pink-950{fill:#500724}.fill-purple-100{fill:#f3e8ff}.fill-purple-200{fill:#e9d5ff}.fill-purple-300{fill:#d8b4fe}.fill-purple-400{fill:#c084fc}.fill-purple-50{fill:#faf5ff}.fill-purple-500{fill:#a855f7}.fill-purple-600{fill:#9333ea}.fill-purple-700{fill:#7e22ce}.fill-purple-800{fill:#6b21a8}.fill-purple-900{fill:#581c87}.fill-purple-950{fill:#3b0764}.fill-red-100{fill:#fee2e2}.fill-red-200{fill:#fecaca}.fill-red-300{fill:#fca5a5}.fill-red-400{fill:#f87171}.fill-red-50{fill:#fef2f2}.fill-red-500{fill:#ef4444}.fill-red-600{fill:#dc2626}.fill-red-700{fill:#b91c1c}.fill-red-800{fill:#991b1b}.fill-red-900{fill:#7f1d1d}.fill-red-950{fill:#450a0a}.fill-rose-100{fill:#ffe4e6}.fill-rose-200{fill:#fecdd3}.fill-rose-300{fill:#fda4af}.fill-rose-400{fill:#fb7185}.fill-rose-50{fill:#fff1f2}.fill-rose-500{fill:#f43f5e}.fill-rose-600{fill:#e11d48}.fill-rose-700{fill:#be123c}.fill-rose-800{fill:#9f1239}.fill-rose-900{fill:#881337}.fill-rose-950{fill:#4c0519}.fill-sky-100{fill:#e0f2fe}.fill-sky-200{fill:#bae6fd}.fill-sky-300{fill:#7dd3fc}.fill-sky-400{fill:#38bdf8}.fill-sky-50{fill:#f0f9ff}.fill-sky-500{fill:#0ea5e9}.fill-sky-600{fill:#0284c7}.fill-sky-700{fill:#0369a1}.fill-sky-800{fill:#075985}.fill-sky-900{fill:#0c4a6e}.fill-sky-950{fill:#082f49}.fill-slate-100{fill:#f1f5f9}.fill-slate-200{fill:#e2e8f0}.fill-slate-300{fill:#cbd5e1}.fill-slate-400{fill:#94a3b8}.fill-slate-50{fill:#f8fafc}.fill-slate-500{fill:#64748b}.fill-slate-600{fill:#475569}.fill-slate-700{fill:#334155}.fill-slate-800{fill:#1e293b}.fill-slate-900{fill:#0f172a}.fill-slate-950{fill:#020617}.fill-stone-100{fill:#f5f5f4}.fill-stone-200{fill:#e7e5e4}.fill-stone-300{fill:#d6d3d1}.fill-stone-400{fill:#a8a29e}.fill-stone-50{fill:#fafaf9}.fill-stone-500{fill:#78716c}.fill-stone-600{fill:#57534e}.fill-stone-700{fill:#44403c}.fill-stone-800{fill:#292524}.fill-stone-900{fill:#1c1917}.fill-stone-950{fill:#0c0a09}.fill-teal-100{fill:#ccfbf1}.fill-teal-200{fill:#99f6e4}.fill-teal-300{fill:#5eead4}.fill-teal-400{fill:#2dd4bf}.fill-teal-50{fill:#f0fdfa}.fill-teal-500{fill:#14b8a6}.fill-teal-600{fill:#0d9488}.fill-teal-700{fill:#0f766e}.fill-teal-800{fill:#115e59}.fill-teal-900{fill:#134e4a}.fill-teal-950{fill:#042f2e}.fill-tremor-content{fill:#6b7280}.fill-tremor-content-emphasis{fill:#374151}.fill-violet-100{fill:#ede9fe}.fill-violet-200{fill:#ddd6fe}.fill-violet-300{fill:#c4b5fd}.fill-violet-400{fill:#a78bfa}.fill-violet-50{fill:#f5f3ff}.fill-violet-500{fill:#8b5cf6}.fill-violet-600{fill:#7c3aed}.fill-violet-700{fill:#6d28d9}.fill-violet-800{fill:#5b21b6}.fill-violet-900{fill:#4c1d95}.fill-violet-950{fill:#2e1065}.fill-yellow-100{fill:#fef9c3}.fill-yellow-200{fill:#fef08a}.fill-yellow-300{fill:#fde047}.fill-yellow-400{fill:#facc15}.fill-yellow-50{fill:#fefce8}.fill-yellow-500{fill:#eab308}.fill-yellow-600{fill:#ca8a04}.fill-yellow-700{fill:#a16207}.fill-yellow-800{fill:#854d0e}.fill-yellow-900{fill:#713f12}.fill-yellow-950{fill:#422006}.fill-zinc-100{fill:#f4f4f5}.fill-zinc-200{fill:#e4e4e7}.fill-zinc-300{fill:#d4d4d8}.fill-zinc-400{fill:#a1a1aa}.fill-zinc-50{fill:#fafafa}.fill-zinc-500{fill:#71717a}.fill-zinc-600{fill:#52525b}.fill-zinc-700{fill:#3f3f46}.fill-zinc-800{fill:#27272a}.fill-zinc-900{fill:#18181b}.fill-zinc-950{fill:#09090b}.stroke-amber-100{stroke:#fef3c7}.stroke-amber-200{stroke:#fde68a}.stroke-amber-300{stroke:#fcd34d}.stroke-amber-400{stroke:#fbbf24}.stroke-amber-50{stroke:#fffbeb}.stroke-amber-500{stroke:#f59e0b}.stroke-amber-600{stroke:#d97706}.stroke-amber-700{stroke:#b45309}.stroke-amber-800{stroke:#92400e}.stroke-amber-900{stroke:#78350f}.stroke-amber-950{stroke:#451a03}.stroke-blue-100{stroke:#dbeafe}.stroke-blue-200{stroke:#bfdbfe}.stroke-blue-300{stroke:#93c5fd}.stroke-blue-400{stroke:#60a5fa}.stroke-blue-50{stroke:#eff6ff}.stroke-blue-500{stroke:#3b82f6}.stroke-blue-600{stroke:#2563eb}.stroke-blue-700{stroke:#1d4ed8}.stroke-blue-800{stroke:#1e40af}.stroke-blue-900{stroke:#1e3a8a}.stroke-blue-950{stroke:#172554}.stroke-cyan-100{stroke:#cffafe}.stroke-cyan-200{stroke:#a5f3fc}.stroke-cyan-300{stroke:#67e8f9}.stroke-cyan-400{stroke:#22d3ee}.stroke-cyan-50{stroke:#ecfeff}.stroke-cyan-500{stroke:#06b6d4}.stroke-cyan-600{stroke:#0891b2}.stroke-cyan-700{stroke:#0e7490}.stroke-cyan-800{stroke:#155e75}.stroke-cyan-900{stroke:#164e63}.stroke-cyan-950{stroke:#083344}.stroke-dark-tremor-background{stroke:#111827}.stroke-dark-tremor-border{stroke:#374151}.stroke-emerald-100{stroke:#d1fae5}.stroke-emerald-200{stroke:#a7f3d0}.stroke-emerald-300{stroke:#6ee7b7}.stroke-emerald-400{stroke:#34d399}.stroke-emerald-50{stroke:#ecfdf5}.stroke-emerald-500{stroke:#10b981}.stroke-emerald-600{stroke:#059669}.stroke-emerald-700{stroke:#047857}.stroke-emerald-800{stroke:#065f46}.stroke-emerald-900{stroke:#064e3b}.stroke-emerald-950{stroke:#022c22}.stroke-fuchsia-100{stroke:#fae8ff}.stroke-fuchsia-200{stroke:#f5d0fe}.stroke-fuchsia-300{stroke:#f0abfc}.stroke-fuchsia-400{stroke:#e879f9}.stroke-fuchsia-50{stroke:#fdf4ff}.stroke-fuchsia-500{stroke:#d946ef}.stroke-fuchsia-600{stroke:#c026d3}.stroke-fuchsia-700{stroke:#a21caf}.stroke-fuchsia-800{stroke:#86198f}.stroke-fuchsia-900{stroke:#701a75}.stroke-fuchsia-950{stroke:#4a044e}.stroke-gray-100{stroke:#f3f4f6}.stroke-gray-200{stroke:#e5e7eb}.stroke-gray-300{stroke:#d1d5db}.stroke-gray-400{stroke:#9ca3af}.stroke-gray-50{stroke:#f9fafb}.stroke-gray-500{stroke:#6b7280}.stroke-gray-600{stroke:#4b5563}.stroke-gray-700{stroke:#374151}.stroke-gray-800{stroke:#1f2937}.stroke-gray-900{stroke:#111827}.stroke-gray-950{stroke:#030712}.stroke-green-100{stroke:#dcfce7}.stroke-green-200{stroke:#bbf7d0}.stroke-green-300{stroke:#86efac}.stroke-green-400{stroke:#4ade80}.stroke-green-50{stroke:#f0fdf4}.stroke-green-500{stroke:#22c55e}.stroke-green-600{stroke:#16a34a}.stroke-green-700{stroke:#15803d}.stroke-green-800{stroke:#166534}.stroke-green-900{stroke:#14532d}.stroke-green-950{stroke:#052e16}.stroke-indigo-100{stroke:#e0e7ff}.stroke-indigo-200{stroke:#c7d2fe}.stroke-indigo-300{stroke:#a5b4fc}.stroke-indigo-400{stroke:#818cf8}.stroke-indigo-50{stroke:#eef2ff}.stroke-indigo-500{stroke:#6366f1}.stroke-indigo-600{stroke:#4f46e5}.stroke-indigo-700{stroke:#4338ca}.stroke-indigo-800{stroke:#3730a3}.stroke-indigo-900{stroke:#312e81}.stroke-indigo-950{stroke:#1e1b4b}.stroke-lime-100{stroke:#ecfccb}.stroke-lime-200{stroke:#d9f99d}.stroke-lime-300{stroke:#bef264}.stroke-lime-400{stroke:#a3e635}.stroke-lime-50{stroke:#f7fee7}.stroke-lime-500{stroke:#84cc16}.stroke-lime-600{stroke:#65a30d}.stroke-lime-700{stroke:#4d7c0f}.stroke-lime-800{stroke:#3f6212}.stroke-lime-900{stroke:#365314}.stroke-lime-950{stroke:#1a2e05}.stroke-neutral-100{stroke:#f5f5f5}.stroke-neutral-200{stroke:#e5e5e5}.stroke-neutral-300{stroke:#d4d4d4}.stroke-neutral-400{stroke:#a3a3a3}.stroke-neutral-50{stroke:#fafafa}.stroke-neutral-500{stroke:#737373}.stroke-neutral-600{stroke:#525252}.stroke-neutral-700{stroke:#404040}.stroke-neutral-800{stroke:#262626}.stroke-neutral-900{stroke:#171717}.stroke-neutral-950{stroke:#0a0a0a}.stroke-orange-100{stroke:#ffedd5}.stroke-orange-200{stroke:#fed7aa}.stroke-orange-300{stroke:#fdba74}.stroke-orange-400{stroke:#fb923c}.stroke-orange-50{stroke:#fff7ed}.stroke-orange-500{stroke:#f97316}.stroke-orange-600{stroke:#ea580c}.stroke-orange-700{stroke:#c2410c}.stroke-orange-800{stroke:#9a3412}.stroke-orange-900{stroke:#7c2d12}.stroke-orange-950{stroke:#431407}.stroke-pink-100{stroke:#fce7f3}.stroke-pink-200{stroke:#fbcfe8}.stroke-pink-300{stroke:#f9a8d4}.stroke-pink-400{stroke:#f472b6}.stroke-pink-50{stroke:#fdf2f8}.stroke-pink-500{stroke:#ec4899}.stroke-pink-600{stroke:#db2777}.stroke-pink-700{stroke:#be185d}.stroke-pink-800{stroke:#9d174d}.stroke-pink-900{stroke:#831843}.stroke-pink-950{stroke:#500724}.stroke-purple-100{stroke:#f3e8ff}.stroke-purple-200{stroke:#e9d5ff}.stroke-purple-300{stroke:#d8b4fe}.stroke-purple-400{stroke:#c084fc}.stroke-purple-50{stroke:#faf5ff}.stroke-purple-500{stroke:#a855f7}.stroke-purple-600{stroke:#9333ea}.stroke-purple-700{stroke:#7e22ce}.stroke-purple-800{stroke:#6b21a8}.stroke-purple-900{stroke:#581c87}.stroke-purple-950{stroke:#3b0764}.stroke-red-100{stroke:#fee2e2}.stroke-red-200{stroke:#fecaca}.stroke-red-300{stroke:#fca5a5}.stroke-red-400{stroke:#f87171}.stroke-red-50{stroke:#fef2f2}.stroke-red-500{stroke:#ef4444}.stroke-red-600{stroke:#dc2626}.stroke-red-700{stroke:#b91c1c}.stroke-red-800{stroke:#991b1b}.stroke-red-900{stroke:#7f1d1d}.stroke-red-950{stroke:#450a0a}.stroke-rose-100{stroke:#ffe4e6}.stroke-rose-200{stroke:#fecdd3}.stroke-rose-300{stroke:#fda4af}.stroke-rose-400{stroke:#fb7185}.stroke-rose-50{stroke:#fff1f2}.stroke-rose-500{stroke:#f43f5e}.stroke-rose-600{stroke:#e11d48}.stroke-rose-700{stroke:#be123c}.stroke-rose-800{stroke:#9f1239}.stroke-rose-900{stroke:#881337}.stroke-rose-950{stroke:#4c0519}.stroke-sky-100{stroke:#e0f2fe}.stroke-sky-200{stroke:#bae6fd}.stroke-sky-300{stroke:#7dd3fc}.stroke-sky-400{stroke:#38bdf8}.stroke-sky-50{stroke:#f0f9ff}.stroke-sky-500{stroke:#0ea5e9}.stroke-sky-600{stroke:#0284c7}.stroke-sky-700{stroke:#0369a1}.stroke-sky-800{stroke:#075985}.stroke-sky-900{stroke:#0c4a6e}.stroke-sky-950{stroke:#082f49}.stroke-slate-100{stroke:#f1f5f9}.stroke-slate-200{stroke:#e2e8f0}.stroke-slate-300{stroke:#cbd5e1}.stroke-slate-400{stroke:#94a3b8}.stroke-slate-50{stroke:#f8fafc}.stroke-slate-500{stroke:#64748b}.stroke-slate-600{stroke:#475569}.stroke-slate-700{stroke:#334155}.stroke-slate-800{stroke:#1e293b}.stroke-slate-900{stroke:#0f172a}.stroke-slate-950{stroke:#020617}.stroke-stone-100{stroke:#f5f5f4}.stroke-stone-200{stroke:#e7e5e4}.stroke-stone-300{stroke:#d6d3d1}.stroke-stone-400{stroke:#a8a29e}.stroke-stone-50{stroke:#fafaf9}.stroke-stone-500{stroke:#78716c}.stroke-stone-600{stroke:#57534e}.stroke-stone-700{stroke:#44403c}.stroke-stone-800{stroke:#292524}.stroke-stone-900{stroke:#1c1917}.stroke-stone-950{stroke:#0c0a09}.stroke-teal-100{stroke:#ccfbf1}.stroke-teal-200{stroke:#99f6e4}.stroke-teal-300{stroke:#5eead4}.stroke-teal-400{stroke:#2dd4bf}.stroke-teal-50{stroke:#f0fdfa}.stroke-teal-500{stroke:#14b8a6}.stroke-teal-600{stroke:#0d9488}.stroke-teal-700{stroke:#0f766e}.stroke-teal-800{stroke:#115e59}.stroke-teal-900{stroke:#134e4a}.stroke-teal-950{stroke:#042f2e}.stroke-tremor-background{stroke:#fff}.stroke-tremor-border{stroke:#e5e7eb}.stroke-tremor-brand{stroke:#6366f1}.stroke-tremor-brand-muted\/50{stroke:rgba(134,136,239,.5)}.stroke-violet-100{stroke:#ede9fe}.stroke-violet-200{stroke:#ddd6fe}.stroke-violet-300{stroke:#c4b5fd}.stroke-violet-400{stroke:#a78bfa}.stroke-violet-50{stroke:#f5f3ff}.stroke-violet-500{stroke:#8b5cf6}.stroke-violet-600{stroke:#7c3aed}.stroke-violet-700{stroke:#6d28d9}.stroke-violet-800{stroke:#5b21b6}.stroke-violet-900{stroke:#4c1d95}.stroke-violet-950{stroke:#2e1065}.stroke-yellow-100{stroke:#fef9c3}.stroke-yellow-200{stroke:#fef08a}.stroke-yellow-300{stroke:#fde047}.stroke-yellow-400{stroke:#facc15}.stroke-yellow-50{stroke:#fefce8}.stroke-yellow-500{stroke:#eab308}.stroke-yellow-600{stroke:#ca8a04}.stroke-yellow-700{stroke:#a16207}.stroke-yellow-800{stroke:#854d0e}.stroke-yellow-900{stroke:#713f12}.stroke-yellow-950{stroke:#422006}.stroke-zinc-100{stroke:#f4f4f5}.stroke-zinc-200{stroke:#e4e4e7}.stroke-zinc-300{stroke:#d4d4d8}.stroke-zinc-400{stroke:#a1a1aa}.stroke-zinc-50{stroke:#fafafa}.stroke-zinc-500{stroke:#71717a}.stroke-zinc-600{stroke:#52525b}.stroke-zinc-700{stroke:#3f3f46}.stroke-zinc-800{stroke:#27272a}.stroke-zinc-900{stroke:#18181b}.stroke-zinc-950{stroke:#09090b}.stroke-1{stroke-width:1}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\[10px\]{padding-top:10px;padding-bottom:10px}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-12{padding-right:3rem}.pr-14{padding-right:3.5rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-tremor-default{font-size:.775rem;line-height:1.15rem}.text-tremor-label{font-size:.75rem;line-height:.3rem}.text-tremor-metric{font-size:1.675rem;line-height:2.15rem}.text-tremor-title{font-size:1.025rem;line-height:1.65rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity))}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity))}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity))}.text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity))}.text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity))}.text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity))}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity))}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity))}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity))}.text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity))}.text-dark-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-dark-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.text-dark-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}.text-dark-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-dark-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-dark-tremor-content-subtle{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity))}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity))}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity))}.text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity))}.text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity))}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity))}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity))}.text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity))}.text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity))}.text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity))}.text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity))}.text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity))}.text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity))}.text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity))}.text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity))}.text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity))}.text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity))}.text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity))}.text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}.text-inherit{color:inherit}.text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity))}.text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity))}.text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity))}.text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity))}.text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity))}.text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity))}.text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity))}.text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity))}.text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity))}.text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity))}.text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity))}.text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity))}.text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity))}.text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity))}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity))}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity))}.text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity))}.text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity))}.text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity))}.text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity))}.text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity))}.text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity))}.text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity))}.text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity))}.text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity))}.text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity))}.text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity))}.text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity))}.text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity))}.text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity))}.text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}.text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity))}.text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity))}.text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity))}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity))}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity))}.text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity))}.text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity))}.text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity))}.text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity))}.text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity))}.text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity))}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity))}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity))}.text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity))}.text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity))}.text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity))}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity))}.text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity))}.text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity))}.text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity))}.text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity))}.text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity))}.text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity))}.text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity))}.text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity))}.text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity))}.text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity))}.text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity))}.text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity))}.text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity))}.text-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.text-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-tremor-content-strong{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-tremor-content-subtle{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity))}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity))}.text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity))}.text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity))}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity))}.text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity))}.text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity))}.text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity))}.text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity))}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}.text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.accent-dark-tremor-brand,.accent-tremor-brand{accent-color:#6366f1}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\[-4px_0_8px_-6px_rgba\(0\2c 0\2c 0\2c 0\.1\)\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_8px_-6px_rgba\(0\2c 0\2c 0\2c 0\.1\)\]{--tw-shadow:-4px 0 8px -6px rgba(0,0,0,.1);--tw-shadow-colored:-4px 0 8px -6px var(--tw-shadow-color)}.shadow-dark-tremor-card{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow-dark-tremor-card,.shadow-dark-tremor-input{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-input{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-tremor-card{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow-tremor-card,.shadow-tremor-dropdown{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-dropdown{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-tremor-input{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-tremor-input,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-tremor-brand{outline-color:#6366f1}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-amber-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 243 199/var(--tw-ring-opacity))}.ring-amber-200{--tw-ring-opacity:1;--tw-ring-color:rgb(253 230 138/var(--tw-ring-opacity))}.ring-amber-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 211 77/var(--tw-ring-opacity))}.ring-amber-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 191 36/var(--tw-ring-opacity))}.ring-amber-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 251 235/var(--tw-ring-opacity))}.ring-amber-500{--tw-ring-opacity:1;--tw-ring-color:rgb(245 158 11/var(--tw-ring-opacity))}.ring-amber-600{--tw-ring-opacity:1;--tw-ring-color:rgb(217 119 6/var(--tw-ring-opacity))}.ring-amber-700{--tw-ring-opacity:1;--tw-ring-color:rgb(180 83 9/var(--tw-ring-opacity))}.ring-amber-800{--tw-ring-opacity:1;--tw-ring-color:rgb(146 64 14/var(--tw-ring-opacity))}.ring-amber-900{--tw-ring-opacity:1;--tw-ring-color:rgb(120 53 15/var(--tw-ring-opacity))}.ring-amber-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 26 3/var(--tw-ring-opacity))}.ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity))}.ring-blue-200{--tw-ring-opacity:1;--tw-ring-color:rgb(191 219 254/var(--tw-ring-opacity))}.ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity))}.ring-blue-400{--tw-ring-opacity:1;--tw-ring-color:rgb(96 165 250/var(--tw-ring-opacity))}.ring-blue-50{--tw-ring-opacity:1;--tw-ring-color:rgb(239 246 255/var(--tw-ring-opacity))}.ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.ring-blue-600{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity))}.ring-blue-700{--tw-ring-opacity:1;--tw-ring-color:rgb(29 78 216/var(--tw-ring-opacity))}.ring-blue-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity))}.ring-blue-900{--tw-ring-opacity:1;--tw-ring-color:rgb(30 58 138/var(--tw-ring-opacity))}.ring-blue-950{--tw-ring-opacity:1;--tw-ring-color:rgb(23 37 84/var(--tw-ring-opacity))}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity))}.ring-cyan-300{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity))}.ring-cyan-400{--tw-ring-opacity:1;--tw-ring-color:rgb(34 211 238/var(--tw-ring-opacity))}.ring-cyan-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 254 255/var(--tw-ring-opacity))}.ring-cyan-500{--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity))}.ring-cyan-600{--tw-ring-opacity:1;--tw-ring-color:rgb(8 145 178/var(--tw-ring-opacity))}.ring-cyan-700{--tw-ring-opacity:1;--tw-ring-color:rgb(14 116 144/var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity:1;--tw-ring-color:rgb(21 94 117/var(--tw-ring-opacity))}.ring-cyan-900{--tw-ring-opacity:1;--tw-ring-color:rgb(22 78 99/var(--tw-ring-opacity))}.ring-cyan-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 51 68/var(--tw-ring-opacity))}.ring-dark-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity))}.ring-emerald-100{--tw-ring-opacity:1;--tw-ring-color:rgb(209 250 229/var(--tw-ring-opacity))}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity))}.ring-emerald-300{--tw-ring-opacity:1;--tw-ring-color:rgb(110 231 183/var(--tw-ring-opacity))}.ring-emerald-400{--tw-ring-opacity:1;--tw-ring-color:rgb(52 211 153/var(--tw-ring-opacity))}.ring-emerald-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 253 245/var(--tw-ring-opacity))}.ring-emerald-500{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity))}.ring-emerald-600{--tw-ring-opacity:1;--tw-ring-color:rgb(5 150 105/var(--tw-ring-opacity))}.ring-emerald-700{--tw-ring-opacity:1;--tw-ring-color:rgb(4 120 87/var(--tw-ring-opacity))}.ring-emerald-800{--tw-ring-opacity:1;--tw-ring-color:rgb(6 95 70/var(--tw-ring-opacity))}.ring-emerald-900{--tw-ring-opacity:1;--tw-ring-color:rgb(6 78 59/var(--tw-ring-opacity))}.ring-emerald-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 44 34/var(--tw-ring-opacity))}.ring-fuchsia-100{--tw-ring-opacity:1;--tw-ring-color:rgb(250 232 255/var(--tw-ring-opacity))}.ring-fuchsia-200{--tw-ring-opacity:1;--tw-ring-color:rgb(245 208 254/var(--tw-ring-opacity))}.ring-fuchsia-300{--tw-ring-opacity:1;--tw-ring-color:rgb(240 171 252/var(--tw-ring-opacity))}.ring-fuchsia-400{--tw-ring-opacity:1;--tw-ring-color:rgb(232 121 249/var(--tw-ring-opacity))}.ring-fuchsia-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 244 255/var(--tw-ring-opacity))}.ring-fuchsia-500{--tw-ring-opacity:1;--tw-ring-color:rgb(217 70 239/var(--tw-ring-opacity))}.ring-fuchsia-600{--tw-ring-opacity:1;--tw-ring-color:rgb(192 38 211/var(--tw-ring-opacity))}.ring-fuchsia-700{--tw-ring-opacity:1;--tw-ring-color:rgb(162 28 175/var(--tw-ring-opacity))}.ring-fuchsia-800{--tw-ring-opacity:1;--tw-ring-color:rgb(134 25 143/var(--tw-ring-opacity))}.ring-fuchsia-900{--tw-ring-opacity:1;--tw-ring-color:rgb(112 26 117/var(--tw-ring-opacity))}.ring-fuchsia-950{--tw-ring-opacity:1;--tw-ring-color:rgb(74 4 78/var(--tw-ring-opacity))}.ring-gray-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 244 246/var(--tw-ring-opacity))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-gray-400{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity))}.ring-gray-50{--tw-ring-opacity:1;--tw-ring-color:rgb(249 250 251/var(--tw-ring-opacity))}.ring-gray-500{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity))}.ring-gray-700{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity))}.ring-gray-900{--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity))}.ring-gray-950{--tw-ring-opacity:1;--tw-ring-color:rgb(3 7 18/var(--tw-ring-opacity))}.ring-green-100{--tw-ring-opacity:1;--tw-ring-color:rgb(220 252 231/var(--tw-ring-opacity))}.ring-green-200{--tw-ring-opacity:1;--tw-ring-color:rgb(187 247 208/var(--tw-ring-opacity))}.ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgb(134 239 172/var(--tw-ring-opacity))}.ring-green-400{--tw-ring-opacity:1;--tw-ring-color:rgb(74 222 128/var(--tw-ring-opacity))}.ring-green-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 244/var(--tw-ring-opacity))}.ring-green-500{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.ring-green-600{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.ring-green-700{--tw-ring-opacity:1;--tw-ring-color:rgb(21 128 61/var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity:1;--tw-ring-color:rgb(22 101 52/var(--tw-ring-opacity))}.ring-green-900{--tw-ring-opacity:1;--tw-ring-color:rgb(20 83 45/var(--tw-ring-opacity))}.ring-green-950{--tw-ring-opacity:1;--tw-ring-color:rgb(5 46 22/var(--tw-ring-opacity))}.ring-indigo-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 231 255/var(--tw-ring-opacity))}.ring-indigo-200{--tw-ring-opacity:1;--tw-ring-color:rgb(199 210 254/var(--tw-ring-opacity))}.ring-indigo-300{--tw-ring-opacity:1;--tw-ring-color:rgb(165 180 252/var(--tw-ring-opacity))}.ring-indigo-400{--tw-ring-opacity:1;--tw-ring-color:rgb(129 140 248/var(--tw-ring-opacity))}.ring-indigo-50{--tw-ring-opacity:1;--tw-ring-color:rgb(238 242 255/var(--tw-ring-opacity))}.ring-indigo-500{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.ring-indigo-600{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity))}.ring-indigo-700{--tw-ring-opacity:1;--tw-ring-color:rgb(67 56 202/var(--tw-ring-opacity))}.ring-indigo-800{--tw-ring-opacity:1;--tw-ring-color:rgb(55 48 163/var(--tw-ring-opacity))}.ring-indigo-900{--tw-ring-opacity:1;--tw-ring-color:rgb(49 46 129/var(--tw-ring-opacity))}.ring-indigo-950{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity))}.ring-lime-100{--tw-ring-opacity:1;--tw-ring-color:rgb(236 252 203/var(--tw-ring-opacity))}.ring-lime-200{--tw-ring-opacity:1;--tw-ring-color:rgb(217 249 157/var(--tw-ring-opacity))}.ring-lime-300{--tw-ring-opacity:1;--tw-ring-color:rgb(190 242 100/var(--tw-ring-opacity))}.ring-lime-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 230 53/var(--tw-ring-opacity))}.ring-lime-50{--tw-ring-opacity:1;--tw-ring-color:rgb(247 254 231/var(--tw-ring-opacity))}.ring-lime-500{--tw-ring-opacity:1;--tw-ring-color:rgb(132 204 22/var(--tw-ring-opacity))}.ring-lime-600{--tw-ring-opacity:1;--tw-ring-color:rgb(101 163 13/var(--tw-ring-opacity))}.ring-lime-700{--tw-ring-opacity:1;--tw-ring-color:rgb(77 124 15/var(--tw-ring-opacity))}.ring-lime-800{--tw-ring-opacity:1;--tw-ring-color:rgb(63 98 18/var(--tw-ring-opacity))}.ring-lime-900{--tw-ring-opacity:1;--tw-ring-color:rgb(54 83 20/var(--tw-ring-opacity))}.ring-lime-950{--tw-ring-opacity:1;--tw-ring-color:rgb(26 46 5/var(--tw-ring-opacity))}.ring-neutral-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 245/var(--tw-ring-opacity))}.ring-neutral-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 229 229/var(--tw-ring-opacity))}.ring-neutral-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 212/var(--tw-ring-opacity))}.ring-neutral-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 163 163/var(--tw-ring-opacity))}.ring-neutral-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity))}.ring-neutral-500{--tw-ring-opacity:1;--tw-ring-color:rgb(115 115 115/var(--tw-ring-opacity))}.ring-neutral-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 82/var(--tw-ring-opacity))}.ring-neutral-700{--tw-ring-opacity:1;--tw-ring-color:rgb(64 64 64/var(--tw-ring-opacity))}.ring-neutral-800{--tw-ring-opacity:1;--tw-ring-color:rgb(38 38 38/var(--tw-ring-opacity))}.ring-neutral-900{--tw-ring-opacity:1;--tw-ring-color:rgb(23 23 23/var(--tw-ring-opacity))}.ring-neutral-950{--tw-ring-opacity:1;--tw-ring-color:rgb(10 10 10/var(--tw-ring-opacity))}.ring-orange-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 237 213/var(--tw-ring-opacity))}.ring-orange-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 215 170/var(--tw-ring-opacity))}.ring-orange-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 186 116/var(--tw-ring-opacity))}.ring-orange-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 146 60/var(--tw-ring-opacity))}.ring-orange-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 247 237/var(--tw-ring-opacity))}.ring-orange-500{--tw-ring-opacity:1;--tw-ring-color:rgb(249 115 22/var(--tw-ring-opacity))}.ring-orange-600{--tw-ring-opacity:1;--tw-ring-color:rgb(234 88 12/var(--tw-ring-opacity))}.ring-orange-700{--tw-ring-opacity:1;--tw-ring-color:rgb(194 65 12/var(--tw-ring-opacity))}.ring-orange-800{--tw-ring-opacity:1;--tw-ring-color:rgb(154 52 18/var(--tw-ring-opacity))}.ring-orange-900{--tw-ring-opacity:1;--tw-ring-color:rgb(124 45 18/var(--tw-ring-opacity))}.ring-orange-950{--tw-ring-opacity:1;--tw-ring-color:rgb(67 20 7/var(--tw-ring-opacity))}.ring-pink-100{--tw-ring-opacity:1;--tw-ring-color:rgb(252 231 243/var(--tw-ring-opacity))}.ring-pink-200{--tw-ring-opacity:1;--tw-ring-color:rgb(251 207 232/var(--tw-ring-opacity))}.ring-pink-300{--tw-ring-opacity:1;--tw-ring-color:rgb(249 168 212/var(--tw-ring-opacity))}.ring-pink-400{--tw-ring-opacity:1;--tw-ring-color:rgb(244 114 182/var(--tw-ring-opacity))}.ring-pink-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 242 248/var(--tw-ring-opacity))}.ring-pink-500{--tw-ring-opacity:1;--tw-ring-color:rgb(236 72 153/var(--tw-ring-opacity))}.ring-pink-600{--tw-ring-opacity:1;--tw-ring-color:rgb(219 39 119/var(--tw-ring-opacity))}.ring-pink-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 24 93/var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity:1;--tw-ring-color:rgb(157 23 77/var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity:1;--tw-ring-color:rgb(131 24 67/var(--tw-ring-opacity))}.ring-pink-950{--tw-ring-opacity:1;--tw-ring-color:rgb(80 7 36/var(--tw-ring-opacity))}.ring-purple-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 232 255/var(--tw-ring-opacity))}.ring-purple-200{--tw-ring-opacity:1;--tw-ring-color:rgb(233 213 255/var(--tw-ring-opacity))}.ring-purple-300{--tw-ring-opacity:1;--tw-ring-color:rgb(216 180 254/var(--tw-ring-opacity))}.ring-purple-400{--tw-ring-opacity:1;--tw-ring-color:rgb(192 132 252/var(--tw-ring-opacity))}.ring-purple-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 245 255/var(--tw-ring-opacity))}.ring-purple-500{--tw-ring-opacity:1;--tw-ring-color:rgb(168 85 247/var(--tw-ring-opacity))}.ring-purple-600{--tw-ring-opacity:1;--tw-ring-color:rgb(147 51 234/var(--tw-ring-opacity))}.ring-purple-700{--tw-ring-opacity:1;--tw-ring-color:rgb(126 34 206/var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity:1;--tw-ring-color:rgb(107 33 168/var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity:1;--tw-ring-color:rgb(88 28 135/var(--tw-ring-opacity))}.ring-purple-950{--tw-ring-opacity:1;--tw-ring-color:rgb(59 7 100/var(--tw-ring-opacity))}.ring-red-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 226 226/var(--tw-ring-opacity))}.ring-red-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity))}.ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 165 165/var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity:1;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity))}.ring-red-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 242 242/var(--tw-ring-opacity))}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.ring-red-600{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity))}.ring-red-700{--tw-ring-opacity:1;--tw-ring-color:rgb(185 28 28/var(--tw-ring-opacity))}.ring-red-800{--tw-ring-opacity:1;--tw-ring-color:rgb(153 27 27/var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity:1;--tw-ring-color:rgb(127 29 29/var(--tw-ring-opacity))}.ring-red-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 10 10/var(--tw-ring-opacity))}.ring-rose-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 228 230/var(--tw-ring-opacity))}.ring-rose-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 205 211/var(--tw-ring-opacity))}.ring-rose-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 164 175/var(--tw-ring-opacity))}.ring-rose-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 113 133/var(--tw-ring-opacity))}.ring-rose-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 241 242/var(--tw-ring-opacity))}.ring-rose-500{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity))}.ring-rose-600{--tw-ring-opacity:1;--tw-ring-color:rgb(225 29 72/var(--tw-ring-opacity))}.ring-rose-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 18 60/var(--tw-ring-opacity))}.ring-rose-800{--tw-ring-opacity:1;--tw-ring-color:rgb(159 18 57/var(--tw-ring-opacity))}.ring-rose-900{--tw-ring-opacity:1;--tw-ring-color:rgb(136 19 55/var(--tw-ring-opacity))}.ring-rose-950{--tw-ring-opacity:1;--tw-ring-color:rgb(76 5 25/var(--tw-ring-opacity))}.ring-sky-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 242 254/var(--tw-ring-opacity))}.ring-sky-200{--tw-ring-opacity:1;--tw-ring-color:rgb(186 230 253/var(--tw-ring-opacity))}.ring-sky-300{--tw-ring-opacity:1;--tw-ring-color:rgb(125 211 252/var(--tw-ring-opacity))}.ring-sky-400{--tw-ring-opacity:1;--tw-ring-color:rgb(56 189 248/var(--tw-ring-opacity))}.ring-sky-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 249 255/var(--tw-ring-opacity))}.ring-sky-500{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.ring-sky-600{--tw-ring-opacity:1;--tw-ring-color:rgb(2 132 199/var(--tw-ring-opacity))}.ring-sky-700{--tw-ring-opacity:1;--tw-ring-color:rgb(3 105 161/var(--tw-ring-opacity))}.ring-sky-800{--tw-ring-opacity:1;--tw-ring-color:rgb(7 89 133/var(--tw-ring-opacity))}.ring-sky-900{--tw-ring-opacity:1;--tw-ring-color:rgb(12 74 110/var(--tw-ring-opacity))}.ring-sky-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 47 73/var(--tw-ring-opacity))}.ring-slate-100{--tw-ring-opacity:1;--tw-ring-color:rgb(241 245 249/var(--tw-ring-opacity))}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity))}.ring-slate-300{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity))}.ring-slate-400{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity))}.ring-slate-50{--tw-ring-opacity:1;--tw-ring-color:rgb(248 250 252/var(--tw-ring-opacity))}.ring-slate-500{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity))}.ring-slate-600{--tw-ring-opacity:1;--tw-ring-color:rgb(71 85 105/var(--tw-ring-opacity))}.ring-slate-700{--tw-ring-opacity:1;--tw-ring-color:rgb(51 65 85/var(--tw-ring-opacity))}.ring-slate-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity))}.ring-slate-900{--tw-ring-opacity:1;--tw-ring-color:rgb(15 23 42/var(--tw-ring-opacity))}.ring-slate-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 6 23/var(--tw-ring-opacity))}.ring-stone-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 244/var(--tw-ring-opacity))}.ring-stone-200{--tw-ring-opacity:1;--tw-ring-color:rgb(231 229 228/var(--tw-ring-opacity))}.ring-stone-300{--tw-ring-opacity:1;--tw-ring-color:rgb(214 211 209/var(--tw-ring-opacity))}.ring-stone-400{--tw-ring-opacity:1;--tw-ring-color:rgb(168 162 158/var(--tw-ring-opacity))}.ring-stone-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 249/var(--tw-ring-opacity))}.ring-stone-500{--tw-ring-opacity:1;--tw-ring-color:rgb(120 113 108/var(--tw-ring-opacity))}.ring-stone-600{--tw-ring-opacity:1;--tw-ring-color:rgb(87 83 78/var(--tw-ring-opacity))}.ring-stone-700{--tw-ring-opacity:1;--tw-ring-color:rgb(68 64 60/var(--tw-ring-opacity))}.ring-stone-800{--tw-ring-opacity:1;--tw-ring-color:rgb(41 37 36/var(--tw-ring-opacity))}.ring-stone-900{--tw-ring-opacity:1;--tw-ring-color:rgb(28 25 23/var(--tw-ring-opacity))}.ring-stone-950{--tw-ring-opacity:1;--tw-ring-color:rgb(12 10 9/var(--tw-ring-opacity))}.ring-teal-100{--tw-ring-opacity:1;--tw-ring-color:rgb(204 251 241/var(--tw-ring-opacity))}.ring-teal-200{--tw-ring-opacity:1;--tw-ring-color:rgb(153 246 228/var(--tw-ring-opacity))}.ring-teal-300{--tw-ring-opacity:1;--tw-ring-color:rgb(94 234 212/var(--tw-ring-opacity))}.ring-teal-400{--tw-ring-opacity:1;--tw-ring-color:rgb(45 212 191/var(--tw-ring-opacity))}.ring-teal-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 250/var(--tw-ring-opacity))}.ring-teal-500{--tw-ring-opacity:1;--tw-ring-color:rgb(20 184 166/var(--tw-ring-opacity))}.ring-teal-600{--tw-ring-opacity:1;--tw-ring-color:rgb(13 148 136/var(--tw-ring-opacity))}.ring-teal-700{--tw-ring-opacity:1;--tw-ring-color:rgb(15 118 110/var(--tw-ring-opacity))}.ring-teal-800{--tw-ring-opacity:1;--tw-ring-color:rgb(17 94 89/var(--tw-ring-opacity))}.ring-teal-900{--tw-ring-opacity:1;--tw-ring-color:rgb(19 78 74/var(--tw-ring-opacity))}.ring-teal-950{--tw-ring-opacity:1;--tw-ring-color:rgb(4 47 46/var(--tw-ring-opacity))}.ring-tremor-brand-inverted{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}.ring-tremor-brand-muted{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity))}.ring-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.ring-violet-100{--tw-ring-opacity:1;--tw-ring-color:rgb(237 233 254/var(--tw-ring-opacity))}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity))}.ring-violet-300{--tw-ring-opacity:1;--tw-ring-color:rgb(196 181 253/var(--tw-ring-opacity))}.ring-violet-400{--tw-ring-opacity:1;--tw-ring-color:rgb(167 139 250/var(--tw-ring-opacity))}.ring-violet-50{--tw-ring-opacity:1;--tw-ring-color:rgb(245 243 255/var(--tw-ring-opacity))}.ring-violet-500{--tw-ring-opacity:1;--tw-ring-color:rgb(139 92 246/var(--tw-ring-opacity))}.ring-violet-600{--tw-ring-opacity:1;--tw-ring-color:rgb(124 58 237/var(--tw-ring-opacity))}.ring-violet-700{--tw-ring-opacity:1;--tw-ring-color:rgb(109 40 217/var(--tw-ring-opacity))}.ring-violet-800{--tw-ring-opacity:1;--tw-ring-color:rgb(91 33 182/var(--tw-ring-opacity))}.ring-violet-900{--tw-ring-opacity:1;--tw-ring-color:rgb(76 29 149/var(--tw-ring-opacity))}.ring-violet-950{--tw-ring-opacity:1;--tw-ring-color:rgb(46 16 101/var(--tw-ring-opacity))}.ring-yellow-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 249 195/var(--tw-ring-opacity))}.ring-yellow-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 240 138/var(--tw-ring-opacity))}.ring-yellow-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 224 71/var(--tw-ring-opacity))}.ring-yellow-400{--tw-ring-opacity:1;--tw-ring-color:rgb(250 204 21/var(--tw-ring-opacity))}.ring-yellow-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 252 232/var(--tw-ring-opacity))}.ring-yellow-500{--tw-ring-opacity:1;--tw-ring-color:rgb(234 179 8/var(--tw-ring-opacity))}.ring-yellow-600{--tw-ring-opacity:1;--tw-ring-color:rgb(202 138 4/var(--tw-ring-opacity))}.ring-yellow-700{--tw-ring-opacity:1;--tw-ring-color:rgb(161 98 7/var(--tw-ring-opacity))}.ring-yellow-800{--tw-ring-opacity:1;--tw-ring-color:rgb(133 77 14/var(--tw-ring-opacity))}.ring-yellow-900{--tw-ring-opacity:1;--tw-ring-color:rgb(113 63 18/var(--tw-ring-opacity))}.ring-yellow-950{--tw-ring-opacity:1;--tw-ring-color:rgb(66 32 6/var(--tw-ring-opacity))}.ring-zinc-100{--tw-ring-opacity:1;--tw-ring-color:rgb(244 244 245/var(--tw-ring-opacity))}.ring-zinc-200{--tw-ring-opacity:1;--tw-ring-color:rgb(228 228 231/var(--tw-ring-opacity))}.ring-zinc-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity))}.ring-zinc-400{--tw-ring-opacity:1;--tw-ring-color:rgb(161 161 170/var(--tw-ring-opacity))}.ring-zinc-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity))}.ring-zinc-500{--tw-ring-opacity:1;--tw-ring-color:rgb(113 113 122/var(--tw-ring-opacity))}.ring-zinc-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 91/var(--tw-ring-opacity))}.ring-zinc-700{--tw-ring-opacity:1;--tw-ring-color:rgb(63 63 70/var(--tw-ring-opacity))}.ring-zinc-800{--tw-ring-opacity:1;--tw-ring-color:rgb(39 39 42/var(--tw-ring-opacity))}.ring-zinc-900{--tw-ring-opacity:1;--tw-ring-color:rgb(24 24 27/var(--tw-ring-opacity))}.ring-zinc-950{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity))}.ring-opacity-40{--tw-ring-opacity:0.4}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--foreground-rgb:0,0,0;--background-start-rgb:255,255,255;--background-end-rgb:255,255,255;--neutral-border:#dcddeb}body{color:rgb(var(--foreground-rgb));background:linear-gradient(to bottom,transparent,rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb))}.table-wrapper{overflow-x:scroll;margin:0 24px}.custom-border{border:1px solid var(--neutral-border)}.placeholder\:text-tremor-content::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.placeholder\:text-tremor-content::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.placeholder\:text-tremor-content-subtle::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.placeholder\:text-tremor-content-subtle::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.first\:rounded-l-\[4px\]:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.last\:rounded-r-\[4px\]:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.last\:border-0:last-child{border-width:0}.last\:border-b-0:last-child{border-bottom-width:0}.focus-within\:relative:focus-within{position:relative}.hover\:border-b-2:hover{border-bottom-width:2px}.hover\:border-amber-100:hover{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity))}.hover\:border-amber-200:hover{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity))}.hover\:border-amber-300:hover{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity))}.hover\:border-amber-400:hover{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity))}.hover\:border-amber-50:hover{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity))}.hover\:border-amber-500:hover{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity))}.hover\:border-amber-600:hover{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity))}.hover\:border-amber-700:hover{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity))}.hover\:border-amber-800:hover{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity))}.hover\:border-amber-900:hover{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity))}.hover\:border-amber-950:hover{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity))}.hover\:border-blue-100:hover{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity))}.hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity))}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.hover\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}.hover\:border-blue-50:hover{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity))}.hover\:border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.hover\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.hover\:border-blue-700:hover{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.hover\:border-blue-800:hover{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}.hover\:border-blue-900:hover{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity))}.hover\:border-blue-950:hover{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity))}.hover\:border-cyan-100:hover{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity))}.hover\:border-cyan-200:hover{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity))}.hover\:border-cyan-300:hover{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity))}.hover\:border-cyan-400:hover{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity))}.hover\:border-cyan-50:hover{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity))}.hover\:border-cyan-500:hover{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity))}.hover\:border-cyan-600:hover{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity))}.hover\:border-cyan-700:hover{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity))}.hover\:border-cyan-800:hover{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity))}.hover\:border-cyan-900:hover{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity))}.hover\:border-cyan-950:hover{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity))}.hover\:border-emerald-100:hover{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity))}.hover\:border-emerald-200:hover{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity))}.hover\:border-emerald-300:hover{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity))}.hover\:border-emerald-400:hover{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity))}.hover\:border-emerald-50:hover{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity))}.hover\:border-emerald-500:hover{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity))}.hover\:border-emerald-600:hover{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity))}.hover\:border-emerald-700:hover{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity))}.hover\:border-emerald-800:hover{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity))}.hover\:border-emerald-900:hover{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity))}.hover\:border-emerald-950:hover{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity))}.hover\:border-fuchsia-100:hover{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity))}.hover\:border-fuchsia-200:hover{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity))}.hover\:border-fuchsia-300:hover{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity))}.hover\:border-fuchsia-400:hover{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity))}.hover\:border-fuchsia-50:hover{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity))}.hover\:border-fuchsia-500:hover{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity))}.hover\:border-fuchsia-600:hover{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity))}.hover\:border-fuchsia-700:hover{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity))}.hover\:border-fuchsia-800:hover{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity))}.hover\:border-fuchsia-900:hover{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity))}.hover\:border-fuchsia-950:hover{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity))}.hover\:border-gray-100:hover{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.hover\:border-gray-200:hover{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:border-gray-400:hover{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.hover\:border-gray-50:hover{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity))}.hover\:border-gray-500:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.hover\:border-gray-700:hover{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.hover\:border-gray-900:hover{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.hover\:border-gray-950:hover{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity))}.hover\:border-green-100:hover{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity))}.hover\:border-green-300:hover{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity))}.hover\:border-green-400:hover{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity))}.hover\:border-green-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity))}.hover\:border-green-500:hover{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.hover\:border-green-600:hover{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity))}.hover\:border-green-700:hover{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity))}.hover\:border-green-800:hover{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity))}.hover\:border-green-900:hover{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity))}.hover\:border-green-950:hover{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity))}.hover\:border-indigo-100:hover{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity))}.hover\:border-indigo-200:hover{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity))}.hover\:border-indigo-300:hover{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity))}.hover\:border-indigo-400:hover{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}.hover\:border-indigo-50:hover{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity))}.hover\:border-indigo-500:hover{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.hover\:border-indigo-600:hover{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity))}.hover\:border-indigo-700:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.hover\:border-indigo-800:hover{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}.hover\:border-indigo-900:hover{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity))}.hover\:border-indigo-950:hover{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity))}.hover\:border-lime-100:hover{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity))}.hover\:border-lime-200:hover{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity))}.hover\:border-lime-300:hover{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity))}.hover\:border-lime-400:hover{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity))}.hover\:border-lime-50:hover{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity))}.hover\:border-lime-500:hover{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity))}.hover\:border-lime-600:hover{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity))}.hover\:border-lime-700:hover{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity))}.hover\:border-lime-800:hover{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity))}.hover\:border-lime-900:hover{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity))}.hover\:border-lime-950:hover{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity))}.hover\:border-neutral-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity))}.hover\:border-neutral-200:hover{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity))}.hover\:border-neutral-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity))}.hover\:border-neutral-400:hover{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity))}.hover\:border-neutral-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}.hover\:border-neutral-500:hover{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity))}.hover\:border-neutral-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity))}.hover\:border-neutral-700:hover{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity))}.hover\:border-neutral-800:hover{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity))}.hover\:border-neutral-900:hover{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity))}.hover\:border-neutral-950:hover{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity))}.hover\:border-orange-100:hover{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity))}.hover\:border-orange-200:hover{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity))}.hover\:border-orange-300:hover{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity))}.hover\:border-orange-400:hover{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity))}.hover\:border-orange-50:hover{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity))}.hover\:border-orange-500:hover{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity))}.hover\:border-orange-600:hover{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity))}.hover\:border-orange-700:hover{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity))}.hover\:border-orange-800:hover{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity))}.hover\:border-orange-900:hover{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity))}.hover\:border-orange-950:hover{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity))}.hover\:border-pink-100:hover{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity))}.hover\:border-pink-200:hover{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity))}.hover\:border-pink-300:hover{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity))}.hover\:border-pink-400:hover{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity))}.hover\:border-pink-50:hover{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity))}.hover\:border-pink-500:hover{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity))}.hover\:border-pink-600:hover{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.hover\:border-pink-700:hover{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity))}.hover\:border-pink-800:hover{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity))}.hover\:border-pink-900:hover{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity))}.hover\:border-pink-950:hover{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity))}.hover\:border-purple-100:hover{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity))}.hover\:border-purple-200:hover{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity))}.hover\:border-purple-300:hover{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity))}.hover\:border-purple-400:hover{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity))}.hover\:border-purple-50:hover{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity))}.hover\:border-purple-500:hover{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity))}.hover\:border-purple-600:hover{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity))}.hover\:border-purple-700:hover{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}.hover\:border-purple-800:hover{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity))}.hover\:border-purple-900:hover{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity))}.hover\:border-purple-950:hover{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity))}.hover\:border-red-100:hover{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity))}.hover\:border-red-200:hover{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity))}.hover\:border-red-300:hover{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.hover\:border-red-400:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.hover\:border-red-50:hover{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity))}.hover\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.hover\:border-red-600:hover{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity))}.hover\:border-red-700:hover{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity))}.hover\:border-red-800:hover{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity))}.hover\:border-red-900:hover{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity))}.hover\:border-red-950:hover{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity))}.hover\:border-rose-100:hover{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity))}.hover\:border-rose-200:hover{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity))}.hover\:border-rose-300:hover{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity))}.hover\:border-rose-400:hover{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.hover\:border-rose-50:hover{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity))}.hover\:border-rose-500:hover{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity))}.hover\:border-rose-600:hover{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity))}.hover\:border-rose-700:hover{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity))}.hover\:border-rose-800:hover{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity))}.hover\:border-rose-900:hover{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity))}.hover\:border-rose-950:hover{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity))}.hover\:border-sky-100:hover{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity))}.hover\:border-sky-200:hover{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity))}.hover\:border-sky-300:hover{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity))}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity))}.hover\:border-sky-50:hover{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity))}.hover\:border-sky-500:hover{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity))}.hover\:border-sky-600:hover{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity))}.hover\:border-sky-700:hover{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity))}.hover\:border-sky-800:hover{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity))}.hover\:border-sky-900:hover{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity))}.hover\:border-sky-950:hover{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity))}.hover\:border-slate-100:hover{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.hover\:border-slate-200:hover{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.hover\:border-slate-400:hover{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.hover\:border-slate-50:hover{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity))}.hover\:border-slate-500:hover{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}.hover\:border-slate-600:hover{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.hover\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.hover\:border-slate-800:hover{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.hover\:border-slate-900:hover{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity))}.hover\:border-slate-950:hover{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity))}.hover\:border-stone-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity))}.hover\:border-stone-200:hover{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity))}.hover\:border-stone-300:hover{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity))}.hover\:border-stone-400:hover{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity))}.hover\:border-stone-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity))}.hover\:border-stone-500:hover{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity))}.hover\:border-stone-600:hover{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity))}.hover\:border-stone-700:hover{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity))}.hover\:border-stone-800:hover{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity))}.hover\:border-stone-900:hover{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity))}.hover\:border-stone-950:hover{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity))}.hover\:border-teal-100:hover{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity))}.hover\:border-teal-200:hover{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity))}.hover\:border-teal-300:hover{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity))}.hover\:border-teal-400:hover{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity))}.hover\:border-teal-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity))}.hover\:border-teal-500:hover{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity))}.hover\:border-teal-600:hover{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity))}.hover\:border-teal-700:hover{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity))}.hover\:border-teal-800:hover{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity))}.hover\:border-teal-900:hover{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity))}.hover\:border-teal-950:hover{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity))}.hover\:border-tremor-brand-emphasis:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.hover\:border-tremor-content:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.hover\:border-violet-100:hover{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity))}.hover\:border-violet-200:hover{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity))}.hover\:border-violet-300:hover{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity))}.hover\:border-violet-400:hover{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity))}.hover\:border-violet-50:hover{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity))}.hover\:border-violet-500:hover{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity))}.hover\:border-violet-600:hover{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity))}.hover\:border-violet-700:hover{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity))}.hover\:border-violet-800:hover{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity))}.hover\:border-violet-900:hover{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity))}.hover\:border-violet-950:hover{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity))}.hover\:border-yellow-100:hover{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity))}.hover\:border-yellow-200:hover{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity))}.hover\:border-yellow-300:hover{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity))}.hover\:border-yellow-400:hover{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}.hover\:border-yellow-50:hover{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity))}.hover\:border-yellow-500:hover{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity))}.hover\:border-yellow-600:hover{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity))}.hover\:border-yellow-700:hover{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity))}.hover\:border-yellow-800:hover{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity))}.hover\:border-yellow-900:hover{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity))}.hover\:border-yellow-950:hover{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity))}.hover\:border-zinc-100:hover{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity))}.hover\:border-zinc-200:hover{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.hover\:border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.hover\:border-zinc-400:hover{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.hover\:border-zinc-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}.hover\:border-zinc-500:hover{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity))}.hover\:border-zinc-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity))}.hover\:border-zinc-700:hover{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity))}.hover\:border-zinc-800:hover{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity))}.hover\:border-zinc-900:hover{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity))}.hover\:border-zinc-950:hover{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity))}.hover\:bg-amber-100:hover{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity))}.hover\:bg-amber-200:hover{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity))}.hover\:bg-amber-300:hover{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity))}.hover\:bg-amber-400:hover{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity))}.hover\:bg-amber-50:hover{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.hover\:bg-amber-500:hover{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity))}.hover\:bg-amber-600:hover{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity))}.hover\:bg-amber-700:hover{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity))}.hover\:bg-amber-800:hover{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity))}.hover\:bg-amber-900:hover{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity))}.hover\:bg-amber-950:hover{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.hover\:bg-blue-900:hover{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity))}.hover\:bg-blue-950:hover{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity))}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity))}.hover\:bg-cyan-200:hover{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity))}.hover\:bg-cyan-300:hover{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity))}.hover\:bg-cyan-400:hover{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity))}.hover\:bg-cyan-500:hover{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity))}.hover\:bg-cyan-600:hover{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.hover\:bg-cyan-800:hover{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity))}.hover\:bg-cyan-900:hover{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity))}.hover\:bg-cyan-950:hover{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity))}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity))}.hover\:bg-emerald-200:hover{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity))}.hover\:bg-emerald-300:hover{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity))}.hover\:bg-emerald-400:hover{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity))}.hover\:bg-emerald-50:hover{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}.hover\:bg-emerald-500:hover{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity))}.hover\:bg-emerald-800:hover{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity))}.hover\:bg-emerald-900:hover{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity))}.hover\:bg-emerald-950:hover{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity))}.hover\:bg-fuchsia-100:hover{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity))}.hover\:bg-fuchsia-200:hover{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity))}.hover\:bg-fuchsia-300:hover{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity))}.hover\:bg-fuchsia-400:hover{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity))}.hover\:bg-fuchsia-50:hover{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity))}.hover\:bg-fuchsia-500:hover{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity))}.hover\:bg-fuchsia-600:hover{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity))}.hover\:bg-fuchsia-700:hover{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity))}.hover\:bg-fuchsia-800:hover{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity))}.hover\:bg-fuchsia-900:hover{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity))}.hover\:bg-fuchsia-950:hover{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.hover\:bg-gray-950:hover{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity))}.hover\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity))}.hover\:bg-green-400:hover{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.hover\:bg-green-500:hover{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity))}.hover\:bg-green-900:hover{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity))}.hover\:bg-green-950:hover{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity))}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.hover\:bg-indigo-300:hover{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity))}.hover\:bg-indigo-400:hover{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.hover\:bg-indigo-50:hover{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.hover\:bg-indigo-800:hover{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.hover\:bg-indigo-900:hover{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.hover\:bg-indigo-950:hover{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity))}.hover\:bg-lime-100:hover{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity))}.hover\:bg-lime-200:hover{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity))}.hover\:bg-lime-300:hover{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity))}.hover\:bg-lime-400:hover{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity))}.hover\:bg-lime-50:hover{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity))}.hover\:bg-lime-500:hover{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity))}.hover\:bg-lime-600:hover{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity))}.hover\:bg-lime-700:hover{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity))}.hover\:bg-lime-800:hover{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity))}.hover\:bg-lime-900:hover{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity))}.hover\:bg-lime-950:hover{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity))}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.hover\:bg-neutral-200:hover{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity))}.hover\:bg-neutral-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity))}.hover\:bg-neutral-400:hover{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity))}.hover\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.hover\:bg-neutral-500:hover{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity))}.hover\:bg-neutral-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.hover\:bg-neutral-800:hover{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.hover\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.hover\:bg-neutral-950:hover{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity))}.hover\:bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity))}.hover\:bg-orange-200:hover{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.hover\:bg-orange-300:hover{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity))}.hover\:bg-orange-400:hover{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}.hover\:bg-orange-50:hover{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity))}.hover\:bg-orange-500:hover{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.hover\:bg-orange-600:hover{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}.hover\:bg-orange-700:hover{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity))}.hover\:bg-orange-800:hover{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity))}.hover\:bg-orange-900:hover{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity))}.hover\:bg-orange-950:hover{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity))}.hover\:bg-pink-100:hover{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity))}.hover\:bg-pink-200:hover{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity))}.hover\:bg-pink-300:hover{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity))}.hover\:bg-pink-400:hover{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}.hover\:bg-pink-50:hover{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity))}.hover\:bg-pink-500:hover{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity))}.hover\:bg-pink-600:hover{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity))}.hover\:bg-pink-700:hover{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity))}.hover\:bg-pink-900:hover{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity))}.hover\:bg-pink-950:hover{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity))}.hover\:bg-purple-100:hover{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity))}.hover\:bg-purple-200:hover{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity))}.hover\:bg-purple-300:hover{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity))}.hover\:bg-purple-400:hover{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.hover\:bg-purple-50:hover{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity))}.hover\:bg-purple-500:hover{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity))}.hover\:bg-purple-600:hover{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.hover\:bg-purple-800:hover{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity))}.hover\:bg-purple-900:hover{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}.hover\:bg-purple-950:hover{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity))}.hover\:bg-red-400:hover{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}.hover\:bg-red-950:hover{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity))}.hover\:bg-rose-100:hover{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity))}.hover\:bg-rose-200:hover{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity))}.hover\:bg-rose-300:hover{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity))}.hover\:bg-rose-400:hover{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity))}.hover\:bg-rose-50:hover{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity))}.hover\:bg-rose-500:hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity))}.hover\:bg-rose-600:hover{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity))}.hover\:bg-rose-700:hover{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity))}.hover\:bg-rose-800:hover{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity))}.hover\:bg-rose-900:hover{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity))}.hover\:bg-rose-950:hover{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity))}.hover\:bg-sky-100:hover{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity))}.hover\:bg-sky-200:hover{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity))}.hover\:bg-sky-300:hover{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity))}.hover\:bg-sky-400:hover{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.hover\:bg-sky-50:hover{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}.hover\:bg-sky-500:hover{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.hover\:bg-sky-600:hover{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.hover\:bg-sky-700:hover{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.hover\:bg-sky-800:hover{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity))}.hover\:bg-sky-900:hover{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity))}.hover\:bg-sky-950:hover{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity))}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.hover\:bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.hover\:bg-slate-400:hover{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.hover\:bg-slate-500:hover{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}.hover\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.hover\:bg-slate-900:hover{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.hover\:bg-slate-950:hover{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity))}.hover\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity))}.hover\:bg-stone-200:hover{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity))}.hover\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.hover\:bg-stone-400:hover{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.hover\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity))}.hover\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity))}.hover\:bg-stone-600:hover{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity))}.hover\:bg-stone-700:hover{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity))}.hover\:bg-stone-800:hover{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity))}.hover\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity))}.hover\:bg-stone-950:hover{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity))}.hover\:bg-teal-100:hover{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity))}.hover\:bg-teal-200:hover{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity))}.hover\:bg-teal-300:hover{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity))}.hover\:bg-teal-400:hover{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity))}.hover\:bg-teal-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity))}.hover\:bg-teal-500:hover{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity))}.hover\:bg-teal-600:hover{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity))}.hover\:bg-teal-700:hover{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity))}.hover\:bg-teal-800:hover{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity))}.hover\:bg-teal-900:hover{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity))}.hover\:bg-teal-950:hover{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity))}.hover\:bg-tremor-background-muted:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-tremor-background-subtle:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-tremor-brand-emphasis:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}.hover\:bg-violet-200:hover{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity))}.hover\:bg-violet-300:hover{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity))}.hover\:bg-violet-400:hover{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity))}.hover\:bg-violet-50:hover{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}.hover\:bg-violet-500:hover{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity))}.hover\:bg-violet-600:hover{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity))}.hover\:bg-violet-700:hover{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity))}.hover\:bg-violet-800:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity))}.hover\:bg-violet-900:hover{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity))}.hover\:bg-violet-950:hover{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.hover\:bg-yellow-100:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity))}.hover\:bg-yellow-400:hover{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity))}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}.hover\:bg-yellow-600:hover{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity))}.hover\:bg-yellow-700:hover{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity))}.hover\:bg-yellow-800:hover{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity))}.hover\:bg-yellow-900:hover{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity))}.hover\:bg-yellow-950:hover{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.hover\:bg-zinc-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.hover\:bg-zinc-500:hover{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity))}.hover\:bg-zinc-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity))}.hover\:bg-zinc-700:hover{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.hover\:bg-zinc-900:hover{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.hover\:bg-zinc-950:hover{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity))}.hover\:bg-opacity-20:hover{--tw-bg-opacity:0.2}.hover\:text-amber-100:hover{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity))}.hover\:text-amber-200:hover{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity))}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity))}.hover\:text-amber-400:hover{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.hover\:text-amber-50:hover{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity))}.hover\:text-amber-500:hover{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity))}.hover\:text-amber-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.hover\:text-amber-800:hover{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity))}.hover\:text-amber-900:hover{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity))}.hover\:text-amber-950:hover{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity))}.hover\:text-blue-100:hover{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity))}.hover\:text-blue-200:hover{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.hover\:text-blue-400:hover{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.hover\:text-blue-50:hover{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity))}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.hover\:text-blue-900:hover{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.hover\:text-blue-950:hover{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity))}.hover\:text-cyan-100:hover{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.hover\:text-cyan-300:hover{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity))}.hover\:text-cyan-400:hover{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity))}.hover\:text-cyan-50:hover{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity))}.hover\:text-cyan-500:hover{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity))}.hover\:text-cyan-600:hover{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity))}.hover\:text-cyan-700:hover{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity))}.hover\:text-cyan-800:hover{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity))}.hover\:text-cyan-900:hover{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity))}.hover\:text-cyan-950:hover{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity))}.hover\:text-emerald-100:hover{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity))}.hover\:text-emerald-200:hover{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity))}.hover\:text-emerald-300:hover{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity))}.hover\:text-emerald-400:hover{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity))}.hover\:text-emerald-50:hover{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity))}.hover\:text-emerald-500:hover{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity))}.hover\:text-emerald-800:hover{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity))}.hover\:text-emerald-900:hover{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity))}.hover\:text-emerald-950:hover{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity))}.hover\:text-fuchsia-100:hover{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity))}.hover\:text-fuchsia-200:hover{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity))}.hover\:text-fuchsia-300:hover{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity))}.hover\:text-fuchsia-400:hover{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity))}.hover\:text-fuchsia-50:hover{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity))}.hover\:text-fuchsia-500:hover{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity))}.hover\:text-fuchsia-600:hover{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity))}.hover\:text-fuchsia-700:hover{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity))}.hover\:text-fuchsia-800:hover{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity))}.hover\:text-fuchsia-900:hover{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity))}.hover\:text-fuchsia-950:hover{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity))}.hover\:text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.hover\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-gray-950:hover{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity))}.hover\:text-green-100:hover{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity))}.hover\:text-green-200:hover{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity))}.hover\:text-green-400:hover{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.hover\:text-green-50:hover{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.hover\:text-green-900:hover{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity))}.hover\:text-green-950:hover{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity))}.hover\:text-indigo-100:hover{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity))}.hover\:text-indigo-200:hover{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.hover\:text-indigo-300:hover{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity))}.hover\:text-indigo-400:hover{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.hover\:text-indigo-50:hover{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.hover\:text-indigo-700:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.hover\:text-indigo-800:hover{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity))}.hover\:text-indigo-950:hover{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}.hover\:text-lime-100:hover{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity))}.hover\:text-lime-200:hover{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity))}.hover\:text-lime-300:hover{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity))}.hover\:text-lime-400:hover{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity))}.hover\:text-lime-50:hover{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity))}.hover\:text-lime-500:hover{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity))}.hover\:text-lime-600:hover{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity))}.hover\:text-lime-700:hover{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity))}.hover\:text-lime-800:hover{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity))}.hover\:text-lime-900:hover{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity))}.hover\:text-lime-950:hover{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity))}.hover\:text-neutral-100:hover{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity))}.hover\:text-neutral-200:hover{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.hover\:text-neutral-300:hover{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity))}.hover\:text-neutral-400:hover{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity))}.hover\:text-neutral-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}.hover\:text-neutral-500:hover{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.hover\:text-neutral-600:hover{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity))}.hover\:text-neutral-700:hover{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity))}.hover\:text-neutral-800:hover{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity))}.hover\:text-neutral-900:hover{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity))}.hover\:text-neutral-950:hover{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity))}.hover\:text-orange-100:hover{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity))}.hover\:text-orange-200:hover{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity))}.hover\:text-orange-300:hover{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity))}.hover\:text-orange-400:hover{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity))}.hover\:text-orange-50:hover{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity))}.hover\:text-orange-500:hover{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity))}.hover\:text-orange-600:hover{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity))}.hover\:text-orange-700:hover{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity))}.hover\:text-orange-800:hover{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity))}.hover\:text-orange-900:hover{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity))}.hover\:text-orange-950:hover{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity))}.hover\:text-pink-100:hover{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity))}.hover\:text-pink-200:hover{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity))}.hover\:text-pink-300:hover{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity))}.hover\:text-pink-400:hover{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity))}.hover\:text-pink-50:hover{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity))}.hover\:text-pink-500:hover{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity))}.hover\:text-pink-600:hover{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity))}.hover\:text-pink-700:hover{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity))}.hover\:text-pink-800:hover{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity))}.hover\:text-pink-950:hover{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity))}.hover\:text-purple-100:hover{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity))}.hover\:text-purple-200:hover{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.hover\:text-purple-300:hover{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity))}.hover\:text-purple-400:hover{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}.hover\:text-purple-50:hover{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity))}.hover\:text-purple-500:hover{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.hover\:text-purple-600:hover{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.hover\:text-purple-700:hover{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.hover\:text-purple-900:hover{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity))}.hover\:text-purple-950:hover{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity))}.hover\:text-red-100:hover{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity))}.hover\:text-red-200:hover{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity))}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.hover\:text-red-50:hover{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.hover\:text-red-800:hover{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.hover\:text-red-950:hover{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity))}.hover\:text-rose-100:hover{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity))}.hover\:text-rose-300:hover{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity))}.hover\:text-rose-400:hover{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity))}.hover\:text-rose-50:hover{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity))}.hover\:text-rose-500:hover{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity))}.hover\:text-rose-600:hover{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity))}.hover\:text-rose-700:hover{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity))}.hover\:text-rose-800:hover{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity))}.hover\:text-rose-900:hover{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity))}.hover\:text-rose-950:hover{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity))}.hover\:text-sky-100:hover{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity))}.hover\:text-sky-200:hover{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.hover\:text-sky-300:hover{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity))}.hover\:text-sky-400:hover{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.hover\:text-sky-50:hover{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity))}.hover\:text-sky-500:hover{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.hover\:text-sky-600:hover{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.hover\:text-sky-700:hover{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity))}.hover\:text-sky-800:hover{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity))}.hover\:text-sky-900:hover{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity))}.hover\:text-sky-950:hover{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity))}.hover\:text-slate-100:hover{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.hover\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.hover\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.hover\:text-slate-400:hover{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.hover\:text-slate-50:hover{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.hover\:text-slate-500:hover{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.hover\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.hover\:text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.hover\:text-slate-950:hover{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity))}.hover\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.hover\:text-stone-200:hover{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity))}.hover\:text-stone-300:hover{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity))}.hover\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}.hover\:text-stone-50:hover{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity))}.hover\:text-stone-500:hover{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity))}.hover\:text-stone-600:hover{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity))}.hover\:text-stone-700:hover{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity))}.hover\:text-stone-800:hover{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity))}.hover\:text-stone-900:hover{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity))}.hover\:text-stone-950:hover{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity))}.hover\:text-teal-100:hover{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity))}.hover\:text-teal-200:hover{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity))}.hover\:text-teal-300:hover{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity))}.hover\:text-teal-400:hover{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity))}.hover\:text-teal-50:hover{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity))}.hover\:text-teal-500:hover{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity))}.hover\:text-teal-600:hover{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity))}.hover\:text-teal-700:hover{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity))}.hover\:text-teal-800:hover{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity))}.hover\:text-teal-900:hover{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity))}.hover\:text-teal-950:hover{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity))}.hover\:text-tremor-brand-emphasis:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.hover\:text-tremor-content:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-tremor-content-emphasis:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-violet-100:hover{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity))}.hover\:text-violet-200:hover{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity))}.hover\:text-violet-300:hover{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity))}.hover\:text-violet-400:hover{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity))}.hover\:text-violet-50:hover{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity))}.hover\:text-violet-500:hover{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity))}.hover\:text-violet-600:hover{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity))}.hover\:text-violet-700:hover{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}.hover\:text-violet-800:hover{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity))}.hover\:text-violet-900:hover{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity))}.hover\:text-violet-950:hover{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity))}.hover\:text-yellow-100:hover{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity))}.hover\:text-yellow-200:hover{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity))}.hover\:text-yellow-300:hover{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}.hover\:text-yellow-400:hover{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.hover\:text-yellow-50:hover{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity))}.hover\:text-yellow-700:hover{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}.hover\:text-yellow-800:hover{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity))}.hover\:text-yellow-900:hover{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity))}.hover\:text-yellow-950:hover{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity))}.hover\:text-zinc-100:hover{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity))}.hover\:text-zinc-400:hover{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}.hover\:text-zinc-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}.hover\:text-zinc-500:hover{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.hover\:text-zinc-600:hover{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.hover\:text-zinc-800:hover{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.hover\:text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.focus\:border-tremor-brand-subtle:focus{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.focus\:ring-tremor-brand-muted:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-indigo-400:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\:text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:active .group-active\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.aria-selected\:\!bg-tremor-background-subtle[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity))!important}.aria-selected\:bg-tremor-background-emphasis[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.aria-selected\:\!text-tremor-content[aria-selected=true]{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity))!important}.aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}.aria-selected\:text-tremor-brand-inverted[aria-selected=true],.aria-selected\:text-tremor-content-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.ui-selected\:border-b-2[data-headlessui-state~=selected]{border-bottom-width:2px}.ui-selected\:border-amber-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity))}.ui-selected\:border-amber-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity))}.ui-selected\:border-amber-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity))}.ui-selected\:border-amber-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity))}.ui-selected\:border-amber-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity))}.ui-selected\:border-amber-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity))}.ui-selected\:border-amber-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity))}.ui-selected\:border-amber-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity))}.ui-selected\:border-amber-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity))}.ui-selected\:border-amber-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity))}.ui-selected\:border-amber-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity))}.ui-selected\:border-blue-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity))}.ui-selected\:border-blue-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity))}.ui-selected\:border-blue-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.ui-selected\:border-blue-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}.ui-selected\:border-blue-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity))}.ui-selected\:border-blue-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.ui-selected\:border-blue-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.ui-selected\:border-blue-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.ui-selected\:border-blue-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}.ui-selected\:border-blue-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity))}.ui-selected\:border-blue-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity))}.ui-selected\:border-cyan-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity))}.ui-selected\:border-cyan-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity))}.ui-selected\:border-cyan-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity))}.ui-selected\:border-cyan-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity))}.ui-selected\:border-cyan-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity))}.ui-selected\:border-cyan-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity))}.ui-selected\:border-cyan-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity))}.ui-selected\:border-cyan-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity))}.ui-selected\:border-cyan-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity))}.ui-selected\:border-cyan-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity))}.ui-selected\:border-cyan-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity))}.ui-selected\:border-emerald-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity))}.ui-selected\:border-emerald-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity))}.ui-selected\:border-emerald-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity))}.ui-selected\:border-emerald-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity))}.ui-selected\:border-emerald-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity))}.ui-selected\:border-emerald-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity))}.ui-selected\:border-emerald-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity))}.ui-selected\:border-emerald-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity))}.ui-selected\:border-emerald-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity))}.ui-selected\:border-emerald-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity))}.ui-selected\:border-emerald-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity))}.ui-selected\:border-fuchsia-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity))}.ui-selected\:border-gray-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.ui-selected\:border-gray-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.ui-selected\:border-gray-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.ui-selected\:border-gray-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.ui-selected\:border-gray-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity))}.ui-selected\:border-gray-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.ui-selected\:border-gray-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.ui-selected\:border-gray-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.ui-selected\:border-gray-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.ui-selected\:border-gray-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.ui-selected\:border-gray-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity))}.ui-selected\:border-green-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity))}.ui-selected\:border-green-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity))}.ui-selected\:border-green-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity))}.ui-selected\:border-green-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity))}.ui-selected\:border-green-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity))}.ui-selected\:border-green-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.ui-selected\:border-green-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity))}.ui-selected\:border-green-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity))}.ui-selected\:border-green-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity))}.ui-selected\:border-green-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity))}.ui-selected\:border-green-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity))}.ui-selected\:border-indigo-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity))}.ui-selected\:border-indigo-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity))}.ui-selected\:border-indigo-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity))}.ui-selected\:border-indigo-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}.ui-selected\:border-indigo-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity))}.ui-selected\:border-indigo-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.ui-selected\:border-indigo-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity))}.ui-selected\:border-indigo-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.ui-selected\:border-indigo-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}.ui-selected\:border-indigo-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity))}.ui-selected\:border-indigo-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity))}.ui-selected\:border-lime-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity))}.ui-selected\:border-lime-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity))}.ui-selected\:border-lime-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity))}.ui-selected\:border-lime-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity))}.ui-selected\:border-lime-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity))}.ui-selected\:border-lime-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity))}.ui-selected\:border-lime-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity))}.ui-selected\:border-lime-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity))}.ui-selected\:border-lime-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity))}.ui-selected\:border-lime-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity))}.ui-selected\:border-lime-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity))}.ui-selected\:border-neutral-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity))}.ui-selected\:border-neutral-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity))}.ui-selected\:border-neutral-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity))}.ui-selected\:border-neutral-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity))}.ui-selected\:border-neutral-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}.ui-selected\:border-neutral-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity))}.ui-selected\:border-neutral-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity))}.ui-selected\:border-neutral-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity))}.ui-selected\:border-neutral-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity))}.ui-selected\:border-neutral-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity))}.ui-selected\:border-neutral-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity))}.ui-selected\:border-orange-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity))}.ui-selected\:border-orange-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity))}.ui-selected\:border-orange-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity))}.ui-selected\:border-orange-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity))}.ui-selected\:border-orange-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity))}.ui-selected\:border-orange-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity))}.ui-selected\:border-orange-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity))}.ui-selected\:border-orange-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity))}.ui-selected\:border-orange-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity))}.ui-selected\:border-orange-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity))}.ui-selected\:border-orange-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity))}.ui-selected\:border-pink-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity))}.ui-selected\:border-pink-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity))}.ui-selected\:border-pink-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity))}.ui-selected\:border-pink-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity))}.ui-selected\:border-pink-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity))}.ui-selected\:border-pink-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity))}.ui-selected\:border-pink-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.ui-selected\:border-pink-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity))}.ui-selected\:border-pink-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity))}.ui-selected\:border-pink-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity))}.ui-selected\:border-pink-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity))}.ui-selected\:border-purple-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity))}.ui-selected\:border-purple-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity))}.ui-selected\:border-purple-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity))}.ui-selected\:border-purple-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity))}.ui-selected\:border-purple-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity))}.ui-selected\:border-purple-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity))}.ui-selected\:border-purple-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity))}.ui-selected\:border-purple-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}.ui-selected\:border-purple-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity))}.ui-selected\:border-purple-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity))}.ui-selected\:border-purple-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity))}.ui-selected\:border-red-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity))}.ui-selected\:border-red-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity))}.ui-selected\:border-red-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.ui-selected\:border-red-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.ui-selected\:border-red-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity))}.ui-selected\:border-red-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.ui-selected\:border-red-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity))}.ui-selected\:border-red-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity))}.ui-selected\:border-red-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity))}.ui-selected\:border-red-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity))}.ui-selected\:border-red-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity))}.ui-selected\:border-rose-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity))}.ui-selected\:border-rose-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity))}.ui-selected\:border-rose-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity))}.ui-selected\:border-rose-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.ui-selected\:border-rose-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity))}.ui-selected\:border-rose-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity))}.ui-selected\:border-rose-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity))}.ui-selected\:border-rose-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity))}.ui-selected\:border-rose-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity))}.ui-selected\:border-rose-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity))}.ui-selected\:border-rose-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity))}.ui-selected\:border-sky-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity))}.ui-selected\:border-sky-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity))}.ui-selected\:border-sky-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity))}.ui-selected\:border-sky-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity))}.ui-selected\:border-sky-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity))}.ui-selected\:border-sky-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity))}.ui-selected\:border-sky-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity))}.ui-selected\:border-sky-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity))}.ui-selected\:border-sky-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity))}.ui-selected\:border-sky-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity))}.ui-selected\:border-sky-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity))}.ui-selected\:border-slate-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.ui-selected\:border-slate-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.ui-selected\:border-slate-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.ui-selected\:border-slate-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.ui-selected\:border-slate-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity))}.ui-selected\:border-slate-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}.ui-selected\:border-slate-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.ui-selected\:border-slate-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.ui-selected\:border-slate-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.ui-selected\:border-slate-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity))}.ui-selected\:border-slate-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity))}.ui-selected\:border-stone-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity))}.ui-selected\:border-stone-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity))}.ui-selected\:border-stone-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity))}.ui-selected\:border-stone-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity))}.ui-selected\:border-stone-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity))}.ui-selected\:border-stone-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity))}.ui-selected\:border-stone-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity))}.ui-selected\:border-stone-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity))}.ui-selected\:border-stone-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity))}.ui-selected\:border-stone-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity))}.ui-selected\:border-stone-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity))}.ui-selected\:border-teal-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity))}.ui-selected\:border-teal-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity))}.ui-selected\:border-teal-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity))}.ui-selected\:border-teal-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity))}.ui-selected\:border-teal-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity))}.ui-selected\:border-teal-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity))}.ui-selected\:border-teal-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity))}.ui-selected\:border-teal-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity))}.ui-selected\:border-teal-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity))}.ui-selected\:border-teal-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity))}.ui-selected\:border-teal-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity))}.ui-selected\:border-tremor-border[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.ui-selected\:border-tremor-brand[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.ui-selected\:border-violet-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity))}.ui-selected\:border-violet-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity))}.ui-selected\:border-violet-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity))}.ui-selected\:border-violet-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity))}.ui-selected\:border-violet-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity))}.ui-selected\:border-violet-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity))}.ui-selected\:border-violet-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity))}.ui-selected\:border-violet-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity))}.ui-selected\:border-violet-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity))}.ui-selected\:border-violet-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity))}.ui-selected\:border-violet-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity))}.ui-selected\:border-yellow-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity))}.ui-selected\:border-yellow-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity))}.ui-selected\:border-yellow-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity))}.ui-selected\:border-yellow-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}.ui-selected\:border-yellow-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity))}.ui-selected\:border-yellow-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity))}.ui-selected\:border-yellow-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity))}.ui-selected\:border-yellow-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity))}.ui-selected\:border-yellow-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity))}.ui-selected\:border-yellow-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity))}.ui-selected\:border-yellow-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity))}.ui-selected\:border-zinc-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity))}.ui-selected\:border-zinc-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.ui-selected\:border-zinc-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.ui-selected\:border-zinc-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.ui-selected\:border-zinc-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}.ui-selected\:border-zinc-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity))}.ui-selected\:border-zinc-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity))}.ui-selected\:border-zinc-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity))}.ui-selected\:border-zinc-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity))}.ui-selected\:border-zinc-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity))}.ui-selected\:border-zinc-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity))}.ui-selected\:bg-amber-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity))}.ui-selected\:bg-amber-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity))}.ui-selected\:bg-amber-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity))}.ui-selected\:bg-amber-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity))}.ui-selected\:bg-amber-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.ui-selected\:bg-amber-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity))}.ui-selected\:bg-amber-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity))}.ui-selected\:bg-amber-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity))}.ui-selected\:bg-amber-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity))}.ui-selected\:bg-amber-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity))}.ui-selected\:bg-amber-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity))}.ui-selected\:bg-blue-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.ui-selected\:bg-blue-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.ui-selected\:bg-blue-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.ui-selected\:bg-blue-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.ui-selected\:bg-blue-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.ui-selected\:bg-blue-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.ui-selected\:bg-blue-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.ui-selected\:bg-blue-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.ui-selected\:bg-blue-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.ui-selected\:bg-blue-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity))}.ui-selected\:bg-blue-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity))}.ui-selected\:bg-cyan-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity))}.ui-selected\:bg-emerald-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity))}.ui-selected\:bg-fuchsia-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity))}.ui-selected\:bg-gray-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.ui-selected\:bg-gray-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.ui-selected\:bg-gray-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.ui-selected\:bg-gray-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.ui-selected\:bg-gray-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.ui-selected\:bg-gray-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.ui-selected\:bg-gray-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.ui-selected\:bg-gray-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.ui-selected\:bg-gray-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.ui-selected\:bg-gray-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.ui-selected\:bg-gray-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity))}.ui-selected\:bg-green-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.ui-selected\:bg-green-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.ui-selected\:bg-green-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity))}.ui-selected\:bg-green-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.ui-selected\:bg-green-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.ui-selected\:bg-green-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.ui-selected\:bg-green-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.ui-selected\:bg-green-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.ui-selected\:bg-green-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity))}.ui-selected\:bg-green-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity))}.ui-selected\:bg-green-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.ui-selected\:bg-indigo-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity))}.ui-selected\:bg-lime-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity))}.ui-selected\:bg-lime-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity))}.ui-selected\:bg-lime-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity))}.ui-selected\:bg-lime-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity))}.ui-selected\:bg-lime-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity))}.ui-selected\:bg-lime-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity))}.ui-selected\:bg-lime-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity))}.ui-selected\:bg-lime-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity))}.ui-selected\:bg-lime-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity))}.ui-selected\:bg-lime-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity))}.ui-selected\:bg-lime-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.ui-selected\:bg-neutral-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity))}.ui-selected\:bg-orange-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity))}.ui-selected\:bg-orange-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.ui-selected\:bg-orange-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity))}.ui-selected\:bg-orange-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}.ui-selected\:bg-orange-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity))}.ui-selected\:bg-orange-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.ui-selected\:bg-orange-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}.ui-selected\:bg-orange-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity))}.ui-selected\:bg-orange-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity))}.ui-selected\:bg-orange-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity))}.ui-selected\:bg-orange-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity))}.ui-selected\:bg-pink-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity))}.ui-selected\:bg-pink-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity))}.ui-selected\:bg-pink-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity))}.ui-selected\:bg-pink-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}.ui-selected\:bg-pink-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity))}.ui-selected\:bg-pink-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity))}.ui-selected\:bg-pink-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity))}.ui-selected\:bg-pink-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity))}.ui-selected\:bg-pink-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity))}.ui-selected\:bg-pink-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity))}.ui-selected\:bg-pink-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity))}.ui-selected\:bg-purple-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity))}.ui-selected\:bg-purple-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity))}.ui-selected\:bg-purple-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity))}.ui-selected\:bg-purple-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.ui-selected\:bg-purple-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity))}.ui-selected\:bg-purple-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity))}.ui-selected\:bg-purple-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.ui-selected\:bg-purple-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.ui-selected\:bg-purple-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity))}.ui-selected\:bg-purple-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}.ui-selected\:bg-purple-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity))}.ui-selected\:bg-red-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.ui-selected\:bg-red-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.ui-selected\:bg-red-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity))}.ui-selected\:bg-red-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.ui-selected\:bg-red-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.ui-selected\:bg-red-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.ui-selected\:bg-red-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.ui-selected\:bg-red-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.ui-selected\:bg-red-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity))}.ui-selected\:bg-red-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}.ui-selected\:bg-red-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity))}.ui-selected\:bg-rose-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity))}.ui-selected\:bg-rose-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity))}.ui-selected\:bg-rose-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity))}.ui-selected\:bg-rose-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity))}.ui-selected\:bg-rose-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity))}.ui-selected\:bg-rose-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity))}.ui-selected\:bg-rose-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity))}.ui-selected\:bg-rose-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity))}.ui-selected\:bg-rose-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity))}.ui-selected\:bg-rose-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity))}.ui-selected\:bg-rose-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity))}.ui-selected\:bg-sky-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity))}.ui-selected\:bg-sky-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity))}.ui-selected\:bg-sky-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity))}.ui-selected\:bg-sky-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.ui-selected\:bg-sky-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}.ui-selected\:bg-sky-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.ui-selected\:bg-sky-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.ui-selected\:bg-sky-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.ui-selected\:bg-sky-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity))}.ui-selected\:bg-sky-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity))}.ui-selected\:bg-sky-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity))}.ui-selected\:bg-slate-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.ui-selected\:bg-slate-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.ui-selected\:bg-slate-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.ui-selected\:bg-slate-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.ui-selected\:bg-slate-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.ui-selected\:bg-slate-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}.ui-selected\:bg-slate-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}.ui-selected\:bg-slate-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.ui-selected\:bg-slate-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.ui-selected\:bg-slate-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.ui-selected\:bg-slate-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity))}.ui-selected\:bg-stone-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity))}.ui-selected\:bg-stone-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity))}.ui-selected\:bg-stone-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}.ui-selected\:bg-stone-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}.ui-selected\:bg-stone-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity))}.ui-selected\:bg-stone-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity))}.ui-selected\:bg-stone-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity))}.ui-selected\:bg-stone-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity))}.ui-selected\:bg-stone-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity))}.ui-selected\:bg-stone-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity))}.ui-selected\:bg-stone-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity))}.ui-selected\:bg-teal-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity))}.ui-selected\:bg-teal-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity))}.ui-selected\:bg-teal-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity))}.ui-selected\:bg-teal-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity))}.ui-selected\:bg-teal-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity))}.ui-selected\:bg-teal-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity))}.ui-selected\:bg-teal-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity))}.ui-selected\:bg-teal-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity))}.ui-selected\:bg-teal-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity))}.ui-selected\:bg-teal-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity))}.ui-selected\:bg-teal-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity))}.ui-selected\:bg-tremor-background[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.ui-selected\:bg-tremor-background-muted[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.ui-selected\:bg-violet-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}.ui-selected\:bg-violet-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity))}.ui-selected\:bg-violet-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity))}.ui-selected\:bg-violet-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity))}.ui-selected\:bg-violet-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}.ui-selected\:bg-violet-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity))}.ui-selected\:bg-violet-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity))}.ui-selected\:bg-violet-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity))}.ui-selected\:bg-violet-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity))}.ui-selected\:bg-violet-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity))}.ui-selected\:bg-violet-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity))}.ui-selected\:bg-yellow-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.ui-selected\:bg-zinc-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity))}.ui-selected\:text-amber-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity))}.ui-selected\:text-amber-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity))}.ui-selected\:text-amber-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity))}.ui-selected\:text-amber-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.ui-selected\:text-amber-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity))}.ui-selected\:text-amber-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity))}.ui-selected\:text-amber-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.ui-selected\:text-amber-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.ui-selected\:text-amber-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity))}.ui-selected\:text-amber-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity))}.ui-selected\:text-amber-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity))}.ui-selected\:text-blue-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity))}.ui-selected\:text-blue-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.ui-selected\:text-blue-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.ui-selected\:text-blue-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.ui-selected\:text-blue-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity))}.ui-selected\:text-blue-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.ui-selected\:text-blue-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.ui-selected\:text-blue-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.ui-selected\:text-blue-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.ui-selected\:text-blue-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.ui-selected\:text-blue-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity))}.ui-selected\:text-cyan-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity))}.ui-selected\:text-cyan-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.ui-selected\:text-cyan-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity))}.ui-selected\:text-cyan-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity))}.ui-selected\:text-cyan-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity))}.ui-selected\:text-cyan-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity))}.ui-selected\:text-cyan-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity))}.ui-selected\:text-cyan-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity))}.ui-selected\:text-cyan-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity))}.ui-selected\:text-cyan-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity))}.ui-selected\:text-cyan-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity))}.ui-selected\:text-dark-tremor-brand[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.ui-selected\:text-emerald-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity))}.ui-selected\:text-emerald-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity))}.ui-selected\:text-emerald-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity))}.ui-selected\:text-emerald-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity))}.ui-selected\:text-emerald-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity))}.ui-selected\:text-emerald-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}.ui-selected\:text-emerald-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.ui-selected\:text-emerald-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity))}.ui-selected\:text-emerald-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity))}.ui-selected\:text-emerald-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity))}.ui-selected\:text-emerald-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity))}.ui-selected\:text-fuchsia-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity))}.ui-selected\:text-gray-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.ui-selected\:text-gray-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.ui-selected\:text-gray-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.ui-selected\:text-gray-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.ui-selected\:text-gray-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.ui-selected\:text-gray-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.ui-selected\:text-gray-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.ui-selected\:text-gray-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.ui-selected\:text-gray-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.ui-selected\:text-gray-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.ui-selected\:text-gray-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity))}.ui-selected\:text-green-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity))}.ui-selected\:text-green-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.ui-selected\:text-green-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity))}.ui-selected\:text-green-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.ui-selected\:text-green-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity))}.ui-selected\:text-green-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.ui-selected\:text-green-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.ui-selected\:text-green-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.ui-selected\:text-green-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.ui-selected\:text-green-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity))}.ui-selected\:text-green-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity))}.ui-selected\:text-indigo-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity))}.ui-selected\:text-indigo-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.ui-selected\:text-indigo-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity))}.ui-selected\:text-indigo-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.ui-selected\:text-indigo-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity))}.ui-selected\:text-indigo-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.ui-selected\:text-indigo-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.ui-selected\:text-indigo-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.ui-selected\:text-indigo-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.ui-selected\:text-indigo-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity))}.ui-selected\:text-indigo-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}.ui-selected\:text-lime-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity))}.ui-selected\:text-lime-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity))}.ui-selected\:text-lime-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity))}.ui-selected\:text-lime-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity))}.ui-selected\:text-lime-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity))}.ui-selected\:text-lime-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity))}.ui-selected\:text-lime-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity))}.ui-selected\:text-lime-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity))}.ui-selected\:text-lime-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity))}.ui-selected\:text-lime-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity))}.ui-selected\:text-lime-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity))}.ui-selected\:text-neutral-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity))}.ui-selected\:text-neutral-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}.ui-selected\:text-neutral-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity))}.ui-selected\:text-neutral-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity))}.ui-selected\:text-neutral-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}.ui-selected\:text-neutral-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}.ui-selected\:text-neutral-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity))}.ui-selected\:text-neutral-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity))}.ui-selected\:text-neutral-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity))}.ui-selected\:text-neutral-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity))}.ui-selected\:text-neutral-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity))}.ui-selected\:text-orange-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity))}.ui-selected\:text-orange-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity))}.ui-selected\:text-orange-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity))}.ui-selected\:text-orange-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity))}.ui-selected\:text-orange-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity))}.ui-selected\:text-orange-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity))}.ui-selected\:text-orange-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity))}.ui-selected\:text-orange-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity))}.ui-selected\:text-orange-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity))}.ui-selected\:text-orange-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity))}.ui-selected\:text-orange-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity))}.ui-selected\:text-pink-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity))}.ui-selected\:text-pink-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity))}.ui-selected\:text-pink-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity))}.ui-selected\:text-pink-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity))}.ui-selected\:text-pink-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity))}.ui-selected\:text-pink-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity))}.ui-selected\:text-pink-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity))}.ui-selected\:text-pink-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity))}.ui-selected\:text-pink-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity))}.ui-selected\:text-pink-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity))}.ui-selected\:text-pink-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity))}.ui-selected\:text-purple-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity))}.ui-selected\:text-purple-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.ui-selected\:text-purple-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity))}.ui-selected\:text-purple-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}.ui-selected\:text-purple-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity))}.ui-selected\:text-purple-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.ui-selected\:text-purple-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.ui-selected\:text-purple-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.ui-selected\:text-purple-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.ui-selected\:text-purple-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity))}.ui-selected\:text-purple-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity))}.ui-selected\:text-red-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity))}.ui-selected\:text-red-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.ui-selected\:text-red-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity))}.ui-selected\:text-red-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.ui-selected\:text-red-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity))}.ui-selected\:text-red-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.ui-selected\:text-red-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.ui-selected\:text-red-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.ui-selected\:text-red-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.ui-selected\:text-red-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.ui-selected\:text-red-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity))}.ui-selected\:text-rose-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity))}.ui-selected\:text-rose-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity))}.ui-selected\:text-rose-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity))}.ui-selected\:text-rose-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity))}.ui-selected\:text-rose-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity))}.ui-selected\:text-rose-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity))}.ui-selected\:text-rose-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity))}.ui-selected\:text-rose-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity))}.ui-selected\:text-rose-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity))}.ui-selected\:text-rose-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity))}.ui-selected\:text-rose-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity))}.ui-selected\:text-sky-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity))}.ui-selected\:text-sky-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.ui-selected\:text-sky-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity))}.ui-selected\:text-sky-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.ui-selected\:text-sky-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity))}.ui-selected\:text-sky-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.ui-selected\:text-sky-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.ui-selected\:text-sky-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity))}.ui-selected\:text-sky-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity))}.ui-selected\:text-sky-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity))}.ui-selected\:text-sky-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity))}.ui-selected\:text-slate-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.ui-selected\:text-slate-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.ui-selected\:text-slate-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.ui-selected\:text-slate-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.ui-selected\:text-slate-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.ui-selected\:text-slate-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.ui-selected\:text-slate-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.ui-selected\:text-slate-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.ui-selected\:text-slate-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.ui-selected\:text-slate-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.ui-selected\:text-slate-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity))}.ui-selected\:text-stone-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}.ui-selected\:text-stone-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity))}.ui-selected\:text-stone-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity))}.ui-selected\:text-stone-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}.ui-selected\:text-stone-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity))}.ui-selected\:text-stone-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity))}.ui-selected\:text-stone-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity))}.ui-selected\:text-stone-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity))}.ui-selected\:text-stone-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity))}.ui-selected\:text-stone-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity))}.ui-selected\:text-stone-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity))}.ui-selected\:text-teal-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity))}.ui-selected\:text-teal-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity))}.ui-selected\:text-teal-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity))}.ui-selected\:text-teal-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity))}.ui-selected\:text-teal-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity))}.ui-selected\:text-teal-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity))}.ui-selected\:text-teal-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity))}.ui-selected\:text-teal-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity))}.ui-selected\:text-teal-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity))}.ui-selected\:text-teal-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity))}.ui-selected\:text-teal-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity))}.ui-selected\:text-tremor-brand[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.ui-selected\:text-tremor-content-emphasis[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.ui-selected\:text-tremor-content-strong[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.ui-selected\:text-violet-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity))}.ui-selected\:text-violet-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity))}.ui-selected\:text-violet-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity))}.ui-selected\:text-violet-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity))}.ui-selected\:text-violet-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity))}.ui-selected\:text-violet-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity))}.ui-selected\:text-violet-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity))}.ui-selected\:text-violet-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}.ui-selected\:text-violet-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity))}.ui-selected\:text-violet-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity))}.ui-selected\:text-violet-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity))}.ui-selected\:text-yellow-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity))}.ui-selected\:text-yellow-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity))}.ui-selected\:text-yellow-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}.ui-selected\:text-yellow-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.ui-selected\:text-yellow-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity))}.ui-selected\:text-yellow-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}.ui-selected\:text-yellow-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity))}.ui-selected\:text-yellow-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}.ui-selected\:text-yellow-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity))}.ui-selected\:text-yellow-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity))}.ui-selected\:text-yellow-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity))}.ui-selected\:text-zinc-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity))}.ui-selected\:text-zinc-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}.ui-selected\:text-zinc-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity))}.ui-selected\:text-zinc-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}.ui-selected\:text-zinc-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}.ui-selected\:text-zinc-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.ui-selected\:text-zinc-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.ui-selected\:text-zinc-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.ui-selected\:text-zinc-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.ui-selected\:text-zinc-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.ui-selected\:text-zinc-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}.ui-selected\:shadow-tremor-input[data-headlessui-state~=selected]{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:where([data-headlessui-state~=selected]) .ui-selected\:border-b-2{border-bottom-width:2px}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-tremor-border{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-tremor-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-tremor-background-muted{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-dark-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-tremor-content-strong{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity))}:where([data-headlessui-state~=selected]) .ui-selected\:shadow-tremor-input{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ui-active\:bg-tremor-background-muted[data-headlessui-state~=active]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.ui-active\:text-tremor-content-strong[data-headlessui-state~=active]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:where([data-headlessui-state~=active]) .ui-active\:bg-tremor-background-muted{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}:where([data-headlessui-state~=active]) .ui-active\:text-tremor-content-strong{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}:is(.dark .dark\:divide-dark-tremor-border)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}:is(.dark .dark\:border-dark-tremor-background){--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}:is(.dark .dark\:border-dark-tremor-border){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:border-dark-tremor-brand){--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}:is(.dark .dark\:border-dark-tremor-brand-emphasis){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}:is(.dark .dark\:border-dark-tremor-brand-inverted){--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity))}:is(.dark .dark\:border-dark-tremor-brand-subtle){--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}:is(.dark .dark\:bg-dark-tremor-background){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-background-emphasis){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-background-muted){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-background-subtle){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-border){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-brand){--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-brand-muted){--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-brand-muted\/70){background-color:rgba(30,27,75,.7)}:is(.dark .dark\:bg-dark-tremor-brand-subtle){--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}:is(.dark .dark\:bg-dark-tremor-content-subtle){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-950\/50){background-color:rgba(2,6,23,.5)}:is(.dark .dark\:bg-opacity-10){--tw-bg-opacity:0.1}:is(.dark .dark\:bg-opacity-25){--tw-bg-opacity:0.25}:is(.dark .dark\:bg-opacity-30){--tw-bg-opacity:0.3}:is(.dark .dark\:from-dark-tremor-background){--tw-gradient-from:#111827 var(--tw-gradient-from-position);--tw-gradient-to:rgba(17,24,39,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:to-dark-tremor-background){--tw-gradient-to:#111827 var(--tw-gradient-to-position)}:is(.dark .dark\:fill-dark-tremor-content){fill:#6b7280}:is(.dark .dark\:fill-dark-tremor-content-emphasis){fill:#e5e7eb}:is(.dark .dark\:stroke-dark-tremor-background){stroke:#111827}:is(.dark .dark\:stroke-dark-tremor-border){stroke:#374151}:is(.dark .dark\:stroke-dark-tremor-brand){stroke:#6366f1}:is(.dark .dark\:stroke-dark-tremor-brand-muted){stroke:#1e1b4b}:is(.dark .dark\:text-dark-tremor-brand){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}:is(.dark .dark\:text-dark-tremor-brand-emphasis){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}:is(.dark .dark\:text-dark-tremor-brand-inverted){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}:is(.dark .dark\:text-dark-tremor-content){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:text-dark-tremor-content-emphasis){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:text-dark-tremor-content-strong){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}:is(.dark .dark\:text-dark-tremor-content-subtle){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:accent-dark-tremor-brand){accent-color:#6366f1}:is(.dark .dark\:opacity-25){opacity:.25}:is(.dark .dark\:shadow-dark-tremor-card){--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-dark-tremor-dropdown){--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-dark-tremor-input){--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:outline-dark-tremor-brand){outline-color:#6366f1}:is(.dark .dark\:ring-dark-tremor-brand-inverted){--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity))}:is(.dark .dark\:ring-dark-tremor-brand-muted){--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity))}:is(.dark .dark\:ring-dark-tremor-ring){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity))}:is(.dark .dark\:placeholder\:text-dark-tremor-content)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-dark-tremor-content)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-dark-tremor-content-subtle)::-moz-placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-dark-tremor-content-subtle)::placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-tremor-content)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-tremor-content)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-tremor-content-subtle)::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:placeholder\:text-tremor-content-subtle)::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:hover\:border-dark-tremor-brand-emphasis:hover){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-dark-tremor-content-emphasis:hover){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}:is(.dark .dark\:hover\:bg-dark-tremor-background-muted:hover){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-dark-tremor-background-subtle:hover){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-dark-tremor-brand-emphasis:hover){--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-dark-tremor-brand-faint:hover){--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-opacity-20:hover){--tw-bg-opacity:0.2}:is(.dark .dark\:hover\:text-dark-tremor-brand-emphasis:hover){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-dark-tremor-content:hover){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-dark-tremor-content-emphasis:hover){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-tremor-content:hover){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-tremor-content-emphasis:hover){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}:is(.dark .hover\:dark\:text-dark-tremor-content):hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\:focus\:border-dark-tremor-brand-subtle:focus){--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}:is(.dark .focus\:dark\:border-dark-tremor-brand-subtle):focus{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity))}:is(.dark .dark\:focus\:ring-dark-tremor-brand-muted:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity))}:is(.dark .focus\:dark\:ring-dark-tremor-brand-muted):focus{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity))}:is(.dark .group:hover .dark\:group-hover\:text-dark-tremor-content-emphasis){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .aria-selected\:dark\:\!bg-dark-tremor-background-subtle)[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(31 41 55/var(--tw-bg-opacity))!important}:is(.dark .dark\:aria-selected\:bg-dark-tremor-background-emphasis[aria-selected=true]){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}:is(.dark .dark\:aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity))}:is(.dark .dark\:aria-selected\:text-dark-tremor-content-inverted[aria-selected=true]){--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity))}:is(.dark .dark\:ui-selected\:border-dark-tremor-border[data-headlessui-state~=selected]){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:ui-selected\:border-dark-tremor-brand[data-headlessui-state~=selected]){--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}:is(.dark .dark\:ui-selected\:bg-dark-tremor-background[data-headlessui-state~=selected]){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .dark\:ui-selected\:bg-dark-tremor-background-muted[data-headlessui-state~=selected]){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity))}:is(.dark .dark\:ui-selected\:text-dark-tremor-brand[data-headlessui-state~=selected]){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}:is(.dark .dark\:ui-selected\:text-dark-tremor-content-emphasis[data-headlessui-state~=selected]){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:ui-selected\:text-dark-tremor-content-strong[data-headlessui-state~=selected]){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}:is(.dark .dark\:ui-selected\:shadow-dark-tremor-input[data-headlessui-state~=selected]){--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:border-dark-tremor-border){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:border-dark-tremor-brand){--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:bg-dark-tremor-background){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:bg-dark-tremor-background-muted){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:text-dark-tremor-brand){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:text-dark-tremor-content-emphasis){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:text-dark-tremor-content-strong){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}:is(.dark :where([data-headlessui-state~=selected]) .dark\:ui-selected\:shadow-dark-tremor-input){--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:ui-active\:bg-dark-tremor-background-muted[data-headlessui-state~=active]){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity))}:is(.dark .dark\:ui-active\:text-dark-tremor-content-strong[data-headlessui-state~=active]){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}:is(.dark :where([data-headlessui-state~=active]) .dark\:ui-active\:bg-dark-tremor-background-muted){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity))}:is(.dark :where([data-headlessui-state~=active]) .dark\:ui-active\:text-dark-tremor-content-strong){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}@media (min-width:640px){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-10{grid-column:span 10/span 10}.sm\:col-span-11{grid-column:span 11/span 11}.sm\:col-span-12{grid-column:span 12/span 12}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:col-span-5{grid-column:span 5/span 5}.sm\:col-span-6{grid-column:span 6/span 6}.sm\:col-span-7{grid-column:span 7/span 7}.sm\:col-span-8{grid-column:span 8/span 8}.sm\:col-span-9{grid-column:span 9/span 9}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:flex{display:flex}.sm\:h-screen{height:100vh}.sm\:w-full{width:100%}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-lg{max-width:32rem}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.sm\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.sm\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.sm\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.sm\:grid-cols-none{grid-template-columns:none}.sm\:flex-row{flex-direction:row}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}}@media (min-width:768px){.md\:col-span-1{grid-column:span 1/span 1}.md\:col-span-10{grid-column:span 10/span 10}.md\:col-span-11{grid-column:span 11/span 11}.md\:col-span-12{grid-column:span 12/span 12}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-3{grid-column:span 3/span 3}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-5{grid-column:span 5/span 5}.md\:col-span-6{grid-column:span 6/span 6}.md\:col-span-7{grid-column:span 7/span 7}.md\:col-span-8{grid-column:span 8/span 8}.md\:col-span-9{grid-column:span 9/span 9}.md\:w-auto{width:auto}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.md\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.md\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.md\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.md\:grid-cols-none{grid-template-columns:none}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-10{grid-column:span 10/span 10}.lg\:col-span-11{grid-column:span 11/span 11}.lg\:col-span-12{grid-column:span 12/span 12}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:col-span-9{grid-column:span 9/span 9}.lg\:max-w-\[200px\]{max-width:200px}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.lg\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.lg\:grid-cols-none{grid-template-columns:none}}@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button,.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&_td\]\:py-0\.5 td{padding-top:.125rem;padding-bottom:.125rem}.\[\&_th\]\:py-1 th{padding-top:.25rem;padding-bottom:.25rem}
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/css/86f6cc749f6b8493.css b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/css/86f6cc749f6b8493.css new file mode 100644 index 00000000..ab8525ac --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/css/86f6cc749f6b8493.css @@ -0,0 +1 @@ +@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/55c55f0601d81cf3-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/26a46d62cd723877-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/97e0cb1ae144a2a9-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/581909926a08bbc8-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/df0a9ae256c0569c-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/6d93bde91c0c2823-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:__Inter_cf7686;font-style:normal;font-weight:100 900;font-display:swap;src:url(/ui/_next/static/media/a34f9d1faa5f3315-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:__Inter_Fallback_cf7686;src:local("Arial");ascent-override:90.49%;descent-override:22.56%;line-gap-override:0.00%;size-adjust:107.06%}.__className_cf7686{font-family:__Inter_cf7686,__Inter_Fallback_cf7686;font-style:normal}
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/26a46d62cd723877-s.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/26a46d62cd723877-s.woff2 Binary files differnew file mode 100644 index 00000000..3a27e632 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/26a46d62cd723877-s.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/55c55f0601d81cf3-s.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/55c55f0601d81cf3-s.woff2 Binary files differnew file mode 100644 index 00000000..bcf38fd1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/55c55f0601d81cf3-s.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/581909926a08bbc8-s.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/581909926a08bbc8-s.woff2 Binary files differnew file mode 100644 index 00000000..b419d430 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/581909926a08bbc8-s.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/6d93bde91c0c2823-s.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/6d93bde91c0c2823-s.woff2 Binary files differnew file mode 100644 index 00000000..47b01cc0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/6d93bde91c0c2823-s.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/97e0cb1ae144a2a9-s.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/97e0cb1ae144a2a9-s.woff2 Binary files differnew file mode 100644 index 00000000..7fdf0b94 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/97e0cb1ae144a2a9-s.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/a34f9d1faa5f3315-s.p.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/a34f9d1faa5f3315-s.p.woff2 Binary files differnew file mode 100644 index 00000000..0d91b7ab --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/a34f9d1faa5f3315-s.p.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/df0a9ae256c0569c-s.woff2 b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/df0a9ae256c0569c-s.woff2 Binary files differnew file mode 100644 index 00000000..072229b8 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/_next/static/media/df0a9ae256c0569c-s.woff2 diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/favicon.ico b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/favicon.ico Binary files differnew file mode 100644 index 00000000..88caa2b8 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/favicon.ico diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/index.html b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/index.html new file mode 100644 index 00000000..b26548f6 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/ui/_next/static/chunks/webpack-75a5453f51d60261.js"/><script src="/ui/_next/static/chunks/fd9d1056-524b80e1a6b8bb06.js" async=""></script><script src="/ui/_next/static/chunks/117-883150efc583d711.js" async=""></script><script src="/ui/_next/static/chunks/main-app-475d6efe4080647d.js" async=""></script><title>LiteLLM Dashboard</title><meta name="description" content="LiteLLM Proxy Admin UI"/><link rel="icon" href="/ui/favicon.ico" type="image/x-icon" sizes="16x16"/><meta name="next-size-adjust"/><script src="/ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><script src="/ui/_next/static/chunks/webpack-75a5453f51d60261.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/ui/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/ui/_next/static/css/86f6cc749f6b8493.css\",\"style\"]\n3:HL[\"/ui/_next/static/css/169f9187db1ec37e.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[12846,[],\"\"]\n6:I[19107,[],\"ClientPageRoot\"]\n7:I[14164,[\"665\",\"static/chunks/3014691f-0b72c78cfebbd712.js\",\"990\",\"static/chunks/13b76428-ebdf3012af0e4489.js\",\"42\",\"static/chunks/42-1cbed529ecb084e0.js\",\"261\",\"static/chunks/261-57d48f76eec1e568.js\",\"899\",\"static/chunks/899-9af4feaf6f21839c.js\",\"394\",\"static/chunks/394-0222ddf4d701e0b4.js\",\"250\",\"static/chunks/250-a75ee9d79f1140b0.js\",\"699\",\"static/chunks/699-2a1c30f260f44c15.js\",\"931\",\"static/chunks/app/page-75d771fb848b47a8.js\"],\"default\",1]\n8:I[4707,[],\"\"]\n9:I[36423,[],\"\"]\nb:I[61060,[],\"\"]\nc:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L4\",null,{\"buildId\":\"9yIyUkG6nV2cO0gn7kJ-Q\",\"assetPrefix\":\"/ui\",\"urlParts\":[\"\",\"\"],\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}],null],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ui/_next/static/css/86f6cc749f6b8493.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/ui/_next/static/css/169f9187db1ec37e.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_cf7686\",\"children\":[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$La\"],\"globalErrorComponent\":\"$b\",\"missingSlots\":\"$Wc\"}]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"LiteLLM Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"LiteLLM Proxy Admin UI\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/ui/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"meta\",\"5\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/index.txt b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/index.txt new file mode 100644 index 00000000..52e1dc04 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/index.txt @@ -0,0 +1,7 @@ +2:I[19107,[],"ClientPageRoot"] +3:I[14164,["665","static/chunks/3014691f-0b72c78cfebbd712.js","990","static/chunks/13b76428-ebdf3012af0e4489.js","42","static/chunks/42-1cbed529ecb084e0.js","261","static/chunks/261-57d48f76eec1e568.js","899","static/chunks/899-9af4feaf6f21839c.js","394","static/chunks/394-0222ddf4d701e0b4.js","250","static/chunks/250-a75ee9d79f1140b0.js","699","static/chunks/699-2a1c30f260f44c15.js","931","static/chunks/app/page-75d771fb848b47a8.js"],"default",1] +4:I[4707,[],""] +5:I[36423,[],""] +0:["9yIyUkG6nV2cO0gn7kJ-Q",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/ui/_next/static/css/86f6cc749f6b8493.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/ui/_next/static/css/169f9187db1ec37e.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_cf7686","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]] +6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"LiteLLM Dashboard"}],["$","meta","3",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","4",{"rel":"icon","href":"/ui/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] +1:null diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/model_hub.txt b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/model_hub.txt new file mode 100644 index 00000000..30811ef3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/model_hub.txt @@ -0,0 +1,7 @@ +2:I[19107,[],"ClientPageRoot"] +3:I[52829,["42","static/chunks/42-1cbed529ecb084e0.js","261","static/chunks/261-57d48f76eec1e568.js","250","static/chunks/250-a75ee9d79f1140b0.js","699","static/chunks/699-2a1c30f260f44c15.js","418","static/chunks/app/model_hub/page-068a441595bd0fc3.js"],"default",1] +4:I[4707,[],""] +5:I[36423,[],""] +0:["9yIyUkG6nV2cO0gn7kJ-Q",[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["model_hub",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","model_hub","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/ui/_next/static/css/86f6cc749f6b8493.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/ui/_next/static/css/169f9187db1ec37e.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_cf7686","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]] +6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"LiteLLM Dashboard"}],["$","meta","3",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","4",{"rel":"icon","href":"/ui/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] +1:null diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/next.svg b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/next.svg new file mode 100644 index 00000000..5174b28c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/next.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/onboarding.txt b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/onboarding.txt new file mode 100644 index 00000000..b92be5ba --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/onboarding.txt @@ -0,0 +1,7 @@ +2:I[19107,[],"ClientPageRoot"] +3:I[12011,["665","static/chunks/3014691f-0b72c78cfebbd712.js","42","static/chunks/42-1cbed529ecb084e0.js","899","static/chunks/899-9af4feaf6f21839c.js","250","static/chunks/250-a75ee9d79f1140b0.js","461","static/chunks/app/onboarding/page-1ffe69692e4b2037.js"],"default",1] +4:I[4707,[],""] +5:I[36423,[],""] +0:["9yIyUkG6nV2cO0gn7kJ-Q",[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["onboarding",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","onboarding","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/ui/_next/static/css/86f6cc749f6b8493.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/ui/_next/static/css/169f9187db1ec37e.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_cf7686","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]] +6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"LiteLLM Dashboard"}],["$","meta","3",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","4",{"rel":"icon","href":"/ui/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] +1:null diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/vercel.svg b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/vercel.svg new file mode 100644 index 00000000..d2f84222 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/out/vercel.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/post_call_rules.py b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/post_call_rules.py new file mode 100644 index 00000000..d5cbe31f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_experimental/post_call_rules.py @@ -0,0 +1,4 @@ +def my_custom_rule(input): # receives the model response + # if len(input) < 5: # trigger fallback if the model response is too short + return False + return True diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_logging.py b/.venv/lib/python3.12/site-packages/litellm/proxy/_logging.py new file mode 100644 index 00000000..dc6b34fd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_logging.py @@ -0,0 +1,40 @@ +### DEPRECATED ### +## unused file. initially written for json logging on proxy. +import json +import logging +import os +from logging import Formatter + +from litellm import json_logs + +# Set default log level to INFO +log_level = os.getenv("LITELLM_LOG", "INFO") +numeric_level: str = getattr(logging, log_level.upper()) + + +class JsonFormatter(Formatter): + def __init__(self): + super(JsonFormatter, self).__init__() + + def format(self, record): + json_record = { + "message": record.getMessage(), + "level": record.levelname, + "timestamp": self.formatTime(record, self.datefmt), + } + return json.dumps(json_record) + + +logger = logging.root +handler = logging.StreamHandler() +if json_logs: + handler.setFormatter(JsonFormatter()) +else: + formatter = logging.Formatter( + "\033[92m%(asctime)s - %(name)s:%(levelname)s\033[0m: %(filename)s:%(lineno)s - %(message)s", + datefmt="%H:%M:%S", + ) + + handler.setFormatter(formatter) +logger.handlers = [handler] +logger.setLevel(numeric_level) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_new_new_secret_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/_new_new_secret_config.yaml new file mode 100644 index 00000000..7932cc20 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_new_new_secret_config.yaml @@ -0,0 +1,14 @@ +model_list: + - model_name: bedrock-claude + litellm_params: + model: bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0 + aws_region_name: us-east-1 + aws_access_key_id: os.environ/AWS_ACCESS_KEY_ID + aws_secret_access_key: os.environ/AWS_SECRET_ACCESS_KEY + +litellm_settings: + callbacks: ["datadog"] # logs llm success + failure logs on datadog + service_callback: ["datadog"] # logs redis, postgres failures on datadog + +general_settings: + store_prompts_in_spend_logs: true diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_new_secret_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/_new_secret_config.yaml new file mode 100644 index 00000000..86172ae2 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_new_secret_config.yaml @@ -0,0 +1,18 @@ +model_list: + - model_name: "gpt-3.5-turbo" + litellm_params: + model: azure/chatgpt-v-2 + api_key: os.environ/AZURE_API_KEY + api_base: http://0.0.0.0:8090 + rpm: 3 + +litellm_settings: + num_retries: 0 + +router_settings: + routing_strategy: usage-based-routing-v2 # 👈 KEY CHANGE + redis_host: os.environ/REDIS_HOST + redis_password: os.environ/REDIS_PASSWORD + redis_port: os.environ/REDIS_PORT + + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_super_secret_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/_super_secret_config.yaml new file mode 100644 index 00000000..b12d5ba0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_super_secret_config.yaml @@ -0,0 +1,110 @@ +model_list: +- model_name: claude-3-5-sonnet + litellm_params: + model: claude-3-haiku-20240307 +# - model_name: gemini-1.5-flash-gemini +# litellm_params: +# model: vertex_ai_beta/gemini-1.5-flash +# api_base: https://gateway.ai.cloudflare.com/v1/fa4cdcab1f32b95ca3b53fd36043d691/test/google-vertex-ai/v1/projects/adroit-crow-413218/locations/us-central1/publishers/google/models/gemini-1.5-flash +- litellm_params: + api_base: http://0.0.0.0:8080 + api_key: '' + model: gpt-4o + rpm: 800 + input_cost_per_token: 300 + model_name: gpt-4o +- model_name: llama3-70b-8192 + litellm_params: + model: groq/llama3-70b-8192 +- model_name: fake-openai-endpoint + litellm_params: + model: predibase/llama-3-8b-instruct + api_key: os.environ/PREDIBASE_API_KEY + tenant_id: os.environ/PREDIBASE_TENANT_ID + max_new_tokens: 256 +# - litellm_params: +# api_base: https://my-endpoint-europe-berri-992.openai.azure.com/ +# api_key: os.environ/AZURE_EUROPE_API_KEY +# model: azure/gpt-35-turbo +# rpm: 10 +# model_name: gpt-3.5-turbo-fake-model +- litellm_params: + api_base: https://openai-gpt-4-test-v-1.openai.azure.com + api_key: os.environ/AZURE_API_KEY + api_version: 2024-02-15-preview + model: azure/chatgpt-v-2 + tpm: 100 + model_name: gpt-3.5-turbo +- litellm_params: + model: anthropic.claude-3-sonnet-20240229-v1:0 + model_name: bedrock-anthropic-claude-3 +- litellm_params: + model: claude-3-haiku-20240307 + model_name: anthropic-claude-3 +- litellm_params: + api_base: https://openai-gpt-4-test-v-1.openai.azure.com/ + api_key: os.environ/AZURE_API_KEY + api_version: 2024-02-15-preview + model: azure/chatgpt-v-2 + drop_params: True + tpm: 100 + model_name: gpt-3.5-turbo +- model_name: tts + litellm_params: + model: openai/tts-1 +- model_name: gpt-4-turbo-preview + litellm_params: + api_base: https://openai-france-1234.openai.azure.com + api_key: os.environ/AZURE_FRANCE_API_KEY + api_version: 2024-02-15-preview + model: azure/gpt-turbo +- model_name: text-embedding + litellm_params: + model: textembedding-gecko-multilingual@001 + vertex_project: my-project-9d5c + vertex_location: us-central1 +- model_name: lbl/command-r-plus + litellm_params: + model: openai/lbl/command-r-plus + api_key: "os.environ/VLLM_API_KEY" + api_base: http://vllm-command:8000/v1 + rpm: 1000 + input_cost_per_token: 0 + output_cost_per_token: 0 + model_info: + max_input_tokens: 80920 + +# litellm_settings: +# callbacks: ["dynamic_rate_limiter"] +# # success_callback: ["langfuse"] +# # failure_callback: ["langfuse"] +# # default_team_settings: +# # - team_id: proj1 +# # success_callback: ["langfuse"] +# # langfuse_public_key: pk-lf-a65841e9-5192-4397-a679-cfff029fd5b0 +# # langfuse_secret: sk-lf-d58c2891-3717-4f98-89dd-df44826215fd +# # langfuse_host: https://us.cloud.langfuse.com +# # - team_id: proj2 +# # success_callback: ["langfuse"] +# # langfuse_public_key: pk-lf-3d789fd1-f49f-4e73-a7d9-1b4e11acbf9a +# # langfuse_secret: sk-lf-11b13aca-b0d4-4cde-9d54-721479dace6d +# # langfuse_host: https://us.cloud.langfuse.com + +assistant_settings: + custom_llm_provider: openai + litellm_params: + api_key: os.environ/OPENAI_API_KEY + + +router_settings: + enable_pre_call_checks: true + + +litellm_settings: + callbacks: ["s3"] + +# general_settings: +# # alerting: ["slack"] +# enable_jwt_auth: True +# litellm_jwtauth: +# team_id_jwt_field: "client_id"
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/_types.py b/.venv/lib/python3.12/site-packages/litellm/proxy/_types.py new file mode 100644 index 00000000..255e3718 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/_types.py @@ -0,0 +1,2648 @@ +import enum +import json +import uuid +from datetime import datetime +from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Union + +import httpx +from pydantic import ( + BaseModel, + ConfigDict, + Field, + Json, + field_validator, + model_validator, +) +from typing_extensions import Required, TypedDict + +from litellm.types.integrations.slack_alerting import AlertType +from litellm.types.llms.openai import AllMessageValues +from litellm.types.router import RouterErrors, UpdateRouterConfig +from litellm.types.utils import ( + CallTypes, + EmbeddingResponse, + GenericBudgetConfigType, + ImageResponse, + LiteLLMPydanticObjectBase, + ModelResponse, + ProviderField, + StandardCallbackDynamicParams, + StandardLoggingPayloadErrorInformation, + StandardLoggingPayloadStatus, + StandardPassThroughResponseObject, + TextCompletionResponse, +) + +from .types_utils.utils import get_instance_fn, validate_custom_validate_return_type + +if TYPE_CHECKING: + from opentelemetry.trace import Span as _Span + + Span = _Span +else: + Span = Any + + +class LiteLLMTeamRoles(enum.Enum): + # team admin + TEAM_ADMIN = "admin" + # team member + TEAM_MEMBER = "user" + + +class LitellmUserRoles(str, enum.Enum): + """ + Admin Roles: + PROXY_ADMIN: admin over the platform + PROXY_ADMIN_VIEW_ONLY: can login, view all own keys, view all spend + ORG_ADMIN: admin over a specific organization, can create teams, users only within their organization + + Internal User Roles: + INTERNAL_USER: can login, view/create/delete their own keys, view their spend + INTERNAL_USER_VIEW_ONLY: can login, view their own keys, view their own spend + + + Team Roles: + TEAM: used for JWT auth + + + Customer Roles: + CUSTOMER: External users -> these are customers + + """ + + # Admin Roles + PROXY_ADMIN = "proxy_admin" + PROXY_ADMIN_VIEW_ONLY = "proxy_admin_viewer" + + # Organization admins + ORG_ADMIN = "org_admin" + + # Internal User Roles + INTERNAL_USER = "internal_user" + INTERNAL_USER_VIEW_ONLY = "internal_user_viewer" + + # Team Roles + TEAM = "team" + + # Customer Roles - External users of proxy + CUSTOMER = "customer" + + def __str__(self): + return str(self.value) + + def values(self) -> List[str]: + return list(self.__annotations__.keys()) + + @property + def description(self): + """ + Descriptions for the enum values + """ + descriptions = { + "proxy_admin": "admin over litellm proxy, has all permissions", + "proxy_admin_viewer": "view all keys, view all spend", + "internal_user": "view/create/delete their own keys, view their own spend", + "internal_user_viewer": "view their own keys, view their own spend", + "team": "team scope used for JWT auth", + "customer": "customer", + } + return descriptions.get(self.value, "") + + @property + def ui_label(self): + """ + UI labels for the enum values + """ + ui_labels = { + "proxy_admin": "Admin (All Permissions)", + "proxy_admin_viewer": "Admin (View Only)", + "internal_user": "Internal User (Create/Delete/View)", + "internal_user_viewer": "Internal User (View Only)", + "team": "Team", + "customer": "Customer", + } + return ui_labels.get(self.value, "") + + @property + def is_internal_user_role(self) -> bool: + """returns true if this role is an `internal_user` or `internal_user_viewer` role""" + return self.value in [ + self.INTERNAL_USER, + self.INTERNAL_USER_VIEW_ONLY, + ] + + +class LitellmTableNames(str, enum.Enum): + """ + Enum for Table Names used by LiteLLM + """ + + TEAM_TABLE_NAME = "LiteLLM_TeamTable" + USER_TABLE_NAME = "LiteLLM_UserTable" + KEY_TABLE_NAME = "LiteLLM_VerificationToken" + PROXY_MODEL_TABLE_NAME = "LiteLLM_ProxyModelTable" + + +def hash_token(token: str): + import hashlib + + # Hash the string using SHA-256 + hashed_token = hashlib.sha256(token.encode()).hexdigest() + + return hashed_token + + +class LiteLLM_UpperboundKeyGenerateParams(LiteLLMPydanticObjectBase): + """ + Set default upperbound to max budget a key called via `/key/generate` can be. + + Args: + max_budget (Optional[float], optional): Max budget a key can be. Defaults to None. + budget_duration (Optional[str], optional): Duration of the budget. Defaults to None. + duration (Optional[str], optional): Duration of the key. Defaults to None. + max_parallel_requests (Optional[int], optional): Max number of requests that can be made in parallel. Defaults to None. + tpm_limit (Optional[int], optional): Tpm limit. Defaults to None. + rpm_limit (Optional[int], optional): Rpm limit. Defaults to None. + """ + + max_budget: Optional[float] = None + budget_duration: Optional[str] = None + duration: Optional[str] = None + max_parallel_requests: Optional[int] = None + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + + +class LiteLLMRoutes(enum.Enum): + openai_route_names = [ + "chat_completion", + "completion", + "embeddings", + "image_generation", + "audio_transcriptions", + "moderations", + "model_list", # OpenAI /v1/models route + ] + openai_routes = [ + # chat completions + "/engines/{model}/chat/completions", + "/openai/deployments/{model}/chat/completions", + "/chat/completions", + "/v1/chat/completions", + # completions + "/engines/{model}/completions", + "/openai/deployments/{model}/completions", + "/completions", + "/v1/completions", + # embeddings + "/engines/{model}/embeddings", + "/openai/deployments/{model}/embeddings", + "/embeddings", + "/v1/embeddings", + # image generation + "/images/generations", + "/v1/images/generations", + # audio transcription + "/audio/transcriptions", + "/v1/audio/transcriptions", + # audio Speech + "/audio/speech", + "/v1/audio/speech", + # moderations + "/moderations", + "/v1/moderations", + # batches + "/v1/batches", + "/batches", + "/v1/batches/{batch_id}", + "/batches/{batch_id}", + # files + "/v1/files", + "/files", + "/v1/files/{file_id}", + "/files/{file_id}", + "/v1/files/{file_id}/content", + "/files/{file_id}/content", + # fine_tuning + "/fine_tuning/jobs", + "/v1/fine_tuning/jobs", + "/fine_tuning/jobs/{fine_tuning_job_id}/cancel", + "/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel", + # assistants-related routes + "/assistants", + "/v1/assistants", + "/v1/assistants/{assistant_id}", + "/assistants/{assistant_id}", + "/threads", + "/v1/threads", + "/threads/{thread_id}", + "/v1/threads/{thread_id}", + "/threads/{thread_id}/messages", + "/v1/threads/{thread_id}/messages", + "/threads/{thread_id}/runs", + "/v1/threads/{thread_id}/runs", + # models + "/models", + "/v1/models", + # token counter + "/utils/token_counter", + # rerank + "/rerank", + "/v1/rerank", + "/v2/rerank" + # realtime + "/realtime", + "/v1/realtime", + "/realtime?{model}", + "/v1/realtime?{model}", + # responses API + "/responses", + "/v1/responses", + "/responses/{response_id}", + "/v1/responses/{response_id}", + "/responses/{response_id}/input_items", + "/v1/responses/{response_id}/input_items", + ] + + mapped_pass_through_routes = [ + "/bedrock", + "/vertex-ai", + "/vertex_ai", + "/cohere", + "/gemini", + "/anthropic", + "/langfuse", + "/azure", + "/openai", + "/assemblyai", + "/eu.assemblyai", + ] + + anthropic_routes = [ + "/v1/messages", + ] + + info_routes = [ + "/key/info", + "/key/health", + "/team/info", + "/team/list", + "/organization/list", + "/team/available", + "/user/info", + "/model/info", + "/v2/model/info", + "/v2/key/info", + "/model_group/info", + "/health", + "/key/list", + "/user/filter/ui", + ] + + # NOTE: ROUTES ONLY FOR MASTER KEY - only the Master Key should be able to Reset Spend + master_key_only_routes = ["/global/spend/reset"] + + management_routes = [ # key + "/key/generate", + "/key/{token_id}/regenerate", + "/key/update", + "/key/delete", + "/key/info", + "/key/health", + "/key/list", + # user + "/user/new", + "/user/update", + "/user/delete", + "/user/info", + # team + "/team/new", + "/team/update", + "/team/delete", + "/team/list", + "/team/info", + "/team/block", + "/team/unblock", + "/team/available", + # model + "/model/new", + "/model/update", + "/model/delete", + "/model/info", + ] + + spend_tracking_routes = [ + # spend + "/spend/keys", + "/spend/users", + "/spend/tags", + "/spend/calculate", + "/spend/logs", + ] + + global_spend_tracking_routes = [ + # global spend + "/global/spend/logs", + "/global/spend", + "/global/spend/keys", + "/global/spend/teams", + "/global/spend/end_users", + "/global/spend/models", + "/global/predict/spend/logs", + "/global/spend/report", + "/global/spend/provider", + ] + + public_routes = set( + [ + "/routes", + "/", + "/health/liveliness", + "/health/liveness", + "/health/readiness", + "/test", + "/config/yaml", + "/metrics", + ] + ) + + ui_routes = [ + "/sso", + "/sso/get/ui_settings", + "/login", + "/key/info", + "/config", + "/spend", + "/model/info", + "/v2/model/info", + "/v2/key/info", + "/models", + "/v1/models", + "/global/spend", + "/global/spend/logs", + "/global/spend/keys", + "/global/spend/models", + "/global/predict/spend/logs", + "/global/activity", + "/health/services", + ] + info_routes + + internal_user_routes = [ + "/key/generate", + "/key/{token_id}/regenerate", + "/key/update", + "/key/delete", + "/key/health", + "/key/info", + "/global/spend/tags", + "/global/spend/keys", + "/global/spend/models", + "/global/spend/provider", + "/global/spend/end_users", + "/global/activity", + "/global/activity/model", + ] + spend_tracking_routes + + internal_user_view_only_routes = ( + spend_tracking_routes + global_spend_tracking_routes + ) + + self_managed_routes = [ + "/team/member_add", + "/team/member_delete", + "/model/new", + ] # routes that manage their own allowed/disallowed logic + + ## Org Admin Routes ## + + # Routes only an Org Admin Can Access + org_admin_only_routes = [ + "/organization/info", + "/organization/delete", + "/organization/member_add", + "/organization/member_update", + ] + + # All routes accesible by an Org Admin + org_admin_allowed_routes = ( + org_admin_only_routes + management_routes + self_managed_routes + ) + + +class LiteLLMPromptInjectionParams(LiteLLMPydanticObjectBase): + heuristics_check: bool = False + vector_db_check: bool = False + llm_api_check: bool = False + llm_api_name: Optional[str] = None + llm_api_system_prompt: Optional[str] = None + llm_api_fail_call_string: Optional[str] = None + reject_as_response: Optional[bool] = Field( + default=False, + description="Return rejected request error message as a string to the user. Default behaviour is to raise an exception.", + ) + + @model_validator(mode="before") + @classmethod + def check_llm_api_params(cls, values): + llm_api_check = values.get("llm_api_check") + if llm_api_check is True: + if "llm_api_name" not in values or not values["llm_api_name"]: + raise ValueError( + "If llm_api_check is set to True, llm_api_name must be provided" + ) + if ( + "llm_api_system_prompt" not in values + or not values["llm_api_system_prompt"] + ): + raise ValueError( + "If llm_api_check is set to True, llm_api_system_prompt must be provided" + ) + if ( + "llm_api_fail_call_string" not in values + or not values["llm_api_fail_call_string"] + ): + raise ValueError( + "If llm_api_check is set to True, llm_api_fail_call_string must be provided" + ) + return values + + +######### Request Class Definition ###### +class ProxyChatCompletionRequest(LiteLLMPydanticObjectBase): + model: str + messages: List[Dict[str, str]] + temperature: Optional[float] = None + top_p: Optional[float] = None + n: Optional[int] = None + stream: Optional[bool] = None + stop: Optional[List[str]] = None + max_tokens: Optional[int] = None + presence_penalty: Optional[float] = None + frequency_penalty: Optional[float] = None + logit_bias: Optional[Dict[str, float]] = None + user: Optional[str] = None + response_format: Optional[Dict[str, str]] = None + seed: Optional[int] = None + tools: Optional[List[str]] = None + tool_choice: Optional[str] = None + functions: Optional[List[str]] = None # soon to be deprecated + function_call: Optional[str] = None # soon to be deprecated + + # Optional LiteLLM params + caching: Optional[bool] = None + api_base: Optional[str] = None + api_version: Optional[str] = None + api_key: Optional[str] = None + num_retries: Optional[int] = None + context_window_fallback_dict: Optional[Dict[str, str]] = None + fallbacks: Optional[List[str]] = None + metadata: Optional[Dict[str, str]] = {} + deployment_id: Optional[str] = None + request_timeout: Optional[int] = None + + model_config = ConfigDict( + extra="allow" + ) # allow params not defined here, these fall in litellm.completion(**kwargs) + + +class ModelInfoDelete(LiteLLMPydanticObjectBase): + id: str + + +class ModelInfo(LiteLLMPydanticObjectBase): + id: Optional[str] + mode: Optional[Literal["embedding", "chat", "completion"]] + input_cost_per_token: Optional[float] = 0.0 + output_cost_per_token: Optional[float] = 0.0 + max_tokens: Optional[int] = 2048 # assume 2048 if not set + + # for azure models we need users to specify the base model, one azure you can call deployments - azure/my-random-model + # we look up the base model in model_prices_and_context_window.json + base_model: Optional[ + Literal[ + "gpt-4-1106-preview", + "gpt-4-32k", + "gpt-4", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo", + "text-embedding-ada-002", + ] + ] + + model_config = ConfigDict(protected_namespaces=(), extra="allow") + + @model_validator(mode="before") + @classmethod + def set_model_info(cls, values): + if values.get("id") is None: + values.update({"id": str(uuid.uuid4())}) + if values.get("mode") is None: + values.update({"mode": None}) + if values.get("input_cost_per_token") is None: + values.update({"input_cost_per_token": None}) + if values.get("output_cost_per_token") is None: + values.update({"output_cost_per_token": None}) + if values.get("max_tokens") is None: + values.update({"max_tokens": None}) + if values.get("base_model") is None: + values.update({"base_model": None}) + return values + + +class ProviderInfo(LiteLLMPydanticObjectBase): + name: str + fields: List[ProviderField] + + +class BlockUsers(LiteLLMPydanticObjectBase): + user_ids: List[str] # required + + +class ModelParams(LiteLLMPydanticObjectBase): + model_name: str + litellm_params: dict + model_info: ModelInfo + + model_config = ConfigDict(protected_namespaces=()) + + @model_validator(mode="before") + @classmethod + def set_model_info(cls, values): + if values.get("model_info") is None: + values.update( + {"model_info": ModelInfo(id=None, mode="chat", base_model=None)} + ) + return values + + +class GenerateRequestBase(LiteLLMPydanticObjectBase): + """ + Overlapping schema between key and user generate/update requests + """ + + key_alias: Optional[str] = None + duration: Optional[str] = None + models: Optional[list] = [] + spend: Optional[float] = 0 + max_budget: Optional[float] = None + user_id: Optional[str] = None + team_id: Optional[str] = None + max_parallel_requests: Optional[int] = None + metadata: Optional[dict] = {} + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + budget_duration: Optional[str] = None + allowed_cache_controls: Optional[list] = [] + config: Optional[dict] = {} + permissions: Optional[dict] = {} + model_max_budget: Optional[dict] = ( + {} + ) # {"gpt-4": 5.0, "gpt-3.5-turbo": 5.0}, defaults to {} + + model_config = ConfigDict(protected_namespaces=()) + model_rpm_limit: Optional[dict] = None + model_tpm_limit: Optional[dict] = None + guardrails: Optional[List[str]] = None + blocked: Optional[bool] = None + aliases: Optional[dict] = {} + + +class KeyRequestBase(GenerateRequestBase): + key: Optional[str] = None + budget_id: Optional[str] = None + tags: Optional[List[str]] = None + enforced_params: Optional[List[str]] = None + + +class GenerateKeyRequest(KeyRequestBase): + soft_budget: Optional[float] = None + send_invite_email: Optional[bool] = None + + +class GenerateKeyResponse(KeyRequestBase): + key: str # type: ignore + key_name: Optional[str] = None + expires: Optional[datetime] + user_id: Optional[str] = None + token_id: Optional[str] = None + litellm_budget_table: Optional[Any] = None + token: Optional[str] = None + created_by: Optional[str] = None + updated_by: Optional[str] = None + + @model_validator(mode="before") + @classmethod + def set_model_info(cls, values): + if values.get("token") is not None: + values.update({"key": values.get("token")}) + dict_fields = [ + "metadata", + "aliases", + "config", + "permissions", + "model_max_budget", + ] + for field in dict_fields: + value = values.get(field) + if value is not None and isinstance(value, str): + try: + values[field] = json.loads(value) + except json.JSONDecodeError: + raise ValueError(f"Field {field} should be a valid dictionary") + + return values + + +class UpdateKeyRequest(KeyRequestBase): + # Note: the defaults of all Params here MUST BE NONE + # else they will get overwritten + key: str # type: ignore + duration: Optional[str] = None + spend: Optional[float] = None + metadata: Optional[dict] = None + temp_budget_increase: Optional[float] = None + temp_budget_expiry: Optional[datetime] = None + + @model_validator(mode="after") + def validate_temp_budget(self) -> "UpdateKeyRequest": + if self.temp_budget_increase is not None or self.temp_budget_expiry is not None: + if self.temp_budget_increase is None or self.temp_budget_expiry is None: + raise ValueError( + "temp_budget_increase and temp_budget_expiry must be set together" + ) + return self + + +class RegenerateKeyRequest(GenerateKeyRequest): + # This needs to be different from UpdateKeyRequest, because "key" is optional for this + key: Optional[str] = None + duration: Optional[str] = None + spend: Optional[float] = None + metadata: Optional[dict] = None + new_master_key: Optional[str] = None + + +class KeyRequest(LiteLLMPydanticObjectBase): + keys: Optional[List[str]] = None + key_aliases: Optional[List[str]] = None + + @model_validator(mode="before") + @classmethod + def validate_at_least_one(cls, values): + if not values.get("keys") and not values.get("key_aliases"): + raise ValueError( + "At least one of 'keys' or 'key_aliases' must be provided." + ) + return values + + +class LiteLLM_ModelTable(LiteLLMPydanticObjectBase): + model_aliases: Optional[Union[str, dict]] = None # json dump the dict + created_by: str + updated_by: str + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_ProxyModelTable(LiteLLMPydanticObjectBase): + model_id: str + model_name: str + litellm_params: dict + model_info: dict + created_by: str + updated_by: str + + @model_validator(mode="before") + @classmethod + def check_potential_json_str(cls, values): + if isinstance(values.get("litellm_params"), str): + try: + values["litellm_params"] = json.loads(values["litellm_params"]) + except json.JSONDecodeError: + pass + if isinstance(values.get("model_info"), str): + try: + values["model_info"] = json.loads(values["model_info"]) + except json.JSONDecodeError: + pass + return values + + +class NewUserRequest(GenerateRequestBase): + max_budget: Optional[float] = None + user_email: Optional[str] = None + user_alias: Optional[str] = None + user_role: Optional[ + Literal[ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + ] + ] = None + teams: Optional[list] = None + auto_create_key: bool = ( + True # flag used for returning a key as part of the /user/new response + ) + send_invite_email: Optional[bool] = None + + +class NewUserResponse(GenerateKeyResponse): + max_budget: Optional[float] = None + user_email: Optional[str] = None + user_role: Optional[ + Literal[ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + ] + ] = None + teams: Optional[list] = None + user_alias: Optional[str] = None + model_max_budget: Optional[dict] = None + + +class UpdateUserRequest(GenerateRequestBase): + # Note: the defaults of all Params here MUST BE NONE + # else they will get overwritten + user_id: Optional[str] = None + password: Optional[str] = None + user_email: Optional[str] = None + spend: Optional[float] = None + metadata: Optional[dict] = None + user_role: Optional[ + Literal[ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + ] + ] = None + max_budget: Optional[float] = None + + @model_validator(mode="before") + @classmethod + def check_user_info(cls, values): + if values.get("user_id") is None and values.get("user_email") is None: + raise ValueError("Either user id or user email must be provided") + return values + + +class DeleteUserRequest(LiteLLMPydanticObjectBase): + user_ids: List[str] # required + + +AllowedModelRegion = Literal["eu", "us"] + + +class BudgetNewRequest(LiteLLMPydanticObjectBase): + budget_id: Optional[str] = Field(default=None, description="The unique budget id.") + max_budget: Optional[float] = Field( + default=None, + description="Requests will fail if this budget (in USD) is exceeded.", + ) + soft_budget: Optional[float] = Field( + default=None, + description="Requests will NOT fail if this is exceeded. Will fire alerting though.", + ) + max_parallel_requests: Optional[int] = Field( + default=None, description="Max concurrent requests allowed for this budget id." + ) + tpm_limit: Optional[int] = Field( + default=None, description="Max tokens per minute, allowed for this budget id." + ) + rpm_limit: Optional[int] = Field( + default=None, description="Max requests per minute, allowed for this budget id." + ) + budget_duration: Optional[str] = Field( + default=None, + description="Max duration budget should be set for (e.g. '1hr', '1d', '28d')", + ) + model_max_budget: Optional[GenericBudgetConfigType] = Field( + default=None, + description="Max budget for each model (e.g. {'gpt-4o': {'max_budget': '0.0000001', 'budget_duration': '1d', 'tpm_limit': 1000, 'rpm_limit': 1000}})", + ) + + +class BudgetRequest(LiteLLMPydanticObjectBase): + budgets: List[str] + + +class BudgetDeleteRequest(LiteLLMPydanticObjectBase): + id: str + + +class CustomerBase(LiteLLMPydanticObjectBase): + user_id: str + alias: Optional[str] = None + spend: float = 0.0 + allowed_model_region: Optional[AllowedModelRegion] = None + default_model: Optional[str] = None + budget_id: Optional[str] = None + litellm_budget_table: Optional[BudgetNewRequest] = None + blocked: bool = False + + +class NewCustomerRequest(BudgetNewRequest): + """ + Create a new customer, allocate a budget to them + """ + + user_id: str + alias: Optional[str] = None # human-friendly alias + blocked: bool = False # allow/disallow requests for this end-user + budget_id: Optional[str] = None # give either a budget_id or max_budget + allowed_model_region: Optional[AllowedModelRegion] = ( + None # require all user requests to use models in this specific region + ) + default_model: Optional[str] = ( + None # if no equivalent model in allowed region - default all requests to this model + ) + + @model_validator(mode="before") + @classmethod + def check_user_info(cls, values): + if values.get("max_budget") is not None and values.get("budget_id") is not None: + raise ValueError("Set either 'max_budget' or 'budget_id', not both.") + + return values + + +class UpdateCustomerRequest(LiteLLMPydanticObjectBase): + """ + Update a Customer, use this to update customer budgets etc + + """ + + user_id: str + alias: Optional[str] = None # human-friendly alias + blocked: bool = False # allow/disallow requests for this end-user + max_budget: Optional[float] = None + budget_id: Optional[str] = None # give either a budget_id or max_budget + allowed_model_region: Optional[AllowedModelRegion] = ( + None # require all user requests to use models in this specific region + ) + default_model: Optional[str] = ( + None # if no equivalent model in allowed region - default all requests to this model + ) + + +class DeleteCustomerRequest(LiteLLMPydanticObjectBase): + """ + Delete multiple Customers + """ + + user_ids: List[str] + + +class MemberBase(LiteLLMPydanticObjectBase): + user_id: Optional[str] = None + user_email: Optional[str] = None + + @model_validator(mode="before") + @classmethod + def check_user_info(cls, values): + if not isinstance(values, dict): + raise ValueError("input needs to be a dictionary") + if values.get("user_id") is None and values.get("user_email") is None: + raise ValueError("Either user id or user email must be provided") + return values + + +class Member(MemberBase): + role: Literal[ + "admin", + "user", + ] + + +class OrgMember(MemberBase): + role: Literal[ + LitellmUserRoles.ORG_ADMIN, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + ] + + +class TeamBase(LiteLLMPydanticObjectBase): + team_alias: Optional[str] = None + team_id: Optional[str] = None + organization_id: Optional[str] = None + admins: list = [] + members: list = [] + members_with_roles: List[Member] = [] + metadata: Optional[dict] = None + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + + # Budget fields + max_budget: Optional[float] = None + budget_duration: Optional[str] = None + + models: list = [] + blocked: bool = False + + +class NewTeamRequest(TeamBase): + model_aliases: Optional[dict] = None + tags: Optional[list] = None + guardrails: Optional[List[str]] = None + + model_config = ConfigDict(protected_namespaces=()) + + +class GlobalEndUsersSpend(LiteLLMPydanticObjectBase): + api_key: Optional[str] = None + startTime: Optional[datetime] = None + endTime: Optional[datetime] = None + + +class UpdateTeamRequest(LiteLLMPydanticObjectBase): + """ + UpdateTeamRequest, used by /team/update when you need to update a team + + team_id: str + team_alias: Optional[str] = None + organization_id: Optional[str] = None + metadata: Optional[dict] = None + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + max_budget: Optional[float] = None + models: Optional[list] = None + blocked: Optional[bool] = None + budget_duration: Optional[str] = None + guardrails: Optional[List[str]] = None + """ + + team_id: str # required + team_alias: Optional[str] = None + organization_id: Optional[str] = None + metadata: Optional[dict] = None + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + max_budget: Optional[float] = None + models: Optional[list] = None + blocked: Optional[bool] = None + budget_duration: Optional[str] = None + tags: Optional[list] = None + model_aliases: Optional[dict] = None + guardrails: Optional[List[str]] = None + + +class ResetTeamBudgetRequest(LiteLLMPydanticObjectBase): + """ + internal type used to reset the budget on a team + used by reset_budget() + + team_id: str + spend: float + budget_reset_at: datetime + """ + + team_id: str + spend: float + budget_reset_at: datetime + updated_at: datetime + + +class DeleteTeamRequest(LiteLLMPydanticObjectBase): + team_ids: List[str] # required + + +class BlockTeamRequest(LiteLLMPydanticObjectBase): + team_id: str # required + + +class BlockKeyRequest(LiteLLMPydanticObjectBase): + key: str # required + + +class AddTeamCallback(LiteLLMPydanticObjectBase): + callback_name: str + callback_type: Optional[Literal["success", "failure", "success_and_failure"]] = ( + "success_and_failure" + ) + callback_vars: Dict[str, str] + + @model_validator(mode="before") + @classmethod + def validate_callback_vars(cls, values): + callback_vars = values.get("callback_vars", {}) + valid_keys = set(StandardCallbackDynamicParams.__annotations__.keys()) + for key, value in callback_vars.items(): + if key not in valid_keys: + raise ValueError( + f"Invalid callback variable: {key}. Must be one of {valid_keys}" + ) + if not isinstance(value, str): + callback_vars[key] = str(value) + return values + + +class TeamCallbackMetadata(LiteLLMPydanticObjectBase): + success_callback: Optional[List[str]] = [] + failure_callback: Optional[List[str]] = [] + callbacks: Optional[List[str]] = [] + # for now - only supported for langfuse + callback_vars: Optional[Dict[str, str]] = {} + + @model_validator(mode="before") + @classmethod + def validate_callback_vars(cls, values): + success_callback = values.get("success_callback", []) + if success_callback is None: + values.pop("success_callback", None) + failure_callback = values.get("failure_callback", []) + if failure_callback is None: + values.pop("failure_callback", None) + callbacks = values.get("callbacks", []) + if callbacks is None: + values.pop("callbacks", None) + + callback_vars = values.get("callback_vars", {}) + if callback_vars is None: + values.pop("callback_vars", None) + if all(val is None for val in values.values()): + return { + "success_callback": [], + "failure_callback": [], + "callbacks": [], + "callback_vars": {}, + } + valid_keys = set(StandardCallbackDynamicParams.__annotations__.keys()) + if callback_vars is not None: + for key in callback_vars: + if key not in valid_keys: + raise ValueError( + f"Invalid callback variable: {key}. Must be one of {valid_keys}" + ) + return values + + +class LiteLLM_TeamTable(TeamBase): + team_id: str # type: ignore + spend: Optional[float] = None + max_parallel_requests: Optional[int] = None + budget_duration: Optional[str] = None + budget_reset_at: Optional[datetime] = None + model_id: Optional[int] = None + litellm_model_table: Optional[LiteLLM_ModelTable] = None + created_at: Optional[datetime] = None + + model_config = ConfigDict(protected_namespaces=()) + + @model_validator(mode="before") + @classmethod + def set_model_info(cls, values): + dict_fields = [ + "metadata", + "aliases", + "config", + "permissions", + "model_max_budget", + "model_aliases", + ] + + if isinstance(values, BaseModel): + values = values.model_dump() + + if ( + isinstance(values.get("members_with_roles"), dict) + and not values["members_with_roles"] + ): + values["members_with_roles"] = [] + + for field in dict_fields: + value = values.get(field) + if value is not None and isinstance(value, str): + try: + values[field] = json.loads(value) + except json.JSONDecodeError: + raise ValueError(f"Field {field} should be a valid dictionary") + + return values + + +class LiteLLM_TeamTableCachedObj(LiteLLM_TeamTable): + last_refreshed_at: Optional[float] = None + + +class TeamRequest(LiteLLMPydanticObjectBase): + teams: List[str] + + +class LiteLLM_BudgetTable(LiteLLMPydanticObjectBase): + """Represents user-controllable params for a LiteLLM_BudgetTable record""" + + soft_budget: Optional[float] = None + max_budget: Optional[float] = None + max_parallel_requests: Optional[int] = None + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + model_max_budget: Optional[dict] = None + budget_duration: Optional[str] = None + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_TeamMemberTable(LiteLLM_BudgetTable): + """ + Used to track spend of a user_id within a team_id + """ + + spend: Optional[float] = None + user_id: Optional[str] = None + team_id: Optional[str] = None + budget_id: Optional[str] = None + + model_config = ConfigDict(protected_namespaces=()) + + +class NewOrganizationRequest(LiteLLM_BudgetTable): + organization_id: Optional[str] = None + organization_alias: str + models: List = [] + budget_id: Optional[str] = None + metadata: Optional[dict] = None + + +class OrganizationRequest(LiteLLMPydanticObjectBase): + organizations: List[str] + + +class DeleteOrganizationRequest(LiteLLMPydanticObjectBase): + organization_ids: List[str] # required + + +class KeyManagementSystem(enum.Enum): + GOOGLE_KMS = "google_kms" + AZURE_KEY_VAULT = "azure_key_vault" + AWS_SECRET_MANAGER = "aws_secret_manager" + GOOGLE_SECRET_MANAGER = "google_secret_manager" + HASHICORP_VAULT = "hashicorp_vault" + LOCAL = "local" + AWS_KMS = "aws_kms" + + +class KeyManagementSettings(LiteLLMPydanticObjectBase): + hosted_keys: Optional[List] = None + store_virtual_keys: Optional[bool] = False + """ + If True, virtual keys created by litellm will be stored in the secret manager + """ + prefix_for_stored_virtual_keys: str = "litellm/" + """ + If set, this prefix will be used for stored virtual keys in the secret manager + """ + + access_mode: Literal["read_only", "write_only", "read_and_write"] = "read_only" + """ + Access mode for the secret manager, when write_only will only use for writing secrets + """ + + primary_secret_name: Optional[str] = None + """ + If set, will read secrets from this primary secret in the secret manager + + eg. on AWS you can store multiple secret values as K/V pairs in a single secret + """ + + +class TeamDefaultSettings(LiteLLMPydanticObjectBase): + team_id: str + + model_config = ConfigDict( + extra="allow" + ) # allow params not defined here, these fall in litellm.completion(**kwargs) + + +class DynamoDBArgs(LiteLLMPydanticObjectBase): + billing_mode: Literal["PROVISIONED_THROUGHPUT", "PAY_PER_REQUEST"] + read_capacity_units: Optional[int] = None + write_capacity_units: Optional[int] = None + ssl_verify: Optional[bool] = None + region_name: str + user_table_name: str = "LiteLLM_UserTable" + key_table_name: str = "LiteLLM_VerificationToken" + config_table_name: str = "LiteLLM_Config" + spend_table_name: str = "LiteLLM_SpendLogs" + aws_role_name: Optional[str] = None + aws_session_name: Optional[str] = None + aws_web_identity_token: Optional[str] = None + aws_provider_id: Optional[str] = None + aws_policy_arns: Optional[List[str]] = None + aws_policy: Optional[str] = None + aws_duration_seconds: Optional[int] = None + assume_role_aws_role_name: Optional[str] = None + assume_role_aws_session_name: Optional[str] = None + + +class PassThroughGenericEndpoint(LiteLLMPydanticObjectBase): + path: str = Field(description="The route to be added to the LiteLLM Proxy Server.") + target: str = Field( + description="The URL to which requests for this path should be forwarded." + ) + headers: dict = Field( + description="Key-value pairs of headers to be forwarded with the request. You can set any key value pair here and it will be forwarded to your target endpoint" + ) + + +class PassThroughEndpointResponse(LiteLLMPydanticObjectBase): + endpoints: List[PassThroughGenericEndpoint] + + +class ConfigFieldUpdate(LiteLLMPydanticObjectBase): + field_name: str + field_value: Any + config_type: Literal["general_settings"] + + +class ConfigFieldDelete(LiteLLMPydanticObjectBase): + config_type: Literal["general_settings"] + field_name: str + + +class FieldDetail(BaseModel): + field_name: str + field_type: str + field_description: str + field_default_value: Any = None + stored_in_db: Optional[bool] + + +class ConfigList(LiteLLMPydanticObjectBase): + field_name: str + field_type: str + field_description: str + field_value: Any + stored_in_db: Optional[bool] + field_default_value: Any + premium_field: bool = False + nested_fields: Optional[List[FieldDetail]] = ( + None # For nested dictionary or Pydantic fields + ) + + +class ConfigGeneralSettings(LiteLLMPydanticObjectBase): + """ + Documents all the fields supported by `general_settings` in config.yaml + """ + + completion_model: Optional[str] = Field( + None, description="proxy level default model for all chat completion calls" + ) + key_management_system: Optional[KeyManagementSystem] = Field( + None, description="key manager to load keys from / decrypt keys with" + ) + use_google_kms: Optional[bool] = Field( + None, description="decrypt keys with google kms" + ) + use_azure_key_vault: Optional[bool] = Field( + None, description="load keys from azure key vault" + ) + master_key: Optional[str] = Field( + None, description="require a key for all calls to proxy" + ) + database_url: Optional[str] = Field( + None, + description="connect to a postgres db - needed for generating temporary keys + tracking spend / key", + ) + database_connection_pool_limit: Optional[int] = Field( + 100, + description="default connection pool for prisma client connecting to postgres db", + ) + database_connection_timeout: Optional[float] = Field( + 60, description="default timeout for a connection to the database" + ) + database_type: Optional[Literal["dynamo_db"]] = Field( + None, description="to use dynamodb instead of postgres db" + ) + database_args: Optional[DynamoDBArgs] = Field( + None, + description="custom args for instantiating dynamodb client - e.g. billing provision", + ) + otel: Optional[bool] = Field( + None, + description="[BETA] OpenTelemetry support - this might change, use with caution.", + ) + custom_auth: Optional[str] = Field( + None, + description="override user_api_key_auth with your own auth script - https://docs.litellm.ai/docs/proxy/virtual_keys#custom-auth", + ) + max_parallel_requests: Optional[int] = Field( + None, + description="maximum parallel requests for each api key", + ) + global_max_parallel_requests: Optional[int] = Field( + None, description="global max parallel requests to allow for a proxy instance." + ) + max_request_size_mb: Optional[int] = Field( + None, + description="max request size in MB, if a request is larger than this size it will be rejected", + ) + max_response_size_mb: Optional[int] = Field( + None, + description="max response size in MB, if a response is larger than this size it will be rejected", + ) + infer_model_from_keys: Optional[bool] = Field( + None, + description="for `/models` endpoint, infers available model based on environment keys (e.g. OPENAI_API_KEY)", + ) + background_health_checks: Optional[bool] = Field( + None, description="run health checks in background" + ) + health_check_interval: int = Field( + 300, description="background health check interval in seconds" + ) + alerting: Optional[List] = Field( + None, + description="List of alerting integrations. Today, just slack - `alerting: ['slack']`", + ) + alert_types: Optional[List[AlertType]] = Field( + None, + description="List of alerting types. By default it is all alerts", + ) + alert_to_webhook_url: Optional[Dict] = Field( + None, + description="Mapping of alert type to webhook url. e.g. `alert_to_webhook_url: {'budget_alerts': 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'}`", + ) + alerting_args: Optional[Dict] = Field( + None, description="Controllable params for slack alerting - e.g. ttl in cache." + ) + alerting_threshold: Optional[int] = Field( + None, + description="sends alerts if requests hang for 5min+", + ) + ui_access_mode: Optional[Literal["admin_only", "all"]] = Field( + "all", description="Control access to the Proxy UI" + ) + allowed_routes: Optional[List] = Field( + None, description="Proxy API Endpoints you want users to be able to access" + ) + enable_public_model_hub: bool = Field( + default=False, + description="Public model hub for users to see what models they have access to, supported openai params, etc.", + ) + pass_through_endpoints: Optional[List[PassThroughGenericEndpoint]] = Field( + default=None, + description="Set-up pass-through endpoints for provider-specific endpoints. Docs - https://docs.litellm.ai/docs/proxy/pass_through", + ) + + +class ConfigYAML(LiteLLMPydanticObjectBase): + """ + Documents all the fields supported by the config.yaml + """ + + environment_variables: Optional[dict] = Field( + None, + description="Object to pass in additional environment variables via POST request", + ) + model_list: Optional[List[ModelParams]] = Field( + None, + description="List of supported models on the server, with model-specific configs", + ) + litellm_settings: Optional[dict] = Field( + None, + description="litellm Module settings. See __init__.py for all, example litellm.drop_params=True, litellm.set_verbose=True, litellm.api_base, litellm.cache", + ) + general_settings: Optional[ConfigGeneralSettings] = None + router_settings: Optional[UpdateRouterConfig] = Field( + None, + description="litellm router object settings. See router.py __init__ for all, example router.num_retries=5, router.timeout=5, router.max_retries=5, router.retry_after=5", + ) + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_VerificationToken(LiteLLMPydanticObjectBase): + token: Optional[str] = None + key_name: Optional[str] = None + key_alias: Optional[str] = None + spend: float = 0.0 + max_budget: Optional[float] = None + expires: Optional[Union[str, datetime]] = None + models: List = [] + aliases: Dict = {} + config: Dict = {} + user_id: Optional[str] = None + team_id: Optional[str] = None + max_parallel_requests: Optional[int] = None + metadata: Dict = {} + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + budget_duration: Optional[str] = None + budget_reset_at: Optional[datetime] = None + allowed_cache_controls: Optional[list] = [] + permissions: Dict = {} + model_spend: Dict = {} + model_max_budget: Dict = {} + soft_budget_cooldown: bool = False + blocked: Optional[bool] = None + litellm_budget_table: Optional[dict] = None + org_id: Optional[str] = None # org id for a given key + created_at: Optional[datetime] = None + created_by: Optional[str] = None + updated_at: Optional[datetime] = None + updated_by: Optional[str] = None + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_VerificationTokenView(LiteLLM_VerificationToken): + """ + Combined view of litellm verification token + litellm team table (select values) + """ + + team_spend: Optional[float] = None + team_alias: Optional[str] = None + team_tpm_limit: Optional[int] = None + team_rpm_limit: Optional[int] = None + team_max_budget: Optional[float] = None + team_models: List = [] + team_blocked: bool = False + soft_budget: Optional[float] = None + team_model_aliases: Optional[Dict] = None + team_member_spend: Optional[float] = None + team_member: Optional[Member] = None + team_metadata: Optional[Dict] = None + + # End User Params + end_user_id: Optional[str] = None + end_user_tpm_limit: Optional[int] = None + end_user_rpm_limit: Optional[int] = None + end_user_max_budget: Optional[float] = None + + # Time stamps + last_refreshed_at: Optional[float] = None # last time joint view was pulled from db + + def __init__(self, **kwargs): + # Handle litellm_budget_table_* keys + for key, value in list(kwargs.items()): + if key.startswith("litellm_budget_table_") and value is not None: + # Extract the corresponding attribute name + attr_name = key.replace("litellm_budget_table_", "") + # Check if the value is None and set the corresponding attribute + if getattr(self, attr_name, None) is None: + kwargs[attr_name] = value + if key == "end_user_id" and value is not None and isinstance(value, int): + kwargs[key] = str(value) + # Initialize the superclass + super().__init__(**kwargs) + + +class UserAPIKeyAuth( + LiteLLM_VerificationTokenView +): # the expected response object for user api key auth + """ + Return the row in the db + """ + + api_key: Optional[str] = None + user_role: Optional[LitellmUserRoles] = None + allowed_model_region: Optional[AllowedModelRegion] = None + parent_otel_span: Optional[Span] = None + rpm_limit_per_model: Optional[Dict[str, int]] = None + tpm_limit_per_model: Optional[Dict[str, int]] = None + user_tpm_limit: Optional[int] = None + user_rpm_limit: Optional[int] = None + user_email: Optional[str] = None + + model_config = ConfigDict(arbitrary_types_allowed=True) + + @model_validator(mode="before") + @classmethod + def check_api_key(cls, values): + if values.get("api_key") is not None: + values.update({"token": hash_token(values.get("api_key"))}) + if isinstance(values.get("api_key"), str) and values.get( + "api_key" + ).startswith("sk-"): + values.update({"api_key": hash_token(values.get("api_key"))}) + return values + + +class UserInfoResponse(LiteLLMPydanticObjectBase): + user_id: Optional[str] + user_info: Optional[Union[dict, BaseModel]] + keys: List + teams: List + + +class LiteLLM_Config(LiteLLMPydanticObjectBase): + param_name: str + param_value: Dict + + +class LiteLLM_OrganizationMembershipTable(LiteLLMPydanticObjectBase): + """ + This is the table that track what organizations a user belongs to and users spend within the organization + """ + + user_id: str + organization_id: str + user_role: Optional[str] = None + spend: float = 0.0 + budget_id: Optional[str] = None + created_at: datetime + updated_at: datetime + user: Optional[Any] = ( + None # You might want to replace 'Any' with a more specific type if available + ) + litellm_budget_table: Optional[LiteLLM_BudgetTable] = None + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_OrganizationTable(LiteLLMPydanticObjectBase): + """Represents user-controllable params for a LiteLLM_OrganizationTable record""" + + organization_id: Optional[str] = None + organization_alias: Optional[str] = None + budget_id: str + spend: float = 0.0 + metadata: Optional[dict] = None + models: List[str] + created_by: str + updated_by: str + + +class LiteLLM_OrganizationTableUpdate(LiteLLMPydanticObjectBase): + """Represents user-controllable params for a LiteLLM_OrganizationTable record""" + + organization_id: Optional[str] = None + organization_alias: Optional[str] = None + budget_id: Optional[str] = None + spend: Optional[float] = None + metadata: Optional[dict] = None + models: Optional[List[str]] = None + updated_by: Optional[str] = None + + +class LiteLLM_OrganizationTableWithMembers(LiteLLM_OrganizationTable): + """Returned by the /organization/info endpoint and /organization/list endpoint""" + + members: List[LiteLLM_OrganizationMembershipTable] = [] + teams: List[LiteLLM_TeamTable] = [] + litellm_budget_table: Optional[LiteLLM_BudgetTable] = None + created_at: datetime + updated_at: datetime + + +class NewOrganizationResponse(LiteLLM_OrganizationTable): + organization_id: str # type: ignore + created_at: datetime + updated_at: datetime + + +class LiteLLM_UserTable(LiteLLMPydanticObjectBase): + user_id: str + max_budget: Optional[float] = None + spend: float = 0.0 + model_max_budget: Optional[Dict] = {} + model_spend: Optional[Dict] = {} + user_email: Optional[str] = None + models: list = [] + tpm_limit: Optional[int] = None + rpm_limit: Optional[int] = None + user_role: Optional[str] = None + organization_memberships: Optional[List[LiteLLM_OrganizationMembershipTable]] = None + teams: List[str] = [] + sso_user_id: Optional[str] = None + budget_duration: Optional[str] = None + budget_reset_at: Optional[datetime] = None + metadata: Optional[dict] = None + + @model_validator(mode="before") + @classmethod + def set_model_info(cls, values): + if values.get("spend") is None: + values.update({"spend": 0.0}) + if values.get("models") is None: + values.update({"models": []}) + if values.get("teams") is None: + values.update({"teams": []}) + return values + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_UserTableFiltered(BaseModel): # done to avoid exposing sensitive data + user_id: str + user_email: str + + +class LiteLLM_UserTableWithKeyCount(LiteLLM_UserTable): + key_count: int = 0 + + +class LiteLLM_EndUserTable(LiteLLMPydanticObjectBase): + user_id: str + blocked: bool + alias: Optional[str] = None + spend: float = 0.0 + allowed_model_region: Optional[AllowedModelRegion] = None + default_model: Optional[str] = None + litellm_budget_table: Optional[LiteLLM_BudgetTable] = None + + @model_validator(mode="before") + @classmethod + def set_model_info(cls, values): + if values.get("spend") is None: + values.update({"spend": 0.0}) + return values + + model_config = ConfigDict(protected_namespaces=()) + + +class LiteLLM_SpendLogs(LiteLLMPydanticObjectBase): + request_id: str + api_key: str + model: Optional[str] = "" + api_base: Optional[str] = "" + call_type: str + spend: Optional[float] = 0.0 + total_tokens: Optional[int] = 0 + prompt_tokens: Optional[int] = 0 + completion_tokens: Optional[int] = 0 + startTime: Union[str, datetime, None] + endTime: Union[str, datetime, None] + user: Optional[str] = "" + metadata: Optional[Json] = {} + cache_hit: Optional[str] = "False" + cache_key: Optional[str] = None + request_tags: Optional[Json] = None + requester_ip_address: Optional[str] = None + messages: Optional[Union[str, list, dict]] + response: Optional[Union[str, list, dict]] + + +class LiteLLM_ErrorLogs(LiteLLMPydanticObjectBase): + request_id: Optional[str] = str(uuid.uuid4()) + api_base: Optional[str] = "" + model_group: Optional[str] = "" + litellm_model_name: Optional[str] = "" + model_id: Optional[str] = "" + request_kwargs: Optional[dict] = {} + exception_type: Optional[str] = "" + status_code: Optional[str] = "" + exception_string: Optional[str] = "" + startTime: Union[str, datetime, None] + endTime: Union[str, datetime, None] + + +AUDIT_ACTIONS = Literal["created", "updated", "deleted", "blocked"] + + +class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase): + id: str + updated_at: datetime + changed_by: Optional[Any] = None + changed_by_api_key: Optional[str] = None + action: AUDIT_ACTIONS + table_name: LitellmTableNames + object_id: str + before_value: Optional[Json] = None + updated_values: Optional[Json] = None + + @model_validator(mode="before") + @classmethod + def cast_changed_by_to_str(cls, values): + if values.get("changed_by") is not None: + values["changed_by"] = str(values["changed_by"]) + return values + + +class LiteLLM_SpendLogs_ResponseObject(LiteLLMPydanticObjectBase): + response: Optional[List[Union[LiteLLM_SpendLogs, Any]]] = None + + +class TokenCountRequest(LiteLLMPydanticObjectBase): + model: str + prompt: Optional[str] = None + messages: Optional[List[dict]] = None + + +class TokenCountResponse(LiteLLMPydanticObjectBase): + total_tokens: int + request_model: str + model_used: str + tokenizer_type: str + + +class CallInfo(LiteLLMPydanticObjectBase): + """Used for slack budget alerting""" + + spend: float + max_budget: Optional[float] = None + soft_budget: Optional[float] = None + token: Optional[str] = Field(default=None, description="Hashed value of that key") + customer_id: Optional[str] = None + user_id: Optional[str] = None + team_id: Optional[str] = None + team_alias: Optional[str] = None + user_email: Optional[str] = None + key_alias: Optional[str] = None + projected_exceeded_date: Optional[str] = None + projected_spend: Optional[float] = None + + +class WebhookEvent(CallInfo): + event: Literal[ + "budget_crossed", + "soft_budget_crossed", + "threshold_crossed", + "projected_limit_exceeded", + "key_created", + "internal_user_created", + "spend_tracked", + ] + event_group: Literal["internal_user", "key", "team", "proxy", "customer"] + event_message: str # human-readable description of event + + +class SpecialModelNames(enum.Enum): + all_team_models = "all-team-models" + all_proxy_models = "all-proxy-models" + no_default_models = "no-default-models" + + +class InvitationNew(LiteLLMPydanticObjectBase): + user_id: str + + +class InvitationUpdate(LiteLLMPydanticObjectBase): + invitation_id: str + is_accepted: bool + + +class InvitationDelete(LiteLLMPydanticObjectBase): + invitation_id: str + + +class InvitationModel(LiteLLMPydanticObjectBase): + id: str + user_id: str + is_accepted: bool + accepted_at: Optional[datetime] + expires_at: datetime + created_at: datetime + created_by: str + updated_at: datetime + updated_by: str + + +class InvitationClaim(LiteLLMPydanticObjectBase): + invitation_link: str + user_id: str + password: str + + +class ConfigFieldInfo(LiteLLMPydanticObjectBase): + field_name: str + field_value: Any + + +class CallbackOnUI(LiteLLMPydanticObjectBase): + litellm_callback_name: str + litellm_callback_params: Optional[list] + ui_callback_name: str + + +class AllCallbacks(LiteLLMPydanticObjectBase): + langfuse: CallbackOnUI = CallbackOnUI( + litellm_callback_name="langfuse", + ui_callback_name="Langfuse", + litellm_callback_params=[ + "LANGFUSE_PUBLIC_KEY", + "LANGFUSE_SECRET_KEY", + ], + ) + + otel: CallbackOnUI = CallbackOnUI( + litellm_callback_name="otel", + ui_callback_name="OpenTelemetry", + litellm_callback_params=[ + "OTEL_EXPORTER", + "OTEL_ENDPOINT", + "OTEL_HEADERS", + ], + ) + + s3: CallbackOnUI = CallbackOnUI( + litellm_callback_name="s3", + ui_callback_name="s3 Bucket (AWS)", + litellm_callback_params=[ + "AWS_ACCESS_KEY_ID", + "AWS_SECRET_ACCESS_KEY", + "AWS_REGION_NAME", + ], + ) + + openmeter: CallbackOnUI = CallbackOnUI( + litellm_callback_name="openmeter", + ui_callback_name="OpenMeter", + litellm_callback_params=[ + "OPENMETER_API_ENDPOINT", + "OPENMETER_API_KEY", + ], + ) + + custom_callback_api: CallbackOnUI = CallbackOnUI( + litellm_callback_name="custom_callback_api", + litellm_callback_params=["GENERIC_LOGGER_ENDPOINT"], + ui_callback_name="Custom Callback API", + ) + + datadog: CallbackOnUI = CallbackOnUI( + litellm_callback_name="datadog", + litellm_callback_params=["DD_API_KEY", "DD_SITE"], + ui_callback_name="Datadog", + ) + + braintrust: CallbackOnUI = CallbackOnUI( + litellm_callback_name="braintrust", + litellm_callback_params=["BRAINTRUST_API_KEY"], + ui_callback_name="Braintrust", + ) + + langsmith: CallbackOnUI = CallbackOnUI( + litellm_callback_name="langsmith", + litellm_callback_params=[ + "LANGSMITH_API_KEY", + "LANGSMITH_PROJECT", + "LANGSMITH_DEFAULT_RUN_NAME", + ], + ui_callback_name="Langsmith", + ) + + lago: CallbackOnUI = CallbackOnUI( + litellm_callback_name="lago", + litellm_callback_params=[ + "LAGO_API_BASE", + "LAGO_API_KEY", + "LAGO_API_EVENT_CODE", + "LAGO_API_CHARGE_BY", + ], + ui_callback_name="Lago Billing", + ) + + +class SpendLogsMetadata(TypedDict): + """ + Specific metadata k,v pairs logged to spendlogs for easier cost tracking + """ + + additional_usage_values: Optional[ + dict + ] # covers provider-specific usage information - e.g. prompt caching + user_api_key: Optional[str] + user_api_key_alias: Optional[str] + user_api_key_team_id: Optional[str] + user_api_key_org_id: Optional[str] + user_api_key_user_id: Optional[str] + user_api_key_team_alias: Optional[str] + spend_logs_metadata: Optional[ + dict + ] # special param to log k,v pairs to spendlogs for a call + requester_ip_address: Optional[str] + applied_guardrails: Optional[List[str]] + status: StandardLoggingPayloadStatus + proxy_server_request: Optional[str] + batch_models: Optional[List[str]] + error_information: Optional[StandardLoggingPayloadErrorInformation] + + +class SpendLogsPayload(TypedDict): + request_id: str + call_type: str + api_key: str + spend: float + total_tokens: int + prompt_tokens: int + completion_tokens: int + startTime: Union[datetime, str] + endTime: Union[datetime, str] + completionStartTime: Optional[Union[datetime, str]] + model: str + model_id: Optional[str] + model_group: Optional[str] + api_base: str + user: str + metadata: str # json str + cache_hit: str + cache_key: str + request_tags: str # json str + team_id: Optional[str] + end_user: Optional[str] + requester_ip_address: Optional[str] + custom_llm_provider: Optional[str] + messages: Optional[Union[str, list, dict]] + response: Optional[Union[str, list, dict]] + + +class SpanAttributes(str, enum.Enum): + # Note: We've taken this from opentelemetry-semantic-conventions-ai + # I chose to not add a new dependency to litellm for this + + # Semantic Conventions for LLM requests, this needs to be removed after + # OpenTelemetry Semantic Conventions support Gen AI. + # Issue at https://github.com/open-telemetry/opentelemetry-python/issues/3868 + # Refer to https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/llm-spans.md + + LLM_SYSTEM = "gen_ai.system" + LLM_REQUEST_MODEL = "gen_ai.request.model" + LLM_REQUEST_MAX_TOKENS = "gen_ai.request.max_tokens" + LLM_REQUEST_TEMPERATURE = "gen_ai.request.temperature" + LLM_REQUEST_TOP_P = "gen_ai.request.top_p" + LLM_PROMPTS = "gen_ai.prompt" + LLM_COMPLETIONS = "gen_ai.completion" + LLM_RESPONSE_MODEL = "gen_ai.response.model" + LLM_USAGE_COMPLETION_TOKENS = "gen_ai.usage.completion_tokens" + LLM_USAGE_PROMPT_TOKENS = "gen_ai.usage.prompt_tokens" + LLM_TOKEN_TYPE = "gen_ai.token.type" + # To be added + # LLM_RESPONSE_FINISH_REASON = "gen_ai.response.finish_reasons" + # LLM_RESPONSE_ID = "gen_ai.response.id" + + # LLM + LLM_REQUEST_TYPE = "llm.request.type" + LLM_USAGE_TOTAL_TOKENS = "llm.usage.total_tokens" + LLM_USAGE_TOKEN_TYPE = "llm.usage.token_type" + LLM_USER = "llm.user" + LLM_HEADERS = "llm.headers" + LLM_TOP_K = "llm.top_k" + LLM_IS_STREAMING = "llm.is_streaming" + LLM_FREQUENCY_PENALTY = "llm.frequency_penalty" + LLM_PRESENCE_PENALTY = "llm.presence_penalty" + LLM_CHAT_STOP_SEQUENCES = "llm.chat.stop_sequences" + LLM_REQUEST_FUNCTIONS = "llm.request.functions" + LLM_REQUEST_REPETITION_PENALTY = "llm.request.repetition_penalty" + LLM_RESPONSE_FINISH_REASON = "llm.response.finish_reason" + LLM_RESPONSE_STOP_REASON = "llm.response.stop_reason" + LLM_CONTENT_COMPLETION_CHUNK = "llm.content.completion.chunk" + + # OpenAI + LLM_OPENAI_RESPONSE_SYSTEM_FINGERPRINT = "gen_ai.openai.system_fingerprint" + LLM_OPENAI_API_BASE = "gen_ai.openai.api_base" + LLM_OPENAI_API_VERSION = "gen_ai.openai.api_version" + LLM_OPENAI_API_TYPE = "gen_ai.openai.api_type" + + +class ManagementEndpointLoggingPayload(LiteLLMPydanticObjectBase): + route: str + request_data: dict + response: Optional[dict] = None + exception: Optional[Any] = None + start_time: Optional[datetime] = None + end_time: Optional[datetime] = None + + +class ProxyException(Exception): + # NOTE: DO NOT MODIFY THIS + # This is used to map exactly to OPENAI Exceptions + def __init__( + self, + message: str, + type: str, + param: Optional[str], + code: Optional[Union[int, str]] = None, # maps to status code + headers: Optional[Dict[str, str]] = None, + openai_code: Optional[str] = None, # maps to 'code' in openai + ): + self.message = str(message) + self.type = type + self.param = param + self.openai_code = openai_code or code + # If we look on official python OpenAI lib, the code should be a string: + # https://github.com/openai/openai-python/blob/195c05a64d39c87b2dfdf1eca2d339597f1fce03/src/openai/types/shared/error_object.py#L11 + # Related LiteLLM issue: https://github.com/BerriAI/litellm/discussions/4834 + self.code = str(code) + if headers is not None: + for k, v in headers.items(): + if not isinstance(v, str): + headers[k] = str(v) + self.headers = headers or {} + + # rules for proxyExceptions + # Litellm router.py returns "No healthy deployment available" when there are no deployments available + # Should map to 429 errors https://github.com/BerriAI/litellm/issues/2487 + if ( + "No healthy deployment available" in self.message + or "No deployments available" in self.message + ): + self.code = "429" + elif RouterErrors.no_deployments_with_tag_routing.value in self.message: + self.code = "401" + + def to_dict(self) -> dict: + """Converts the ProxyException instance to a dictionary.""" + return { + "message": self.message, + "type": self.type, + "param": self.param, + "code": self.code, + } + + +class CommonProxyErrors(str, enum.Enum): + db_not_connected_error = ( + "DB not connected. See https://docs.litellm.ai/docs/proxy/virtual_keys" + ) + no_llm_router = "No models configured on proxy" + not_allowed_access = "Admin-only endpoint. Not allowed to access this." + not_premium_user = "You must be a LiteLLM Enterprise user to use this feature. If you have a license please set `LITELLM_LICENSE` in your env. Get a 7 day trial key here: https://www.litellm.ai/#trial. \nPricing: https://www.litellm.ai/#pricing" + max_parallel_request_limit_reached = ( + "Crossed TPM / RPM / Max Parallel Request Limit" + ) + + +class SpendCalculateRequest(LiteLLMPydanticObjectBase): + model: Optional[str] = None + messages: Optional[List] = None + completion_response: Optional[dict] = None + + +class ProxyErrorTypes(str, enum.Enum): + budget_exceeded = "budget_exceeded" + key_model_access_denied = "key_model_access_denied" + team_model_access_denied = "team_model_access_denied" + user_model_access_denied = "user_model_access_denied" + expired_key = "expired_key" + auth_error = "auth_error" + internal_server_error = "internal_server_error" + bad_request_error = "bad_request_error" + not_found_error = "not_found_error" + validation_error = "bad_request_error" + cache_ping_error = "cache_ping_error" + + @classmethod + def get_model_access_error_type_for_object( + cls, object_type: Literal["key", "user", "team"] + ) -> "ProxyErrorTypes": + """ + Get the model access error type for object_type + """ + if object_type == "key": + return cls.key_model_access_denied + elif object_type == "team": + return cls.team_model_access_denied + elif object_type == "user": + return cls.user_model_access_denied + + +DB_CONNECTION_ERROR_TYPES = (httpx.ConnectError, httpx.ReadError, httpx.ReadTimeout) + + +class SSOUserDefinedValues(TypedDict): + models: List[str] + user_id: str + user_email: Optional[str] + user_role: Optional[str] + max_budget: Optional[float] + budget_duration: Optional[str] + + +class VirtualKeyEvent(LiteLLMPydanticObjectBase): + created_by_user_id: str + created_by_user_role: str + created_by_key_alias: Optional[str] + request_kwargs: dict + + +class CreatePassThroughEndpoint(LiteLLMPydanticObjectBase): + path: str + target: str + headers: dict + + +class LiteLLM_TeamMembership(LiteLLMPydanticObjectBase): + user_id: str + team_id: str + budget_id: str + litellm_budget_table: Optional[LiteLLM_BudgetTable] + + +#### Organization / Team Member Requests #### + + +class MemberAddRequest(LiteLLMPydanticObjectBase): + member: Union[List[Member], Member] + + def __init__(self, **data): + member_data = data.get("member") + if isinstance(member_data, list): + # If member is a list of dictionaries, convert each dictionary to a Member object + members = [Member(**item) for item in member_data] + # Replace member_data with the list of Member objects + data["member"] = members + elif isinstance(member_data, dict): + # If member is a dictionary, convert it to a single Member object + member = Member(**member_data) + # Replace member_data with the single Member object + data["member"] = member + # Call the superclass __init__ method to initialize the object + super().__init__(**data) + + +class OrgMemberAddRequest(LiteLLMPydanticObjectBase): + member: Union[List[OrgMember], OrgMember] + + def __init__(self, **data): + member_data = data.get("member") + if isinstance(member_data, list): + # If member is a list of dictionaries, convert each dictionary to a Member object + members = [OrgMember(**item) for item in member_data] + # Replace member_data with the list of Member objects + data["member"] = members + elif isinstance(member_data, dict): + # If member is a dictionary, convert it to a single Member object + member = OrgMember(**member_data) + # Replace member_data with the single Member object + data["member"] = member + # Call the superclass __init__ method to initialize the object + super().__init__(**data) + + +class TeamAddMemberResponse(LiteLLM_TeamTable): + updated_users: List[LiteLLM_UserTable] + updated_team_memberships: List[LiteLLM_TeamMembership] + + +class OrganizationAddMemberResponse(LiteLLMPydanticObjectBase): + organization_id: str + updated_users: List[LiteLLM_UserTable] + updated_organization_memberships: List[LiteLLM_OrganizationMembershipTable] + + +class MemberDeleteRequest(LiteLLMPydanticObjectBase): + user_id: Optional[str] = None + user_email: Optional[str] = None + + @model_validator(mode="before") + @classmethod + def check_user_info(cls, values): + if values.get("user_id") is None and values.get("user_email") is None: + raise ValueError("Either user id or user email must be provided") + return values + + +class MemberUpdateResponse(LiteLLMPydanticObjectBase): + user_id: str + user_email: Optional[str] = None + + +# Team Member Requests +class TeamMemberAddRequest(MemberAddRequest): + team_id: str + max_budget_in_team: Optional[float] = None # Users max budget within the team + + +class TeamMemberDeleteRequest(MemberDeleteRequest): + team_id: str + + +class TeamMemberUpdateRequest(TeamMemberDeleteRequest): + max_budget_in_team: Optional[float] = None + role: Optional[Literal["admin", "user"]] = None + + +class TeamMemberUpdateResponse(MemberUpdateResponse): + team_id: str + max_budget_in_team: Optional[float] = None + + +class TeamModelAddRequest(BaseModel): + """Request to add models to a team""" + + team_id: str + models: List[str] + + +class TeamModelDeleteRequest(BaseModel): + """Request to delete models from a team""" + + team_id: str + models: List[str] + + +# Organization Member Requests +class OrganizationMemberAddRequest(OrgMemberAddRequest): + organization_id: str + max_budget_in_organization: Optional[float] = ( + None # Users max budget within the organization + ) + + +class OrganizationMemberDeleteRequest(MemberDeleteRequest): + organization_id: str + + +ROLES_WITHIN_ORG = [ + LitellmUserRoles.ORG_ADMIN, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, +] + + +class OrganizationMemberUpdateRequest(OrganizationMemberDeleteRequest): + max_budget_in_organization: Optional[float] = None + role: Optional[LitellmUserRoles] = None + + @field_validator("role") + def validate_role( + cls, value: Optional[LitellmUserRoles] + ) -> Optional[LitellmUserRoles]: + if value is not None and value not in ROLES_WITHIN_ORG: + raise ValueError( + f"Invalid role. Must be one of: {[role.value for role in ROLES_WITHIN_ORG]}" + ) + return value + + +class OrganizationMemberUpdateResponse(MemberUpdateResponse): + organization_id: str + max_budget_in_organization: float + + +########################################## + + +class TeamInfoResponseObject(TypedDict): + team_id: str + team_info: LiteLLM_TeamTable + keys: List + team_memberships: List[LiteLLM_TeamMembership] + + +class TeamListResponseObject(LiteLLM_TeamTable): + team_memberships: List[LiteLLM_TeamMembership] + keys: List # list of keys that belong to the team + + +class KeyListResponseObject(TypedDict, total=False): + keys: List[Union[str, UserAPIKeyAuth]] + total_count: Optional[int] + current_page: Optional[int] + total_pages: Optional[int] + + +class CurrentItemRateLimit(TypedDict): + current_requests: int + current_tpm: int + current_rpm: int + + +class LoggingCallbackStatus(TypedDict, total=False): + callbacks: List[str] + status: Literal["healthy", "unhealthy"] + details: Optional[str] + + +class KeyHealthResponse(TypedDict, total=False): + key: Literal["healthy", "unhealthy"] + logging_callbacks: Optional[LoggingCallbackStatus] + + +class SpecialHeaders(enum.Enum): + """Used by user_api_key_auth.py to get litellm key""" + + openai_authorization = "Authorization" + azure_authorization = "API-Key" + anthropic_authorization = "x-api-key" + google_ai_studio_authorization = "x-goog-api-key" + azure_apim_authorization = "Ocp-Apim-Subscription-Key" + + +class LitellmDataForBackendLLMCall(TypedDict, total=False): + headers: dict + organization: str + timeout: Optional[float] + + +class JWTKeyItem(TypedDict, total=False): + kid: str + + +JWKKeyValue = Union[List[JWTKeyItem], JWTKeyItem] + + +class JWKUrlResponse(TypedDict, total=False): + keys: JWKKeyValue + + +class UserManagementEndpointParamDocStringEnums(str, enum.Enum): + user_id_doc_str = ( + "Optional[str] - Specify a user id. If not set, a unique id will be generated." + ) + user_alias_doc_str = ( + "Optional[str] - A descriptive name for you to know who this user id refers to." + ) + teams_doc_str = "Optional[list] - specify a list of team id's a user belongs to." + user_email_doc_str = "Optional[str] - Specify a user email." + send_invite_email_doc_str = ( + "Optional[bool] - Specify if an invite email should be sent." + ) + user_role_doc_str = """Optional[str] - Specify a user role - "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer", "team", "customer". Info about each role here: `https://github.com/BerriAI/litellm/litellm/proxy/_types.py#L20`""" + max_budget_doc_str = """Optional[float] - Specify max budget for a given user.""" + budget_duration_doc_str = """Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").""" + models_doc_str = """Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models)""" + tpm_limit_doc_str = ( + """Optional[int] - Specify tpm limit for a given user (Tokens per minute)""" + ) + rpm_limit_doc_str = ( + """Optional[int] - Specify rpm limit for a given user (Requests per minute)""" + ) + auto_create_key_doc_str = """bool - Default=True. Flag used for returning a key as part of the /user/new response""" + aliases_doc_str = """Optional[dict] - Model aliases for the user - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases)""" + config_doc_str = """Optional[dict] - [DEPRECATED PARAM] User-specific config.""" + allowed_cache_controls_doc_str = """Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request-""" + blocked_doc_str = ( + """Optional[bool] - [Not Implemented Yet] Whether the user is blocked.""" + ) + guardrails_doc_str = """Optional[List[str]] - [Not Implemented Yet] List of active guardrails for the user""" + permissions_doc_str = """Optional[dict] - [Not Implemented Yet] User-specific permissions, eg. turning off pii masking.""" + metadata_doc_str = """Optional[dict] - Metadata for user, store information for user. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" }""" + max_parallel_requests_doc_str = """Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x.""" + soft_budget_doc_str = """Optional[float] - Get alerts when user crosses given budget, doesn't block requests.""" + model_max_budget_doc_str = """Optional[dict] - Model-specific max budget for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-budgets-to-keys)""" + model_rpm_limit_doc_str = """Optional[float] - Model-specific rpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys)""" + model_tpm_limit_doc_str = """Optional[float] - Model-specific tpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys)""" + spend_doc_str = """Optional[float] - Amount spent by user. Default is 0. Will be updated by proxy whenever user is used.""" + team_id_doc_str = """Optional[str] - [DEPRECATED PARAM] The team id of the user. Default is None.""" + duration_doc_str = """Optional[str] - Duration for the key auto-created on `/user/new`. Default is None.""" + + +PassThroughEndpointLoggingResultValues = Union[ + ModelResponse, + TextCompletionResponse, + ImageResponse, + EmbeddingResponse, + StandardPassThroughResponseObject, +] + + +class PassThroughEndpointLoggingTypedDict(TypedDict): + result: Optional[PassThroughEndpointLoggingResultValues] + kwargs: dict + + +LiteLLM_ManagementEndpoint_MetadataFields = [ + "model_rpm_limit", + "model_tpm_limit", + "guardrails", + "tags", + "enforced_params", + "temp_budget_increase", + "temp_budget_expiry", +] + +LiteLLM_ManagementEndpoint_MetadataFields_Premium = [ + "guardrails", + "tags", +] + + +class ProviderBudgetResponseObject(LiteLLMPydanticObjectBase): + """ + Configuration for a single provider's budget settings + """ + + budget_limit: Optional[float] # Budget limit in USD for the time period + time_period: Optional[str] # Time period for budget (e.g., '1d', '30d', '1mo') + spend: Optional[float] = 0.0 # Current spend for this provider + budget_reset_at: Optional[str] = None # When the current budget period resets + + +class ProviderBudgetResponse(LiteLLMPydanticObjectBase): + """ + Complete provider budget configuration and status. + Maps provider names to their budget configs. + """ + + providers: Dict[str, ProviderBudgetResponseObject] = ( + {} + ) # Dictionary mapping provider names to their budget configurations + + +class ProxyStateVariables(TypedDict): + """ + TypedDict for Proxy state variables. + """ + + spend_logs_row_count: int + + +UI_TEAM_ID = "litellm-dashboard" + + +class JWTAuthBuilderResult(TypedDict): + is_proxy_admin: bool + team_object: Optional[LiteLLM_TeamTable] + user_object: Optional[LiteLLM_UserTable] + end_user_object: Optional[LiteLLM_EndUserTable] + org_object: Optional[LiteLLM_OrganizationTable] + token: str + team_id: Optional[str] + user_id: Optional[str] + end_user_id: Optional[str] + org_id: Optional[str] + + +class ClientSideFallbackModel(TypedDict, total=False): + """ + Dictionary passed when client configuring input + """ + + model: Required[str] + messages: List[AllMessageValues] + + +ALL_FALLBACK_MODEL_VALUES = Union[str, ClientSideFallbackModel] + + +RBAC_ROLES = Literal[ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.TEAM, + LitellmUserRoles.INTERNAL_USER, +] + + +class OIDCPermissions(LiteLLMPydanticObjectBase): + models: Optional[List[str]] = None + routes: Optional[List[str]] = None + + +class RoleBasedPermissions(OIDCPermissions): + role: RBAC_ROLES + + model_config = { + "extra": "forbid", + } + + +class RoleMapping(BaseModel): + role: str + internal_role: RBAC_ROLES + + +class ScopeMapping(OIDCPermissions): + scope: str + + model_config = { + "extra": "forbid", + } + + +class LiteLLM_JWTAuth(LiteLLMPydanticObjectBase): + """ + A class to define the roles and permissions for a LiteLLM Proxy w/ JWT Auth. + + Attributes: + - admin_jwt_scope: The JWT scope required for proxy admin roles. + - admin_allowed_routes: list of allowed routes for proxy admin roles. + - team_jwt_scope: The JWT scope required for proxy team roles. + - team_id_jwt_field: The field in the JWT token that stores the team ID. Default - `client_id`. + - team_allowed_routes: list of allowed routes for proxy team roles. + - user_id_jwt_field: The field in the JWT token that stores the user id (maps to `LiteLLMUserTable`). Use this for internal employees. + - user_email_jwt_field: The field in the JWT token that stores the user email (maps to `LiteLLMUserTable`). Use this for internal employees. + - user_allowed_email_subdomain: If specified, only emails from specified subdomain will be allowed to access proxy. + - end_user_id_jwt_field: The field in the JWT token that stores the end-user ID (maps to `LiteLLMEndUserTable`). Turn this off by setting to `None`. Enables end-user cost tracking. Use this for external customers. + - public_key_ttl: Default - 600s. TTL for caching public JWT keys. + - public_allowed_routes: list of allowed routes for authenticated but unknown litellm role jwt tokens. + - enforce_rbac: If true, enforce RBAC for all routes. + - custom_validate: A custom function to validates the JWT token. + + See `auth_checks.py` for the specific routes + """ + + admin_jwt_scope: str = "litellm_proxy_admin" + admin_allowed_routes: List[str] = [ + "management_routes", + "spend_tracking_routes", + "global_spend_tracking_routes", + "info_routes", + ] + team_id_jwt_field: Optional[str] = None + team_id_upsert: bool = False + team_ids_jwt_field: Optional[str] = None + upsert_sso_user_to_team: bool = False + team_allowed_routes: List[ + Literal["openai_routes", "info_routes", "management_routes"] + ] = ["openai_routes", "info_routes"] + team_id_default: Optional[str] = Field( + default=None, + description="If no team_id given, default permissions/spend-tracking to this team.s", + ) + + org_id_jwt_field: Optional[str] = None + user_id_jwt_field: Optional[str] = None + user_email_jwt_field: Optional[str] = None + user_allowed_email_domain: Optional[str] = None + user_roles_jwt_field: Optional[str] = None + user_allowed_roles: Optional[List[str]] = None + user_id_upsert: bool = Field( + default=False, description="If user doesn't exist, upsert them into the db." + ) + end_user_id_jwt_field: Optional[str] = None + public_key_ttl: float = 600 + public_allowed_routes: List[str] = ["public_routes"] + enforce_rbac: bool = False + roles_jwt_field: Optional[str] = None # v2 on role mappings + role_mappings: Optional[List[RoleMapping]] = None + object_id_jwt_field: Optional[str] = ( + None # can be either user / team, inferred from the role mapping + ) + scope_mappings: Optional[List[ScopeMapping]] = None + enforce_scope_based_access: bool = False + enforce_team_based_model_access: bool = False + custom_validate: Optional[Callable[..., Literal[True]]] = None + + def __init__(self, **kwargs: Any) -> None: + # get the attribute names for this Pydantic model + allowed_keys = self.__annotations__.keys() + + invalid_keys = set(kwargs.keys()) - allowed_keys + user_roles_jwt_field = kwargs.get("user_roles_jwt_field") + user_allowed_roles = kwargs.get("user_allowed_roles") + object_id_jwt_field = kwargs.get("object_id_jwt_field") + role_mappings = kwargs.get("role_mappings") + scope_mappings = kwargs.get("scope_mappings") + enforce_scope_based_access = kwargs.get("enforce_scope_based_access") + custom_validate = kwargs.get("custom_validate") + + if custom_validate is not None: + fn = get_instance_fn(custom_validate) + validate_custom_validate_return_type(fn) + kwargs["custom_validate"] = fn + + if invalid_keys: + raise ValueError( + f"Invalid arguments provided: {', '.join(invalid_keys)}. Allowed arguments are: {', '.join(allowed_keys)}." + ) + if (user_roles_jwt_field is not None and user_allowed_roles is None) or ( + user_roles_jwt_field is None and user_allowed_roles is not None + ): + raise ValueError( + "user_allowed_roles must be provided if user_roles_jwt_field is set." + ) + + if object_id_jwt_field is not None and role_mappings is None: + raise ValueError( + "if object_id_jwt_field is set, role_mappings must also be set. Needed to infer if the caller is a user or team." + ) + + if scope_mappings is not None and not enforce_scope_based_access: + raise ValueError( + "scope_mappings must be set if enforce_scope_based_access is true." + ) + + super().__init__(**kwargs) + + +class PrismaCompatibleUpdateDBModel(TypedDict, total=False): + model_name: str + litellm_params: str + model_info: str + updated_at: str + updated_by: str + + +class SpecialManagementEndpointEnums(enum.Enum): + DEFAULT_ORGANIZATION = "default_organization" + + +class TransformRequestBody(BaseModel): + call_type: CallTypes + request_body: dict + + +class DefaultInternalUserParams(LiteLLMPydanticObjectBase): + """ + Default parameters to apply when a new user signs in via SSO or is created on the /user/new API endpoint + """ + + user_role: Optional[ + Literal[ + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + ] + ] = Field( + default=LitellmUserRoles.INTERNAL_USER, + description="Default role assigned to new users created", + ) + max_budget: Optional[float] = Field( + default=None, + description="Default maximum budget (in USD) for new users created", + ) + budget_duration: Optional[str] = Field( + default=None, + description="Default budget duration for new users (e.g. 'daily', 'weekly', 'monthly')", + ) + models: Optional[List[str]] = Field( + default=None, description="Default list of models that new users can access" + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/analytics_endpoints/analytics_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/analytics_endpoints/analytics_endpoints.py new file mode 100644 index 00000000..f929cb74 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/analytics_endpoints/analytics_endpoints.py @@ -0,0 +1,106 @@ +#### Analytics Endpoints ##### +from datetime import datetime +from typing import List, Optional + +import fastapi +from fastapi import APIRouter, Depends, HTTPException, status + +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth + +router = APIRouter() + + +@router.get( + "/global/activity/cache_hits", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, + include_in_schema=False, +) +async def get_global_activity( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), +): + """ + Get number of cache hits, vs misses + + { + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + cache_hits: 10, + llm_api_calls: 2000 + }, + { + date: 'Jan 23', + cache_hits: 10, + llm_api_calls: 12 + }, + ], + "sum_cache_hits": 20, + "sum_llm_api_calls": 2012 + } + """ + + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise ValueError( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + sql_query = """ + SELECT + CASE + WHEN vt."key_alias" IS NOT NULL THEN vt."key_alias" + ELSE 'Unnamed Key' + END AS api_key, + sl."call_type", + sl."model", + COUNT(*) AS total_rows, + SUM(CASE WHEN sl."cache_hit" = 'True' THEN 1 ELSE 0 END) AS cache_hit_true_rows, + SUM(CASE WHEN sl."cache_hit" = 'True' THEN sl."completion_tokens" ELSE 0 END) AS cached_completion_tokens, + SUM(CASE WHEN sl."cache_hit" != 'True' THEN sl."completion_tokens" ELSE 0 END) AS generated_completion_tokens + FROM "LiteLLM_SpendLogs" sl + LEFT JOIN "LiteLLM_VerificationToken" vt ON sl."api_key" = vt."token" + WHERE + sl."startTime" BETWEEN $1::date AND $2::date + interval '1 day' + GROUP BY + vt."key_alias", + sl."call_type", + sl."model" + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + + if db_response is None: + return [] + + return db_response + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/anthropic_endpoints/endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/anthropic_endpoints/endpoints.py new file mode 100644 index 00000000..78078b93 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/anthropic_endpoints/endpoints.py @@ -0,0 +1,252 @@ +""" +Unified /v1/messages endpoint - (Anthropic Spec) +""" + +import asyncio +import json +import time +import traceback + +from fastapi import APIRouter, Depends, HTTPException, Request, Response, status +from fastapi.responses import StreamingResponse + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing +from litellm.proxy.common_utils.http_parsing_utils import _read_request_body +from litellm.proxy.litellm_pre_call_utils import add_litellm_data_to_request +from litellm.proxy.utils import ProxyLogging + +router = APIRouter() + + +async def async_data_generator_anthropic( + response, + user_api_key_dict: UserAPIKeyAuth, + request_data: dict, + proxy_logging_obj: ProxyLogging, +): + verbose_proxy_logger.debug("inside generator") + try: + time.time() + async for chunk in response: + verbose_proxy_logger.debug( + "async_data_generator: received streaming chunk - {}".format(chunk) + ) + ### CALL HOOKS ### - modify outgoing data + chunk = await proxy_logging_obj.async_post_call_streaming_hook( + user_api_key_dict=user_api_key_dict, response=chunk + ) + + yield chunk + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.async_data_generator(): Exception occured - {}".format( + str(e) + ) + ) + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data=request_data, + ) + verbose_proxy_logger.debug( + f"\033[1;31mAn error occurred: {e}\n\n Debug this by setting `--debug`, e.g. `litellm --model gpt-3.5-turbo --debug`" + ) + + if isinstance(e, HTTPException): + raise e + else: + error_traceback = traceback.format_exc() + error_msg = f"{str(e)}\n\n{error_traceback}" + + proxy_exception = ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + error_returned = json.dumps({"error": proxy_exception.to_dict()}) + yield f"data: {error_returned}\n\n" + + +@router.post( + "/v1/messages", + tags=["[beta] Anthropic `/v1/messages`"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def anthropic_response( # noqa: PLR0915 + fastapi_response: Response, + request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Use `{PROXY_BASE_URL}/anthropic/v1/messages` instead - [Docs](https://docs.litellm.ai/docs/anthropic_completion). + + This was a BETA endpoint that calls 100+ LLMs in the anthropic format. + """ + from litellm.proxy.proxy_server import ( + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + user_api_base, + user_max_tokens, + user_model, + user_request_timeout, + user_temperature, + version, + ) + + request_data = await _read_request_body(request=request) + data: dict = {**request_data} + try: + data["model"] = ( + general_settings.get("completion_model", None) # server default + or user_model # model name passed via cli args + or data.get("model", None) # default passed in http request + ) + if user_model: + data["model"] = user_model + + data = await add_litellm_data_to_request( + data=data, # type: ignore + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # override with user settings, these are params passed via cli + if user_temperature: + data["temperature"] = user_temperature + if user_request_timeout: + data["request_timeout"] = user_request_timeout + if user_max_tokens: + data["max_tokens"] = user_max_tokens + if user_api_base: + data["api_base"] = user_api_base + + ### MODEL ALIAS MAPPING ### + # check if model name in model alias map + # get the actual model name + if data["model"] in litellm.model_alias_map: + data["model"] = litellm.model_alias_map[data["model"]] + + ### CALL HOOKS ### - modify incoming data before calling the model + data = await proxy_logging_obj.pre_call_hook( # type: ignore + user_api_key_dict=user_api_key_dict, data=data, call_type="text_completion" + ) + + ### ROUTE THE REQUESTs ### + router_model_names = llm_router.model_names if llm_router is not None else [] + + # skip router if user passed their key + if ( + llm_router is not None and data["model"] in router_model_names + ): # model in router model list + llm_response = asyncio.create_task(llm_router.aanthropic_messages(**data)) + elif ( + llm_router is not None + and llm_router.model_group_alias is not None + and data["model"] in llm_router.model_group_alias + ): # model set in model_group_alias + llm_response = asyncio.create_task(llm_router.aanthropic_messages(**data)) + elif ( + llm_router is not None and data["model"] in llm_router.deployment_names + ): # model in router deployments, calling a specific deployment on the router + llm_response = asyncio.create_task( + llm_router.aanthropic_messages(**data, specific_deployment=True) + ) + elif ( + llm_router is not None and data["model"] in llm_router.get_model_ids() + ): # model in router model list + llm_response = asyncio.create_task(llm_router.aanthropic_messages(**data)) + elif ( + llm_router is not None + and data["model"] not in router_model_names + and ( + llm_router.default_deployment is not None + or len(llm_router.pattern_router.patterns) > 0 + ) + ): # model in router deployments, calling a specific deployment on the router + llm_response = asyncio.create_task(llm_router.aanthropic_messages(**data)) + elif user_model is not None: # `litellm --model <your-model-name>` + llm_response = asyncio.create_task(litellm.anthropic_messages(**data)) + else: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={ + "error": "completion: Invalid model name passed in model=" + + data.get("model", "") + }, + ) + + # Await the llm_response task + response = await llm_response + + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + verbose_proxy_logger.debug("final response: %s", response) + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + request_data=data, + hidden_params=hidden_params, + ) + ) + + if ( + "stream" in data and data["stream"] is True + ): # use generate_responses to stream responses + selected_data_generator = async_data_generator_anthropic( + response=response, + user_api_key_dict=user_api_key_dict, + request_data=data, + proxy_logging_obj=proxy_logging_obj, + ) + + return StreamingResponse( + selected_data_generator, # type: ignore + media_type="text/event-stream", + ) + + verbose_proxy_logger.info("\nResponse from Litellm:\n{}".format(response)) + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.anthropic_response(): Exception occured - {}".format( + str(e) + ) + ) + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_checks.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_checks.py new file mode 100644 index 00000000..f029511d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_checks.py @@ -0,0 +1,1373 @@ +# What is this? +## Common auth checks between jwt + key based auth +""" +Got Valid Token from Cache, DB +Run checks for: + +1. If user can call model +2. If user is in budget +3. If end_user ('user' passed to /chat/completions, /embeddings endpoint) is in budget +""" +import asyncio +import re +import time +import traceback +from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, cast + +from fastapi import status +from pydantic import BaseModel + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.caching.dual_cache import LimitedSizeOrderedDict +from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider +from litellm.proxy._types import ( + DB_CONNECTION_ERROR_TYPES, + RBAC_ROLES, + CallInfo, + LiteLLM_EndUserTable, + LiteLLM_JWTAuth, + LiteLLM_OrganizationMembershipTable, + LiteLLM_OrganizationTable, + LiteLLM_TeamTable, + LiteLLM_TeamTableCachedObj, + LiteLLM_UserTable, + LiteLLMRoutes, + LitellmUserRoles, + ProxyErrorTypes, + ProxyException, + RoleBasedPermissions, + SpecialModelNames, + UserAPIKeyAuth, +) +from litellm.proxy.auth.route_checks import RouteChecks +from litellm.proxy.route_llm_request import route_request +from litellm.proxy.utils import PrismaClient, ProxyLogging, log_db_metrics +from litellm.router import Router +from litellm.types.services import ServiceTypes + +from .auth_checks_organization import organization_role_based_access_check + +if TYPE_CHECKING: + from opentelemetry.trace import Span as _Span + + Span = _Span +else: + Span = Any + + +last_db_access_time = LimitedSizeOrderedDict(max_size=100) +db_cache_expiry = 5 # refresh every 5s + +all_routes = LiteLLMRoutes.openai_routes.value + LiteLLMRoutes.management_routes.value + + +async def common_checks( + request_body: dict, + team_object: Optional[LiteLLM_TeamTable], + user_object: Optional[LiteLLM_UserTable], + end_user_object: Optional[LiteLLM_EndUserTable], + global_proxy_spend: Optional[float], + general_settings: dict, + route: str, + llm_router: Optional[Router], + proxy_logging_obj: ProxyLogging, + valid_token: Optional[UserAPIKeyAuth], +) -> bool: + """ + Common checks across jwt + key-based auth. + + 1. If team is blocked + 2. If team can call model + 3. If team is in budget + 4. If user passed in (JWT or key.user_id) - is in budget + 5. If end_user (either via JWT or 'user' passed to /chat/completions, /embeddings endpoint) is in budget + 6. [OPTIONAL] If 'enforce_end_user' enabled - did developer pass in 'user' param for openai endpoints + 7. [OPTIONAL] If 'litellm.max_budget' is set (>0), is proxy under budget + 8. [OPTIONAL] If guardrails modified - is request allowed to change this + 9. Check if request body is safe + 10. [OPTIONAL] Organization checks - is user_object.organization_id is set, run these checks + """ + _model = request_body.get("model", None) + + # 1. If team is blocked + if team_object is not None and team_object.blocked is True: + raise Exception( + f"Team={team_object.team_id} is blocked. Update via `/team/unblock` if your admin." + ) + + # 2. If team can call model + if _model and team_object: + if not await can_team_access_model( + model=_model, + team_object=team_object, + llm_router=llm_router, + team_model_aliases=valid_token.team_model_aliases if valid_token else None, + ): + raise ProxyException( + message=f"Team not allowed to access model. Team={team_object.team_id}, Model={_model}. Allowed team models = {team_object.models}", + type=ProxyErrorTypes.team_model_access_denied, + param="model", + code=status.HTTP_401_UNAUTHORIZED, + ) + + ## 2.1 If user can call model (if personal key) + if team_object is None and user_object is not None: + await can_user_call_model( + model=_model, + llm_router=llm_router, + user_object=user_object, + ) + + # 3. If team is in budget + await _team_max_budget_check( + team_object=team_object, + proxy_logging_obj=proxy_logging_obj, + valid_token=valid_token, + ) + + # 4. If user is in budget + ## 4.1 check personal budget, if personal key + if ( + (team_object is None or team_object.team_id is None) + and user_object is not None + and user_object.max_budget is not None + ): + user_budget = user_object.max_budget + if user_budget < user_object.spend: + raise litellm.BudgetExceededError( + current_cost=user_object.spend, + max_budget=user_budget, + message=f"ExceededBudget: User={user_object.user_id} over budget. Spend={user_object.spend}, Budget={user_budget}", + ) + + ## 4.2 check team member budget, if team key + # 5. If end_user ('user' passed to /chat/completions, /embeddings endpoint) is in budget + if end_user_object is not None and end_user_object.litellm_budget_table is not None: + end_user_budget = end_user_object.litellm_budget_table.max_budget + if end_user_budget is not None and end_user_object.spend > end_user_budget: + raise litellm.BudgetExceededError( + current_cost=end_user_object.spend, + max_budget=end_user_budget, + message=f"ExceededBudget: End User={end_user_object.user_id} over budget. Spend={end_user_object.spend}, Budget={end_user_budget}", + ) + + # 6. [OPTIONAL] If 'enforce_user_param' enabled - did developer pass in 'user' param for openai endpoints + if ( + general_settings.get("enforce_user_param", None) is not None + and general_settings["enforce_user_param"] is True + ): + if RouteChecks.is_llm_api_route(route=route) and "user" not in request_body: + raise Exception( + f"'user' param not passed in. 'enforce_user_param'={general_settings['enforce_user_param']}" + ) + # 7. [OPTIONAL] If 'litellm.max_budget' is set (>0), is proxy under budget + if ( + litellm.max_budget > 0 + and global_proxy_spend is not None + # only run global budget checks for OpenAI routes + # Reason - the Admin UI should continue working if the proxy crosses it's global budget + and RouteChecks.is_llm_api_route(route=route) + and route != "/v1/models" + and route != "/models" + ): + if global_proxy_spend > litellm.max_budget: + raise litellm.BudgetExceededError( + current_cost=global_proxy_spend, max_budget=litellm.max_budget + ) + + _request_metadata: dict = request_body.get("metadata", {}) or {} + if _request_metadata.get("guardrails"): + # check if team allowed to modify guardrails + from litellm.proxy.guardrails.guardrail_helpers import can_modify_guardrails + + can_modify: bool = can_modify_guardrails(team_object) + if can_modify is False: + from fastapi import HTTPException + + raise HTTPException( + status_code=403, + detail={ + "error": "Your team does not have permission to modify guardrails." + }, + ) + + # 10 [OPTIONAL] Organization RBAC checks + organization_role_based_access_check( + user_object=user_object, route=route, request_body=request_body + ) + + return True + + +def _allowed_routes_check(user_route: str, allowed_routes: list) -> bool: + """ + Return if a user is allowed to access route. Helper function for `allowed_routes_check`. + + Parameters: + - user_route: str - the route the user is trying to call + - allowed_routes: List[str|LiteLLMRoutes] - the list of allowed routes for the user. + """ + + for allowed_route in allowed_routes: + if ( + allowed_route in LiteLLMRoutes.__members__ + and user_route in LiteLLMRoutes[allowed_route].value + ): + return True + elif allowed_route == user_route: + return True + return False + + +def allowed_routes_check( + user_role: Literal[ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.TEAM, + LitellmUserRoles.INTERNAL_USER, + ], + user_route: str, + litellm_proxy_roles: LiteLLM_JWTAuth, +) -> bool: + """ + Check if user -> not admin - allowed to access these routes + """ + + if user_role == LitellmUserRoles.PROXY_ADMIN: + is_allowed = _allowed_routes_check( + user_route=user_route, + allowed_routes=litellm_proxy_roles.admin_allowed_routes, + ) + return is_allowed + + elif user_role == LitellmUserRoles.TEAM: + if litellm_proxy_roles.team_allowed_routes is None: + """ + By default allow a team to call openai + info routes + """ + is_allowed = _allowed_routes_check( + user_route=user_route, allowed_routes=["openai_routes", "info_routes"] + ) + return is_allowed + elif litellm_proxy_roles.team_allowed_routes is not None: + is_allowed = _allowed_routes_check( + user_route=user_route, + allowed_routes=litellm_proxy_roles.team_allowed_routes, + ) + return is_allowed + return False + + +def allowed_route_check_inside_route( + user_api_key_dict: UserAPIKeyAuth, + requested_user_id: Optional[str], +) -> bool: + ret_val = True + if ( + user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN + and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY + ): + ret_val = False + if requested_user_id is not None and user_api_key_dict.user_id is not None: + if user_api_key_dict.user_id == requested_user_id: + ret_val = True + return ret_val + + +def get_actual_routes(allowed_routes: list) -> list: + actual_routes: list = [] + for route_name in allowed_routes: + try: + route_value = LiteLLMRoutes[route_name].value + if isinstance(route_value, set): + actual_routes.extend(list(route_value)) + else: + actual_routes.extend(route_value) + + except KeyError: + actual_routes.append(route_name) + return actual_routes + + +@log_db_metrics +async def get_end_user_object( + end_user_id: Optional[str], + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span] = None, + proxy_logging_obj: Optional[ProxyLogging] = None, +) -> Optional[LiteLLM_EndUserTable]: + """ + Returns end user object, if in db. + + Do a isolated check for end user in table vs. doing a combined key + team + user + end-user check, as key might come in frequently for different end-users. Larger call will slowdown query time. This way we get to cache the constant (key/team/user info) and only update based on the changing value (end-user). + """ + if prisma_client is None: + raise Exception("No db connected") + + if end_user_id is None: + return None + _key = "end_user_id:{}".format(end_user_id) + + def check_in_budget(end_user_obj: LiteLLM_EndUserTable): + if end_user_obj.litellm_budget_table is None: + return + end_user_budget = end_user_obj.litellm_budget_table.max_budget + if end_user_budget is not None and end_user_obj.spend > end_user_budget: + raise litellm.BudgetExceededError( + current_cost=end_user_obj.spend, max_budget=end_user_budget + ) + + # check if in cache + cached_user_obj = await user_api_key_cache.async_get_cache(key=_key) + if cached_user_obj is not None: + if isinstance(cached_user_obj, dict): + return_obj = LiteLLM_EndUserTable(**cached_user_obj) + check_in_budget(end_user_obj=return_obj) + return return_obj + elif isinstance(cached_user_obj, LiteLLM_EndUserTable): + return_obj = cached_user_obj + check_in_budget(end_user_obj=return_obj) + return return_obj + # else, check db + try: + response = await prisma_client.db.litellm_endusertable.find_unique( + where={"user_id": end_user_id}, + include={"litellm_budget_table": True}, + ) + + if response is None: + raise Exception + + # save the end-user object to cache + await user_api_key_cache.async_set_cache( + key="end_user_id:{}".format(end_user_id), value=response + ) + + _response = LiteLLM_EndUserTable(**response.dict()) + + check_in_budget(end_user_obj=_response) + + return _response + except Exception as e: # if end-user not in db + if isinstance(e, litellm.BudgetExceededError): + raise e + return None + + +def model_in_access_group( + model: str, team_models: Optional[List[str]], llm_router: Optional[Router] +) -> bool: + from collections import defaultdict + + if team_models is None: + return True + if model in team_models: + return True + + access_groups: dict[str, list[str]] = defaultdict(list) + if llm_router: + access_groups = llm_router.get_model_access_groups(model_name=model) + + if len(access_groups) > 0: # check if token contains any model access groups + for idx, m in enumerate( + team_models + ): # loop token models, if any of them are an access group add the access group + if m in access_groups: + return True + + # Filter out models that are access_groups + filtered_models = [m for m in team_models if m not in access_groups] + + if model in filtered_models: + return True + + return False + + +def _should_check_db( + key: str, last_db_access_time: LimitedSizeOrderedDict, db_cache_expiry: int +) -> bool: + """ + Prevent calling db repeatedly for items that don't exist in the db. + """ + current_time = time.time() + # if key doesn't exist in last_db_access_time -> check db + if key not in last_db_access_time: + return True + elif ( + last_db_access_time[key][0] is not None + ): # check db for non-null values (for refresh operations) + return True + elif last_db_access_time[key][0] is None: + if current_time - last_db_access_time[key] >= db_cache_expiry: + return True + return False + + +def _update_last_db_access_time( + key: str, value: Optional[Any], last_db_access_time: LimitedSizeOrderedDict +): + last_db_access_time[key] = (value, time.time()) + + +def _get_role_based_permissions( + rbac_role: RBAC_ROLES, + general_settings: dict, + key: Literal["models", "routes"], +) -> Optional[List[str]]: + """ + Get the role based permissions from the general settings. + """ + role_based_permissions = cast( + Optional[List[RoleBasedPermissions]], + general_settings.get("role_permissions", []), + ) + if role_based_permissions is None: + return None + + for role_based_permission in role_based_permissions: + + if role_based_permission.role == rbac_role: + return getattr(role_based_permission, key) + + return None + + +def get_role_based_models( + rbac_role: RBAC_ROLES, + general_settings: dict, +) -> Optional[List[str]]: + """ + Get the models allowed for a user role. + + Used by JWT Auth. + """ + + return _get_role_based_permissions( + rbac_role=rbac_role, + general_settings=general_settings, + key="models", + ) + + +def get_role_based_routes( + rbac_role: RBAC_ROLES, + general_settings: dict, +) -> Optional[List[str]]: + """ + Get the routes allowed for a user role. + """ + + return _get_role_based_permissions( + rbac_role=rbac_role, + general_settings=general_settings, + key="routes", + ) + + +async def _get_fuzzy_user_object( + prisma_client: PrismaClient, + sso_user_id: Optional[str] = None, + user_email: Optional[str] = None, +) -> Optional[LiteLLM_UserTable]: + """ + Checks if sso user is in db. + + Called when user id match is not found in db. + + - Check if sso_user_id is user_id in db + - Check if sso_user_id is sso_user_id in db + - Check if user_email is user_email in db + - If not, create new user with user_email and sso_user_id and user_id = sso_user_id + """ + response = None + if sso_user_id is not None: + response = await prisma_client.db.litellm_usertable.find_unique( + where={"sso_user_id": sso_user_id}, + include={"organization_memberships": True}, + ) + + if response is None and user_email is not None: + response = await prisma_client.db.litellm_usertable.find_first( + where={"user_email": user_email}, + include={"organization_memberships": True}, + ) + + if response is not None and sso_user_id is not None: # update sso_user_id + asyncio.create_task( # background task to update user with sso id + prisma_client.db.litellm_usertable.update( + where={"user_id": response.user_id}, + data={"sso_user_id": sso_user_id}, + ) + ) + + return response + + +@log_db_metrics +async def get_user_object( + user_id: Optional[str], + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + user_id_upsert: bool, + parent_otel_span: Optional[Span] = None, + proxy_logging_obj: Optional[ProxyLogging] = None, + sso_user_id: Optional[str] = None, + user_email: Optional[str] = None, +) -> Optional[LiteLLM_UserTable]: + """ + - Check if user id in proxy User Table + - if valid, return LiteLLM_UserTable object with defined limits + - if not, then raise an error + """ + + if user_id is None: + return None + + # check if in cache + cached_user_obj = await user_api_key_cache.async_get_cache(key=user_id) + if cached_user_obj is not None: + if isinstance(cached_user_obj, dict): + return LiteLLM_UserTable(**cached_user_obj) + elif isinstance(cached_user_obj, LiteLLM_UserTable): + return cached_user_obj + # else, check db + if prisma_client is None: + raise Exception("No db connected") + try: + db_access_time_key = "user_id:{}".format(user_id) + should_check_db = _should_check_db( + key=db_access_time_key, + last_db_access_time=last_db_access_time, + db_cache_expiry=db_cache_expiry, + ) + + if should_check_db: + response = await prisma_client.db.litellm_usertable.find_unique( + where={"user_id": user_id}, include={"organization_memberships": True} + ) + + if response is None: + response = await _get_fuzzy_user_object( + prisma_client=prisma_client, + sso_user_id=sso_user_id, + user_email=user_email, + ) + + else: + response = None + + if response is None: + if user_id_upsert: + response = await prisma_client.db.litellm_usertable.create( + data={"user_id": user_id}, + include={"organization_memberships": True}, + ) + else: + raise Exception + + if ( + response.organization_memberships is not None + and len(response.organization_memberships) > 0 + ): + # dump each organization membership to type LiteLLM_OrganizationMembershipTable + _dumped_memberships = [ + LiteLLM_OrganizationMembershipTable(**membership.model_dump()) + for membership in response.organization_memberships + if membership is not None + ] + response.organization_memberships = _dumped_memberships + + _response = LiteLLM_UserTable(**dict(response)) + response_dict = _response.model_dump() + + # save the user object to cache + await user_api_key_cache.async_set_cache(key=user_id, value=response_dict) + + # save to db access time + _update_last_db_access_time( + key=db_access_time_key, + value=response_dict, + last_db_access_time=last_db_access_time, + ) + + return _response + except Exception as e: # if user not in db + raise ValueError( + f"User doesn't exist in db. 'user_id'={user_id}. Create user via `/user/new` call. Got error - {e}" + ) + + +async def _cache_management_object( + key: str, + value: BaseModel, + user_api_key_cache: DualCache, + proxy_logging_obj: Optional[ProxyLogging], +): + await user_api_key_cache.async_set_cache(key=key, value=value) + + +async def _cache_team_object( + team_id: str, + team_table: LiteLLM_TeamTableCachedObj, + user_api_key_cache: DualCache, + proxy_logging_obj: Optional[ProxyLogging], +): + key = "team_id:{}".format(team_id) + + ## CACHE REFRESH TIME! + team_table.last_refreshed_at = time.time() + + await _cache_management_object( + key=key, + value=team_table, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + +async def _cache_key_object( + hashed_token: str, + user_api_key_obj: UserAPIKeyAuth, + user_api_key_cache: DualCache, + proxy_logging_obj: Optional[ProxyLogging], +): + key = hashed_token + + ## CACHE REFRESH TIME + user_api_key_obj.last_refreshed_at = time.time() + + await _cache_management_object( + key=key, + value=user_api_key_obj, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + +async def _delete_cache_key_object( + hashed_token: str, + user_api_key_cache: DualCache, + proxy_logging_obj: Optional[ProxyLogging], +): + key = hashed_token + + user_api_key_cache.delete_cache(key=key) + + ## UPDATE REDIS CACHE ## + if proxy_logging_obj is not None: + await proxy_logging_obj.internal_usage_cache.dual_cache.async_delete_cache( + key=key + ) + + +@log_db_metrics +async def _get_team_db_check( + team_id: str, prisma_client: PrismaClient, team_id_upsert: Optional[bool] = None +): + response = await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": team_id} + ) + + if response is None and team_id_upsert: + response = await prisma_client.db.litellm_teamtable.create( + data={"team_id": team_id} + ) + + return response + + +async def _get_team_object_from_db(team_id: str, prisma_client: PrismaClient): + return await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": team_id} + ) + + +async def _get_team_object_from_user_api_key_cache( + team_id: str, + prisma_client: PrismaClient, + user_api_key_cache: DualCache, + last_db_access_time: LimitedSizeOrderedDict, + db_cache_expiry: int, + proxy_logging_obj: Optional[ProxyLogging], + key: str, + team_id_upsert: Optional[bool] = None, +) -> LiteLLM_TeamTableCachedObj: + db_access_time_key = key + should_check_db = _should_check_db( + key=db_access_time_key, + last_db_access_time=last_db_access_time, + db_cache_expiry=db_cache_expiry, + ) + if should_check_db: + response = await _get_team_db_check( + team_id=team_id, prisma_client=prisma_client, team_id_upsert=team_id_upsert + ) + else: + response = None + + if response is None: + raise Exception + + _response = LiteLLM_TeamTableCachedObj(**response.dict()) + # save the team object to cache + await _cache_team_object( + team_id=team_id, + team_table=_response, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + # save to db access time + # save to db access time + _update_last_db_access_time( + key=db_access_time_key, + value=_response, + last_db_access_time=last_db_access_time, + ) + + return _response + + +async def _get_team_object_from_cache( + key: str, + proxy_logging_obj: Optional[ProxyLogging], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span], +) -> Optional[LiteLLM_TeamTableCachedObj]: + cached_team_obj: Optional[LiteLLM_TeamTableCachedObj] = None + + ## CHECK REDIS CACHE ## + if ( + proxy_logging_obj is not None + and proxy_logging_obj.internal_usage_cache.dual_cache + ): + + cached_team_obj = ( + await proxy_logging_obj.internal_usage_cache.dual_cache.async_get_cache( + key=key, parent_otel_span=parent_otel_span + ) + ) + + if cached_team_obj is None: + cached_team_obj = await user_api_key_cache.async_get_cache(key=key) + + if cached_team_obj is not None: + if isinstance(cached_team_obj, dict): + return LiteLLM_TeamTableCachedObj(**cached_team_obj) + elif isinstance(cached_team_obj, LiteLLM_TeamTableCachedObj): + return cached_team_obj + + return None + + +async def get_team_object( + team_id: str, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span] = None, + proxy_logging_obj: Optional[ProxyLogging] = None, + check_cache_only: Optional[bool] = None, + check_db_only: Optional[bool] = None, + team_id_upsert: Optional[bool] = None, +) -> LiteLLM_TeamTableCachedObj: + """ + - Check if team id in proxy Team Table + - if valid, return LiteLLM_TeamTable object with defined limits + - if not, then raise an error + + Raises: + - Exception: If team doesn't exist in db or cache + """ + if prisma_client is None: + raise Exception( + "No DB Connected. See - https://docs.litellm.ai/docs/proxy/virtual_keys" + ) + + # check if in cache + key = "team_id:{}".format(team_id) + + if not check_db_only: + cached_team_obj = await _get_team_object_from_cache( + key=key, + proxy_logging_obj=proxy_logging_obj, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + ) + + if cached_team_obj is not None: + return cached_team_obj + + if check_cache_only: + raise Exception( + f"Team doesn't exist in cache + check_cache_only=True. Team={team_id}." + ) + + # else, check db + try: + return await _get_team_object_from_user_api_key_cache( + team_id=team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + last_db_access_time=last_db_access_time, + db_cache_expiry=db_cache_expiry, + key=key, + team_id_upsert=team_id_upsert, + ) + except Exception: + raise Exception( + f"Team doesn't exist in db. Team={team_id}. Create team via `/team/new` call." + ) + + +@log_db_metrics +async def get_key_object( + hashed_token: str, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span] = None, + proxy_logging_obj: Optional[ProxyLogging] = None, + check_cache_only: Optional[bool] = None, +) -> UserAPIKeyAuth: + """ + - Check if team id in proxy Team Table + - if valid, return LiteLLM_TeamTable object with defined limits + - if not, then raise an error + """ + if prisma_client is None: + raise Exception( + "No DB Connected. See - https://docs.litellm.ai/docs/proxy/virtual_keys" + ) + + # check if in cache + key = hashed_token + + cached_key_obj: Optional[UserAPIKeyAuth] = await user_api_key_cache.async_get_cache( + key=key + ) + + if cached_key_obj is not None: + if isinstance(cached_key_obj, dict): + return UserAPIKeyAuth(**cached_key_obj) + elif isinstance(cached_key_obj, UserAPIKeyAuth): + return cached_key_obj + + if check_cache_only: + raise Exception( + f"Key doesn't exist in cache + check_cache_only=True. key={key}." + ) + + # else, check db + try: + _valid_token: Optional[BaseModel] = await prisma_client.get_data( + token=hashed_token, + table_name="combined_view", + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + + if _valid_token is None: + raise Exception + + _response = UserAPIKeyAuth(**_valid_token.model_dump(exclude_none=True)) + + # save the key object to cache + await _cache_key_object( + hashed_token=hashed_token, + user_api_key_obj=_response, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + return _response + except DB_CONNECTION_ERROR_TYPES as e: + return await _handle_failed_db_connection_for_get_key_object(e=e) + except Exception: + traceback.print_exc() + raise Exception( + f"Key doesn't exist in db. key={hashed_token}. Create key via `/key/generate` call." + ) + + +async def _handle_failed_db_connection_for_get_key_object( + e: Exception, +) -> UserAPIKeyAuth: + """ + Handles httpx.ConnectError when reading a Virtual Key from LiteLLM DB + + Use this if you don't want failed DB queries to block LLM API reqiests + + Returns: + - UserAPIKeyAuth: If general_settings.allow_requests_on_db_unavailable is True + + Raises: + - Orignal Exception in all other cases + """ + from litellm.proxy.proxy_server import ( + general_settings, + litellm_proxy_admin_name, + proxy_logging_obj, + ) + + # If this flag is on, requests failing to connect to the DB will be allowed + if general_settings.get("allow_requests_on_db_unavailable", False) is True: + # log this as a DB failure on prometheus + proxy_logging_obj.service_logging_obj.service_failure_hook( + service=ServiceTypes.DB, + call_type="get_key_object", + error=e, + duration=0.0, + ) + + return UserAPIKeyAuth( + key_name="failed-to-connect-to-db", + token="failed-to-connect-to-db", + user_id=litellm_proxy_admin_name, + ) + else: + # raise the original exception, the wrapper on `get_key_object` handles logging db failure to prometheus + raise e + + +@log_db_metrics +async def get_org_object( + org_id: str, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span] = None, + proxy_logging_obj: Optional[ProxyLogging] = None, +) -> Optional[LiteLLM_OrganizationTable]: + """ + - Check if org id in proxy Org Table + - if valid, return LiteLLM_OrganizationTable object + - if not, then raise an error + """ + if prisma_client is None: + raise Exception( + "No DB Connected. See - https://docs.litellm.ai/docs/proxy/virtual_keys" + ) + + # check if in cache + cached_org_obj = user_api_key_cache.async_get_cache(key="org_id:{}".format(org_id)) + if cached_org_obj is not None: + if isinstance(cached_org_obj, dict): + return LiteLLM_OrganizationTable(**cached_org_obj) + elif isinstance(cached_org_obj, LiteLLM_OrganizationTable): + return cached_org_obj + # else, check db + try: + response = await prisma_client.db.litellm_organizationtable.find_unique( + where={"organization_id": org_id} + ) + + if response is None: + raise Exception + + return response + except Exception: + raise Exception( + f"Organization doesn't exist in db. Organization={org_id}. Create organization via `/organization/new` call." + ) + + +async def _can_object_call_model( + model: str, + llm_router: Optional[Router], + models: List[str], + team_model_aliases: Optional[Dict[str, str]] = None, + object_type: Literal["user", "team", "key"] = "user", +) -> Literal[True]: + """ + Checks if token can call a given model + + Args: + - model: str + - llm_router: Optional[Router] + - models: List[str] + - team_model_aliases: Optional[Dict[str, str]] + - object_type: Literal["user", "team", "key"]. We use the object type to raise the correct exception type + + Returns: + - True: if token allowed to call model + + Raises: + - Exception: If token not allowed to call model + """ + if model in litellm.model_alias_map: + model = litellm.model_alias_map[model] + + ## check if model in allowed model names + from collections import defaultdict + + access_groups: Dict[str, List[str]] = defaultdict(list) + + if llm_router: + access_groups = llm_router.get_model_access_groups(model_name=model) + if ( + len(access_groups) > 0 and llm_router is not None + ): # check if token contains any model access groups + for idx, m in enumerate( + models + ): # loop token models, if any of them are an access group add the access group + if m in access_groups: + return True + + # Filter out models that are access_groups + filtered_models = [m for m in models if m not in access_groups] + + verbose_proxy_logger.debug(f"model: {model}; allowed_models: {filtered_models}") + + if _model_in_team_aliases(model=model, team_model_aliases=team_model_aliases): + return True + + if _model_matches_any_wildcard_pattern_in_list( + model=model, allowed_model_list=filtered_models + ): + return True + + all_model_access: bool = False + + if (len(filtered_models) == 0 and len(models) == 0) or "*" in filtered_models: + all_model_access = True + + if SpecialModelNames.all_proxy_models.value in filtered_models: + all_model_access = True + + if model is not None and model not in filtered_models and all_model_access is False: + raise ProxyException( + message=f"{object_type} not allowed to access model. This {object_type} can only access models={models}. Tried to access {model}", + type=ProxyErrorTypes.get_model_access_error_type_for_object( + object_type=object_type + ), + param="model", + code=status.HTTP_401_UNAUTHORIZED, + ) + + verbose_proxy_logger.debug( + f"filtered allowed_models: {filtered_models}; models: {models}" + ) + return True + + +def _model_in_team_aliases( + model: str, team_model_aliases: Optional[Dict[str, str]] = None +) -> bool: + """ + Returns True if `model` being accessed is an alias of a team model + + - `model=gpt-4o` + - `team_model_aliases={"gpt-4o": "gpt-4o-team-1"}` + - returns True + + - `model=gp-4o` + - `team_model_aliases={"o-3": "o3-preview"}` + - returns False + """ + if team_model_aliases: + if model in team_model_aliases: + return True + return False + + +async def can_key_call_model( + model: str, + llm_model_list: Optional[list], + valid_token: UserAPIKeyAuth, + llm_router: Optional[litellm.Router], +) -> Literal[True]: + """ + Checks if token can call a given model + + Returns: + - True: if token allowed to call model + + Raises: + - Exception: If token not allowed to call model + """ + return await _can_object_call_model( + model=model, + llm_router=llm_router, + models=valid_token.models, + team_model_aliases=valid_token.team_model_aliases, + object_type="key", + ) + + +async def can_team_access_model( + model: str, + team_object: Optional[LiteLLM_TeamTable], + llm_router: Optional[Router], + team_model_aliases: Optional[Dict[str, str]] = None, +) -> Literal[True]: + """ + Returns True if the team can access a specific model. + + """ + return await _can_object_call_model( + model=model, + llm_router=llm_router, + models=team_object.models if team_object else [], + team_model_aliases=team_model_aliases, + object_type="team", + ) + + +async def can_user_call_model( + model: str, + llm_router: Optional[Router], + user_object: Optional[LiteLLM_UserTable], +) -> Literal[True]: + + if user_object is None: + return True + + if SpecialModelNames.no_default_models.value in user_object.models: + raise ProxyException( + message=f"User not allowed to access model. No default model access, only team models allowed. Tried to access {model}", + type=ProxyErrorTypes.key_model_access_denied, + param="model", + code=status.HTTP_401_UNAUTHORIZED, + ) + + return await _can_object_call_model( + model=model, + llm_router=llm_router, + models=user_object.models, + object_type="user", + ) + + +async def is_valid_fallback_model( + model: str, + llm_router: Optional[Router], + user_model: Optional[str], +) -> Literal[True]: + """ + Try to route the fallback model request. + + Validate if it can't be routed. + + Help catch invalid fallback models. + """ + await route_request( + data={ + "model": model, + "messages": [{"role": "user", "content": "Who was Alexander?"}], + }, + llm_router=llm_router, + user_model=user_model, + route_type="acompletion", # route type shouldn't affect the fallback model check + ) + + return True + + +async def _virtual_key_max_budget_check( + valid_token: UserAPIKeyAuth, + proxy_logging_obj: ProxyLogging, + user_obj: Optional[LiteLLM_UserTable] = None, +): + """ + Raises: + BudgetExceededError if the token is over it's max budget. + Triggers a budget alert if the token is over it's max budget. + + """ + if valid_token.spend is not None and valid_token.max_budget is not None: + #################################### + # collect information for alerting # + #################################### + + user_email = None + # Check if the token has any user id information + if user_obj is not None: + user_email = user_obj.user_email + + call_info = CallInfo( + token=valid_token.token, + spend=valid_token.spend, + max_budget=valid_token.max_budget, + user_id=valid_token.user_id, + team_id=valid_token.team_id, + user_email=user_email, + key_alias=valid_token.key_alias, + ) + asyncio.create_task( + proxy_logging_obj.budget_alerts( + type="token_budget", + user_info=call_info, + ) + ) + + #################################### + # collect information for alerting # + #################################### + + if valid_token.spend >= valid_token.max_budget: + raise litellm.BudgetExceededError( + current_cost=valid_token.spend, + max_budget=valid_token.max_budget, + ) + + +async def _virtual_key_soft_budget_check( + valid_token: UserAPIKeyAuth, + proxy_logging_obj: ProxyLogging, +): + """ + Triggers a budget alert if the token is over it's soft budget. + + """ + + if valid_token.soft_budget and valid_token.spend >= valid_token.soft_budget: + verbose_proxy_logger.debug( + "Crossed Soft Budget for token %s, spend %s, soft_budget %s", + valid_token.token, + valid_token.spend, + valid_token.soft_budget, + ) + call_info = CallInfo( + token=valid_token.token, + spend=valid_token.spend, + max_budget=valid_token.max_budget, + soft_budget=valid_token.soft_budget, + user_id=valid_token.user_id, + team_id=valid_token.team_id, + team_alias=valid_token.team_alias, + user_email=None, + key_alias=valid_token.key_alias, + ) + asyncio.create_task( + proxy_logging_obj.budget_alerts( + type="soft_budget", + user_info=call_info, + ) + ) + + +async def _team_max_budget_check( + team_object: Optional[LiteLLM_TeamTable], + valid_token: Optional[UserAPIKeyAuth], + proxy_logging_obj: ProxyLogging, +): + """ + Check if the team is over it's max budget. + + Raises: + BudgetExceededError if the team is over it's max budget. + Triggers a budget alert if the team is over it's max budget. + """ + if ( + team_object is not None + and team_object.max_budget is not None + and team_object.spend is not None + and team_object.spend > team_object.max_budget + ): + if valid_token: + call_info = CallInfo( + token=valid_token.token, + spend=team_object.spend, + max_budget=team_object.max_budget, + user_id=valid_token.user_id, + team_id=valid_token.team_id, + team_alias=valid_token.team_alias, + ) + asyncio.create_task( + proxy_logging_obj.budget_alerts( + type="team_budget", + user_info=call_info, + ) + ) + + raise litellm.BudgetExceededError( + current_cost=team_object.spend, + max_budget=team_object.max_budget, + message=f"Budget has been exceeded! Team={team_object.team_id} Current cost: {team_object.spend}, Max budget: {team_object.max_budget}", + ) + + +def is_model_allowed_by_pattern(model: str, allowed_model_pattern: str) -> bool: + """ + Check if a model matches an allowed pattern. + Handles exact matches and wildcard patterns. + + Args: + model (str): The model to check (e.g., "bedrock/anthropic.claude-3-5-sonnet-20240620") + allowed_model_pattern (str): The allowed pattern (e.g., "bedrock/*", "*", "openai/*") + + Returns: + bool: True if model matches the pattern, False otherwise + """ + if "*" in allowed_model_pattern: + pattern = f"^{allowed_model_pattern.replace('*', '.*')}$" + return bool(re.match(pattern, model)) + + return False + + +def _model_matches_any_wildcard_pattern_in_list( + model: str, allowed_model_list: list +) -> bool: + """ + Returns True if a model matches any wildcard pattern in a list. + + eg. + - model=`bedrock/us.amazon.nova-micro-v1:0`, allowed_models=`bedrock/*` returns True + - model=`bedrock/us.amazon.nova-micro-v1:0`, allowed_models=`bedrock/us.*` returns True + - model=`bedrockzzzz/us.amazon.nova-micro-v1:0`, allowed_models=`bedrock/*` returns False + """ + + if any( + _is_wildcard_pattern(allowed_model_pattern) + and is_model_allowed_by_pattern( + model=model, allowed_model_pattern=allowed_model_pattern + ) + for allowed_model_pattern in allowed_model_list + ): + return True + + if any( + _is_wildcard_pattern(allowed_model_pattern) + and _model_custom_llm_provider_matches_wildcard_pattern( + model=model, allowed_model_pattern=allowed_model_pattern + ) + for allowed_model_pattern in allowed_model_list + ): + return True + + return False + + +def _model_custom_llm_provider_matches_wildcard_pattern( + model: str, allowed_model_pattern: str +) -> bool: + """ + Returns True for this scenario: + - `model=gpt-4o` + - `allowed_model_pattern=openai/*` + + or + - `model=claude-3-5-sonnet-20240620` + - `allowed_model_pattern=anthropic/*` + """ + try: + model, custom_llm_provider, _, _ = get_llm_provider(model=model) + except Exception: + return False + + return is_model_allowed_by_pattern( + model=f"{custom_llm_provider}/{model}", + allowed_model_pattern=allowed_model_pattern, + ) + + +def _is_wildcard_pattern(allowed_model_pattern: str) -> bool: + """ + Returns True if the pattern is a wildcard pattern. + + Checks if `*` is in the pattern. + """ + return "*" in allowed_model_pattern diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_checks_organization.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_checks_organization.py new file mode 100644 index 00000000..3da3d8dd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_checks_organization.py @@ -0,0 +1,161 @@ +""" +Auth Checks for Organizations +""" + +from typing import Dict, List, Optional, Tuple + +from fastapi import status + +from litellm.proxy._types import * + + +def organization_role_based_access_check( + request_body: dict, + user_object: Optional[LiteLLM_UserTable], + route: str, +): + """ + Role based access control checks only run if a user is part of an Organization + + Organization Checks: + ONLY RUN IF user_object.organization_memberships is not None + + 1. Only Proxy Admins can access /organization/new + 2. IF route is a LiteLLMRoutes.org_admin_only_routes, then check if user is an Org Admin for that organization + + """ + + if user_object is None: + return + + passed_organization_id: Optional[str] = request_body.get("organization_id", None) + + if route == "/organization/new": + if user_object.user_role != LitellmUserRoles.PROXY_ADMIN.value: + raise ProxyException( + message=f"Only proxy admins can create new organizations. You are {user_object.user_role}", + type=ProxyErrorTypes.auth_error.value, + param="user_role", + code=status.HTTP_401_UNAUTHORIZED, + ) + + if user_object.user_role == LitellmUserRoles.PROXY_ADMIN.value: + return + + # Checks if route is an Org Admin Only Route + if route in LiteLLMRoutes.org_admin_only_routes.value: + _user_organizations, _user_organization_role_mapping = ( + get_user_organization_info(user_object) + ) + + if user_object.organization_memberships is None: + raise ProxyException( + message=f"Tried to access route={route} but you are not a member of any organization. Please contact the proxy admin to request access.", + type=ProxyErrorTypes.auth_error.value, + param="organization_id", + code=status.HTTP_401_UNAUTHORIZED, + ) + + if passed_organization_id is None: + raise ProxyException( + message="Passed organization_id is None, please pass an organization_id in your request", + type=ProxyErrorTypes.auth_error.value, + param="organization_id", + code=status.HTTP_401_UNAUTHORIZED, + ) + + user_role: Optional[LitellmUserRoles] = _user_organization_role_mapping.get( + passed_organization_id + ) + if user_role is None: + raise ProxyException( + message=f"You do not have a role within the selected organization. Passed organization_id: {passed_organization_id}. Please contact the organization admin to request access.", + type=ProxyErrorTypes.auth_error.value, + param="organization_id", + code=status.HTTP_401_UNAUTHORIZED, + ) + + if user_role != LitellmUserRoles.ORG_ADMIN.value: + raise ProxyException( + message=f"You do not have the required role to perform {route} in Organization {passed_organization_id}. Your role is {user_role} in Organization {passed_organization_id}", + type=ProxyErrorTypes.auth_error.value, + param="user_role", + code=status.HTTP_401_UNAUTHORIZED, + ) + elif route == "/team/new": + # if user is part of multiple teams, then they need to specify the organization_id + _user_organizations, _user_organization_role_mapping = ( + get_user_organization_info(user_object) + ) + if ( + user_object.organization_memberships is not None + and len(user_object.organization_memberships) > 0 + ): + if passed_organization_id is None: + raise ProxyException( + message=f"Passed organization_id is None, please specify the organization_id in your request. You are part of multiple organizations: {_user_organizations}", + type=ProxyErrorTypes.auth_error.value, + param="organization_id", + code=status.HTTP_401_UNAUTHORIZED, + ) + + _user_role_in_passed_org = _user_organization_role_mapping.get( + passed_organization_id + ) + if _user_role_in_passed_org != LitellmUserRoles.ORG_ADMIN.value: + raise ProxyException( + message=f"You do not have the required role to call {route}. Your role is {_user_role_in_passed_org} in Organization {passed_organization_id}", + type=ProxyErrorTypes.auth_error.value, + param="user_role", + code=status.HTTP_401_UNAUTHORIZED, + ) + + +def get_user_organization_info( + user_object: LiteLLM_UserTable, +) -> Tuple[List[str], Dict[str, Optional[LitellmUserRoles]]]: + """ + Helper function to extract user organization information. + + Args: + user_object (LiteLLM_UserTable): The user object containing organization memberships. + + Returns: + Tuple[List[str], Dict[str, Optional[LitellmUserRoles]]]: A tuple containing: + - List of organization IDs the user is a member of + - Dictionary mapping organization IDs to user roles + """ + _user_organizations: List[str] = [] + _user_organization_role_mapping: Dict[str, Optional[LitellmUserRoles]] = {} + + if user_object.organization_memberships is not None: + for _membership in user_object.organization_memberships: + if _membership.organization_id is not None: + _user_organizations.append(_membership.organization_id) + _user_organization_role_mapping[_membership.organization_id] = _membership.user_role # type: ignore + + return _user_organizations, _user_organization_role_mapping + + +def _user_is_org_admin( + request_data: dict, + user_object: Optional[LiteLLM_UserTable] = None, +) -> bool: + """ + Helper function to check if user is an org admin for the passed organization_id + """ + if request_data.get("organization_id", None) is None: + return False + + if user_object is None: + return False + + if user_object.organization_memberships is None: + return False + + for _membership in user_object.organization_memberships: + if _membership.organization_id == request_data.get("organization_id", None): + if _membership.user_role == LitellmUserRoles.ORG_ADMIN.value: + return True + + return False diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_utils.py new file mode 100644 index 00000000..91fcaf7e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/auth_utils.py @@ -0,0 +1,514 @@ +import os +import re +import sys +from typing import Any, List, Optional, Tuple + +from fastapi import HTTPException, Request, status + +from litellm import Router, provider_list +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.types.router import CONFIGURABLE_CLIENTSIDE_AUTH_PARAMS + + +def _get_request_ip_address( + request: Request, use_x_forwarded_for: Optional[bool] = False +) -> Optional[str]: + + client_ip = None + if use_x_forwarded_for is True and "x-forwarded-for" in request.headers: + client_ip = request.headers["x-forwarded-for"] + elif request.client is not None: + client_ip = request.client.host + else: + client_ip = "" + + return client_ip + + +def _check_valid_ip( + allowed_ips: Optional[List[str]], + request: Request, + use_x_forwarded_for: Optional[bool] = False, +) -> Tuple[bool, Optional[str]]: + """ + Returns if ip is allowed or not + """ + if allowed_ips is None: # if not set, assume true + return True, None + + # if general_settings.get("use_x_forwarded_for") is True then use x-forwarded-for + client_ip = _get_request_ip_address( + request=request, use_x_forwarded_for=use_x_forwarded_for + ) + + # Check if IP address is allowed + if client_ip not in allowed_ips: + return False, client_ip + + return True, client_ip + + +def check_complete_credentials(request_body: dict) -> bool: + """ + if 'api_base' in request body. Check if complete credentials given. Prevent malicious attacks. + """ + given_model: Optional[str] = None + + given_model = request_body.get("model") + if given_model is None: + return False + + if ( + "sagemaker" in given_model + or "bedrock" in given_model + or "vertex_ai" in given_model + or "vertex_ai_beta" in given_model + ): + # complex credentials - easier to make a malicious request + return False + + if "api_key" in request_body: + return True + + return False + + +def check_regex_or_str_match(request_body_value: Any, regex_str: str) -> bool: + """ + Check if request_body_value matches the regex_str or is equal to param + """ + if re.match(regex_str, request_body_value) or regex_str == request_body_value: + return True + return False + + +def _is_param_allowed( + param: str, + request_body_value: Any, + configurable_clientside_auth_params: CONFIGURABLE_CLIENTSIDE_AUTH_PARAMS, +) -> bool: + """ + Check if param is a str or dict and if request_body_value is in the list of allowed values + """ + if configurable_clientside_auth_params is None: + return False + + for item in configurable_clientside_auth_params: + if isinstance(item, str) and param == item: + return True + elif isinstance(item, Dict): + if param == "api_base" and check_regex_or_str_match( + request_body_value=request_body_value, + regex_str=item["api_base"], + ): # assume param is a regex + return True + + return False + + +def _allow_model_level_clientside_configurable_parameters( + model: str, param: str, request_body_value: Any, llm_router: Optional[Router] +) -> bool: + """ + Check if model is allowed to use configurable client-side params + - get matching model + - check if 'clientside_configurable_parameters' is set for model + - + """ + if llm_router is None: + return False + # check if model is set + model_info = llm_router.get_model_group_info(model_group=model) + if model_info is None: + # check if wildcard model is set + if model.split("/", 1)[0] in provider_list: + model_info = llm_router.get_model_group_info( + model_group=model.split("/", 1)[0] + ) + + if model_info is None: + return False + + if model_info is None or model_info.configurable_clientside_auth_params is None: + return False + + return _is_param_allowed( + param=param, + request_body_value=request_body_value, + configurable_clientside_auth_params=model_info.configurable_clientside_auth_params, + ) + + +def is_request_body_safe( + request_body: dict, general_settings: dict, llm_router: Optional[Router], model: str +) -> bool: + """ + Check if the request body is safe. + + A malicious user can set the api_base to their own domain and invoke POST /chat/completions to intercept and steal the OpenAI API key. + Relevant issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997 + """ + banned_params = ["api_base", "base_url"] + + for param in banned_params: + if ( + param in request_body + and not check_complete_credentials( # allow client-credentials to be passed to proxy + request_body=request_body + ) + ): + if general_settings.get("allow_client_side_credentials") is True: + return True + elif ( + _allow_model_level_clientside_configurable_parameters( + model=model, + param=param, + request_body_value=request_body[param], + llm_router=llm_router, + ) + is True + ): + return True + raise ValueError( + f"Rejected Request: {param} is not allowed in request body. " + "Enable with `general_settings::allow_client_side_credentials` on proxy config.yaml. " + "Relevant Issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997", + ) + + return True + + +async def pre_db_read_auth_checks( + request: Request, + request_data: dict, + route: str, +): + """ + 1. Checks if request size is under max_request_size_mb (if set) + 2. Check if request body is safe (example user has not set api_base in request body) + 3. Check if IP address is allowed (if set) + 4. Check if request route is an allowed route on the proxy (if set) + + Returns: + - True + + Raises: + - HTTPException if request fails initial auth checks + """ + from litellm.proxy.proxy_server import general_settings, llm_router, premium_user + + # Check 1. request size + await check_if_request_size_is_safe(request=request) + + # Check 2. Request body is safe + is_request_body_safe( + request_body=request_data, + general_settings=general_settings, + llm_router=llm_router, + model=request_data.get( + "model", "" + ), # [TODO] use model passed in url as well (azure openai routes) + ) + + # Check 3. Check if IP address is allowed + is_valid_ip, passed_in_ip = _check_valid_ip( + allowed_ips=general_settings.get("allowed_ips", None), + use_x_forwarded_for=general_settings.get("use_x_forwarded_for", False), + request=request, + ) + + if not is_valid_ip: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=f"Access forbidden: IP address {passed_in_ip} not allowed.", + ) + + # Check 4. Check if request route is an allowed route on the proxy + if "allowed_routes" in general_settings: + _allowed_routes = general_settings["allowed_routes"] + if premium_user is not True: + verbose_proxy_logger.error( + f"Trying to set allowed_routes. This is an Enterprise feature. {CommonProxyErrors.not_premium_user.value}" + ) + if route not in _allowed_routes: + verbose_proxy_logger.error( + f"Route {route} not in allowed_routes={_allowed_routes}" + ) + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=f"Access forbidden: Route {route} not allowed", + ) + + +def route_in_additonal_public_routes(current_route: str): + """ + Helper to check if the user defined public_routes on config.yaml + + Parameters: + - current_route: str - the route the user is trying to call + + Returns: + - bool - True if the route is defined in public_routes + - bool - False if the route is not defined in public_routes + + + In order to use this the litellm config.yaml should have the following in general_settings: + + ```yaml + general_settings: + master_key: sk-1234 + public_routes: ["LiteLLMRoutes.public_routes", "/spend/calculate"] + ``` + """ + + # check if user is premium_user - if not do nothing + from litellm.proxy.proxy_server import general_settings, premium_user + + try: + if premium_user is not True: + return False + # check if this is defined on the config + if general_settings is None: + return False + + routes_defined = general_settings.get("public_routes", []) + if current_route in routes_defined: + return True + + return False + except Exception as e: + verbose_proxy_logger.error(f"route_in_additonal_public_routes: {str(e)}") + return False + + +def get_request_route(request: Request) -> str: + """ + Helper to get the route from the request + + remove base url from path if set e.g. `/genai/chat/completions` -> `/chat/completions + """ + try: + if hasattr(request, "base_url") and request.url.path.startswith( + request.base_url.path + ): + # remove base_url from path + return request.url.path[len(request.base_url.path) - 1 :] + else: + return request.url.path + except Exception as e: + verbose_proxy_logger.debug( + f"error on get_request_route: {str(e)}, defaulting to request.url.path={request.url.path}" + ) + return request.url.path + + +async def check_if_request_size_is_safe(request: Request) -> bool: + """ + Enterprise Only: + - Checks if the request size is within the limit + + Args: + request (Request): The incoming request. + + Returns: + bool: True if the request size is within the limit + + Raises: + ProxyException: If the request size is too large + + """ + from litellm.proxy.proxy_server import general_settings, premium_user + + max_request_size_mb = general_settings.get("max_request_size_mb", None) + if max_request_size_mb is not None: + # Check if premium user + if premium_user is not True: + verbose_proxy_logger.warning( + f"using max_request_size_mb - not checking - this is an enterprise only feature. {CommonProxyErrors.not_premium_user.value}" + ) + return True + + # Get the request body + content_length = request.headers.get("content-length") + + if content_length: + header_size = int(content_length) + header_size_mb = bytes_to_mb(bytes_value=header_size) + verbose_proxy_logger.debug( + f"content_length request size in MB={header_size_mb}" + ) + + if header_size_mb > max_request_size_mb: + raise ProxyException( + message=f"Request size is too large. Request size is {header_size_mb} MB. Max size is {max_request_size_mb} MB", + type=ProxyErrorTypes.bad_request_error.value, + code=400, + param="content-length", + ) + else: + # If Content-Length is not available, read the body + body = await request.body() + body_size = len(body) + request_size_mb = bytes_to_mb(bytes_value=body_size) + + verbose_proxy_logger.debug( + f"request body request size in MB={request_size_mb}" + ) + if request_size_mb > max_request_size_mb: + raise ProxyException( + message=f"Request size is too large. Request size is {request_size_mb} MB. Max size is {max_request_size_mb} MB", + type=ProxyErrorTypes.bad_request_error.value, + code=400, + param="content-length", + ) + + return True + + +async def check_response_size_is_safe(response: Any) -> bool: + """ + Enterprise Only: + - Checks if the response size is within the limit + + Args: + response (Any): The response to check. + + Returns: + bool: True if the response size is within the limit + + Raises: + ProxyException: If the response size is too large + + """ + + from litellm.proxy.proxy_server import general_settings, premium_user + + max_response_size_mb = general_settings.get("max_response_size_mb", None) + if max_response_size_mb is not None: + # Check if premium user + if premium_user is not True: + verbose_proxy_logger.warning( + f"using max_response_size_mb - not checking - this is an enterprise only feature. {CommonProxyErrors.not_premium_user.value}" + ) + return True + + response_size_mb = bytes_to_mb(bytes_value=sys.getsizeof(response)) + verbose_proxy_logger.debug(f"response size in MB={response_size_mb}") + if response_size_mb > max_response_size_mb: + raise ProxyException( + message=f"Response size is too large. Response size is {response_size_mb} MB. Max size is {max_response_size_mb} MB", + type=ProxyErrorTypes.bad_request_error.value, + code=400, + param="content-length", + ) + + return True + + +def bytes_to_mb(bytes_value: int): + """ + Helper to convert bytes to MB + """ + return bytes_value / (1024 * 1024) + + +# helpers used by parallel request limiter to handle model rpm/tpm limits for a given api key +def get_key_model_rpm_limit( + user_api_key_dict: UserAPIKeyAuth, +) -> Optional[Dict[str, int]]: + if user_api_key_dict.metadata: + if "model_rpm_limit" in user_api_key_dict.metadata: + return user_api_key_dict.metadata["model_rpm_limit"] + elif user_api_key_dict.model_max_budget: + model_rpm_limit: Dict[str, Any] = {} + for model, budget in user_api_key_dict.model_max_budget.items(): + if "rpm_limit" in budget and budget["rpm_limit"] is not None: + model_rpm_limit[model] = budget["rpm_limit"] + return model_rpm_limit + + return None + + +def get_key_model_tpm_limit( + user_api_key_dict: UserAPIKeyAuth, +) -> Optional[Dict[str, int]]: + if user_api_key_dict.metadata: + if "model_tpm_limit" in user_api_key_dict.metadata: + return user_api_key_dict.metadata["model_tpm_limit"] + elif user_api_key_dict.model_max_budget: + if "tpm_limit" in user_api_key_dict.model_max_budget: + return user_api_key_dict.model_max_budget["tpm_limit"] + + return None + + +def is_pass_through_provider_route(route: str) -> bool: + PROVIDER_SPECIFIC_PASS_THROUGH_ROUTES = [ + "vertex-ai", + ] + + # check if any of the prefixes are in the route + for prefix in PROVIDER_SPECIFIC_PASS_THROUGH_ROUTES: + if prefix in route: + return True + + return False + + +def should_run_auth_on_pass_through_provider_route(route: str) -> bool: + """ + Use this to decide if the rest of the LiteLLM Virtual Key auth checks should run on /vertex-ai/{endpoint} routes + Use this to decide if the rest of the LiteLLM Virtual Key auth checks should run on provider pass through routes + ex /vertex-ai/{endpoint} routes + Run virtual key auth if the following is try: + - User is premium_user + - User has enabled litellm_setting.use_client_credentials_pass_through_routes + """ + from litellm.proxy.proxy_server import general_settings, premium_user + + if premium_user is not True: + + return False + + # premium use has opted into using client credentials + if ( + general_settings.get("use_client_credentials_pass_through_routes", False) + is True + ): + return False + + # only enabled for LiteLLM Enterprise + return True + + +def _has_user_setup_sso(): + """ + Check if the user has set up single sign-on (SSO) by verifying the presence of Microsoft client ID, Google client ID or generic client ID and UI username environment variables. + Returns a boolean indicating whether SSO has been set up. + """ + microsoft_client_id = os.getenv("MICROSOFT_CLIENT_ID", None) + google_client_id = os.getenv("GOOGLE_CLIENT_ID", None) + generic_client_id = os.getenv("GENERIC_CLIENT_ID", None) + + sso_setup = ( + (microsoft_client_id is not None) + or (google_client_id is not None) + or (generic_client_id is not None) + ) + + return sso_setup + + +def get_end_user_id_from_request_body(request_body: dict) -> Optional[str]: + # openai - check 'user' + if "user" in request_body and request_body["user"] is not None: + return str(request_body["user"]) + # anthropic - check 'litellm_metadata' + end_user_id = request_body.get("litellm_metadata", {}).get("user", None) + if end_user_id: + return str(end_user_id) + metadata = request_body.get("metadata") + if metadata and "user_id" in metadata and metadata["user_id"] is not None: + return str(metadata["user_id"]) + return None diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/handle_jwt.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/handle_jwt.py new file mode 100644 index 00000000..cc410501 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/handle_jwt.py @@ -0,0 +1,1001 @@ +""" +Supports using JWT's for authenticating into the proxy. + +Currently only supports admin. + +JWT token must have 'litellm_proxy_admin' in scope. +""" + +import json +import os +from typing import Any, List, Literal, Optional, Set, Tuple, cast + +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import serialization +from fastapi import HTTPException + +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.litellm_core_utils.dot_notation_indexing import get_nested_value +from litellm.llms.custom_httpx.httpx_handler import HTTPHandler +from litellm.proxy._types import ( + RBAC_ROLES, + JWKKeyValue, + JWTAuthBuilderResult, + JWTKeyItem, + LiteLLM_EndUserTable, + LiteLLM_JWTAuth, + LiteLLM_OrganizationTable, + LiteLLM_TeamTable, + LiteLLM_UserTable, + LitellmUserRoles, + ScopeMapping, + Span, +) +from litellm.proxy.auth.auth_checks import can_team_access_model +from litellm.proxy.utils import PrismaClient, ProxyLogging + +from .auth_checks import ( + _allowed_routes_check, + allowed_routes_check, + get_actual_routes, + get_end_user_object, + get_org_object, + get_role_based_models, + get_role_based_routes, + get_team_object, + get_user_object, +) + + +class JWTHandler: + """ + - treat the sub id passed in as the user id + - return an error if id making request doesn't exist in proxy user table + - track spend against the user id + - if role="litellm_proxy_user" -> allow making calls + info. Can not edit budgets + """ + + prisma_client: Optional[PrismaClient] + user_api_key_cache: DualCache + + def __init__( + self, + ) -> None: + self.http_handler = HTTPHandler() + self.leeway = 0 + + def update_environment( + self, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + litellm_jwtauth: LiteLLM_JWTAuth, + leeway: int = 0, + ) -> None: + self.prisma_client = prisma_client + self.user_api_key_cache = user_api_key_cache + self.litellm_jwtauth = litellm_jwtauth + self.leeway = leeway + + def is_jwt(self, token: str): + parts = token.split(".") + return len(parts) == 3 + + def _rbac_role_from_role_mapping(self, token: dict) -> Optional[RBAC_ROLES]: + """ + Returns the RBAC role the token 'belongs' to based on role mappings. + + Args: + token (dict): The JWT token containing role information + + Returns: + Optional[RBAC_ROLES]: The mapped internal RBAC role if a mapping exists, + None otherwise + + Note: + The function handles both single string roles and lists of roles from the JWT. + If multiple mappings match the JWT roles, the first matching mapping is returned. + """ + if self.litellm_jwtauth.role_mappings is None: + return None + + jwt_role = self.get_jwt_role(token=token, default_value=None) + if not jwt_role: + return None + + jwt_role_set = set(jwt_role) + + for role_mapping in self.litellm_jwtauth.role_mappings: + # Check if the mapping role matches any of the JWT roles + if role_mapping.role in jwt_role_set: + return role_mapping.internal_role + + return None + + def get_rbac_role(self, token: dict) -> Optional[RBAC_ROLES]: + """ + Returns the RBAC role the token 'belongs' to. + + RBAC roles allowed to make requests: + - PROXY_ADMIN: can make requests to all routes + - TEAM: can make requests to routes associated with a team + - INTERNAL_USER: can make requests to routes associated with a user + + Resolves: https://github.com/BerriAI/litellm/issues/6793 + + Returns: + - PROXY_ADMIN: if token is admin + - TEAM: if token is associated with a team + - INTERNAL_USER: if token is associated with a user + - None: if token is not associated with a team or user + """ + scopes = self.get_scopes(token=token) + is_admin = self.is_admin(scopes=scopes) + user_roles = self.get_user_roles(token=token, default_value=None) + + if is_admin: + return LitellmUserRoles.PROXY_ADMIN + elif self.get_team_id(token=token, default_value=None) is not None: + return LitellmUserRoles.TEAM + elif self.get_user_id(token=token, default_value=None) is not None: + return LitellmUserRoles.INTERNAL_USER + elif user_roles is not None and self.is_allowed_user_role( + user_roles=user_roles + ): + return LitellmUserRoles.INTERNAL_USER + elif rbac_role := self._rbac_role_from_role_mapping(token=token): + return rbac_role + + return None + + def is_admin(self, scopes: list) -> bool: + if self.litellm_jwtauth.admin_jwt_scope in scopes: + return True + return False + + def get_team_ids_from_jwt(self, token: dict) -> List[str]: + if ( + self.litellm_jwtauth.team_ids_jwt_field is not None + and token.get(self.litellm_jwtauth.team_ids_jwt_field) is not None + ): + return token[self.litellm_jwtauth.team_ids_jwt_field] + return [] + + def get_end_user_id( + self, token: dict, default_value: Optional[str] + ) -> Optional[str]: + try: + + if self.litellm_jwtauth.end_user_id_jwt_field is not None: + user_id = token[self.litellm_jwtauth.end_user_id_jwt_field] + else: + user_id = None + except KeyError: + user_id = default_value + + return user_id + + def is_required_team_id(self) -> bool: + """ + Returns: + - True: if 'team_id_jwt_field' is set + - False: if not + """ + if self.litellm_jwtauth.team_id_jwt_field is None: + return False + return True + + def is_enforced_email_domain(self) -> bool: + """ + Returns: + - True: if 'user_allowed_email_domain' is set + - False: if 'user_allowed_email_domain' is None + """ + + if self.litellm_jwtauth.user_allowed_email_domain is not None and isinstance( + self.litellm_jwtauth.user_allowed_email_domain, str + ): + return True + return False + + def get_team_id(self, token: dict, default_value: Optional[str]) -> Optional[str]: + try: + if self.litellm_jwtauth.team_id_jwt_field is not None: + team_id = token[self.litellm_jwtauth.team_id_jwt_field] + elif self.litellm_jwtauth.team_id_default is not None: + team_id = self.litellm_jwtauth.team_id_default + else: + team_id = None + except KeyError: + team_id = default_value + return team_id + + def is_upsert_user_id(self, valid_user_email: Optional[bool] = None) -> bool: + """ + Returns: + - True: if 'user_id_upsert' is set AND valid_user_email is not False + - False: if not + """ + if valid_user_email is False: + return False + return self.litellm_jwtauth.user_id_upsert + + def get_user_id(self, token: dict, default_value: Optional[str]) -> Optional[str]: + try: + if self.litellm_jwtauth.user_id_jwt_field is not None: + user_id = token[self.litellm_jwtauth.user_id_jwt_field] + else: + user_id = default_value + except KeyError: + user_id = default_value + return user_id + + def get_user_roles( + self, token: dict, default_value: Optional[List[str]] + ) -> Optional[List[str]]: + """ + Returns the user role from the token. + + Set via 'user_roles_jwt_field' in the config. + """ + try: + if self.litellm_jwtauth.user_roles_jwt_field is not None: + user_roles = get_nested_value( + data=token, + key_path=self.litellm_jwtauth.user_roles_jwt_field, + default=default_value, + ) + else: + user_roles = default_value + except KeyError: + user_roles = default_value + return user_roles + + def get_jwt_role( + self, token: dict, default_value: Optional[List[str]] + ) -> Optional[List[str]]: + """ + Generic implementation of `get_user_roles` that can be used for both user and team roles. + + Returns the jwt role from the token. + + Set via 'roles_jwt_field' in the config. + """ + try: + if self.litellm_jwtauth.roles_jwt_field is not None: + user_roles = get_nested_value( + data=token, + key_path=self.litellm_jwtauth.roles_jwt_field, + default=default_value, + ) + else: + user_roles = default_value + except KeyError: + user_roles = default_value + return user_roles + + def is_allowed_user_role(self, user_roles: Optional[List[str]]) -> bool: + """ + Returns the user role from the token. + + Set via 'user_allowed_roles' in the config. + """ + if ( + user_roles is not None + and self.litellm_jwtauth.user_allowed_roles is not None + and any( + role in self.litellm_jwtauth.user_allowed_roles for role in user_roles + ) + ): + return True + return False + + def get_user_email( + self, token: dict, default_value: Optional[str] + ) -> Optional[str]: + try: + if self.litellm_jwtauth.user_email_jwt_field is not None: + user_email = token[self.litellm_jwtauth.user_email_jwt_field] + else: + user_email = None + except KeyError: + user_email = default_value + return user_email + + def get_object_id(self, token: dict, default_value: Optional[str]) -> Optional[str]: + try: + if self.litellm_jwtauth.object_id_jwt_field is not None: + object_id = token[self.litellm_jwtauth.object_id_jwt_field] + else: + object_id = default_value + except KeyError: + object_id = default_value + return object_id + + def get_org_id(self, token: dict, default_value: Optional[str]) -> Optional[str]: + try: + if self.litellm_jwtauth.org_id_jwt_field is not None: + org_id = token[self.litellm_jwtauth.org_id_jwt_field] + else: + org_id = None + except KeyError: + org_id = default_value + return org_id + + def get_scopes(self, token: dict) -> List[str]: + try: + if isinstance(token["scope"], str): + # Assuming the scopes are stored in 'scope' claim and are space-separated + scopes = token["scope"].split() + elif isinstance(token["scope"], list): + scopes = token["scope"] + else: + raise Exception( + f"Unmapped scope type - {type(token['scope'])}. Supported types - list, str." + ) + except KeyError: + scopes = [] + return scopes + + async def get_public_key(self, kid: Optional[str]) -> dict: + + keys_url = os.getenv("JWT_PUBLIC_KEY_URL") + + if keys_url is None: + raise Exception("Missing JWT Public Key URL from environment.") + + keys_url_list = [url.strip() for url in keys_url.split(",")] + + for key_url in keys_url_list: + + cache_key = f"litellm_jwt_auth_keys_{key_url}" + + cached_keys = await self.user_api_key_cache.async_get_cache(cache_key) + + if cached_keys is None: + response = await self.http_handler.get(key_url) + + response_json = response.json() + if "keys" in response_json: + keys: JWKKeyValue = response.json()["keys"] + else: + keys = response_json + + await self.user_api_key_cache.async_set_cache( + key=cache_key, + value=keys, + ttl=self.litellm_jwtauth.public_key_ttl, # cache for 10 mins + ) + else: + keys = cached_keys + + public_key = self.parse_keys(keys=keys, kid=kid) + if public_key is not None: + return cast(dict, public_key) + + raise Exception( + f"No matching public key found. keys={keys_url_list}, kid={kid}" + ) + + def parse_keys(self, keys: JWKKeyValue, kid: Optional[str]) -> Optional[JWTKeyItem]: + public_key: Optional[JWTKeyItem] = None + if len(keys) == 1: + if isinstance(keys, dict) and (keys.get("kid", None) == kid or kid is None): + public_key = keys + elif isinstance(keys, list) and ( + keys[0].get("kid", None) == kid or kid is None + ): + public_key = keys[0] + elif len(keys) > 1: + for key in keys: + if isinstance(key, dict): + key_kid = key.get("kid", None) + else: + key_kid = None + if ( + kid is not None + and isinstance(key, dict) + and key_kid is not None + and key_kid == kid + ): + public_key = key + + return public_key + + def is_allowed_domain(self, user_email: str) -> bool: + if self.litellm_jwtauth.user_allowed_email_domain is None: + return True + + email_domain = user_email.split("@")[-1] # Extract domain from email + if email_domain == self.litellm_jwtauth.user_allowed_email_domain: + return True + else: + return False + + async def auth_jwt(self, token: str) -> dict: + # Supported algos: https://pyjwt.readthedocs.io/en/stable/algorithms.html + # "Warning: Make sure not to mix symmetric and asymmetric algorithms that interpret + # the key in different ways (e.g. HS* and RS*)." + algorithms = ["RS256", "RS384", "RS512", "PS256", "PS384", "PS512"] + + audience = os.getenv("JWT_AUDIENCE") + decode_options = None + if audience is None: + decode_options = {"verify_aud": False} + + import jwt + from jwt.algorithms import RSAAlgorithm + + header = jwt.get_unverified_header(token) + + verbose_proxy_logger.debug("header: %s", header) + + kid = header.get("kid", None) + + public_key = await self.get_public_key(kid=kid) + + if public_key is not None and isinstance(public_key, dict): + jwk = {} + if "kty" in public_key: + jwk["kty"] = public_key["kty"] + if "kid" in public_key: + jwk["kid"] = public_key["kid"] + if "n" in public_key: + jwk["n"] = public_key["n"] + if "e" in public_key: + jwk["e"] = public_key["e"] + + public_key_rsa = RSAAlgorithm.from_jwk(json.dumps(jwk)) + + try: + # decode the token using the public key + payload = jwt.decode( + token, + public_key_rsa, # type: ignore + algorithms=algorithms, + options=decode_options, + audience=audience, + leeway=self.leeway, # allow testing of expired tokens + ) + return payload + + except jwt.ExpiredSignatureError: + # the token is expired, do something to refresh it + raise Exception("Token Expired") + except Exception as e: + raise Exception(f"Validation fails: {str(e)}") + elif public_key is not None and isinstance(public_key, str): + try: + cert = x509.load_pem_x509_certificate( + public_key.encode(), default_backend() + ) + + # Extract public key + key = cert.public_key().public_bytes( + serialization.Encoding.PEM, + serialization.PublicFormat.SubjectPublicKeyInfo, + ) + + # decode the token using the public key + payload = jwt.decode( + token, + key, + algorithms=algorithms, + audience=audience, + options=decode_options, + ) + return payload + + except jwt.ExpiredSignatureError: + # the token is expired, do something to refresh it + raise Exception("Token Expired") + except Exception as e: + raise Exception(f"Validation fails: {str(e)}") + + raise Exception("Invalid JWT Submitted") + + async def close(self): + await self.http_handler.close() + + +class JWTAuthManager: + """Manages JWT authentication and authorization operations""" + + @staticmethod + def can_rbac_role_call_route( + rbac_role: RBAC_ROLES, + general_settings: dict, + route: str, + ) -> Literal[True]: + """ + Checks if user is allowed to access the route, based on their role. + """ + role_based_routes = get_role_based_routes( + rbac_role=rbac_role, general_settings=general_settings + ) + + if role_based_routes is None or route is None: + return True + + is_allowed = _allowed_routes_check( + user_route=route, + allowed_routes=role_based_routes, + ) + + if not is_allowed: + raise HTTPException( + status_code=403, + detail=f"Role={rbac_role} not allowed to call route={route}. Allowed routes={role_based_routes}", + ) + + return True + + @staticmethod + def can_rbac_role_call_model( + rbac_role: RBAC_ROLES, + general_settings: dict, + model: Optional[str], + ) -> Literal[True]: + """ + Checks if user is allowed to access the model, based on their role. + """ + role_based_models = get_role_based_models( + rbac_role=rbac_role, general_settings=general_settings + ) + if role_based_models is None or model is None: + return True + + if model not in role_based_models: + raise HTTPException( + status_code=403, + detail=f"Role={rbac_role} not allowed to call model={model}. Allowed models={role_based_models}", + ) + + return True + + @staticmethod + def check_scope_based_access( + scope_mappings: List[ScopeMapping], + scopes: List[str], + request_data: dict, + general_settings: dict, + ) -> None: + """ + Check if scope allows access to the requested model + """ + if not scope_mappings: + return None + + allowed_models = [] + for sm in scope_mappings: + if sm.scope in scopes and sm.models: + allowed_models.extend(sm.models) + + requested_model = request_data.get("model") + + if not requested_model: + return None + + if requested_model not in allowed_models: + raise HTTPException( + status_code=403, + detail={ + "error": "model={} not allowed. Allowed_models={}".format( + requested_model, allowed_models + ) + }, + ) + return None + + @staticmethod + async def check_rbac_role( + jwt_handler: JWTHandler, + jwt_valid_token: dict, + general_settings: dict, + request_data: dict, + route: str, + rbac_role: Optional[RBAC_ROLES], + ) -> None: + """Validate RBAC role and model access permissions""" + if jwt_handler.litellm_jwtauth.enforce_rbac is True: + if rbac_role is None: + raise HTTPException( + status_code=403, + detail="Unmatched token passed in. enforce_rbac is set to True. Token must belong to a proxy admin, team, or user.", + ) + JWTAuthManager.can_rbac_role_call_model( + rbac_role=rbac_role, + general_settings=general_settings, + model=request_data.get("model"), + ) + JWTAuthManager.can_rbac_role_call_route( + rbac_role=rbac_role, + general_settings=general_settings, + route=route, + ) + + @staticmethod + async def check_admin_access( + jwt_handler: JWTHandler, + scopes: list, + route: str, + user_id: Optional[str], + org_id: Optional[str], + api_key: str, + ) -> Optional[JWTAuthBuilderResult]: + """Check admin status and route access permissions""" + if not jwt_handler.is_admin(scopes=scopes): + return None + + is_allowed = allowed_routes_check( + user_role=LitellmUserRoles.PROXY_ADMIN, + user_route=route, + litellm_proxy_roles=jwt_handler.litellm_jwtauth, + ) + if not is_allowed: + allowed_routes: List[Any] = jwt_handler.litellm_jwtauth.admin_allowed_routes + actual_routes = get_actual_routes(allowed_routes=allowed_routes) + raise Exception( + f"Admin not allowed to access this route. Route={route}, Allowed Routes={actual_routes}" + ) + + return JWTAuthBuilderResult( + is_proxy_admin=True, + team_object=None, + user_object=None, + end_user_object=None, + org_object=None, + token=api_key, + team_id=None, + user_id=user_id, + end_user_id=None, + org_id=org_id, + ) + + @staticmethod + async def find_and_validate_specific_team_id( + jwt_handler: JWTHandler, + jwt_valid_token: dict, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span], + proxy_logging_obj: ProxyLogging, + ) -> Tuple[Optional[str], Optional[LiteLLM_TeamTable]]: + """Find and validate specific team ID""" + individual_team_id = jwt_handler.get_team_id( + token=jwt_valid_token, default_value=None + ) + + if not individual_team_id and jwt_handler.is_required_team_id() is True: + raise Exception( + f"No team id found in token. Checked team_id field '{jwt_handler.litellm_jwtauth.team_id_jwt_field}'" + ) + + ## VALIDATE TEAM OBJECT ### + team_object: Optional[LiteLLM_TeamTable] = None + if individual_team_id: + team_object = await get_team_object( + team_id=individual_team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + team_id_upsert=jwt_handler.litellm_jwtauth.team_id_upsert, + ) + + return individual_team_id, team_object + + @staticmethod + def get_all_team_ids(jwt_handler: JWTHandler, jwt_valid_token: dict) -> Set[str]: + """Get combined team IDs from groups and individual team_id""" + team_ids_from_groups = jwt_handler.get_team_ids_from_jwt(token=jwt_valid_token) + + all_team_ids = set(team_ids_from_groups) + + return all_team_ids + + @staticmethod + async def find_team_with_model_access( + team_ids: Set[str], + requested_model: Optional[str], + route: str, + jwt_handler: JWTHandler, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span], + proxy_logging_obj: ProxyLogging, + ) -> Tuple[Optional[str], Optional[LiteLLM_TeamTable]]: + """Find first team with access to the requested model""" + + if not team_ids: + if jwt_handler.litellm_jwtauth.enforce_team_based_model_access: + raise HTTPException( + status_code=403, + detail="No teams found in token. `enforce_team_based_model_access` is set to True. Token must belong to a team.", + ) + return None, None + + for team_id in team_ids: + try: + team_object = await get_team_object( + team_id=team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + + if team_object and team_object.models is not None: + team_models = team_object.models + if isinstance(team_models, list) and ( + not requested_model + or can_team_access_model( + model=requested_model, + team_object=team_object, + llm_router=None, + team_model_aliases=None, + ) + ): + is_allowed = allowed_routes_check( + user_role=LitellmUserRoles.TEAM, + user_route=route, + litellm_proxy_roles=jwt_handler.litellm_jwtauth, + ) + if is_allowed: + return team_id, team_object + except Exception: + continue + + if requested_model: + raise HTTPException( + status_code=403, + detail=f"No team has access to the requested model: {requested_model}. Checked teams={team_ids}. Check `/models` to see all available models.", + ) + + return None, None + + @staticmethod + async def get_user_info( + jwt_handler: JWTHandler, + jwt_valid_token: dict, + ) -> Tuple[Optional[str], Optional[str], Optional[bool]]: + """Get user email and validation status""" + user_email = jwt_handler.get_user_email( + token=jwt_valid_token, default_value=None + ) + valid_user_email = None + if jwt_handler.is_enforced_email_domain(): + valid_user_email = ( + False + if user_email is None + else jwt_handler.is_allowed_domain(user_email=user_email) + ) + user_id = jwt_handler.get_user_id( + token=jwt_valid_token, default_value=user_email + ) + return user_id, user_email, valid_user_email + + @staticmethod + async def get_objects( + user_id: Optional[str], + user_email: Optional[str], + org_id: Optional[str], + end_user_id: Optional[str], + valid_user_email: Optional[bool], + jwt_handler: JWTHandler, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span], + proxy_logging_obj: ProxyLogging, + ) -> Tuple[ + Optional[LiteLLM_UserTable], + Optional[LiteLLM_OrganizationTable], + Optional[LiteLLM_EndUserTable], + ]: + """Get user, org, and end user objects""" + org_object: Optional[LiteLLM_OrganizationTable] = None + if org_id: + org_object = ( + await get_org_object( + org_id=org_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + if org_id + else None + ) + + user_object: Optional[LiteLLM_UserTable] = None + if user_id: + user_object = ( + await get_user_object( + user_id=user_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + user_id_upsert=jwt_handler.is_upsert_user_id( + valid_user_email=valid_user_email + ), + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + user_email=user_email, + sso_user_id=user_id, + ) + if user_id + else None + ) + + end_user_object: Optional[LiteLLM_EndUserTable] = None + if end_user_id: + end_user_object = ( + await get_end_user_object( + end_user_id=end_user_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + if end_user_id + else None + ) + + return user_object, org_object, end_user_object + + @staticmethod + def validate_object_id( + user_id: Optional[str], + team_id: Optional[str], + enforce_rbac: bool, + is_proxy_admin: bool, + ) -> Literal[True]: + """If enforce_rbac is true, validate that a valid rbac id is returned for spend tracking""" + if enforce_rbac and not is_proxy_admin and not user_id and not team_id: + raise HTTPException( + status_code=403, + detail="No user or team id found in token. enforce_rbac is set to True. Token must belong to a proxy admin, team, or user.", + ) + return True + + @staticmethod + async def auth_builder( + api_key: str, + jwt_handler: JWTHandler, + request_data: dict, + general_settings: dict, + route: str, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + parent_otel_span: Optional[Span], + proxy_logging_obj: ProxyLogging, + ) -> JWTAuthBuilderResult: + """Main authentication and authorization builder""" + jwt_valid_token: dict = await jwt_handler.auth_jwt(token=api_key) + + # Check custom validate + if jwt_handler.litellm_jwtauth.custom_validate: + if not jwt_handler.litellm_jwtauth.custom_validate(jwt_valid_token): + raise HTTPException( + status_code=403, + detail="Invalid JWT token", + ) + + # Check RBAC + rbac_role = jwt_handler.get_rbac_role(token=jwt_valid_token) + await JWTAuthManager.check_rbac_role( + jwt_handler, + jwt_valid_token, + general_settings, + request_data, + route, + rbac_role, + ) + + # Check Scope Based Access + scopes = jwt_handler.get_scopes(token=jwt_valid_token) + if ( + jwt_handler.litellm_jwtauth.enforce_scope_based_access + and jwt_handler.litellm_jwtauth.scope_mappings + ): + JWTAuthManager.check_scope_based_access( + scope_mappings=jwt_handler.litellm_jwtauth.scope_mappings, + scopes=scopes, + request_data=request_data, + general_settings=general_settings, + ) + + object_id = jwt_handler.get_object_id(token=jwt_valid_token, default_value=None) + + # Get basic user info + scopes = jwt_handler.get_scopes(token=jwt_valid_token) + user_id, user_email, valid_user_email = await JWTAuthManager.get_user_info( + jwt_handler, jwt_valid_token + ) + + # Get IDs + org_id = jwt_handler.get_org_id(token=jwt_valid_token, default_value=None) + end_user_id = jwt_handler.get_end_user_id( + token=jwt_valid_token, default_value=None + ) + team_id: Optional[str] = None + team_object: Optional[LiteLLM_TeamTable] = None + object_id = jwt_handler.get_object_id(token=jwt_valid_token, default_value=None) + + if rbac_role and object_id: + + if rbac_role == LitellmUserRoles.TEAM: + team_id = object_id + elif rbac_role == LitellmUserRoles.INTERNAL_USER: + user_id = object_id + + # Check admin access + admin_result = await JWTAuthManager.check_admin_access( + jwt_handler, scopes, route, user_id, org_id, api_key + ) + if admin_result: + return admin_result + + # Get team with model access + ## SPECIFIC TEAM ID + + if not team_id: + team_id, team_object = ( + await JWTAuthManager.find_and_validate_specific_team_id( + jwt_handler, + jwt_valid_token, + prisma_client, + user_api_key_cache, + parent_otel_span, + proxy_logging_obj, + ) + ) + + if not team_object and not team_id: + ## CHECK USER GROUP ACCESS + all_team_ids = JWTAuthManager.get_all_team_ids(jwt_handler, jwt_valid_token) + team_id, team_object = await JWTAuthManager.find_team_with_model_access( + team_ids=all_team_ids, + requested_model=request_data.get("model"), + route=route, + jwt_handler=jwt_handler, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + + # Get other objects + user_object, org_object, end_user_object = await JWTAuthManager.get_objects( + user_id=user_id, + user_email=user_email, + org_id=org_id, + end_user_id=end_user_id, + valid_user_email=valid_user_email, + jwt_handler=jwt_handler, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + + # Validate that a valid rbac id is returned for spend tracking + JWTAuthManager.validate_object_id( + user_id=user_id, + team_id=team_id, + enforce_rbac=general_settings.get("enforce_rbac", False), + is_proxy_admin=False, + ) + + return JWTAuthBuilderResult( + is_proxy_admin=False, + team_id=team_id, + team_object=team_object, + user_id=user_id, + user_object=user_object, + org_id=org_id, + org_object=org_object, + end_user_id=end_user_id, + end_user_object=end_user_object, + token=api_key, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/litellm_license.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/litellm_license.py new file mode 100644 index 00000000..67ec91f5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/litellm_license.py @@ -0,0 +1,169 @@ +# What is this? +## If litellm license in env, checks if it's valid +import base64 +import json +import os +from datetime import datetime +from typing import Optional + +import httpx + +from litellm._logging import verbose_proxy_logger +from litellm.llms.custom_httpx.http_handler import HTTPHandler + + +class LicenseCheck: + """ + - Check if license in env + - Returns if license is valid + """ + + base_url = "https://license.litellm.ai" + + def __init__(self) -> None: + self.license_str = os.getenv("LITELLM_LICENSE", None) + verbose_proxy_logger.debug("License Str value - {}".format(self.license_str)) + self.http_handler = HTTPHandler(timeout=15) + self.public_key = None + self.read_public_key() + + def read_public_key(self): + try: + from cryptography.hazmat.primitives import serialization + + # current dir + current_dir = os.path.dirname(os.path.realpath(__file__)) + + # check if public_key.pem exists + _path_to_public_key = os.path.join(current_dir, "public_key.pem") + if os.path.exists(_path_to_public_key): + with open(_path_to_public_key, "rb") as key_file: + self.public_key = serialization.load_pem_public_key(key_file.read()) + else: + self.public_key = None + except Exception as e: + verbose_proxy_logger.error(f"Error reading public key: {str(e)}") + + def _verify(self, license_str: str) -> bool: + + verbose_proxy_logger.debug( + "litellm.proxy.auth.litellm_license.py::_verify - Checking license against {}/verify_license - {}".format( + self.base_url, license_str + ) + ) + url = "{}/verify_license/{}".format(self.base_url, license_str) + + response: Optional[httpx.Response] = None + try: # don't impact user, if call fails + num_retries = 3 + for i in range(num_retries): + try: + response = self.http_handler.get(url=url) + if response is None: + raise Exception("No response from license server") + response.raise_for_status() + except httpx.HTTPStatusError: + if i == num_retries - 1: + raise + + if response is None: + raise Exception("No response from license server") + + response_json = response.json() + + premium = response_json["verify"] + + assert isinstance(premium, bool) + + verbose_proxy_logger.debug( + "litellm.proxy.auth.litellm_license.py::_verify - License={} is premium={}".format( + license_str, premium + ) + ) + return premium + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.auth.litellm_license.py::_verify - Unable to verify License={} via api. - {}".format( + license_str, str(e) + ) + ) + return False + + def is_premium(self) -> bool: + """ + 1. verify_license_without_api_request: checks if license was generate using private / public key pair + 2. _verify: checks if license is valid calling litellm API. This is the old way we were generating/validating license + """ + try: + verbose_proxy_logger.debug( + "litellm.proxy.auth.litellm_license.py::is_premium() - ENTERING 'IS_PREMIUM' - LiteLLM License={}".format( + self.license_str + ) + ) + + if self.license_str is None: + self.license_str = os.getenv("LITELLM_LICENSE", None) + + verbose_proxy_logger.debug( + "litellm.proxy.auth.litellm_license.py::is_premium() - Updated 'self.license_str' - {}".format( + self.license_str + ) + ) + + if self.license_str is None: + return False + elif ( + self.verify_license_without_api_request( + public_key=self.public_key, license_key=self.license_str + ) + is True + ): + return True + elif self._verify(license_str=self.license_str) is True: + return True + return False + except Exception: + return False + + def verify_license_without_api_request(self, public_key, license_key): + try: + from cryptography.hazmat.primitives import hashes + from cryptography.hazmat.primitives.asymmetric import padding + + # Decode the license key + decoded = base64.b64decode(license_key) + message, signature = decoded.split(b".", 1) + + # Verify the signature + public_key.verify( + signature, + message, + padding.PSS( + mgf=padding.MGF1(hashes.SHA256()), + salt_length=padding.PSS.MAX_LENGTH, + ), + hashes.SHA256(), + ) + + # Decode and parse the data + license_data = json.loads(message.decode()) + + # debug information provided in license data + verbose_proxy_logger.debug("License data: %s", license_data) + + # Check expiration date + expiration_date = datetime.strptime( + license_data["expiration_date"], "%Y-%m-%d" + ) + if expiration_date < datetime.now(): + return False, "License has expired" + + return True + + except Exception as e: + verbose_proxy_logger.debug( + "litellm.proxy.auth.litellm_license.py::verify_license_without_api_request - Unable to verify License locally. - {}".format( + str(e) + ) + ) + return False diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/model_checks.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/model_checks.py new file mode 100644 index 00000000..a48ef6ae --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/model_checks.py @@ -0,0 +1,197 @@ +# What is this? +## Common checks for /v1/models and `/model/info` +import copy +from typing import Dict, List, Optional, Set + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import SpecialModelNames, UserAPIKeyAuth +from litellm.utils import get_valid_models + + +def _check_wildcard_routing(model: str) -> bool: + """ + Returns True if a model is a provider wildcard. + + eg: + - anthropic/* + - openai/* + - * + """ + if "*" in model: + return True + return False + + +def get_provider_models(provider: str) -> Optional[List[str]]: + """ + Returns the list of known models by provider + """ + if provider == "*": + return get_valid_models() + + if provider in litellm.models_by_provider: + provider_models = copy.deepcopy(litellm.models_by_provider[provider]) + for idx, _model in enumerate(provider_models): + if provider not in _model: + provider_models[idx] = f"{provider}/{_model}" + return provider_models + return None + + +def _get_models_from_access_groups( + model_access_groups: Dict[str, List[str]], + all_models: List[str], +) -> List[str]: + idx_to_remove = [] + new_models = [] + for idx, model in enumerate(all_models): + if model in model_access_groups: + idx_to_remove.append(idx) + new_models.extend(model_access_groups[model]) + + for idx in sorted(idx_to_remove, reverse=True): + all_models.pop(idx) + + all_models.extend(new_models) + return all_models + + +def get_key_models( + user_api_key_dict: UserAPIKeyAuth, + proxy_model_list: List[str], + model_access_groups: Dict[str, List[str]], +) -> List[str]: + """ + Returns: + - List of model name strings + - Empty list if no models set + - If model_access_groups is provided, only return models that are in the access groups + """ + all_models: List[str] = [] + if len(user_api_key_dict.models) > 0: + all_models = user_api_key_dict.models + if SpecialModelNames.all_team_models.value in all_models: + all_models = user_api_key_dict.team_models + if SpecialModelNames.all_proxy_models.value in all_models: + all_models = proxy_model_list + + all_models = _get_models_from_access_groups( + model_access_groups=model_access_groups, all_models=all_models + ) + + verbose_proxy_logger.debug("ALL KEY MODELS - {}".format(len(all_models))) + return all_models + + +def get_team_models( + team_models: List[str], + proxy_model_list: List[str], + model_access_groups: Dict[str, List[str]], +) -> List[str]: + """ + Returns: + - List of model name strings + - Empty list if no models set + - If model_access_groups is provided, only return models that are in the access groups + """ + all_models = [] + if len(team_models) > 0: + all_models = team_models + if SpecialModelNames.all_team_models.value in all_models: + all_models = team_models + if SpecialModelNames.all_proxy_models.value in all_models: + all_models = proxy_model_list + + all_models = _get_models_from_access_groups( + model_access_groups=model_access_groups, all_models=all_models + ) + + verbose_proxy_logger.debug("ALL TEAM MODELS - {}".format(len(all_models))) + return all_models + + +def get_complete_model_list( + key_models: List[str], + team_models: List[str], + proxy_model_list: List[str], + user_model: Optional[str], + infer_model_from_keys: Optional[bool], + return_wildcard_routes: Optional[bool] = False, +) -> List[str]: + """Logic for returning complete model list for a given key + team pair""" + + """ + - If key list is empty -> defer to team list + - If team list is empty -> defer to proxy model list + + If list contains wildcard -> return known provider models + """ + unique_models: Set[str] = set() + if key_models: + unique_models.update(key_models) + elif team_models: + unique_models.update(team_models) + else: + unique_models.update(proxy_model_list) + + if user_model: + unique_models.add(user_model) + + if infer_model_from_keys: + valid_models = get_valid_models() + unique_models.update(valid_models) + + all_wildcard_models = _get_wildcard_models( + unique_models=unique_models, return_wildcard_routes=return_wildcard_routes + ) + + return list(unique_models) + all_wildcard_models + + +def get_known_models_from_wildcard(wildcard_model: str) -> List[str]: + try: + provider, model = wildcard_model.split("/", 1) + except ValueError: # safely fail + return [] + # get all known provider models + wildcard_models = get_provider_models(provider=provider) + if wildcard_models is None: + return [] + if model == "*": + return wildcard_models or [] + else: + model_prefix = model.replace("*", "") + filtered_wildcard_models = [ + wc_model + for wc_model in wildcard_models + if wc_model.split("/")[1].startswith(model_prefix) + ] + + return filtered_wildcard_models + + +def _get_wildcard_models( + unique_models: Set[str], return_wildcard_routes: Optional[bool] = False +) -> List[str]: + models_to_remove = set() + all_wildcard_models = [] + for model in unique_models: + if _check_wildcard_routing(model=model): + + if ( + return_wildcard_routes + ): # will add the wildcard route to the list eg: anthropic/*. + all_wildcard_models.append(model) + + # get all known provider models + wildcard_models = get_known_models_from_wildcard(wildcard_model=model) + + if wildcard_models is not None: + models_to_remove.add(model) + all_wildcard_models.extend(wildcard_models) + + for model in models_to_remove: + unique_models.remove(model) + + return all_wildcard_models diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/oauth2_check.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/oauth2_check.py new file mode 100644 index 00000000..4851c270 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/oauth2_check.py @@ -0,0 +1,80 @@ +from litellm.proxy._types import UserAPIKeyAuth + + +async def check_oauth2_token(token: str) -> UserAPIKeyAuth: + """ + Makes a request to the token info endpoint to validate the OAuth2 token. + + Args: + token (str): The OAuth2 token to validate. + + Returns: + Literal[True]: If the token is valid. + + Raises: + ValueError: If the token is invalid, the request fails, or the token info endpoint is not set. + """ + import os + + import httpx + + from litellm._logging import verbose_proxy_logger + from litellm.llms.custom_httpx.http_handler import ( + get_async_httpx_client, + httpxSpecialProvider, + ) + from litellm.proxy._types import CommonProxyErrors + from litellm.proxy.proxy_server import premium_user + + if premium_user is not True: + raise ValueError( + "Oauth2 token validation is only available for premium users" + + CommonProxyErrors.not_premium_user.value + ) + + verbose_proxy_logger.debug("Oauth2 token validation for token=%s", token) + # Get the token info endpoint from environment variable + token_info_endpoint = os.getenv("OAUTH_TOKEN_INFO_ENDPOINT") + user_id_field_name = os.environ.get("OAUTH_USER_ID_FIELD_NAME", "sub") + user_role_field_name = os.environ.get("OAUTH_USER_ROLE_FIELD_NAME", "role") + user_team_id_field_name = os.environ.get("OAUTH_USER_TEAM_ID_FIELD_NAME", "team_id") + + if not token_info_endpoint: + raise ValueError("OAUTH_TOKEN_INFO_ENDPOINT environment variable is not set") + + client = get_async_httpx_client(llm_provider=httpxSpecialProvider.Oauth2Check) + headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"} + + try: + response = await client.get(token_info_endpoint, headers=headers) + + # if it's a bad token we expect it to raise an HTTPStatusError + response.raise_for_status() + + # If we get here, the request was successful + data = response.json() + + verbose_proxy_logger.debug( + "Oauth2 token validation for token=%s, response from /token/info=%s", + token, + data, + ) + + # You might want to add additional checks here based on the response + # For example, checking if the token is expired or has the correct scope + user_id = data.get(user_id_field_name) + user_team_id = data.get(user_team_id_field_name) + user_role = data.get(user_role_field_name) + + return UserAPIKeyAuth( + api_key=token, + team_id=user_team_id, + user_id=user_id, + user_role=user_role, + ) + except httpx.HTTPStatusError as e: + # This will catch any 4xx or 5xx errors + raise ValueError(f"Oauth 2.0 Token validation failed: {e}") + except Exception as e: + # This will catch any other errors (like network issues) + raise ValueError(f"An error occurred during token validation: {e}") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/oauth2_proxy_hook.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/oauth2_proxy_hook.py new file mode 100644 index 00000000..a1db5d84 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/oauth2_proxy_hook.py @@ -0,0 +1,45 @@ +from typing import Any, Dict + +from fastapi import Request + +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import UserAPIKeyAuth + + +async def handle_oauth2_proxy_request(request: Request) -> UserAPIKeyAuth: + """ + Handle request from oauth2 proxy. + """ + from litellm.proxy.proxy_server import general_settings + + verbose_proxy_logger.debug("Handling oauth2 proxy request") + # Define the OAuth2 config mappings + oauth2_config_mappings: Dict[str, str] = general_settings.get( + "oauth2_config_mappings", None + ) + verbose_proxy_logger.debug(f"Oauth2 config mappings: {oauth2_config_mappings}") + + if not oauth2_config_mappings: + raise ValueError("Oauth2 config mappings not found in general_settings") + # Initialize a dictionary to store the mapped values + auth_data: Dict[str, Any] = {} + + # Extract values from headers based on the mappings + for key, header in oauth2_config_mappings.items(): + value = request.headers.get(header) + if value: + # Convert max_budget to float if present + if key == "max_budget": + auth_data[key] = float(value) + # Convert models to list if present + elif key == "models": + auth_data[key] = [model.strip() for model in value.split(",")] + else: + auth_data[key] = value + verbose_proxy_logger.debug( + f"Auth data before creating UserAPIKeyAuth object: {auth_data}" + ) + user_api_key_auth = UserAPIKeyAuth(**auth_data) + verbose_proxy_logger.debug(f"UserAPIKeyAuth object created: {user_api_key_auth}") + # Create and return UserAPIKeyAuth object + return user_api_key_auth diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/public_key.pem b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/public_key.pem new file mode 100644 index 00000000..0962794a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/public_key.pem @@ -0,0 +1,9 @@ + -----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwcNBabWBZzrDhFAuA4Fh +FhIcA3rF7vrLb8+1yhF2U62AghQp9nStyuJRjxMUuldWgJ1yRJ2s7UffVw5r8DeA +dqXPD+w+3LCNwqJGaIKN08QGJXNArM3QtMaN0RTzAyQ4iibN1r6609W5muK9wGp0 +b1j5+iDUmf0ynItnhvaX6B8Xoaflc3WD/UBdrygLmsU5uR3XC86+/8ILoSZH3HtN +6FJmWhlhjS2TR1cKZv8K5D0WuADTFf5MF8jYFR+uORPj5Pe/EJlLGN26Lfn2QnGu +XgbPF6nCGwZ0hwH1Xkn3xzGaJ4xBEC761wqp5cHxWSDktHyFKnLbP3jVeegjVIHh +pQIDAQAB +-----END PUBLIC KEY-----
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/rds_iam_token.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/rds_iam_token.py new file mode 100644 index 00000000..053cdb91 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/rds_iam_token.py @@ -0,0 +1,187 @@ +import os +from typing import Any, Optional, Union + +import httpx + + +def init_rds_client( + aws_access_key_id: Optional[str] = None, + aws_secret_access_key: Optional[str] = None, + aws_region_name: Optional[str] = None, + aws_session_name: Optional[str] = None, + aws_profile_name: Optional[str] = None, + aws_role_name: Optional[str] = None, + aws_web_identity_token: Optional[str] = None, + timeout: Optional[Union[float, httpx.Timeout]] = None, +): + from litellm.secret_managers.main import get_secret + + # check for custom AWS_REGION_NAME and use it if not passed to init_bedrock_client + litellm_aws_region_name = get_secret("AWS_REGION_NAME", None) + standard_aws_region_name = get_secret("AWS_REGION", None) + ## CHECK IS 'os.environ/' passed in + # Define the list of parameters to check + params_to_check = [ + aws_access_key_id, + aws_secret_access_key, + aws_region_name, + aws_session_name, + aws_profile_name, + aws_role_name, + aws_web_identity_token, + ] + + # Iterate over parameters and update if needed + for i, param in enumerate(params_to_check): + if param and param.startswith("os.environ/"): + params_to_check[i] = get_secret(param) # type: ignore + # Assign updated values back to parameters + ( + aws_access_key_id, + aws_secret_access_key, + aws_region_name, + aws_session_name, + aws_profile_name, + aws_role_name, + aws_web_identity_token, + ) = params_to_check + + ### SET REGION NAME + region_name = aws_region_name + if aws_region_name: + region_name = aws_region_name + elif litellm_aws_region_name: + region_name = litellm_aws_region_name + elif standard_aws_region_name: + region_name = standard_aws_region_name + else: + raise Exception( + "AWS region not set: set AWS_REGION_NAME or AWS_REGION env variable or in .env file", + ) + + import boto3 + + if isinstance(timeout, float): + config = boto3.session.Config(connect_timeout=timeout, read_timeout=timeout) # type: ignore + elif isinstance(timeout, httpx.Timeout): + config = boto3.session.Config( # type: ignore + connect_timeout=timeout.connect, read_timeout=timeout.read + ) + else: + config = boto3.session.Config() # type: ignore + + ### CHECK STS ### + if ( + aws_web_identity_token is not None + and aws_role_name is not None + and aws_session_name is not None + ): + try: + oidc_token = open(aws_web_identity_token).read() # check if filepath + except Exception: + oidc_token = get_secret(aws_web_identity_token) + + if oidc_token is None: + raise Exception( + "OIDC token could not be retrieved from secret manager.", + ) + + sts_client = boto3.client("sts") + + # https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html + # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sts/client/assume_role_with_web_identity.html + sts_response = sts_client.assume_role_with_web_identity( + RoleArn=aws_role_name, + RoleSessionName=aws_session_name, + WebIdentityToken=oidc_token, + DurationSeconds=3600, + ) + + client = boto3.client( + service_name="rds", + aws_access_key_id=sts_response["Credentials"]["AccessKeyId"], + aws_secret_access_key=sts_response["Credentials"]["SecretAccessKey"], + aws_session_token=sts_response["Credentials"]["SessionToken"], + region_name=region_name, + config=config, + ) + + elif aws_role_name is not None and aws_session_name is not None: + # use sts if role name passed in + sts_client = boto3.client( + "sts", + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + ) + + sts_response = sts_client.assume_role( + RoleArn=aws_role_name, RoleSessionName=aws_session_name + ) + + client = boto3.client( + service_name="rds", + aws_access_key_id=sts_response["Credentials"]["AccessKeyId"], + aws_secret_access_key=sts_response["Credentials"]["SecretAccessKey"], + aws_session_token=sts_response["Credentials"]["SessionToken"], + region_name=region_name, + config=config, + ) + elif aws_access_key_id is not None: + # uses auth params passed to completion + # aws_access_key_id is not None, assume user is trying to auth using litellm.completion + + client = boto3.client( + service_name="rds", + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + region_name=region_name, + config=config, + ) + elif aws_profile_name is not None: + # uses auth values from AWS profile usually stored in ~/.aws/credentials + + client = boto3.Session(profile_name=aws_profile_name).client( + service_name="rds", + region_name=region_name, + config=config, + ) + + else: + # aws_access_key_id is None, assume user is trying to auth using env variables + # boto3 automatically reads env variables + + client = boto3.client( + service_name="rds", + region_name=region_name, + config=config, + ) + + return client + + +def generate_iam_auth_token( + db_host, db_port, db_user, client: Optional[Any] = None +) -> str: + from urllib.parse import quote + + if client is None: + boto_client = init_rds_client( + aws_region_name=os.getenv("AWS_REGION_NAME"), + aws_access_key_id=os.getenv("AWS_ACCESS_KEY_ID"), + aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"), + aws_session_name=os.getenv("AWS_SESSION_NAME"), + aws_profile_name=os.getenv("AWS_PROFILE_NAME"), + aws_role_name=os.getenv("AWS_ROLE_NAME", os.getenv("AWS_ROLE_ARN")), + aws_web_identity_token=os.getenv( + "AWS_WEB_IDENTITY_TOKEN", os.getenv("AWS_WEB_IDENTITY_TOKEN_FILE") + ), + ) + else: + boto_client = client + + token = boto_client.generate_db_auth_token( + DBHostname=db_host, Port=db_port, DBUsername=db_user + ) + cleaned_token = quote(token, safe="") + + return cleaned_token diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/route_checks.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/route_checks.py new file mode 100644 index 00000000..a18a7ab5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/route_checks.py @@ -0,0 +1,257 @@ +import re +from typing import List, Optional + +from fastapi import HTTPException, Request, status + +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import ( + CommonProxyErrors, + LiteLLM_UserTable, + LiteLLMRoutes, + LitellmUserRoles, + UserAPIKeyAuth, +) + +from .auth_checks_organization import _user_is_org_admin + + +class RouteChecks: + + @staticmethod + def non_proxy_admin_allowed_routes_check( + user_obj: Optional[LiteLLM_UserTable], + _user_role: Optional[LitellmUserRoles], + route: str, + request: Request, + valid_token: UserAPIKeyAuth, + api_key: str, + request_data: dict, + ): + """ + Checks if Non Proxy Admin User is allowed to access the route + """ + + # Check user has defined custom admin routes + RouteChecks.custom_admin_only_route_check( + route=route, + ) + + if RouteChecks.is_llm_api_route(route=route): + pass + elif ( + route in LiteLLMRoutes.info_routes.value + ): # check if user allowed to call an info route + if route == "/key/info": + # handled by function itself + pass + elif route == "/user/info": + # check if user can access this route + query_params = request.query_params + user_id = query_params.get("user_id") + verbose_proxy_logger.debug( + f"user_id: {user_id} & valid_token.user_id: {valid_token.user_id}" + ) + if user_id and user_id != valid_token.user_id: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail="key not allowed to access this user's info. user_id={}, key's user_id={}".format( + user_id, valid_token.user_id + ), + ) + elif route == "/model/info": + # /model/info just shows models user has access to + pass + elif route == "/team/info": + pass # handled by function itself + elif ( + route in LiteLLMRoutes.global_spend_tracking_routes.value + and getattr(valid_token, "permissions", None) is not None + and "get_spend_routes" in getattr(valid_token, "permissions", []) + ): + + pass + elif _user_role == LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value: + if RouteChecks.is_llm_api_route(route=route): + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=f"user not allowed to access this OpenAI routes, role= {_user_role}", + ) + if RouteChecks.check_route_access( + route=route, allowed_routes=LiteLLMRoutes.management_routes.value + ): + # the Admin Viewer is only allowed to call /user/update for their own user_id and can only update + if route == "/user/update": + + # Check the Request params are valid for PROXY_ADMIN_VIEW_ONLY + if request_data is not None and isinstance(request_data, dict): + _params_updated = request_data.keys() + for param in _params_updated: + if param not in ["user_email", "password"]: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=f"user not allowed to access this route, role= {_user_role}. Trying to access: {route} and updating invalid param: {param}. only user_email and password can be updated", + ) + else: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=f"user not allowed to access this route, role= {_user_role}. Trying to access: {route}", + ) + + elif ( + _user_role == LitellmUserRoles.INTERNAL_USER.value + and RouteChecks.check_route_access( + route=route, allowed_routes=LiteLLMRoutes.internal_user_routes.value + ) + ): + pass + elif _user_is_org_admin( + request_data=request_data, user_object=user_obj + ) and RouteChecks.check_route_access( + route=route, allowed_routes=LiteLLMRoutes.org_admin_allowed_routes.value + ): + pass + elif ( + _user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY.value + and RouteChecks.check_route_access( + route=route, + allowed_routes=LiteLLMRoutes.internal_user_view_only_routes.value, + ) + ): + pass + elif RouteChecks.check_route_access( + route=route, allowed_routes=LiteLLMRoutes.self_managed_routes.value + ): # routes that manage their own allowed/disallowed logic + pass + else: + user_role = "unknown" + user_id = "unknown" + if user_obj is not None: + user_role = user_obj.user_role or "unknown" + user_id = user_obj.user_id or "unknown" + raise Exception( + f"Only proxy admin can be used to generate, delete, update info for new keys/users/teams. Route={route}. Your role={user_role}. Your user_id={user_id}" + ) + + @staticmethod + def custom_admin_only_route_check(route: str): + from litellm.proxy.proxy_server import general_settings, premium_user + + if "admin_only_routes" in general_settings: + if premium_user is not True: + verbose_proxy_logger.error( + f"Trying to use 'admin_only_routes' this is an Enterprise only feature. {CommonProxyErrors.not_premium_user.value}" + ) + return + if route in general_settings["admin_only_routes"]: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail=f"user not allowed to access this route. Route={route} is an admin only route", + ) + pass + + @staticmethod + def is_llm_api_route(route: str) -> bool: + """ + Helper to checks if provided route is an OpenAI route + + + Returns: + - True: if route is an OpenAI route + - False: if route is not an OpenAI route + """ + + if route in LiteLLMRoutes.openai_routes.value: + return True + + if route in LiteLLMRoutes.anthropic_routes.value: + return True + + # fuzzy match routes like "/v1/threads/thread_49EIN5QF32s4mH20M7GFKdlZ" + # Check for routes with placeholders + for openai_route in LiteLLMRoutes.openai_routes.value: + # Replace placeholders with regex pattern + # placeholders are written as "/threads/{thread_id}" + if "{" in openai_route: + if RouteChecks._route_matches_pattern( + route=route, pattern=openai_route + ): + return True + + if RouteChecks._is_azure_openai_route(route=route): + return True + + for _llm_passthrough_route in LiteLLMRoutes.mapped_pass_through_routes.value: + if _llm_passthrough_route in route: + return True + + return False + + @staticmethod + def _is_azure_openai_route(route: str) -> bool: + """ + Check if route is a route from AzureOpenAI SDK client + + eg. + route='/openai/deployments/vertex_ai/gemini-1.5-flash/chat/completions' + """ + # Add support for deployment and engine model paths + deployment_pattern = r"^/openai/deployments/[^/]+/[^/]+/chat/completions$" + engine_pattern = r"^/engines/[^/]+/chat/completions$" + + if re.match(deployment_pattern, route) or re.match(engine_pattern, route): + return True + return False + + @staticmethod + def _route_matches_pattern(route: str, pattern: str) -> bool: + """ + Check if route matches the pattern placed in proxy/_types.py + + Example: + - pattern: "/threads/{thread_id}" + - route: "/threads/thread_49EIN5QF32s4mH20M7GFKdlZ" + - returns: True + + + - pattern: "/key/{token_id}/regenerate" + - route: "/key/regenerate/82akk800000000jjsk" + - returns: False, pattern is "/key/{token_id}/regenerate" + """ + pattern = re.sub(r"\{[^}]+\}", r"[^/]+", pattern) + # Anchor the pattern to match the entire string + pattern = f"^{pattern}$" + if re.match(pattern, route): + return True + return False + + @staticmethod + def check_route_access(route: str, allowed_routes: List[str]) -> bool: + """ + Check if a route has access by checking both exact matches and patterns + + Args: + route (str): The route to check + allowed_routes (list): List of allowed routes/patterns + + Returns: + bool: True if route is allowed, False otherwise + """ + return route in allowed_routes or any( # Check exact match + RouteChecks._route_matches_pattern(route=route, pattern=allowed_route) + for allowed_route in allowed_routes + ) # Check pattern match + + @staticmethod + def _is_assistants_api_request(request: Request) -> bool: + """ + Returns True if `thread` or `assistant` is in the request path + + Args: + request (Request): The request object + + Returns: + bool: True if `thread` or `assistant` is in the request path, False otherwise + """ + if "thread" in request.url.path or "assistant" in request.url.path: + return True + return False diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/service_account_checks.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/service_account_checks.py new file mode 100644 index 00000000..87d7d668 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/service_account_checks.py @@ -0,0 +1,53 @@ +""" +Checks for LiteLLM service account keys + +""" + +from litellm.proxy._types import ProxyErrorTypes, ProxyException, UserAPIKeyAuth + + +def check_if_token_is_service_account(valid_token: UserAPIKeyAuth) -> bool: + """ + Checks if the token is a service account + + Returns: + bool: True if token is a service account + + """ + if valid_token.metadata: + if "service_account_id" in valid_token.metadata: + return True + return False + + +async def service_account_checks( + valid_token: UserAPIKeyAuth, request_data: dict +) -> bool: + """ + If a virtual key is a service account, checks it's a valid service account + + A token is a service account if it has a service_account_id in its metadata + + Service Account Specific Checks: + - Check if required_params is set + """ + + if check_if_token_is_service_account(valid_token) is not True: + return True + + from litellm.proxy.proxy_server import general_settings + + if "service_account_settings" in general_settings: + service_account_settings = general_settings["service_account_settings"] + if "enforced_params" in service_account_settings: + _enforced_params = service_account_settings["enforced_params"] + for param in _enforced_params: + if param not in request_data: + raise ProxyException( + type=ProxyErrorTypes.bad_request_error.value, + code=400, + param=param, + message=f"BadRequest please pass param={param} in request body. This is a required param for service account", + ) + + return True diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/auth/user_api_key_auth.py b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/user_api_key_auth.py new file mode 100644 index 00000000..ace0bf49 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/auth/user_api_key_auth.py @@ -0,0 +1,1337 @@ +""" +This file handles authentication for the LiteLLM Proxy. + +it checks if the user passed a valid API Key to the LiteLLM Proxy + +Returns a UserAPIKeyAuth object if the API key is valid + +""" + +import asyncio +import re +import secrets +from datetime import datetime, timezone +from typing import Optional, cast + +import fastapi +from fastapi import HTTPException, Request, WebSocket, status +from fastapi.security.api_key import APIKeyHeader + +import litellm +from litellm._logging import verbose_logger, verbose_proxy_logger +from litellm._service_logger import ServiceLogging +from litellm.caching import DualCache +from litellm.litellm_core_utils.dd_tracing import tracer +from litellm.proxy._types import * +from litellm.proxy.auth.auth_checks import ( + _cache_key_object, + _handle_failed_db_connection_for_get_key_object, + _virtual_key_max_budget_check, + _virtual_key_soft_budget_check, + can_key_call_model, + common_checks, + get_end_user_object, + get_key_object, + get_team_object, + get_user_object, + is_valid_fallback_model, +) +from litellm.proxy.auth.auth_utils import ( + _get_request_ip_address, + get_end_user_id_from_request_body, + get_request_route, + is_pass_through_provider_route, + pre_db_read_auth_checks, + route_in_additonal_public_routes, + should_run_auth_on_pass_through_provider_route, +) +from litellm.proxy.auth.handle_jwt import JWTAuthManager, JWTHandler +from litellm.proxy.auth.oauth2_check import check_oauth2_token +from litellm.proxy.auth.oauth2_proxy_hook import handle_oauth2_proxy_request +from litellm.proxy.auth.route_checks import RouteChecks +from litellm.proxy.auth.service_account_checks import service_account_checks +from litellm.proxy.common_utils.http_parsing_utils import _read_request_body +from litellm.proxy.utils import PrismaClient, ProxyLogging +from litellm.types.services import ServiceTypes + +user_api_key_service_logger_obj = ServiceLogging() # used for tracking latency on OTEL + + +api_key_header = APIKeyHeader( + name=SpecialHeaders.openai_authorization.value, + auto_error=False, + description="Bearer token", +) +azure_api_key_header = APIKeyHeader( + name=SpecialHeaders.azure_authorization.value, + auto_error=False, + description="Some older versions of the openai Python package will send an API-Key header with just the API key ", +) +anthropic_api_key_header = APIKeyHeader( + name=SpecialHeaders.anthropic_authorization.value, + auto_error=False, + description="If anthropic client used.", +) +google_ai_studio_api_key_header = APIKeyHeader( + name=SpecialHeaders.google_ai_studio_authorization.value, + auto_error=False, + description="If google ai studio client used.", +) +azure_apim_header = APIKeyHeader( + name=SpecialHeaders.azure_apim_authorization.value, + auto_error=False, + description="The default name of the subscription key header of Azure", +) + + +def _get_bearer_token( + api_key: str, +): + if api_key.startswith("Bearer "): # ensure Bearer token passed in + api_key = api_key.replace("Bearer ", "") # extract the token + elif api_key.startswith("Basic "): + api_key = api_key.replace("Basic ", "") # handle langfuse input + elif api_key.startswith("bearer "): + api_key = api_key.replace("bearer ", "") + else: + api_key = "" + return api_key + + +def _is_ui_route( + route: str, + user_obj: Optional[LiteLLM_UserTable] = None, +) -> bool: + """ + - Check if the route is a UI used route + """ + # this token is only used for managing the ui + allowed_routes = LiteLLMRoutes.ui_routes.value + # check if the current route startswith any of the allowed routes + if ( + route is not None + and isinstance(route, str) + and any(route.startswith(allowed_route) for allowed_route in allowed_routes) + ): + # Do something if the current route starts with any of the allowed routes + return True + elif any( + RouteChecks._route_matches_pattern(route=route, pattern=allowed_route) + for allowed_route in allowed_routes + ): + return True + return False + + +def _is_api_route_allowed( + route: str, + request: Request, + request_data: dict, + api_key: str, + valid_token: Optional[UserAPIKeyAuth], + user_obj: Optional[LiteLLM_UserTable] = None, +) -> bool: + """ + - Route b/w api token check and normal token check + """ + _user_role = _get_user_role(user_obj=user_obj) + + if valid_token is None: + raise Exception("Invalid proxy server token passed. valid_token=None.") + + if not _is_user_proxy_admin(user_obj=user_obj): # if non-admin + RouteChecks.non_proxy_admin_allowed_routes_check( + user_obj=user_obj, + _user_role=_user_role, + route=route, + request=request, + request_data=request_data, + api_key=api_key, + valid_token=valid_token, + ) + return True + + +def _is_allowed_route( + route: str, + token_type: Literal["ui", "api"], + request: Request, + request_data: dict, + api_key: str, + valid_token: Optional[UserAPIKeyAuth], + user_obj: Optional[LiteLLM_UserTable] = None, +) -> bool: + """ + - Route b/w ui token check and normal token check + """ + + if token_type == "ui" and _is_ui_route(route=route, user_obj=user_obj): + return True + else: + return _is_api_route_allowed( + route=route, + request=request, + request_data=request_data, + api_key=api_key, + valid_token=valid_token, + user_obj=user_obj, + ) + + +async def user_api_key_auth_websocket(websocket: WebSocket): + # Accept the WebSocket connection + + request = Request(scope={"type": "http"}) + request._url = websocket.url + + query_params = websocket.query_params + + model = query_params.get("model") + + async def return_body(): + return_string = f'{{"model": "{model}"}}' + # return string as bytes + return return_string.encode() + + request.body = return_body # type: ignore + + # Extract the Authorization header + authorization = websocket.headers.get("authorization") + + # If no Authorization header, try the api-key header + if not authorization: + api_key = websocket.headers.get("api-key") + if not api_key: + await websocket.close(code=status.WS_1008_POLICY_VIOLATION) + raise HTTPException(status_code=403, detail="No API key provided") + else: + # Extract the API key from the Bearer token + if not authorization.startswith("Bearer "): + await websocket.close(code=status.WS_1008_POLICY_VIOLATION) + raise HTTPException( + status_code=403, detail="Invalid Authorization header format" + ) + + api_key = authorization[len("Bearer ") :].strip() + + # Call user_api_key_auth with the extracted API key + # Note: You'll need to modify this to work with WebSocket context if needed + try: + return await user_api_key_auth(request=request, api_key=f"Bearer {api_key}") + except Exception as e: + verbose_proxy_logger.exception(e) + await websocket.close(code=status.WS_1008_POLICY_VIOLATION) + raise HTTPException(status_code=403, detail=str(e)) + + +def update_valid_token_with_end_user_params( + valid_token: UserAPIKeyAuth, end_user_params: dict +) -> UserAPIKeyAuth: + valid_token.end_user_id = end_user_params.get("end_user_id") + valid_token.end_user_tpm_limit = end_user_params.get("end_user_tpm_limit") + valid_token.end_user_rpm_limit = end_user_params.get("end_user_rpm_limit") + valid_token.allowed_model_region = end_user_params.get("allowed_model_region") + return valid_token + + +async def get_global_proxy_spend( + litellm_proxy_admin_name: str, + user_api_key_cache: DualCache, + prisma_client: Optional[PrismaClient], + token: str, + proxy_logging_obj: ProxyLogging, +) -> Optional[float]: + global_proxy_spend = None + if litellm.max_budget > 0: # user set proxy max budget + # check cache + global_proxy_spend = await user_api_key_cache.async_get_cache( + key="{}:spend".format(litellm_proxy_admin_name) + ) + if global_proxy_spend is None and prisma_client is not None: + # get from db + sql_query = ( + """SELECT SUM(spend) as total_spend FROM "MonthlyGlobalSpend";""" + ) + + response = await prisma_client.db.query_raw(query=sql_query) + + global_proxy_spend = response[0]["total_spend"] + + await user_api_key_cache.async_set_cache( + key="{}:spend".format(litellm_proxy_admin_name), + value=global_proxy_spend, + ) + if global_proxy_spend is not None: + user_info = CallInfo( + user_id=litellm_proxy_admin_name, + max_budget=litellm.max_budget, + spend=global_proxy_spend, + token=token, + ) + asyncio.create_task( + proxy_logging_obj.budget_alerts( + type="proxy_budget", + user_info=user_info, + ) + ) + return global_proxy_spend + + +def get_rbac_role(jwt_handler: JWTHandler, scopes: List[str]) -> str: + is_admin = jwt_handler.is_admin(scopes=scopes) + if is_admin: + return LitellmUserRoles.PROXY_ADMIN + else: + return LitellmUserRoles.TEAM + + +def get_model_from_request(request_data: dict, route: str) -> Optional[str]: + + # First try to get model from request_data + model = request_data.get("model") + + # If model not in request_data, try to extract from route + if model is None: + # Parse model from route that follows the pattern /openai/deployments/{model}/* + match = re.match(r"/openai/deployments/([^/]+)", route) + if match: + model = match.group(1) + + return model + + +async def _user_api_key_auth_builder( # noqa: PLR0915 + request: Request, + api_key: str, + azure_api_key_header: str, + anthropic_api_key_header: Optional[str], + google_ai_studio_api_key_header: Optional[str], + azure_apim_header: Optional[str], + request_data: dict, +) -> UserAPIKeyAuth: + + from litellm.proxy.proxy_server import ( + general_settings, + jwt_handler, + litellm_proxy_admin_name, + llm_model_list, + llm_router, + master_key, + model_max_budget_limiter, + open_telemetry_logger, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + user_custom_auth, + ) + + parent_otel_span: Optional[Span] = None + start_time = datetime.now() + route: str = get_request_route(request=request) + try: + + # get the request body + + await pre_db_read_auth_checks( + request_data=request_data, + request=request, + route=route, + ) + pass_through_endpoints: Optional[List[dict]] = general_settings.get( + "pass_through_endpoints", None + ) + passed_in_key: Optional[str] = None + if isinstance(api_key, str): + passed_in_key = api_key + api_key = _get_bearer_token(api_key=api_key) + elif isinstance(azure_api_key_header, str): + api_key = azure_api_key_header + elif isinstance(anthropic_api_key_header, str): + api_key = anthropic_api_key_header + elif isinstance(google_ai_studio_api_key_header, str): + api_key = google_ai_studio_api_key_header + elif isinstance(azure_apim_header, str): + api_key = azure_apim_header + elif pass_through_endpoints is not None: + for endpoint in pass_through_endpoints: + if endpoint.get("path", "") == route: + headers: Optional[dict] = endpoint.get("headers", None) + if headers is not None: + header_key: str = headers.get("litellm_user_api_key", "") + if request.headers.get(key=header_key) is not None: + api_key = request.headers.get(key=header_key) + + # if user wants to pass LiteLLM_Master_Key as a custom header, example pass litellm keys as X-LiteLLM-Key: Bearer sk-1234 + custom_litellm_key_header_name = general_settings.get("litellm_key_header_name") + if custom_litellm_key_header_name is not None: + api_key = get_api_key_from_custom_header( + request=request, + custom_litellm_key_header_name=custom_litellm_key_header_name, + ) + + if open_telemetry_logger is not None: + parent_otel_span = ( + open_telemetry_logger.create_litellm_proxy_request_started_span( + start_time=start_time, + headers=dict(request.headers), + ) + ) + + ### USER-DEFINED AUTH FUNCTION ### + if user_custom_auth is not None: + response = await user_custom_auth(request=request, api_key=api_key) # type: ignore + return UserAPIKeyAuth.model_validate(response) + + ### LITELLM-DEFINED AUTH FUNCTION ### + #### IF JWT #### + """ + LiteLLM supports using JWTs. + + Enable this in proxy config, by setting + ``` + general_settings: + enable_jwt_auth: true + ``` + """ + + ######## Route Checks Before Reading DB / Cache for "token" ################ + if ( + route in LiteLLMRoutes.public_routes.value # type: ignore + or route_in_additonal_public_routes(current_route=route) + ): + # check if public endpoint + return UserAPIKeyAuth(user_role=LitellmUserRoles.INTERNAL_USER_VIEW_ONLY) + elif is_pass_through_provider_route(route=route): + if should_run_auth_on_pass_through_provider_route(route=route) is False: + return UserAPIKeyAuth( + user_role=LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ) + + ########## End of Route Checks Before Reading DB / Cache for "token" ######## + + if general_settings.get("enable_oauth2_auth", False) is True: + # return UserAPIKeyAuth object + # helper to check if the api_key is a valid oauth2 token + from litellm.proxy.proxy_server import premium_user + + if premium_user is not True: + raise ValueError( + "Oauth2 token validation is only available for premium users" + + CommonProxyErrors.not_premium_user.value + ) + + return await check_oauth2_token(token=api_key) + + if general_settings.get("enable_oauth2_proxy_auth", False) is True: + return await handle_oauth2_proxy_request(request=request) + + if general_settings.get("enable_jwt_auth", False) is True: + from litellm.proxy.proxy_server import premium_user + + if premium_user is not True: + raise ValueError( + f"JWT Auth is an enterprise only feature. {CommonProxyErrors.not_premium_user.value}" + ) + is_jwt = jwt_handler.is_jwt(token=api_key) + verbose_proxy_logger.debug("is_jwt: %s", is_jwt) + if is_jwt: + result = await JWTAuthManager.auth_builder( + request_data=request_data, + general_settings=general_settings, + api_key=api_key, + jwt_handler=jwt_handler, + route=route, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + parent_otel_span=parent_otel_span, + ) + + is_proxy_admin = result["is_proxy_admin"] + team_id = result["team_id"] + team_object = result["team_object"] + user_id = result["user_id"] + user_object = result["user_object"] + end_user_id = result["end_user_id"] + end_user_object = result["end_user_object"] + org_id = result["org_id"] + token = result["token"] + + global_proxy_spend = await get_global_proxy_spend( + litellm_proxy_admin_name=litellm_proxy_admin_name, + user_api_key_cache=user_api_key_cache, + prisma_client=prisma_client, + token=token, + proxy_logging_obj=proxy_logging_obj, + ) + + if is_proxy_admin: + return UserAPIKeyAuth( + user_role=LitellmUserRoles.PROXY_ADMIN, + parent_otel_span=parent_otel_span, + ) + # run through common checks + _ = await common_checks( + request_body=request_data, + team_object=team_object, + user_object=user_object, + end_user_object=end_user_object, + general_settings=general_settings, + global_proxy_spend=global_proxy_spend, + route=route, + llm_router=llm_router, + proxy_logging_obj=proxy_logging_obj, + valid_token=None, + ) + + # return UserAPIKeyAuth object + return UserAPIKeyAuth( + api_key=None, + team_id=team_id, + team_tpm_limit=( + team_object.tpm_limit if team_object is not None else None + ), + team_rpm_limit=( + team_object.rpm_limit if team_object is not None else None + ), + team_models=team_object.models if team_object is not None else [], + user_role=LitellmUserRoles.INTERNAL_USER, + user_id=user_id, + org_id=org_id, + parent_otel_span=parent_otel_span, + end_user_id=end_user_id, + ) + + #### ELSE #### + ## CHECK PASS-THROUGH ENDPOINTS ## + is_mapped_pass_through_route: bool = False + for mapped_route in LiteLLMRoutes.mapped_pass_through_routes.value: # type: ignore + if route.startswith(mapped_route): + is_mapped_pass_through_route = True + if is_mapped_pass_through_route: + if request.headers.get("litellm_user_api_key") is not None: + api_key = request.headers.get("litellm_user_api_key") or "" + if pass_through_endpoints is not None: + for endpoint in pass_through_endpoints: + if isinstance(endpoint, dict) and endpoint.get("path", "") == route: + ## IF AUTH DISABLED + if endpoint.get("auth") is not True: + return UserAPIKeyAuth() + ## IF AUTH ENABLED + ### IF CUSTOM PARSER REQUIRED + if ( + endpoint.get("custom_auth_parser") is not None + and endpoint.get("custom_auth_parser") == "langfuse" + ): + """ + - langfuse returns {'Authorization': 'Basic YW55dGhpbmc6YW55dGhpbmc'} + - check the langfuse public key if it contains the litellm api key + """ + import base64 + + api_key = api_key.replace("Basic ", "").strip() + decoded_bytes = base64.b64decode(api_key) + decoded_str = decoded_bytes.decode("utf-8") + api_key = decoded_str.split(":")[0] + else: + headers = endpoint.get("headers", None) + if headers is not None: + header_key = headers.get("litellm_user_api_key", "") + if ( + isinstance(request.headers, dict) + and request.headers.get(key=header_key) is not None # type: ignore + ): + api_key = request.headers.get(key=header_key) # type: ignore + if master_key is None: + if isinstance(api_key, str): + return UserAPIKeyAuth( + api_key=api_key, + user_role=LitellmUserRoles.PROXY_ADMIN, + parent_otel_span=parent_otel_span, + ) + else: + return UserAPIKeyAuth( + user_role=LitellmUserRoles.PROXY_ADMIN, + parent_otel_span=parent_otel_span, + ) + elif api_key is None: # only require api key if master key is set + raise Exception("No api key passed in.") + elif api_key == "": + # missing 'Bearer ' prefix + raise Exception( + f"Malformed API Key passed in. Ensure Key has `Bearer ` prefix. Passed in: {passed_in_key}" + ) + + if route == "/user/auth": + if general_settings.get("allow_user_auth", False) is True: + return UserAPIKeyAuth() + else: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail="'allow_user_auth' not set or set to False", + ) + + ## Check END-USER OBJECT + _end_user_object = None + end_user_params = {} + + end_user_id = get_end_user_id_from_request_body(request_data) + if end_user_id: + try: + end_user_params["end_user_id"] = end_user_id + + # get end-user object + _end_user_object = await get_end_user_object( + end_user_id=end_user_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + if _end_user_object is not None: + end_user_params["allowed_model_region"] = ( + _end_user_object.allowed_model_region + ) + if _end_user_object.litellm_budget_table is not None: + budget_info = _end_user_object.litellm_budget_table + if budget_info.tpm_limit is not None: + end_user_params["end_user_tpm_limit"] = ( + budget_info.tpm_limit + ) + if budget_info.rpm_limit is not None: + end_user_params["end_user_rpm_limit"] = ( + budget_info.rpm_limit + ) + if budget_info.max_budget is not None: + end_user_params["end_user_max_budget"] = ( + budget_info.max_budget + ) + except Exception as e: + if isinstance(e, litellm.BudgetExceededError): + raise e + verbose_proxy_logger.debug( + "Unable to find user in db. Error - {}".format(str(e)) + ) + pass + + ### CHECK IF ADMIN ### + # note: never string compare api keys, this is vulenerable to a time attack. Use secrets.compare_digest instead + ### CHECK IF ADMIN ### + # note: never string compare api keys, this is vulenerable to a time attack. Use secrets.compare_digest instead + ## Check CACHE + try: + valid_token = await get_key_object( + hashed_token=hash_token(api_key), + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + check_cache_only=True, + ) + except Exception: + verbose_logger.debug("api key not found in cache.") + valid_token = None + + if ( + valid_token is not None + and isinstance(valid_token, UserAPIKeyAuth) + and valid_token.user_role == LitellmUserRoles.PROXY_ADMIN + ): + # update end-user params on valid token + valid_token = update_valid_token_with_end_user_params( + valid_token=valid_token, end_user_params=end_user_params + ) + valid_token.parent_otel_span = parent_otel_span + + return valid_token + + if ( + valid_token is not None + and isinstance(valid_token, UserAPIKeyAuth) + and valid_token.team_id is not None + ): + ## UPDATE TEAM VALUES BASED ON CACHED TEAM OBJECT - allows `/team/update` values to work for cached token + try: + team_obj: LiteLLM_TeamTableCachedObj = await get_team_object( + team_id=valid_token.team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + check_cache_only=True, + ) + + if ( + team_obj.last_refreshed_at is not None + and valid_token.last_refreshed_at is not None + and team_obj.last_refreshed_at > valid_token.last_refreshed_at + ): + team_obj_dict = team_obj.__dict__ + + for k, v in team_obj_dict.items(): + field_name = f"team_{k}" + if field_name in valid_token.__fields__: + setattr(valid_token, field_name, v) + except Exception as e: + verbose_logger.debug( + e + ) # moving from .warning to .debug as it spams logs when team missing from cache. + + try: + is_master_key_valid = secrets.compare_digest(api_key, master_key) # type: ignore + except Exception: + is_master_key_valid = False + + ## VALIDATE MASTER KEY ## + try: + assert isinstance(master_key, str) + except Exception: + raise HTTPException( + status_code=500, + detail={ + "Master key must be a valid string. Current type={}".format( + type(master_key) + ) + }, + ) + + if is_master_key_valid: + _user_api_key_obj = await _return_user_api_key_auth_obj( + user_obj=None, + user_role=LitellmUserRoles.PROXY_ADMIN, + api_key=master_key, + parent_otel_span=parent_otel_span, + valid_token_dict={ + **end_user_params, + "user_id": litellm_proxy_admin_name, + }, + route=route, + start_time=start_time, + ) + asyncio.create_task( + _cache_key_object( + hashed_token=hash_token(master_key), + user_api_key_obj=_user_api_key_obj, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + ) + + _user_api_key_obj = update_valid_token_with_end_user_params( + valid_token=_user_api_key_obj, end_user_params=end_user_params + ) + + return _user_api_key_obj + + ## IF it's not a master key + ## Route should not be in master_key_only_routes + if route in LiteLLMRoutes.master_key_only_routes.value: # type: ignore + raise Exception( + f"Tried to access route={route}, which is only for MASTER KEY" + ) + + ## Check DB + if isinstance( + api_key, str + ): # if generated token, make sure it starts with sk-. + assert api_key.startswith( + "sk-" + ), "LiteLLM Virtual Key expected. Received={}, expected to start with 'sk-'.".format( + api_key + ) # prevent token hashes from being used + else: + verbose_logger.warning( + "litellm.proxy.proxy_server.user_api_key_auth(): Warning - Key={} is not a string.".format( + api_key + ) + ) + + if ( + prisma_client is None + ): # if both master key + user key submitted, and user key != master key, and no db connected, raise an error + return await _handle_failed_db_connection_for_get_key_object( + e=Exception("No connected db.") + ) + + ## check for cache hit (In-Memory Cache) + _user_role = None + if api_key.startswith("sk-"): + api_key = hash_token(token=api_key) + + if valid_token is None: + try: + valid_token = await get_key_object( + hashed_token=api_key, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + # update end-user params on valid token + # These can change per request - it's important to update them here + valid_token.end_user_id = end_user_params.get("end_user_id") + valid_token.end_user_tpm_limit = end_user_params.get( + "end_user_tpm_limit" + ) + valid_token.end_user_rpm_limit = end_user_params.get( + "end_user_rpm_limit" + ) + valid_token.allowed_model_region = end_user_params.get( + "allowed_model_region" + ) + # update key budget with temp budget increase + valid_token = _update_key_budget_with_temp_budget_increase( + valid_token + ) # updating it here, allows all downstream reporting / checks to use the updated budget + except Exception: + verbose_logger.info( + "litellm.proxy.auth.user_api_key_auth.py::user_api_key_auth() - Unable to find token={} in cache or `LiteLLM_VerificationTokenTable`. Defaulting 'valid_token' to None'".format( + api_key + ) + ) + valid_token = None + + if valid_token is None: + raise Exception( + "Invalid proxy server token passed. Received API Key (hashed)={}. Unable to find token in cache or `LiteLLM_VerificationTokenTable`".format( + api_key + ) + ) + + user_obj: Optional[LiteLLM_UserTable] = None + valid_token_dict: dict = {} + if valid_token is not None: + # Got Valid Token from Cache, DB + # Run checks for + # 1. If token can call model + ## 1a. If token can call fallback models (if client-side fallbacks given) + # 2. If user_id for this token is in budget + # 3. If the user spend within their own team is within budget + # 4. If 'user' passed to /chat/completions, /embeddings endpoint is in budget + # 5. If token is expired + # 6. If token spend is under Budget for the token + # 7. If token spend per model is under budget per model + # 8. If token spend is under team budget + # 9. If team spend is under team budget + + ## base case ## key is disabled + if valid_token.blocked is True: + raise Exception( + "Key is blocked. Update via `/key/unblock` if you're admin." + ) + config = valid_token.config + + if config != {}: + model_list = config.get("model_list", []) + new_model_list = model_list + verbose_proxy_logger.debug( + f"\n new llm router model list {new_model_list}" + ) + elif ( + isinstance(valid_token.models, list) + and "all-team-models" in valid_token.models + ): + # Do not do any validation at this step + # the validation will occur when checking the team has access to this model + pass + else: + model = get_model_from_request(request_data, route) + fallback_models = cast( + Optional[List[ALL_FALLBACK_MODEL_VALUES]], + request_data.get("fallbacks", None), + ) + + if model is not None: + await can_key_call_model( + model=model, + llm_model_list=llm_model_list, + valid_token=valid_token, + llm_router=llm_router, + ) + + if fallback_models is not None: + for m in fallback_models: + await can_key_call_model( + model=m["model"] if isinstance(m, dict) else m, + llm_model_list=llm_model_list, + valid_token=valid_token, + llm_router=llm_router, + ) + await is_valid_fallback_model( + model=m["model"] if isinstance(m, dict) else m, + llm_router=llm_router, + user_model=None, + ) + + # Check 2. If user_id for this token is in budget - done in common_checks() + if valid_token.user_id is not None: + try: + user_obj = await get_user_object( + user_id=valid_token.user_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + user_id_upsert=False, + parent_otel_span=parent_otel_span, + proxy_logging_obj=proxy_logging_obj, + ) + except Exception as e: + verbose_logger.debug( + "litellm.proxy.auth.user_api_key_auth.py::user_api_key_auth() - Unable to get user from db/cache. Setting user_obj to None. Exception received - {}".format( + str(e) + ) + ) + user_obj = None + + # Check 3. Check if user is in their team budget + if valid_token.team_member_spend is not None: + if prisma_client is not None: + + _cache_key = f"{valid_token.team_id}_{valid_token.user_id}" + + team_member_info = await user_api_key_cache.async_get_cache( + key=_cache_key + ) + if team_member_info is None: + # read from DB + _user_id = valid_token.user_id + _team_id = valid_token.team_id + + if _user_id is not None and _team_id is not None: + team_member_info = await prisma_client.db.litellm_teammembership.find_first( + where={ + "user_id": _user_id, + "team_id": _team_id, + }, # type: ignore + include={"litellm_budget_table": True}, + ) + await user_api_key_cache.async_set_cache( + key=_cache_key, + value=team_member_info, + ) + + if ( + team_member_info is not None + and team_member_info.litellm_budget_table is not None + ): + team_member_budget = ( + team_member_info.litellm_budget_table.max_budget + ) + if team_member_budget is not None and team_member_budget > 0: + if valid_token.team_member_spend > team_member_budget: + raise litellm.BudgetExceededError( + current_cost=valid_token.team_member_spend, + max_budget=team_member_budget, + ) + + # Check 3. If token is expired + if valid_token.expires is not None: + current_time = datetime.now(timezone.utc) + if isinstance(valid_token.expires, datetime): + expiry_time = valid_token.expires + else: + expiry_time = datetime.fromisoformat(valid_token.expires) + if ( + expiry_time.tzinfo is None + or expiry_time.tzinfo.utcoffset(expiry_time) is None + ): + expiry_time = expiry_time.replace(tzinfo=timezone.utc) + verbose_proxy_logger.debug( + f"Checking if token expired, expiry time {expiry_time} and current time {current_time}" + ) + if expiry_time < current_time: + # Token exists but is expired. + raise ProxyException( + message=f"Authentication Error - Expired Key. Key Expiry time {expiry_time} and current time {current_time}", + type=ProxyErrorTypes.expired_key, + code=400, + param=api_key, + ) + + # Check 4. Token Spend is under budget + await _virtual_key_max_budget_check( + valid_token=valid_token, + proxy_logging_obj=proxy_logging_obj, + user_obj=user_obj, + ) + + # Check 5. Soft Budget Check + await _virtual_key_soft_budget_check( + valid_token=valid_token, + proxy_logging_obj=proxy_logging_obj, + ) + + # Check 5. Token Model Spend is under Model budget + max_budget_per_model = valid_token.model_max_budget + current_model = request_data.get("model", None) + + if ( + max_budget_per_model is not None + and isinstance(max_budget_per_model, dict) + and len(max_budget_per_model) > 0 + and prisma_client is not None + and current_model is not None + and valid_token.token is not None + ): + ## GET THE SPEND FOR THIS MODEL + await model_max_budget_limiter.is_key_within_model_budget( + user_api_key_dict=valid_token, + model=current_model, + ) + + # Check 6: Additional Common Checks across jwt + key auth + if valid_token.team_id is not None: + _team_obj: Optional[LiteLLM_TeamTable] = LiteLLM_TeamTable( + team_id=valid_token.team_id, + max_budget=valid_token.team_max_budget, + spend=valid_token.team_spend, + tpm_limit=valid_token.team_tpm_limit, + rpm_limit=valid_token.team_rpm_limit, + blocked=valid_token.team_blocked, + models=valid_token.team_models, + metadata=valid_token.team_metadata, + ) + else: + _team_obj = None + + # Check 7: Check if key is a service account key + await service_account_checks( + valid_token=valid_token, + request_data=request_data, + ) + + user_api_key_cache.set_cache( + key=valid_token.team_id, value=_team_obj + ) # save team table in cache - used for tpm/rpm limiting - tpm_rpm_limiter.py + + global_proxy_spend = None + if ( + litellm.max_budget > 0 and prisma_client is not None + ): # user set proxy max budget + # check cache + global_proxy_spend = await user_api_key_cache.async_get_cache( + key="{}:spend".format(litellm_proxy_admin_name) + ) + if global_proxy_spend is None: + # get from db + sql_query = """SELECT SUM(spend) as total_spend FROM "MonthlyGlobalSpend";""" + + response = await prisma_client.db.query_raw(query=sql_query) + + global_proxy_spend = response[0]["total_spend"] + await user_api_key_cache.async_set_cache( + key="{}:spend".format(litellm_proxy_admin_name), + value=global_proxy_spend, + ) + + if global_proxy_spend is not None: + call_info = CallInfo( + token=valid_token.token, + spend=global_proxy_spend, + max_budget=litellm.max_budget, + user_id=litellm_proxy_admin_name, + team_id=valid_token.team_id, + ) + asyncio.create_task( + proxy_logging_obj.budget_alerts( + type="proxy_budget", + user_info=call_info, + ) + ) + _ = await common_checks( + request_body=request_data, + team_object=_team_obj, + user_object=user_obj, + end_user_object=_end_user_object, + general_settings=general_settings, + global_proxy_spend=global_proxy_spend, + route=route, + llm_router=llm_router, + proxy_logging_obj=proxy_logging_obj, + valid_token=valid_token, + ) + # Token passed all checks + if valid_token is None: + raise HTTPException(401, detail="Invalid API key") + if valid_token.token is None: + raise HTTPException(401, detail="Invalid API key, no token associated") + api_key = valid_token.token + + # Add hashed token to cache + asyncio.create_task( + _cache_key_object( + hashed_token=api_key, + user_api_key_obj=valid_token, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + ) + + valid_token_dict = valid_token.model_dump(exclude_none=True) + valid_token_dict.pop("token", None) + + if _end_user_object is not None: + valid_token_dict.update(end_user_params) + + # check if token is from litellm-ui, litellm ui makes keys to allow users to login with sso. These keys can only be used for LiteLLM UI functions + # sso/login, ui/login, /key functions and /user functions + # this will never be allowed to call /chat/completions + token_team = getattr(valid_token, "team_id", None) + token_type: Literal["ui", "api"] = ( + "ui" + if token_team is not None and token_team == "litellm-dashboard" + else "api" + ) + _is_route_allowed = _is_allowed_route( + route=route, + token_type=token_type, + user_obj=user_obj, + request=request, + request_data=request_data, + api_key=api_key, + valid_token=valid_token, + ) + if not _is_route_allowed: + raise HTTPException(401, detail="Invalid route for UI token") + + if valid_token is None: + # No token was found when looking up in the DB + raise Exception("Invalid proxy server token passed") + if valid_token_dict is not None: + return await _return_user_api_key_auth_obj( + user_obj=user_obj, + api_key=api_key, + parent_otel_span=parent_otel_span, + valid_token_dict=valid_token_dict, + route=route, + start_time=start_time, + ) + else: + raise Exception() + except Exception as e: + requester_ip = _get_request_ip_address( + request=request, + use_x_forwarded_for=general_settings.get("use_x_forwarded_for", False), + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.user_api_key_auth(): Exception occured - {}\nRequester IP Address:{}".format( + str(e), + requester_ip, + ), + extra={"requester_ip": requester_ip}, + ) + + # Log this exception to OTEL, Datadog etc + user_api_key_dict = UserAPIKeyAuth( + parent_otel_span=parent_otel_span, + api_key=api_key, + ) + asyncio.create_task( + proxy_logging_obj.post_call_failure_hook( + request_data=request_data, + original_exception=e, + user_api_key_dict=user_api_key_dict, + error_type=ProxyErrorTypes.auth_error, + route=route, + ) + ) + + if isinstance(e, litellm.BudgetExceededError): + raise ProxyException( + message=e.message, + type=ProxyErrorTypes.budget_exceeded, + param=None, + code=400, + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_401_UNAUTHORIZED), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_401_UNAUTHORIZED, + ) + + +@tracer.wrap() +async def user_api_key_auth( + request: Request, + api_key: str = fastapi.Security(api_key_header), + azure_api_key_header: str = fastapi.Security(azure_api_key_header), + anthropic_api_key_header: Optional[str] = fastapi.Security( + anthropic_api_key_header + ), + google_ai_studio_api_key_header: Optional[str] = fastapi.Security( + google_ai_studio_api_key_header + ), + azure_apim_header: Optional[str] = fastapi.Security(azure_apim_header), +) -> UserAPIKeyAuth: + """ + Parent function to authenticate user api key / jwt token. + """ + + request_data = await _read_request_body(request=request) + + user_api_key_auth_obj = await _user_api_key_auth_builder( + request=request, + api_key=api_key, + azure_api_key_header=azure_api_key_header, + anthropic_api_key_header=anthropic_api_key_header, + google_ai_studio_api_key_header=google_ai_studio_api_key_header, + azure_apim_header=azure_apim_header, + request_data=request_data, + ) + + end_user_id = get_end_user_id_from_request_body(request_data) + if end_user_id is not None: + user_api_key_auth_obj.end_user_id = end_user_id + + return user_api_key_auth_obj + + +async def _return_user_api_key_auth_obj( + user_obj: Optional[LiteLLM_UserTable], + api_key: str, + parent_otel_span: Optional[Span], + valid_token_dict: dict, + route: str, + start_time: datetime, + user_role: Optional[LitellmUserRoles] = None, +) -> UserAPIKeyAuth: + end_time = datetime.now() + + asyncio.create_task( + user_api_key_service_logger_obj.async_service_success_hook( + service=ServiceTypes.AUTH, + call_type=route, + start_time=start_time, + end_time=end_time, + duration=end_time.timestamp() - start_time.timestamp(), + parent_otel_span=parent_otel_span, + ) + ) + + retrieved_user_role = ( + user_role or _get_user_role(user_obj=user_obj) or LitellmUserRoles.INTERNAL_USER + ) + + user_api_key_kwargs = { + "api_key": api_key, + "parent_otel_span": parent_otel_span, + "user_role": retrieved_user_role, + **valid_token_dict, + } + if user_obj is not None: + user_api_key_kwargs.update( + user_tpm_limit=user_obj.tpm_limit, + user_rpm_limit=user_obj.rpm_limit, + user_email=user_obj.user_email, + ) + if user_obj is not None and _is_user_proxy_admin(user_obj=user_obj): + user_api_key_kwargs.update( + user_role=LitellmUserRoles.PROXY_ADMIN, + ) + return UserAPIKeyAuth(**user_api_key_kwargs) + else: + return UserAPIKeyAuth(**user_api_key_kwargs) + + +def _is_user_proxy_admin(user_obj: Optional[LiteLLM_UserTable]): + if user_obj is None: + return False + + if ( + user_obj.user_role is not None + and user_obj.user_role == LitellmUserRoles.PROXY_ADMIN.value + ): + return True + + if ( + user_obj.user_role is not None + and user_obj.user_role == LitellmUserRoles.PROXY_ADMIN.value + ): + return True + + return False + + +def _get_user_role( + user_obj: Optional[LiteLLM_UserTable], +) -> Optional[LitellmUserRoles]: + if user_obj is None: + return None + + _user = user_obj + + _user_role = _user.user_role + try: + role = LitellmUserRoles(_user_role) + except ValueError: + return LitellmUserRoles.INTERNAL_USER + + return role + + +def get_api_key_from_custom_header( + request: Request, custom_litellm_key_header_name: str +) -> str: + """ + Get API key from custom header + + Args: + request (Request): Request object + custom_litellm_key_header_name (str): Custom header name + + Returns: + Optional[str]: API key + """ + api_key: str = "" + # use this as the virtual key passed to litellm proxy + custom_litellm_key_header_name = custom_litellm_key_header_name.lower() + _headers = {k.lower(): v for k, v in request.headers.items()} + verbose_proxy_logger.debug( + "searching for custom_litellm_key_header_name= %s, in headers=%s", + custom_litellm_key_header_name, + _headers, + ) + custom_api_key = _headers.get(custom_litellm_key_header_name) + if custom_api_key: + api_key = _get_bearer_token(api_key=custom_api_key) + verbose_proxy_logger.debug( + "Found custom API key using header: {}, setting api_key={}".format( + custom_litellm_key_header_name, api_key + ) + ) + else: + verbose_proxy_logger.exception( + f"No LiteLLM Virtual Key pass. Please set header={custom_litellm_key_header_name}: Bearer <api_key>" + ) + return api_key + + +def _get_temp_budget_increase(valid_token: UserAPIKeyAuth): + valid_token_metadata = valid_token.metadata + if ( + "temp_budget_increase" in valid_token_metadata + and "temp_budget_expiry" in valid_token_metadata + ): + expiry = datetime.fromisoformat(valid_token_metadata["temp_budget_expiry"]) + if expiry > datetime.now(): + return valid_token_metadata["temp_budget_increase"] + return None + + +def _update_key_budget_with_temp_budget_increase( + valid_token: UserAPIKeyAuth, +) -> UserAPIKeyAuth: + if valid_token.max_budget is None: + return valid_token + temp_budget_increase = _get_temp_budget_increase(valid_token) or 0.0 + valid_token.max_budget = valid_token.max_budget + temp_budget_increase + return valid_token diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/batches_endpoints/endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/batches_endpoints/endpoints.py new file mode 100644 index 00000000..6b7651d4 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/batches_endpoints/endpoints.py @@ -0,0 +1,488 @@ +###################################################################### + +# /v1/batches Endpoints + + +###################################################################### +import asyncio +from typing import Dict, Optional, cast + +from fastapi import APIRouter, Depends, HTTPException, Path, Request, Response + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.batches.main import ( + CancelBatchRequest, + CreateBatchRequest, + RetrieveBatchRequest, +) +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing +from litellm.proxy.common_utils.http_parsing_utils import _read_request_body +from litellm.proxy.common_utils.openai_endpoint_utils import ( + get_custom_llm_provider_from_request_body, +) +from litellm.proxy.openai_files_endpoints.files_endpoints import is_known_model +from litellm.proxy.utils import handle_exception_on_proxy + +router = APIRouter() + + +@router.post( + "/{provider}/v1/batches", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.post( + "/v1/batches", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.post( + "/batches", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +async def create_batch( + request: Request, + fastapi_response: Response, + provider: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create large batches of API requests for asynchronous processing. + This is the equivalent of POST https://api.openai.com/v1/batch + Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch + + Example Curl + ``` + curl http://localhost:4000/v1/batches \ + -H "Authorization: Bearer sk-1234" \ + -H "Content-Type: application/json" \ + -d '{ + "input_file_id": "file-abc123", + "endpoint": "/v1/chat/completions", + "completion_window": "24h" + }' + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + data = await _read_request_body(request=request) + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n{}".format(json.dumps(data, indent=4)), + ) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + ## check if model is a loadbalanced model + router_model: Optional[str] = None + is_router_model = False + if litellm.enable_loadbalancing_on_batch_endpoints is True: + router_model = data.get("model", None) + is_router_model = is_known_model(model=router_model, llm_router=llm_router) + + custom_llm_provider = ( + provider or data.pop("custom_llm_provider", None) or "openai" + ) + _create_batch_data = CreateBatchRequest(**data) + if ( + litellm.enable_loadbalancing_on_batch_endpoints is True + and is_router_model + and router_model is not None + ): + if llm_router is None: + raise HTTPException( + status_code=500, + detail={ + "error": "LLM Router not initialized. Ensure models added to proxy." + }, + ) + + response = await llm_router.acreate_batch(**_create_batch_data) # type: ignore + else: + response = await litellm.acreate_batch( + custom_llm_provider=custom_llm_provider, **_create_batch_data # type: ignore + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.create_batch(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +@router.get( + "/{provider}/v1/batches/{batch_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.get( + "/v1/batches/{batch_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.get( + "/batches/{batch_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +async def retrieve_batch( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + provider: Optional[str] = None, + batch_id: str = Path( + title="Batch ID to retrieve", description="The ID of the batch to retrieve" + ), +): + """ + Retrieves a batch. + This is the equivalent of GET https://api.openai.com/v1/batches/{batch_id} + Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/retrieve + + Example Curl + ``` + curl http://localhost:4000/v1/batches/batch_abc123 \ + -H "Authorization: Bearer sk-1234" \ + -H "Content-Type: application/json" \ + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + ## check if model is a loadbalanced model + _retrieve_batch_request = RetrieveBatchRequest( + batch_id=batch_id, + ) + + data = cast(dict, _retrieve_batch_request) + + # setup logging + data["litellm_call_id"] = request.headers.get( + "x-litellm-call-id", str(uuid.uuid4()) + ) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + if litellm.enable_loadbalancing_on_batch_endpoints is True: + if llm_router is None: + raise HTTPException( + status_code=500, + detail={ + "error": "LLM Router not initialized. Ensure models added to proxy." + }, + ) + + response = await llm_router.aretrieve_batch(**data) # type: ignore + else: + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + response = await litellm.aretrieve_batch( + custom_llm_provider=custom_llm_provider, **data # type: ignore + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.retrieve_batch(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +@router.get( + "/{provider}/v1/batches", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.get( + "/v1/batches", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.get( + "/batches", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +async def list_batches( + request: Request, + fastapi_response: Response, + provider: Optional[str] = None, + limit: Optional[int] = None, + after: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Lists + This is the equivalent of GET https://api.openai.com/v1/batches/ + Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/list + + Example Curl + ``` + curl http://localhost:4000/v1/batches?limit=2 \ + -H "Authorization: Bearer sk-1234" \ + -H "Content-Type: application/json" \ + + ``` + """ + from litellm.proxy.proxy_server import proxy_logging_obj, version + + verbose_proxy_logger.debug("GET /v1/batches after={} limit={}".format(after, limit)) + try: + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + response = await litellm.alist_batches( + custom_llm_provider=custom_llm_provider, # type: ignore + after=after, + limit=limit, + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data={"after": after, "limit": limit}, + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.retrieve_batch(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +@router.post( + "/{provider}/v1/batches/{batch_id:path}/cancel", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.post( + "/v1/batches/{batch_id:path}/cancel", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +@router.post( + "/batches/{batch_id:path}/cancel", + dependencies=[Depends(user_api_key_auth)], + tags=["batch"], +) +async def cancel_batch( + request: Request, + batch_id: str, + fastapi_response: Response, + provider: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Cancel a batch. + This is the equivalent of POST https://api.openai.com/v1/batches/{batch_id}/cancel + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel + + Example Curl + ``` + curl http://localhost:4000/v1/batches/batch_abc123/cancel \ + -H "Authorization: Bearer sk-1234" \ + -H "Content-Type: application/json" \ + -X POST + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + data = await _read_request_body(request=request) + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n{}".format(json.dumps(data, indent=4)), + ) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + custom_llm_provider = ( + provider or data.pop("custom_llm_provider", None) or "openai" + ) + _cancel_batch_data = CancelBatchRequest(batch_id=batch_id, **data) + response = await litellm.acancel_batch( + custom_llm_provider=custom_llm_provider, # type: ignore + **_cancel_batch_data + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.create_batch(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +###################################################################### + +# END OF /v1/batches Endpoints Implementation + +###################################################################### diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/cached_logo.jpg b/.venv/lib/python3.12/site-packages/litellm/proxy/cached_logo.jpg Binary files differnew file mode 100644 index 00000000..da4faf5b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/cached_logo.jpg diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/caching_routes.py b/.venv/lib/python3.12/site-packages/litellm/proxy/caching_routes.py new file mode 100644 index 00000000..3a22ce2f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/caching_routes.py @@ -0,0 +1,236 @@ +from typing import Any, Dict + +from fastapi import APIRouter, Depends, HTTPException, Request + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import RedisCache +from litellm.litellm_core_utils.safe_json_dumps import safe_dumps +from litellm.litellm_core_utils.sensitive_data_masker import SensitiveDataMasker +from litellm.proxy._types import ProxyErrorTypes, ProxyException +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.types.caching import CachePingResponse, HealthCheckCacheParams + +masker = SensitiveDataMasker() + +router = APIRouter( + prefix="/cache", + tags=["caching"], +) + + +def _extract_cache_params() -> Dict[str, Any]: + """ + Safely extracts and cleans cache parameters. + + The health check UI needs to display specific cache parameters, to show users how they set up their cache. + + eg. + { + "host": "localhost", + "port": 6379, + "redis_kwargs": {"db": 0}, + "namespace": "test", + } + + Returns: + Dict containing cleaned and masked cache parameters + """ + if litellm.cache is None: + return {} + try: + cache_params = vars(litellm.cache.cache) + cleaned_params = ( + HealthCheckCacheParams(**cache_params).model_dump() if cache_params else {} + ) + return masker.mask_dict(cleaned_params) + except (AttributeError, TypeError) as e: + verbose_proxy_logger.debug(f"Error extracting cache params: {str(e)}") + return {} + + +@router.get( + "/ping", + response_model=CachePingResponse, + dependencies=[Depends(user_api_key_auth)], +) +async def cache_ping(): + """ + Endpoint for checking if cache can be pinged + """ + litellm_cache_params: Dict[str, Any] = {} + cleaned_cache_params: Dict[str, Any] = {} + try: + if litellm.cache is None: + raise HTTPException( + status_code=503, detail="Cache not initialized. litellm.cache is None" + ) + litellm_cache_params = masker.mask_dict(vars(litellm.cache)) + # remove field that might reference itself + litellm_cache_params.pop("cache", None) + cleaned_cache_params = _extract_cache_params() + + if litellm.cache.type == "redis": + ping_response = await litellm.cache.ping() + verbose_proxy_logger.debug( + "/cache/ping: ping_response: " + str(ping_response) + ) + # add cache does not return anything + await litellm.cache.async_add_cache( + result="test_key", + model="test-model", + messages=[{"role": "user", "content": "test from litellm"}], + ) + verbose_proxy_logger.debug("/cache/ping: done with set_cache()") + + return CachePingResponse( + status="healthy", + cache_type=str(litellm.cache.type), + ping_response=True, + set_cache_response="success", + litellm_cache_params=safe_dumps(litellm_cache_params), + health_check_cache_params=cleaned_cache_params, + ) + else: + return CachePingResponse( + status="healthy", + cache_type=str(litellm.cache.type), + litellm_cache_params=safe_dumps(litellm_cache_params), + ) + except Exception as e: + import traceback + + traceback.print_exc() + error_message = { + "message": f"Service Unhealthy ({str(e)})", + "litellm_cache_params": safe_dumps(litellm_cache_params), + "health_check_cache_params": safe_dumps(cleaned_cache_params), + "traceback": traceback.format_exc(), + } + raise ProxyException( + message=safe_dumps(error_message), + type=ProxyErrorTypes.cache_ping_error, + param="cache_ping", + code=503, + ) + + +@router.post( + "/delete", + tags=["caching"], + dependencies=[Depends(user_api_key_auth)], +) +async def cache_delete(request: Request): + """ + Endpoint for deleting a key from the cache. All responses from litellm proxy have `x-litellm-cache-key` in the headers + + Parameters: + - **keys**: *Optional[List[str]]* - A list of keys to delete from the cache. Example {"keys": ["key1", "key2"]} + + ```shell + curl -X POST "http://0.0.0.0:4000/cache/delete" \ + -H "Authorization: Bearer sk-1234" \ + -d '{"keys": ["key1", "key2"]}' + ``` + + """ + try: + if litellm.cache is None: + raise HTTPException( + status_code=503, detail="Cache not initialized. litellm.cache is None" + ) + + request_data = await request.json() + keys = request_data.get("keys", None) + + if litellm.cache.type == "redis": + await litellm.cache.delete_cache_keys(keys=keys) + return { + "status": "success", + } + else: + raise HTTPException( + status_code=500, + detail=f"Cache type {litellm.cache.type} does not support deleting a key. only `redis` is supported", + ) + except Exception as e: + raise HTTPException( + status_code=500, + detail=f"Cache Delete Failed({str(e)})", + ) + + +@router.get( + "/redis/info", + dependencies=[Depends(user_api_key_auth)], +) +async def cache_redis_info(): + """ + Endpoint for getting /redis/info + """ + try: + if litellm.cache is None: + raise HTTPException( + status_code=503, detail="Cache not initialized. litellm.cache is None" + ) + if litellm.cache.type == "redis" and isinstance( + litellm.cache.cache, RedisCache + ): + client_list = litellm.cache.cache.client_list() + redis_info = litellm.cache.cache.info() + num_clients = len(client_list) + return { + "num_clients": num_clients, + "clients": client_list, + "info": redis_info, + } + else: + raise HTTPException( + status_code=500, + detail=f"Cache type {litellm.cache.type} does not support flushing", + ) + except Exception as e: + raise HTTPException( + status_code=503, + detail=f"Service Unhealthy ({str(e)})", + ) + + +@router.post( + "/flushall", + tags=["caching"], + dependencies=[Depends(user_api_key_auth)], +) +async def cache_flushall(): + """ + A function to flush all items from the cache. (All items will be deleted from the cache with this) + Raises HTTPException if the cache is not initialized or if the cache type does not support flushing. + Returns a dictionary with the status of the operation. + + Usage: + ``` + curl -X POST http://0.0.0.0:4000/cache/flushall -H "Authorization: Bearer sk-1234" + ``` + """ + try: + if litellm.cache is None: + raise HTTPException( + status_code=503, detail="Cache not initialized. litellm.cache is None" + ) + if litellm.cache.type == "redis" and isinstance( + litellm.cache.cache, RedisCache + ): + litellm.cache.cache.flushall() + return { + "status": "success", + } + else: + raise HTTPException( + status_code=500, + detail=f"Cache type {litellm.cache.type} does not support flushing", + ) + except Exception as e: + raise HTTPException( + status_code=503, + detail=f"Service Unhealthy ({str(e)})", + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_request_processing.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_request_processing.py new file mode 100644 index 00000000..fcc13509 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_request_processing.py @@ -0,0 +1,358 @@ +import asyncio +import json +import uuid +from datetime import datetime +from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, Union + +import httpx +from fastapi import HTTPException, Request, status +from fastapi.responses import Response, StreamingResponse + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.proxy._types import ProxyException, UserAPIKeyAuth +from litellm.proxy.auth.auth_utils import check_response_size_is_safe +from litellm.proxy.common_utils.callback_utils import ( + get_logging_caching_headers, + get_remaining_tokens_and_requests_from_request_data, +) +from litellm.proxy.route_llm_request import route_request +from litellm.proxy.utils import ProxyLogging +from litellm.router import Router + +if TYPE_CHECKING: + from litellm.proxy.proxy_server import ProxyConfig as _ProxyConfig + + ProxyConfig = _ProxyConfig +else: + ProxyConfig = Any +from litellm.proxy.litellm_pre_call_utils import add_litellm_data_to_request + + +class ProxyBaseLLMRequestProcessing: + def __init__(self, data: dict): + self.data = data + + @staticmethod + def get_custom_headers( + *, + user_api_key_dict: UserAPIKeyAuth, + call_id: Optional[str] = None, + model_id: Optional[str] = None, + cache_key: Optional[str] = None, + api_base: Optional[str] = None, + version: Optional[str] = None, + model_region: Optional[str] = None, + response_cost: Optional[Union[float, str]] = None, + hidden_params: Optional[dict] = None, + fastest_response_batch_completion: Optional[bool] = None, + request_data: Optional[dict] = {}, + timeout: Optional[Union[float, int, httpx.Timeout]] = None, + **kwargs, + ) -> dict: + exclude_values = {"", None, "None"} + hidden_params = hidden_params or {} + headers = { + "x-litellm-call-id": call_id, + "x-litellm-model-id": model_id, + "x-litellm-cache-key": cache_key, + "x-litellm-model-api-base": ( + api_base.split("?")[0] if api_base else None + ), # don't include query params, risk of leaking sensitive info + "x-litellm-version": version, + "x-litellm-model-region": model_region, + "x-litellm-response-cost": str(response_cost), + "x-litellm-key-tpm-limit": str(user_api_key_dict.tpm_limit), + "x-litellm-key-rpm-limit": str(user_api_key_dict.rpm_limit), + "x-litellm-key-max-budget": str(user_api_key_dict.max_budget), + "x-litellm-key-spend": str(user_api_key_dict.spend), + "x-litellm-response-duration-ms": str( + hidden_params.get("_response_ms", None) + ), + "x-litellm-overhead-duration-ms": str( + hidden_params.get("litellm_overhead_time_ms", None) + ), + "x-litellm-fastest_response_batch_completion": ( + str(fastest_response_batch_completion) + if fastest_response_batch_completion is not None + else None + ), + "x-litellm-timeout": str(timeout) if timeout is not None else None, + **{k: str(v) for k, v in kwargs.items()}, + } + if request_data: + remaining_tokens_header = ( + get_remaining_tokens_and_requests_from_request_data(request_data) + ) + headers.update(remaining_tokens_header) + + logging_caching_headers = get_logging_caching_headers(request_data) + if logging_caching_headers: + headers.update(logging_caching_headers) + + try: + return { + key: str(value) + for key, value in headers.items() + if value not in exclude_values + } + except Exception as e: + verbose_proxy_logger.error(f"Error setting custom headers: {e}") + return {} + + async def base_process_llm_request( + self, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth, + route_type: Literal["acompletion", "aresponses"], + proxy_logging_obj: ProxyLogging, + general_settings: dict, + proxy_config: ProxyConfig, + select_data_generator: Callable, + llm_router: Optional[Router] = None, + model: Optional[str] = None, + user_model: Optional[str] = None, + user_temperature: Optional[float] = None, + user_request_timeout: Optional[float] = None, + user_max_tokens: Optional[int] = None, + user_api_base: Optional[str] = None, + version: Optional[str] = None, + ) -> Any: + """ + Common request processing logic for both chat completions and responses API endpoints + """ + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n{}".format(json.dumps(self.data, indent=4)), + ) + + self.data = await add_litellm_data_to_request( + data=self.data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + self.data["model"] = ( + general_settings.get("completion_model", None) # server default + or user_model # model name passed via cli args + or model # for azure deployments + or self.data.get("model", None) # default passed in http request + ) + + # override with user settings, these are params passed via cli + if user_temperature: + self.data["temperature"] = user_temperature + if user_request_timeout: + self.data["request_timeout"] = user_request_timeout + if user_max_tokens: + self.data["max_tokens"] = user_max_tokens + if user_api_base: + self.data["api_base"] = user_api_base + + ### MODEL ALIAS MAPPING ### + # check if model name in model alias map + # get the actual model name + if ( + isinstance(self.data["model"], str) + and self.data["model"] in litellm.model_alias_map + ): + self.data["model"] = litellm.model_alias_map[self.data["model"]] + + ### CALL HOOKS ### - modify/reject incoming data before calling the model + self.data = await proxy_logging_obj.pre_call_hook( # type: ignore + user_api_key_dict=user_api_key_dict, data=self.data, call_type="completion" + ) + + ## LOGGING OBJECT ## - initialize logging object for logging success/failure events for call + ## IMPORTANT Note: - initialize this before running pre-call checks. Ensures we log rejected requests to langfuse. + self.data["litellm_call_id"] = request.headers.get( + "x-litellm-call-id", str(uuid.uuid4()) + ) + logging_obj, self.data = litellm.utils.function_setup( + original_function=route_type, + rules_obj=litellm.utils.Rules(), + start_time=datetime.now(), + **self.data, + ) + + self.data["litellm_logging_obj"] = logging_obj + + tasks = [] + tasks.append( + proxy_logging_obj.during_call_hook( + data=self.data, + user_api_key_dict=user_api_key_dict, + call_type=ProxyBaseLLMRequestProcessing._get_pre_call_type( + route_type=route_type + ), + ) + ) + + ### ROUTE THE REQUEST ### + # Do not change this - it should be a constant time fetch - ALWAYS + llm_call = await route_request( + data=self.data, + route_type=route_type, + llm_router=llm_router, + user_model=user_model, + ) + tasks.append(llm_call) + + # wait for call to end + llm_responses = asyncio.gather( + *tasks + ) # run the moderation check in parallel to the actual llm api call + + responses = await llm_responses + + response = responses[1] + + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + fastest_response_batch_completion = hidden_params.get( + "fastest_response_batch_completion", None + ) + additional_headers: dict = hidden_params.get("additional_headers", {}) or {} + + # Post Call Processing + if llm_router is not None: + self.data["deployment"] = llm_router.get_deployment(model_id=model_id) + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=self.data.get("litellm_call_id", ""), status="success" + ) + ) + if ( + "stream" in self.data and self.data["stream"] is True + ): # use generate_responses to stream responses + custom_headers = ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=logging_obj.litellm_call_id, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + fastest_response_batch_completion=fastest_response_batch_completion, + request_data=self.data, + hidden_params=hidden_params, + **additional_headers, + ) + selected_data_generator = select_data_generator( + response=response, + user_api_key_dict=user_api_key_dict, + request_data=self.data, + ) + return StreamingResponse( + selected_data_generator, + media_type="text/event-stream", + headers=custom_headers, + ) + + ### CALL HOOKS ### - modify outgoing data + response = await proxy_logging_obj.post_call_success_hook( + data=self.data, user_api_key_dict=user_api_key_dict, response=response + ) + + hidden_params = ( + getattr(response, "_hidden_params", {}) or {} + ) # get any updated response headers + additional_headers = hidden_params.get("additional_headers", {}) or {} + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=logging_obj.litellm_call_id, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + fastest_response_batch_completion=fastest_response_batch_completion, + request_data=self.data, + hidden_params=hidden_params, + **additional_headers, + ) + ) + await check_response_size_is_safe(response=response) + + return response + + async def _handle_llm_api_exception( + self, + e: Exception, + user_api_key_dict: UserAPIKeyAuth, + proxy_logging_obj: ProxyLogging, + version: Optional[str] = None, + ): + """Raises ProxyException (OpenAI API compatible) if an exception is raised""" + verbose_proxy_logger.exception( + f"litellm.proxy.proxy_server._handle_llm_api_exception(): Exception occured - {str(e)}" + ) + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data=self.data, + ) + litellm_debug_info = getattr(e, "litellm_debug_info", "") + verbose_proxy_logger.debug( + "\033[1;31mAn error occurred: %s %s\n\n Debug this by setting `--debug`, e.g. `litellm --model gpt-3.5-turbo --debug`", + e, + litellm_debug_info, + ) + + timeout = getattr( + e, "timeout", None + ) # returns the timeout set by the wrapper. Used for testing if model-specific timeout are set correctly + _litellm_logging_obj: Optional[LiteLLMLoggingObj] = self.data.get( + "litellm_logging_obj", None + ) + custom_headers = ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=( + _litellm_logging_obj.litellm_call_id if _litellm_logging_obj else None + ), + version=version, + response_cost=0, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=self.data, + timeout=timeout, + ) + headers = getattr(e, "headers", {}) or {} + headers.update(custom_headers) + + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", str(e)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + headers=headers, + ) + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + openai_code=getattr(e, "code", None), + code=getattr(e, "status_code", 500), + headers=headers, + ) + + @staticmethod + def _get_pre_call_type( + route_type: Literal["acompletion", "aresponses"] + ) -> Literal["completion", "responses"]: + if route_type == "acompletion": + return "completion" + elif route_type == "aresponses": + return "responses" diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/admin_ui_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/admin_ui_utils.py new file mode 100644 index 00000000..204032ac --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/admin_ui_utils.py @@ -0,0 +1,240 @@ +import os + + +def show_missing_vars_in_env(): + from fastapi.responses import HTMLResponse + + from litellm.proxy.proxy_server import master_key, prisma_client + + if prisma_client is None and master_key is None: + return HTMLResponse( + content=missing_keys_form( + missing_key_names="DATABASE_URL, LITELLM_MASTER_KEY" + ), + status_code=200, + ) + if prisma_client is None: + return HTMLResponse( + content=missing_keys_form(missing_key_names="DATABASE_URL"), status_code=200 + ) + + if master_key is None: + return HTMLResponse( + content=missing_keys_form(missing_key_names="LITELLM_MASTER_KEY"), + status_code=200, + ) + return None + + +# LiteLLM Admin UI - Non SSO Login +url_to_redirect_to = os.getenv("PROXY_BASE_URL", "") +url_to_redirect_to += "/login" +html_form = f""" +<!DOCTYPE html> +<html> +<head> + <title>LiteLLM Login</title> + <style> + body {{ + font-family: Arial, sans-serif; + background-color: #f4f4f4; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + }} + + form {{ + background-color: #fff; + padding: 20px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + }} + + label {{ + display: block; + margin-bottom: 8px; + }} + + input {{ + width: 100%; + padding: 8px; + margin-bottom: 16px; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 4px; + }} + + input[type="submit"] {{ + background-color: #4caf50; + color: #fff; + cursor: pointer; + }} + + input[type="submit"]:hover {{ + background-color: #45a049; + }} + </style> +</head> +<body> + <form action="{url_to_redirect_to}" method="post"> + <h2>LiteLLM Login</h2> + + <p>By default Username is "admin" and Password is your set LiteLLM Proxy `MASTER_KEY`</p> + <p>If you need to set UI credentials / SSO docs here: <a href="https://docs.litellm.ai/docs/proxy/ui" target="_blank">https://docs.litellm.ai/docs/proxy/ui</a></p> + <br> + <label for="username">Username:</label> + <input type="text" id="username" name="username" required> + <label for="password">Password:</label> + <input type="password" id="password" name="password" required> + <input type="submit" value="Submit"> + </form> +""" + + +def missing_keys_form(missing_key_names: str): + missing_keys_html_form = """ + <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <style> + body {{ + font-family: Arial, sans-serif; + background-color: #f4f4f9; + color: #333; + margin: 20px; + line-height: 1.6; + }} + .container {{ + max-width: 800px; + margin: auto; + padding: 20px; + background: #fff; + border: 1px solid #ddd; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + }} + h1 {{ + font-size: 24px; + margin-bottom: 20px; + }} + pre {{ + background: #f8f8f8; + padding: 1px; + border: 1px solid #ccc; + border-radius: 4px; + overflow-x: auto; + font-size: 14px; + }} + .env-var {{ + font-weight: normal; + }} + .comment {{ + font-weight: normal; + color: #777; + }} + </style> + <title>Environment Setup Instructions</title> + </head> + <body> + <div class="container"> + <h1>Environment Setup Instructions</h1> + <p>Please add the following variables to your environment variables:</p> + <pre> + <span class="env-var">LITELLM_MASTER_KEY="sk-1234"</span> <span class="comment"># Your master key for the proxy server. Can use this to send /chat/completion requests etc</span> + <span class="env-var">LITELLM_SALT_KEY="sk-XXXXXXXX"</span> <span class="comment"># Can NOT CHANGE THIS ONCE SET - It is used to encrypt/decrypt credentials stored in DB. If value of 'LITELLM_SALT_KEY' changes your models cannot be retrieved from DB</span> + <span class="env-var">DATABASE_URL="postgres://..."</span> <span class="comment"># Need a postgres database? (Check out Supabase, Neon, etc)</span> + <span class="comment">## OPTIONAL ##</span> + <span class="env-var">PORT=4000</span> <span class="comment"># DO THIS FOR RENDER/RAILWAY</span> + <span class="env-var">STORE_MODEL_IN_DB="True"</span> <span class="comment"># Allow storing models in db</span> + </pre> + <h1>Missing Environment Variables</h1> + <p>{missing_keys}</p> + </div> + + <div class="container"> + <h1>Need Help? Support</h1> + <p>Discord: <a href="https://discord.com/invite/wuPM9dRgDw" target="_blank">https://discord.com/invite/wuPM9dRgDw</a></p> + <p>Docs: <a href="https://docs.litellm.ai/docs/" target="_blank">https://docs.litellm.ai/docs/</a></p> + </div> + </body> + </html> + """ + return missing_keys_html_form.format(missing_keys=missing_key_names) + + +def admin_ui_disabled(): + from fastapi.responses import HTMLResponse + + ui_disabled_html = """ + <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <style> + body {{ + font-family: Arial, sans-serif; + background-color: #f4f4f9; + color: #333; + margin: 20px; + line-height: 1.6; + }} + .container {{ + max-width: 800px; + margin: auto; + padding: 20px; + background: #fff; + border: 1px solid #ddd; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + }} + h1 {{ + font-size: 24px; + margin-bottom: 20px; + }} + pre {{ + background: #f8f8f8; + padding: 1px; + border: 1px solid #ccc; + border-radius: 4px; + overflow-x: auto; + font-size: 14px; + }} + .env-var {{ + font-weight: normal; + }} + .comment {{ + font-weight: normal; + color: #777; + }} + </style> + <title>Admin UI Disabled</title> + </head> + <body> + <div class="container"> + <h1>Admin UI is Disabled</h1> + <p>The Admin UI has been disabled by the administrator. To re-enable it, please update the following environment variable:</p> + <pre> + <span class="env-var">DISABLE_ADMIN_UI="False"</span> <span class="comment"># Set this to "False" to enable the Admin UI.</span> + </pre> + <p>After making this change, restart the application for it to take effect.</p> + </div> + + <div class="container"> + <h1>Need Help? Support</h1> + <p>Discord: <a href="https://discord.com/invite/wuPM9dRgDw" target="_blank">https://discord.com/invite/wuPM9dRgDw</a></p> + <p>Docs: <a href="https://docs.litellm.ai/docs/" target="_blank">https://docs.litellm.ai/docs/</a></p> + </div> + </body> + </html> + """ + + return HTMLResponse( + content=ui_disabled_html, + status_code=200, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/callback_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/callback_utils.py new file mode 100644 index 00000000..2280e72e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/callback_utils.py @@ -0,0 +1,319 @@ +from typing import Any, Dict, List, Optional + +import litellm +from litellm import get_secret +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import CommonProxyErrors, LiteLLMPromptInjectionParams +from litellm.proxy.types_utils.utils import get_instance_fn + +blue_color_code = "\033[94m" +reset_color_code = "\033[0m" + + +def initialize_callbacks_on_proxy( # noqa: PLR0915 + value: Any, + premium_user: bool, + config_file_path: str, + litellm_settings: dict, + callback_specific_params: dict = {}, +): + from litellm.proxy.proxy_server import prisma_client + + verbose_proxy_logger.debug( + f"{blue_color_code}initializing callbacks={value} on proxy{reset_color_code}" + ) + if isinstance(value, list): + imported_list: List[Any] = [] + for callback in value: # ["presidio", <my-custom-callback>] + if ( + isinstance(callback, str) + and callback in litellm._known_custom_logger_compatible_callbacks + ): + imported_list.append(callback) + elif isinstance(callback, str) and callback == "presidio": + from litellm.proxy.guardrails.guardrail_hooks.presidio import ( + _OPTIONAL_PresidioPIIMasking, + ) + + presidio_logging_only: Optional[bool] = litellm_settings.get( + "presidio_logging_only", None + ) + if presidio_logging_only is not None: + presidio_logging_only = bool( + presidio_logging_only + ) # validate boolean given + + _presidio_params = {} + if "presidio" in callback_specific_params and isinstance( + callback_specific_params["presidio"], dict + ): + _presidio_params = callback_specific_params["presidio"] + + params: Dict[str, Any] = { + "logging_only": presidio_logging_only, + **_presidio_params, + } + pii_masking_object = _OPTIONAL_PresidioPIIMasking(**params) + imported_list.append(pii_masking_object) + elif isinstance(callback, str) and callback == "llamaguard_moderations": + from enterprise.enterprise_hooks.llama_guard import ( + _ENTERPRISE_LlamaGuard, + ) + + if premium_user is not True: + raise Exception( + "Trying to use Llama Guard" + + CommonProxyErrors.not_premium_user.value + ) + + llama_guard_object = _ENTERPRISE_LlamaGuard() + imported_list.append(llama_guard_object) + elif isinstance(callback, str) and callback == "hide_secrets": + from enterprise.enterprise_hooks.secret_detection import ( + _ENTERPRISE_SecretDetection, + ) + + if premium_user is not True: + raise Exception( + "Trying to use secret hiding" + + CommonProxyErrors.not_premium_user.value + ) + + _secret_detection_object = _ENTERPRISE_SecretDetection() + imported_list.append(_secret_detection_object) + elif isinstance(callback, str) and callback == "openai_moderations": + from enterprise.enterprise_hooks.openai_moderation import ( + _ENTERPRISE_OpenAI_Moderation, + ) + + if premium_user is not True: + raise Exception( + "Trying to use OpenAI Moderations Check" + + CommonProxyErrors.not_premium_user.value + ) + + openai_moderations_object = _ENTERPRISE_OpenAI_Moderation() + imported_list.append(openai_moderations_object) + elif isinstance(callback, str) and callback == "lakera_prompt_injection": + from litellm.proxy.guardrails.guardrail_hooks.lakera_ai import ( + lakeraAI_Moderation, + ) + + init_params = {} + if "lakera_prompt_injection" in callback_specific_params: + init_params = callback_specific_params["lakera_prompt_injection"] + lakera_moderations_object = lakeraAI_Moderation(**init_params) + imported_list.append(lakera_moderations_object) + elif isinstance(callback, str) and callback == "aporia_prompt_injection": + from litellm.proxy.guardrails.guardrail_hooks.aporia_ai import ( + AporiaGuardrail, + ) + + aporia_guardrail_object = AporiaGuardrail() + imported_list.append(aporia_guardrail_object) + elif isinstance(callback, str) and callback == "google_text_moderation": + from enterprise.enterprise_hooks.google_text_moderation import ( + _ENTERPRISE_GoogleTextModeration, + ) + + if premium_user is not True: + raise Exception( + "Trying to use Google Text Moderation" + + CommonProxyErrors.not_premium_user.value + ) + + google_text_moderation_obj = _ENTERPRISE_GoogleTextModeration() + imported_list.append(google_text_moderation_obj) + elif isinstance(callback, str) and callback == "llmguard_moderations": + from enterprise.enterprise_hooks.llm_guard import _ENTERPRISE_LLMGuard + + if premium_user is not True: + raise Exception( + "Trying to use Llm Guard" + + CommonProxyErrors.not_premium_user.value + ) + + llm_guard_moderation_obj = _ENTERPRISE_LLMGuard() + imported_list.append(llm_guard_moderation_obj) + elif isinstance(callback, str) and callback == "blocked_user_check": + from enterprise.enterprise_hooks.blocked_user_list import ( + _ENTERPRISE_BlockedUserList, + ) + + if premium_user is not True: + raise Exception( + "Trying to use ENTERPRISE BlockedUser" + + CommonProxyErrors.not_premium_user.value + ) + + blocked_user_list = _ENTERPRISE_BlockedUserList( + prisma_client=prisma_client + ) + imported_list.append(blocked_user_list) + elif isinstance(callback, str) and callback == "banned_keywords": + from enterprise.enterprise_hooks.banned_keywords import ( + _ENTERPRISE_BannedKeywords, + ) + + if premium_user is not True: + raise Exception( + "Trying to use ENTERPRISE BannedKeyword" + + CommonProxyErrors.not_premium_user.value + ) + + banned_keywords_obj = _ENTERPRISE_BannedKeywords() + imported_list.append(banned_keywords_obj) + elif isinstance(callback, str) and callback == "detect_prompt_injection": + from litellm.proxy.hooks.prompt_injection_detection import ( + _OPTIONAL_PromptInjectionDetection, + ) + + prompt_injection_params = None + if "prompt_injection_params" in litellm_settings: + prompt_injection_params_in_config = litellm_settings[ + "prompt_injection_params" + ] + prompt_injection_params = LiteLLMPromptInjectionParams( + **prompt_injection_params_in_config + ) + + prompt_injection_detection_obj = _OPTIONAL_PromptInjectionDetection( + prompt_injection_params=prompt_injection_params, + ) + imported_list.append(prompt_injection_detection_obj) + elif isinstance(callback, str) and callback == "batch_redis_requests": + from litellm.proxy.hooks.batch_redis_get import ( + _PROXY_BatchRedisRequests, + ) + + batch_redis_obj = _PROXY_BatchRedisRequests() + imported_list.append(batch_redis_obj) + elif isinstance(callback, str) and callback == "azure_content_safety": + from litellm.proxy.hooks.azure_content_safety import ( + _PROXY_AzureContentSafety, + ) + + azure_content_safety_params = litellm_settings[ + "azure_content_safety_params" + ] + for k, v in azure_content_safety_params.items(): + if ( + v is not None + and isinstance(v, str) + and v.startswith("os.environ/") + ): + azure_content_safety_params[k] = get_secret(v) + + azure_content_safety_obj = _PROXY_AzureContentSafety( + **azure_content_safety_params, + ) + imported_list.append(azure_content_safety_obj) + else: + verbose_proxy_logger.debug( + f"{blue_color_code} attempting to import custom calback={callback} {reset_color_code}" + ) + imported_list.append( + get_instance_fn( + value=callback, + config_file_path=config_file_path, + ) + ) + if isinstance(litellm.callbacks, list): + litellm.callbacks.extend(imported_list) + else: + litellm.callbacks = imported_list # type: ignore + + if "prometheus" in value: + if premium_user is not True: + verbose_proxy_logger.warning( + f"Prometheus metrics are only available for premium users. {CommonProxyErrors.not_premium_user.value}" + ) + from litellm.proxy.proxy_server import app + + verbose_proxy_logger.debug("Starting Prometheus Metrics on /metrics") + from prometheus_client import make_asgi_app + + # Add prometheus asgi middleware to route /metrics requests + metrics_app = make_asgi_app() + app.mount("/metrics", metrics_app) + else: + litellm.callbacks = [ + get_instance_fn( + value=value, + config_file_path=config_file_path, + ) + ] + verbose_proxy_logger.debug( + f"{blue_color_code} Initialized Callbacks - {litellm.callbacks} {reset_color_code}" + ) + + +def get_model_group_from_litellm_kwargs(kwargs: dict) -> Optional[str]: + _litellm_params = kwargs.get("litellm_params", None) or {} + _metadata = _litellm_params.get("metadata", None) or {} + _model_group = _metadata.get("model_group", None) + if _model_group is not None: + return _model_group + + return None + + +def get_model_group_from_request_data(data: dict) -> Optional[str]: + _metadata = data.get("metadata", None) or {} + _model_group = _metadata.get("model_group", None) + if _model_group is not None: + return _model_group + + return None + + +def get_remaining_tokens_and_requests_from_request_data(data: Dict) -> Dict[str, str]: + """ + Helper function to return x-litellm-key-remaining-tokens-{model_group} and x-litellm-key-remaining-requests-{model_group} + + Returns {} when api_key + model rpm/tpm limit is not set + + """ + headers = {} + _metadata = data.get("metadata", None) or {} + model_group = get_model_group_from_request_data(data) + + # Remaining Requests + remaining_requests_variable_name = f"litellm-key-remaining-requests-{model_group}" + remaining_requests = _metadata.get(remaining_requests_variable_name, None) + if remaining_requests: + headers[f"x-litellm-key-remaining-requests-{model_group}"] = remaining_requests + + # Remaining Tokens + remaining_tokens_variable_name = f"litellm-key-remaining-tokens-{model_group}" + remaining_tokens = _metadata.get(remaining_tokens_variable_name, None) + if remaining_tokens: + headers[f"x-litellm-key-remaining-tokens-{model_group}"] = remaining_tokens + + return headers + + +def get_logging_caching_headers(request_data: Dict) -> Optional[Dict]: + _metadata = request_data.get("metadata", None) or {} + headers = {} + if "applied_guardrails" in _metadata: + headers["x-litellm-applied-guardrails"] = ",".join( + _metadata["applied_guardrails"] + ) + + if "semantic-similarity" in _metadata: + headers["x-litellm-semantic-similarity"] = str(_metadata["semantic-similarity"]) + + return headers + + +def add_guardrail_to_applied_guardrails_header( + request_data: Dict, guardrail_name: Optional[str] +): + if guardrail_name is None: + return + _metadata = request_data.get("metadata", None) or {} + if "applied_guardrails" in _metadata: + _metadata["applied_guardrails"].append(guardrail_name) + else: + _metadata["applied_guardrails"] = [guardrail_name] diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/debug_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/debug_utils.py new file mode 100644 index 00000000..fdfbe0cb --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/debug_utils.py @@ -0,0 +1,242 @@ +# Start tracing memory allocations +import json +import os +import tracemalloc + +from fastapi import APIRouter + +from litellm import get_secret_str +from litellm._logging import verbose_proxy_logger + +router = APIRouter() + +if os.environ.get("LITELLM_PROFILE", "false").lower() == "true": + try: + import objgraph # type: ignore + + print("growth of objects") # noqa + objgraph.show_growth() + print("\n\nMost common types") # noqa + objgraph.show_most_common_types() + roots = objgraph.get_leaking_objects() + print("\n\nLeaking objects") # noqa + objgraph.show_most_common_types(objects=roots) + except ImportError: + raise ImportError( + "objgraph not found. Please install objgraph to use this feature." + ) + + tracemalloc.start(10) + + @router.get("/memory-usage", include_in_schema=False) + async def memory_usage(): + # Take a snapshot of the current memory usage + snapshot = tracemalloc.take_snapshot() + top_stats = snapshot.statistics("lineno") + verbose_proxy_logger.debug("TOP STATS: %s", top_stats) + + # Get the top 50 memory usage lines + top_50 = top_stats[:50] + result = [] + for stat in top_50: + result.append(f"{stat.traceback.format(limit=10)}: {stat.size / 1024} KiB") + + return {"top_50_memory_usage": result} + + +@router.get("/memory-usage-in-mem-cache", include_in_schema=False) +async def memory_usage_in_mem_cache(): + # returns the size of all in-memory caches on the proxy server + """ + 1. user_api_key_cache + 2. router_cache + 3. proxy_logging_cache + 4. internal_usage_cache + """ + from litellm.proxy.proxy_server import ( + llm_router, + proxy_logging_obj, + user_api_key_cache, + ) + + if llm_router is None: + num_items_in_llm_router_cache = 0 + else: + num_items_in_llm_router_cache = len( + llm_router.cache.in_memory_cache.cache_dict + ) + len(llm_router.cache.in_memory_cache.ttl_dict) + + num_items_in_user_api_key_cache = len( + user_api_key_cache.in_memory_cache.cache_dict + ) + len(user_api_key_cache.in_memory_cache.ttl_dict) + + num_items_in_proxy_logging_obj_cache = len( + proxy_logging_obj.internal_usage_cache.dual_cache.in_memory_cache.cache_dict + ) + len(proxy_logging_obj.internal_usage_cache.dual_cache.in_memory_cache.ttl_dict) + + return { + "num_items_in_user_api_key_cache": num_items_in_user_api_key_cache, + "num_items_in_llm_router_cache": num_items_in_llm_router_cache, + "num_items_in_proxy_logging_obj_cache": num_items_in_proxy_logging_obj_cache, + } + + +@router.get("/memory-usage-in-mem-cache-items", include_in_schema=False) +async def memory_usage_in_mem_cache_items(): + # returns the size of all in-memory caches on the proxy server + """ + 1. user_api_key_cache + 2. router_cache + 3. proxy_logging_cache + 4. internal_usage_cache + """ + from litellm.proxy.proxy_server import ( + llm_router, + proxy_logging_obj, + user_api_key_cache, + ) + + if llm_router is None: + llm_router_in_memory_cache_dict = {} + llm_router_in_memory_ttl_dict = {} + else: + llm_router_in_memory_cache_dict = llm_router.cache.in_memory_cache.cache_dict + llm_router_in_memory_ttl_dict = llm_router.cache.in_memory_cache.ttl_dict + + return { + "user_api_key_cache": user_api_key_cache.in_memory_cache.cache_dict, + "user_api_key_ttl": user_api_key_cache.in_memory_cache.ttl_dict, + "llm_router_cache": llm_router_in_memory_cache_dict, + "llm_router_ttl": llm_router_in_memory_ttl_dict, + "proxy_logging_obj_cache": proxy_logging_obj.internal_usage_cache.dual_cache.in_memory_cache.cache_dict, + "proxy_logging_obj_ttl": proxy_logging_obj.internal_usage_cache.dual_cache.in_memory_cache.ttl_dict, + } + + +@router.get("/otel-spans", include_in_schema=False) +async def get_otel_spans(): + from litellm.proxy.proxy_server import open_telemetry_logger + + if open_telemetry_logger is None: + return { + "otel_spans": [], + "spans_grouped_by_parent": {}, + "most_recent_parent": None, + } + + otel_exporter = open_telemetry_logger.OTEL_EXPORTER + if hasattr(otel_exporter, "get_finished_spans"): + recorded_spans = otel_exporter.get_finished_spans() # type: ignore + else: + recorded_spans = [] + + print("Spans: ", recorded_spans) # noqa + + most_recent_parent = None + most_recent_start_time = 1000000 + spans_grouped_by_parent = {} + for span in recorded_spans: + if span.parent is not None: + parent_trace_id = span.parent.trace_id + if parent_trace_id not in spans_grouped_by_parent: + spans_grouped_by_parent[parent_trace_id] = [] + spans_grouped_by_parent[parent_trace_id].append(span.name) + + # check time of span + if span.start_time > most_recent_start_time: + most_recent_parent = parent_trace_id + most_recent_start_time = span.start_time + + # these are otel spans - get the span name + span_names = [span.name for span in recorded_spans] + return { + "otel_spans": span_names, + "spans_grouped_by_parent": spans_grouped_by_parent, + "most_recent_parent": most_recent_parent, + } + + +# Helper functions for debugging +def init_verbose_loggers(): + try: + worker_config = get_secret_str("WORKER_CONFIG") + # if not, assume it's a json string + if worker_config is None: + return + if os.path.isfile(worker_config): + return + _settings = json.loads(worker_config) + if not isinstance(_settings, dict): + return + + debug = _settings.get("debug", None) + detailed_debug = _settings.get("detailed_debug", None) + if debug is True: # this needs to be first, so users can see Router init debugg + import logging + + from litellm._logging import ( + verbose_logger, + verbose_proxy_logger, + verbose_router_logger, + ) + + # this must ALWAYS remain logging.INFO, DO NOT MODIFY THIS + verbose_logger.setLevel(level=logging.INFO) # sets package logs to info + verbose_router_logger.setLevel( + level=logging.INFO + ) # set router logs to info + verbose_proxy_logger.setLevel(level=logging.INFO) # set proxy logs to info + if detailed_debug is True: + import logging + + from litellm._logging import ( + verbose_logger, + verbose_proxy_logger, + verbose_router_logger, + ) + + verbose_logger.setLevel(level=logging.DEBUG) # set package log to debug + verbose_router_logger.setLevel( + level=logging.DEBUG + ) # set router logs to debug + verbose_proxy_logger.setLevel( + level=logging.DEBUG + ) # set proxy logs to debug + elif debug is False and detailed_debug is False: + # users can control proxy debugging using env variable = 'LITELLM_LOG' + litellm_log_setting = os.environ.get("LITELLM_LOG", "") + if litellm_log_setting is not None: + if litellm_log_setting.upper() == "INFO": + import logging + + from litellm._logging import ( + verbose_proxy_logger, + verbose_router_logger, + ) + + # this must ALWAYS remain logging.INFO, DO NOT MODIFY THIS + + verbose_router_logger.setLevel( + level=logging.INFO + ) # set router logs to info + verbose_proxy_logger.setLevel( + level=logging.INFO + ) # set proxy logs to info + elif litellm_log_setting.upper() == "DEBUG": + import logging + + from litellm._logging import ( + verbose_proxy_logger, + verbose_router_logger, + ) + + verbose_router_logger.setLevel( + level=logging.DEBUG + ) # set router logs to info + verbose_proxy_logger.setLevel( + level=logging.DEBUG + ) # set proxy logs to debug + except Exception as e: + import logging + + logging.warning(f"Failed to init verbose loggers: {str(e)}") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/encrypt_decrypt_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/encrypt_decrypt_utils.py new file mode 100644 index 00000000..ec9279a0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/encrypt_decrypt_utils.py @@ -0,0 +1,104 @@ +import base64 +import os +from typing import Optional + +from litellm._logging import verbose_proxy_logger + + +def _get_salt_key(): + from litellm.proxy.proxy_server import master_key + + salt_key = os.getenv("LITELLM_SALT_KEY", None) + + if salt_key is None: + verbose_proxy_logger.debug( + "LITELLM_SALT_KEY is None using master_key to encrypt/decrypt secrets stored in DB" + ) + + salt_key = master_key + + return salt_key + + +def encrypt_value_helper(value: str, new_encryption_key: Optional[str] = None): + + signing_key = new_encryption_key or _get_salt_key() + + try: + if isinstance(value, str): + encrypted_value = encrypt_value(value=value, signing_key=signing_key) # type: ignore + encrypted_value = base64.b64encode(encrypted_value).decode("utf-8") + + return encrypted_value + + verbose_proxy_logger.debug( + f"Invalid value type passed to encrypt_value: {type(value)} for Value: {value}\n Value must be a string" + ) + # if it's not a string - do not encrypt it and return the value + return value + except Exception as e: + raise e + + +def decrypt_value_helper(value: str): + + signing_key = _get_salt_key() + + try: + if isinstance(value, str): + decoded_b64 = base64.b64decode(value) + value = decrypt_value(value=decoded_b64, signing_key=signing_key) # type: ignore + return value + + # if it's not str - do not decrypt it, return the value + return value + except Exception as e: + import traceback + + traceback.print_stack() + verbose_proxy_logger.error( + f"Error decrypting value, Did your master_key/salt key change recently? \nError: {str(e)}\nSet permanent salt key - https://docs.litellm.ai/docs/proxy/prod#5-set-litellm-salt-key" + ) + # [Non-Blocking Exception. - this should not block decrypting other values] + pass + + +def encrypt_value(value: str, signing_key: str): + import hashlib + + import nacl.secret + import nacl.utils + + # get 32 byte master key # + hash_object = hashlib.sha256(signing_key.encode()) + hash_bytes = hash_object.digest() + + # initialize secret box # + box = nacl.secret.SecretBox(hash_bytes) + + # encode message # + value_bytes = value.encode("utf-8") + + encrypted = box.encrypt(value_bytes) + + return encrypted + + +def decrypt_value(value: bytes, signing_key: str) -> str: + import hashlib + + import nacl.secret + import nacl.utils + + # get 32 byte master key # + hash_object = hashlib.sha256(signing_key.encode()) + hash_bytes = hash_object.digest() + + # initialize secret box # + box = nacl.secret.SecretBox(hash_bytes) + + # Convert the bytes object to a string + plaintext = box.decrypt(value) + + plaintext = plaintext.decode("utf-8") # type: ignore + return plaintext # type: ignore diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/http_parsing_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/http_parsing_utils.py new file mode 100644 index 00000000..5736ee21 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/http_parsing_utils.py @@ -0,0 +1,182 @@ +import json +from typing import Dict, List, Optional + +import orjson +from fastapi import Request, UploadFile, status + +from litellm._logging import verbose_proxy_logger +from litellm.types.router import Deployment + + +async def _read_request_body(request: Optional[Request]) -> Dict: + """ + Safely read the request body and parse it as JSON. + + Parameters: + - request: The request object to read the body from + + Returns: + - dict: Parsed request data as a dictionary or an empty dictionary if parsing fails + """ + try: + if request is None: + return {} + + # Check if we already read and parsed the body + _cached_request_body: Optional[dict] = _safe_get_request_parsed_body( + request=request + ) + if _cached_request_body is not None: + return _cached_request_body + + _request_headers: dict = _safe_get_request_headers(request=request) + content_type = _request_headers.get("content-type", "") + + if "form" in content_type: + parsed_body = dict(await request.form()) + else: + # Read the request body + body = await request.body() + + # Return empty dict if body is empty or None + if not body: + parsed_body = {} + else: + try: + parsed_body = orjson.loads(body) + except orjson.JSONDecodeError: + # Fall back to the standard json module which is more forgiving + # First decode bytes to string if needed + body_str = body.decode("utf-8") if isinstance(body, bytes) else body + + # Replace invalid surrogate pairs + import re + + # This regex finds incomplete surrogate pairs + body_str = re.sub( + r"[\uD800-\uDBFF](?![\uDC00-\uDFFF])", "", body_str + ) + # This regex finds low surrogates without high surrogates + body_str = re.sub( + r"(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]", "", body_str + ) + + parsed_body = json.loads(body_str) + + # Cache the parsed result + _safe_set_request_parsed_body(request=request, parsed_body=parsed_body) + return parsed_body + + except (json.JSONDecodeError, orjson.JSONDecodeError): + verbose_proxy_logger.exception("Invalid JSON payload received.") + return {} + except Exception as e: + # Catch unexpected errors to avoid crashes + verbose_proxy_logger.exception( + "Unexpected error reading request body - {}".format(e) + ) + return {} + + +def _safe_get_request_parsed_body(request: Optional[Request]) -> Optional[dict]: + if request is None: + return None + if hasattr(request, "scope") and "parsed_body" in request.scope: + return request.scope["parsed_body"] + return None + + +def _safe_set_request_parsed_body( + request: Optional[Request], + parsed_body: dict, +) -> None: + try: + if request is None: + return + request.scope["parsed_body"] = parsed_body + except Exception as e: + verbose_proxy_logger.debug( + "Unexpected error setting request parsed body - {}".format(e) + ) + + +def _safe_get_request_headers(request: Optional[Request]) -> dict: + """ + [Non-Blocking] Safely get the request headers + """ + try: + if request is None: + return {} + return dict(request.headers) + except Exception as e: + verbose_proxy_logger.debug( + "Unexpected error reading request headers - {}".format(e) + ) + return {} + + +def check_file_size_under_limit( + request_data: dict, + file: UploadFile, + router_model_names: List[str], +) -> bool: + """ + Check if any files passed in request are under max_file_size_mb + + Returns True -> when file size is under max_file_size_mb limit + Raises ProxyException -> when file size is over max_file_size_mb limit or not a premium_user + """ + from litellm.proxy.proxy_server import ( + CommonProxyErrors, + ProxyException, + llm_router, + premium_user, + ) + + file_contents_size = file.size or 0 + file_content_size_in_mb = file_contents_size / (1024 * 1024) + if "metadata" not in request_data: + request_data["metadata"] = {} + request_data["metadata"]["file_size_in_mb"] = file_content_size_in_mb + max_file_size_mb = None + + if llm_router is not None and request_data["model"] in router_model_names: + try: + deployment: Optional[Deployment] = ( + llm_router.get_deployment_by_model_group_name( + model_group_name=request_data["model"] + ) + ) + if ( + deployment + and deployment.litellm_params is not None + and deployment.litellm_params.max_file_size_mb is not None + ): + max_file_size_mb = deployment.litellm_params.max_file_size_mb + except Exception as e: + verbose_proxy_logger.error( + "Got error when checking file size: %s", (str(e)) + ) + + if max_file_size_mb is not None: + verbose_proxy_logger.debug( + "Checking file size, file content size=%s, max_file_size_mb=%s", + file_content_size_in_mb, + max_file_size_mb, + ) + if not premium_user: + raise ProxyException( + message=f"Tried setting max_file_size_mb for /audio/transcriptions. {CommonProxyErrors.not_premium_user.value}", + code=status.HTTP_400_BAD_REQUEST, + type="bad_request", + param="file", + ) + if file_content_size_in_mb > max_file_size_mb: + raise ProxyException( + message=f"File size is too large. Please check your file size. Passed file size: {file_content_size_in_mb} MB. Max file size: {max_file_size_mb} MB", + code=status.HTTP_400_BAD_REQUEST, + type="bad_request", + param="file", + ) + + return True diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/load_config_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/load_config_utils.py new file mode 100644 index 00000000..38e7b3f3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/load_config_utils.py @@ -0,0 +1,76 @@ +import yaml + +from litellm._logging import verbose_proxy_logger + + +def get_file_contents_from_s3(bucket_name, object_key): + try: + # v0 rely on boto3 for authentication - allowing boto3 to handle IAM credentials etc + import tempfile + + import boto3 + from botocore.credentials import Credentials + + from litellm.main import bedrock_converse_chat_completion + + credentials: Credentials = bedrock_converse_chat_completion.get_credentials() + s3_client = boto3.client( + "s3", + aws_access_key_id=credentials.access_key, + aws_secret_access_key=credentials.secret_key, + aws_session_token=credentials.token, # Optional, if using temporary credentials + ) + verbose_proxy_logger.debug( + f"Retrieving {object_key} from S3 bucket: {bucket_name}" + ) + response = s3_client.get_object(Bucket=bucket_name, Key=object_key) + verbose_proxy_logger.debug(f"Response: {response}") + + # Read the file contents + file_contents = response["Body"].read().decode("utf-8") + verbose_proxy_logger.debug("File contents retrieved from S3") + + # Create a temporary file with YAML extension + with tempfile.NamedTemporaryFile(delete=False, suffix=".yaml") as temp_file: + temp_file.write(file_contents.encode("utf-8")) + temp_file_path = temp_file.name + verbose_proxy_logger.debug(f"File stored temporarily at: {temp_file_path}") + + # Load the YAML file content + with open(temp_file_path, "r") as yaml_file: + config = yaml.safe_load(yaml_file) + + return config + except ImportError as e: + # this is most likely if a user is not using the litellm docker container + verbose_proxy_logger.error(f"ImportError: {str(e)}") + pass + except Exception as e: + verbose_proxy_logger.error(f"Error retrieving file contents: {str(e)}") + return None + + +async def get_config_file_contents_from_gcs(bucket_name, object_key): + try: + from litellm.integrations.gcs_bucket.gcs_bucket import GCSBucketLogger + + gcs_bucket = GCSBucketLogger( + bucket_name=bucket_name, + ) + file_contents = await gcs_bucket.download_gcs_object(object_key) + if file_contents is None: + raise Exception(f"File contents are None for {object_key}") + # file_contentis is a bytes object, so we need to convert it to yaml + file_contents = file_contents.decode("utf-8") + # convert to yaml + config = yaml.safe_load(file_contents) + return config + + except Exception as e: + verbose_proxy_logger.error(f"Error retrieving file contents: {str(e)}") + return None + + +# # Example usage +# bucket_name = 'litellm-proxy' +# object_key = 'litellm_proxy_config.yaml' diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/openai_endpoint_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/openai_endpoint_utils.py new file mode 100644 index 00000000..316a8427 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/openai_endpoint_utils.py @@ -0,0 +1,39 @@ +""" +Contains utils used by OpenAI compatible endpoints +""" + +from typing import Optional + +from fastapi import Request + +from litellm.proxy.common_utils.http_parsing_utils import _read_request_body + + +def remove_sensitive_info_from_deployment(deployment_dict: dict) -> dict: + """ + Removes sensitive information from a deployment dictionary. + + Args: + deployment_dict (dict): The deployment dictionary to remove sensitive information from. + + Returns: + dict: The modified deployment dictionary with sensitive information removed. + """ + deployment_dict["litellm_params"].pop("api_key", None) + deployment_dict["litellm_params"].pop("vertex_credentials", None) + deployment_dict["litellm_params"].pop("aws_access_key_id", None) + deployment_dict["litellm_params"].pop("aws_secret_access_key", None) + + return deployment_dict + + +async def get_custom_llm_provider_from_request_body(request: Request) -> Optional[str]: + """ + Get the `custom_llm_provider` from the request body + + Safely reads the request body + """ + request_body: dict = await _read_request_body(request=request) or {} + if "custom_llm_provider" in request_body: + return request_body["custom_llm_provider"] + return None diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/proxy_state.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/proxy_state.py new file mode 100644 index 00000000..edd18c60 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/proxy_state.py @@ -0,0 +1,36 @@ +""" +This file is used to store the state variables of the proxy server. + +Example: `spend_logs_row_count` is used to store the number of rows in the `LiteLLM_SpendLogs` table. +""" + +from typing import Any, Literal + +from litellm.proxy._types import ProxyStateVariables + + +class ProxyState: + """ + Proxy state class has get/set methods for Proxy state variables. + """ + + # Note: mypy does not recognize when we fetch ProxyStateVariables.annotations.keys(), so we also need to add the valid keys here + valid_keys_literal = Literal["spend_logs_row_count"] + + def __init__(self) -> None: + self.proxy_state_variables: ProxyStateVariables = ProxyStateVariables( + spend_logs_row_count=0, + ) + + def get_proxy_state_variable( + self, + variable_name: valid_keys_literal, + ) -> Any: + return self.proxy_state_variables.get(variable_name, None) + + def set_proxy_state_variable( + self, + variable_name: valid_keys_literal, + value: Any, + ) -> None: + self.proxy_state_variables[variable_name] = value diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/reset_budget_job.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/reset_budget_job.py new file mode 100644 index 00000000..1d50002f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/reset_budget_job.py @@ -0,0 +1,365 @@ +import asyncio +import json +import time +from datetime import datetime, timedelta +from typing import List, Literal, Optional, Union + +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.duration_parser import duration_in_seconds +from litellm.proxy._types import ( + LiteLLM_TeamTable, + LiteLLM_UserTable, + LiteLLM_VerificationToken, +) +from litellm.proxy.utils import PrismaClient, ProxyLogging +from litellm.types.services import ServiceTypes + + +class ResetBudgetJob: + """ + Resets the budget for all the keys, users, and teams that need it + """ + + def __init__(self, proxy_logging_obj: ProxyLogging, prisma_client: PrismaClient): + self.proxy_logging_obj: ProxyLogging = proxy_logging_obj + self.prisma_client: PrismaClient = prisma_client + + async def reset_budget( + self, + ): + """ + Gets all the non-expired keys for a db, which need spend to be reset + + Resets their spend + + Updates db + """ + if self.prisma_client is not None: + ### RESET KEY BUDGET ### + await self.reset_budget_for_litellm_keys() + + ### RESET USER BUDGET ### + await self.reset_budget_for_litellm_users() + + ## Reset Team Budget + await self.reset_budget_for_litellm_teams() + + async def reset_budget_for_litellm_keys(self): + """ + Resets the budget for all the litellm keys + + Catches Exceptions and logs them + """ + now = datetime.utcnow() + start_time = time.time() + keys_to_reset: Optional[List[LiteLLM_VerificationToken]] = None + try: + keys_to_reset = await self.prisma_client.get_data( + table_name="key", query_type="find_all", expires=now, reset_at=now + ) + verbose_proxy_logger.debug( + "Keys to reset %s", json.dumps(keys_to_reset, indent=4, default=str) + ) + updated_keys: List[LiteLLM_VerificationToken] = [] + failed_keys = [] + if keys_to_reset is not None and len(keys_to_reset) > 0: + for key in keys_to_reset: + try: + updated_key = await ResetBudgetJob._reset_budget_for_key( + key=key, current_time=now + ) + if updated_key is not None: + updated_keys.append(updated_key) + else: + failed_keys.append( + {"key": key, "error": "Returned None without exception"} + ) + except Exception as e: + failed_keys.append({"key": key, "error": str(e)}) + verbose_proxy_logger.exception( + "Failed to reset budget for key: %s", key + ) + + verbose_proxy_logger.debug( + "Updated keys %s", json.dumps(updated_keys, indent=4, default=str) + ) + + if updated_keys: + await self.prisma_client.update_data( + query_type="update_many", + data_list=updated_keys, + table_name="key", + ) + + end_time = time.time() + if len(failed_keys) > 0: # If any keys failed to reset + raise Exception( + f"Failed to reset {len(failed_keys)} keys: {json.dumps(failed_keys, default=str)}" + ) + + asyncio.create_task( + self.proxy_logging_obj.service_logging_obj.async_service_success_hook( + service=ServiceTypes.RESET_BUDGET_JOB, + duration=end_time - start_time, + call_type="reset_budget_keys", + start_time=start_time, + end_time=end_time, + event_metadata={ + "num_keys_found": len(keys_to_reset) if keys_to_reset else 0, + "keys_found": json.dumps(keys_to_reset, indent=4, default=str), + "num_keys_updated": len(updated_keys), + "keys_updated": json.dumps(updated_keys, indent=4, default=str), + "num_keys_failed": len(failed_keys), + "keys_failed": json.dumps(failed_keys, indent=4, default=str), + }, + ) + ) + except Exception as e: + end_time = time.time() + asyncio.create_task( + self.proxy_logging_obj.service_logging_obj.async_service_failure_hook( + service=ServiceTypes.RESET_BUDGET_JOB, + duration=end_time - start_time, + error=e, + call_type="reset_budget_keys", + start_time=start_time, + end_time=end_time, + event_metadata={ + "num_keys_found": len(keys_to_reset) if keys_to_reset else 0, + "keys_found": json.dumps(keys_to_reset, indent=4, default=str), + }, + ) + ) + verbose_proxy_logger.exception("Failed to reset budget for keys: %s", e) + + async def reset_budget_for_litellm_users(self): + """ + Resets the budget for all LiteLLM Internal Users if their budget has expired + """ + now = datetime.utcnow() + start_time = time.time() + users_to_reset: Optional[List[LiteLLM_UserTable]] = None + try: + users_to_reset = await self.prisma_client.get_data( + table_name="user", query_type="find_all", reset_at=now + ) + updated_users: List[LiteLLM_UserTable] = [] + failed_users = [] + if users_to_reset is not None and len(users_to_reset) > 0: + for user in users_to_reset: + try: + updated_user = await ResetBudgetJob._reset_budget_for_user( + user=user, current_time=now + ) + if updated_user is not None: + updated_users.append(updated_user) + else: + failed_users.append( + { + "user": user, + "error": "Returned None without exception", + } + ) + except Exception as e: + failed_users.append({"user": user, "error": str(e)}) + verbose_proxy_logger.exception( + "Failed to reset budget for user: %s", user + ) + + verbose_proxy_logger.debug( + "Updated users %s", json.dumps(updated_users, indent=4, default=str) + ) + if updated_users: + await self.prisma_client.update_data( + query_type="update_many", + data_list=updated_users, + table_name="user", + ) + + end_time = time.time() + if len(failed_users) > 0: # If any users failed to reset + raise Exception( + f"Failed to reset {len(failed_users)} users: {json.dumps(failed_users, default=str)}" + ) + + asyncio.create_task( + self.proxy_logging_obj.service_logging_obj.async_service_success_hook( + service=ServiceTypes.RESET_BUDGET_JOB, + duration=end_time - start_time, + call_type="reset_budget_users", + start_time=start_time, + end_time=end_time, + event_metadata={ + "num_users_found": len(users_to_reset) if users_to_reset else 0, + "users_found": json.dumps( + users_to_reset, indent=4, default=str + ), + "num_users_updated": len(updated_users), + "users_updated": json.dumps( + updated_users, indent=4, default=str + ), + "num_users_failed": len(failed_users), + "users_failed": json.dumps(failed_users, indent=4, default=str), + }, + ) + ) + except Exception as e: + end_time = time.time() + asyncio.create_task( + self.proxy_logging_obj.service_logging_obj.async_service_failure_hook( + service=ServiceTypes.RESET_BUDGET_JOB, + duration=end_time - start_time, + error=e, + call_type="reset_budget_users", + start_time=start_time, + end_time=end_time, + event_metadata={ + "num_users_found": len(users_to_reset) if users_to_reset else 0, + "users_found": json.dumps( + users_to_reset, indent=4, default=str + ), + }, + ) + ) + verbose_proxy_logger.exception("Failed to reset budget for users: %s", e) + + async def reset_budget_for_litellm_teams(self): + """ + Resets the budget for all LiteLLM Internal Teams if their budget has expired + """ + now = datetime.utcnow() + start_time = time.time() + teams_to_reset: Optional[List[LiteLLM_TeamTable]] = None + try: + teams_to_reset = await self.prisma_client.get_data( + table_name="team", query_type="find_all", reset_at=now + ) + updated_teams: List[LiteLLM_TeamTable] = [] + failed_teams = [] + if teams_to_reset is not None and len(teams_to_reset) > 0: + for team in teams_to_reset: + try: + updated_team = await ResetBudgetJob._reset_budget_for_team( + team=team, current_time=now + ) + if updated_team is not None: + updated_teams.append(updated_team) + else: + failed_teams.append( + { + "team": team, + "error": "Returned None without exception", + } + ) + except Exception as e: + failed_teams.append({"team": team, "error": str(e)}) + verbose_proxy_logger.exception( + "Failed to reset budget for team: %s", team + ) + + verbose_proxy_logger.debug( + "Updated teams %s", json.dumps(updated_teams, indent=4, default=str) + ) + if updated_teams: + await self.prisma_client.update_data( + query_type="update_many", + data_list=updated_teams, + table_name="team", + ) + + end_time = time.time() + if len(failed_teams) > 0: # If any teams failed to reset + raise Exception( + f"Failed to reset {len(failed_teams)} teams: {json.dumps(failed_teams, default=str)}" + ) + + asyncio.create_task( + self.proxy_logging_obj.service_logging_obj.async_service_success_hook( + service=ServiceTypes.RESET_BUDGET_JOB, + duration=end_time - start_time, + call_type="reset_budget_teams", + start_time=start_time, + end_time=end_time, + event_metadata={ + "num_teams_found": len(teams_to_reset) if teams_to_reset else 0, + "teams_found": json.dumps( + teams_to_reset, indent=4, default=str + ), + "num_teams_updated": len(updated_teams), + "teams_updated": json.dumps( + updated_teams, indent=4, default=str + ), + "num_teams_failed": len(failed_teams), + "teams_failed": json.dumps(failed_teams, indent=4, default=str), + }, + ) + ) + except Exception as e: + end_time = time.time() + asyncio.create_task( + self.proxy_logging_obj.service_logging_obj.async_service_failure_hook( + service=ServiceTypes.RESET_BUDGET_JOB, + duration=end_time - start_time, + error=e, + call_type="reset_budget_teams", + start_time=start_time, + end_time=end_time, + event_metadata={ + "num_teams_found": len(teams_to_reset) if teams_to_reset else 0, + "teams_found": json.dumps( + teams_to_reset, indent=4, default=str + ), + }, + ) + ) + verbose_proxy_logger.exception("Failed to reset budget for teams: %s", e) + + @staticmethod + async def _reset_budget_common( + item: Union[LiteLLM_TeamTable, LiteLLM_UserTable, LiteLLM_VerificationToken], + current_time: datetime, + item_type: Literal["key", "team", "user"], + ): + """ + In-place, updates spend=0, and sets budget_reset_at to current_time + budget_duration + + Common logic for resetting budget for a team, user, or key + """ + try: + item.spend = 0.0 + if hasattr(item, "budget_duration") and item.budget_duration is not None: + duration_s = duration_in_seconds(duration=item.budget_duration) + item.budget_reset_at = current_time + timedelta(seconds=duration_s) + return item + except Exception as e: + verbose_proxy_logger.exception( + "Error resetting budget for %s: %s. Item: %s", item_type, e, item + ) + raise e + + @staticmethod + async def _reset_budget_for_team( + team: LiteLLM_TeamTable, current_time: datetime + ) -> Optional[LiteLLM_TeamTable]: + await ResetBudgetJob._reset_budget_common( + item=team, current_time=current_time, item_type="team" + ) + return team + + @staticmethod + async def _reset_budget_for_user( + user: LiteLLM_UserTable, current_time: datetime + ) -> Optional[LiteLLM_UserTable]: + await ResetBudgetJob._reset_budget_common( + item=user, current_time=current_time, item_type="user" + ) + return user + + @staticmethod + async def _reset_budget_for_key( + key: LiteLLM_VerificationToken, current_time: datetime + ) -> Optional[LiteLLM_VerificationToken]: + await ResetBudgetJob._reset_budget_common( + item=key, current_time=current_time, item_type="key" + ) + return key diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/swagger_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/swagger_utils.py new file mode 100644 index 00000000..75a64707 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/swagger_utils.py @@ -0,0 +1,48 @@ +from typing import Any, Dict + +from pydantic import BaseModel, Field + +from litellm.exceptions import LITELLM_EXCEPTION_TYPES + + +class ErrorResponse(BaseModel): + detail: Dict[str, Any] = Field( + ..., + example={ # type: ignore + "error": { + "message": "Error message", + "type": "error_type", + "param": "error_param", + "code": "error_code", + } + }, + ) + + +# Define a function to get the status code +def get_status_code(exception): + if hasattr(exception, "status_code"): + return exception.status_code + # Default status codes for exceptions without a status_code attribute + if exception.__name__ == "Timeout": + return 408 # Request Timeout + if exception.__name__ == "APIConnectionError": + return 503 # Service Unavailable + return 500 # Internal Server Error as default + + +# Create error responses +ERROR_RESPONSES = { + get_status_code(exception): { + "model": ErrorResponse, + "description": exception.__doc__ or exception.__name__, + } + for exception in LITELLM_EXCEPTION_TYPES +} + +# Ensure we have a 500 error response +if 500 not in ERROR_RESPONSES: + ERROR_RESPONSES[500] = { + "model": ErrorResponse, + "description": "Internal Server Error", + } diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/config_management_endpoints/pass_through_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/config_management_endpoints/pass_through_endpoints.py new file mode 100644 index 00000000..5ff02b8b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/config_management_endpoints/pass_through_endpoints.py @@ -0,0 +1,26 @@ +""" +What is this? + +CRUD endpoints for managing pass-through endpoints +""" + +from fastapi import APIRouter, Depends, Request, Response + +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth + +router = APIRouter() + + +@router.get( + "/config/pass_through_endpoints/settings", + dependencies=[Depends(user_api_key_auth)], + tags=["pass-through-endpoints"], + summary="Create pass-through endpoints for provider specific endpoints - https://docs.litellm.ai/docs/proxy/pass_through", +) +async def create_fine_tuning_job( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + pass diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/credential_endpoints/endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/credential_endpoints/endpoints.py new file mode 100644 index 00000000..bbbbbfd6 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/credential_endpoints/endpoints.py @@ -0,0 +1,319 @@ +""" +CRUD endpoints for storing reusable credentials. +""" + +from typing import Optional + +from fastapi import APIRouter, Depends, HTTPException, Request, Response + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.credential_accessor import CredentialAccessor +from litellm.litellm_core_utils.litellm_logging import _get_masked_values +from litellm.proxy._types import CommonProxyErrors, UserAPIKeyAuth +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_utils.encrypt_decrypt_utils import encrypt_value_helper +from litellm.proxy.utils import handle_exception_on_proxy, jsonify_object +from litellm.types.utils import CreateCredentialItem, CredentialItem + +router = APIRouter() + + +class CredentialHelperUtils: + @staticmethod + def encrypt_credential_values(credential: CredentialItem) -> CredentialItem: + """Encrypt values in credential.credential_values and add to DB""" + encrypted_credential_values = {} + for key, value in credential.credential_values.items(): + encrypted_credential_values[key] = encrypt_value_helper(value) + credential.credential_values = encrypted_credential_values + return credential + + +@router.post( + "/credentials", + dependencies=[Depends(user_api_key_auth)], + tags=["credential management"], +) +async def create_credential( + request: Request, + fastapi_response: Response, + credential: CreateCredentialItem, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] endpoint. This might change unexpectedly. + Stores credential in DB. + Reloads credentials in memory. + """ + from litellm.proxy.proxy_server import llm_router, prisma_client + + try: + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + if credential.model_id: + if llm_router is None: + raise HTTPException( + status_code=500, + detail="LLM router not found. Please ensure you have a valid router instance.", + ) + # get model from router + model = llm_router.get_deployment(credential.model_id) + if model is None: + raise HTTPException(status_code=404, detail="Model not found") + credential_values = llm_router.get_deployment_credentials( + credential.model_id + ) + if credential_values is None: + raise HTTPException(status_code=404, detail="Model not found") + credential.credential_values = credential_values + + if credential.credential_values is None: + raise HTTPException( + status_code=400, + detail="Credential values are required. Unable to infer credential values from model ID.", + ) + processed_credential = CredentialItem( + credential_name=credential.credential_name, + credential_values=credential.credential_values, + credential_info=credential.credential_info, + ) + encrypted_credential = CredentialHelperUtils.encrypt_credential_values( + processed_credential + ) + credentials_dict = encrypted_credential.model_dump() + credentials_dict_jsonified = jsonify_object(credentials_dict) + await prisma_client.db.litellm_credentialstable.create( + data={ + **credentials_dict_jsonified, + "created_by": user_api_key_dict.user_id, + "updated_by": user_api_key_dict.user_id, + } + ) + + ## ADD TO LITELLM ## + CredentialAccessor.upsert_credentials([processed_credential]) + + return {"success": True, "message": "Credential created successfully"} + except Exception as e: + verbose_proxy_logger.exception(e) + raise handle_exception_on_proxy(e) + + +@router.get( + "/credentials", + dependencies=[Depends(user_api_key_auth)], + tags=["credential management"], +) +async def get_credentials( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] endpoint. This might change unexpectedly. + """ + try: + masked_credentials = [ + { + "credential_name": credential.credential_name, + "credential_values": _get_masked_values(credential.credential_values), + "credential_info": credential.credential_info, + } + for credential in litellm.credential_list + ] + return {"success": True, "credentials": masked_credentials} + except Exception as e: + return handle_exception_on_proxy(e) + + +@router.get( + "/credentials/by_name/{credential_name}", + dependencies=[Depends(user_api_key_auth)], + tags=["credential management"], + response_model=CredentialItem, +) +@router.get( + "/credentials/by_model/{model_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["credential management"], + response_model=CredentialItem, +) +async def get_credential( + request: Request, + fastapi_response: Response, + credential_name: Optional[str] = None, + model_id: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] endpoint. This might change unexpectedly. + """ + from litellm.proxy.proxy_server import llm_router + + try: + if model_id: + if llm_router is None: + raise HTTPException(status_code=500, detail="LLM router not found") + model = llm_router.get_deployment(model_id) + if model is None: + raise HTTPException(status_code=404, detail="Model not found") + credential_values = llm_router.get_deployment_credentials(model_id) + if credential_values is None: + raise HTTPException(status_code=404, detail="Model not found") + masked_credential_values = _get_masked_values( + credential_values, + unmasked_length=4, + number_of_asterisks=4, + ) + credential = CredentialItem( + credential_name="{}-credential-{}".format(model.model_name, model_id), + credential_values=masked_credential_values, + credential_info={}, + ) + # return credential object + return credential + elif credential_name: + for credential in litellm.credential_list: + if credential.credential_name == credential_name: + masked_credential = CredentialItem( + credential_name=credential.credential_name, + credential_values=_get_masked_values( + credential.credential_values, + unmasked_length=4, + number_of_asterisks=4, + ), + credential_info=credential.credential_info, + ) + return masked_credential + raise HTTPException( + status_code=404, + detail="Credential not found. Got credential name: " + credential_name, + ) + else: + raise HTTPException( + status_code=404, detail="Credential name or model ID required" + ) + except Exception as e: + verbose_proxy_logger.exception(e) + raise handle_exception_on_proxy(e) + + +@router.delete( + "/credentials/{credential_name}", + dependencies=[Depends(user_api_key_auth)], + tags=["credential management"], +) +async def delete_credential( + request: Request, + fastapi_response: Response, + credential_name: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] endpoint. This might change unexpectedly. + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + await prisma_client.db.litellm_credentialstable.delete( + where={"credential_name": credential_name} + ) + + ## DELETE FROM LITELLM ## + litellm.credential_list = [ + cred + for cred in litellm.credential_list + if cred.credential_name != credential_name + ] + return {"success": True, "message": "Credential deleted successfully"} + except Exception as e: + return handle_exception_on_proxy(e) + + +def update_db_credential( + db_credential: CredentialItem, updated_patch: CredentialItem +) -> CredentialItem: + """ + Update a credential in the DB. + """ + merged_credential = CredentialItem( + credential_name=db_credential.credential_name, + credential_info=db_credential.credential_info, + credential_values=db_credential.credential_values, + ) + + encrypted_credential = CredentialHelperUtils.encrypt_credential_values( + updated_patch + ) + # update model name + if encrypted_credential.credential_name: + merged_credential.credential_name = encrypted_credential.credential_name + + # update litellm params + if encrypted_credential.credential_values: + # Encrypt any sensitive values + encrypted_params = { + k: v for k, v in encrypted_credential.credential_values.items() + } + + merged_credential.credential_values.update(encrypted_params) + + # update model info + if encrypted_credential.credential_info: + """Update credential info""" + if "credential_info" not in merged_credential.credential_info: + merged_credential.credential_info = {} + merged_credential.credential_info.update(encrypted_credential.credential_info) + + return merged_credential + + +@router.patch( + "/credentials/{credential_name}", + dependencies=[Depends(user_api_key_auth)], + tags=["credential management"], +) +async def update_credential( + request: Request, + fastapi_response: Response, + credential_name: str, + credential: CredentialItem, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] endpoint. This might change unexpectedly. + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + db_credential = await prisma_client.db.litellm_credentialstable.find_unique( + where={"credential_name": credential_name}, + ) + if db_credential is None: + raise HTTPException(status_code=404, detail="Credential not found in DB.") + merged_credential = update_db_credential(db_credential, credential) + credential_object_jsonified = jsonify_object(merged_credential.model_dump()) + await prisma_client.db.litellm_credentialstable.update( + where={"credential_name": credential_name}, + data={ + **credential_object_jsonified, + "updated_by": user_api_key_dict.user_id, + }, + ) + return {"success": True, "message": "Credential updated successfully"} + except Exception as e: + return handle_exception_on_proxy(e) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/custom_prompt_management.py b/.venv/lib/python3.12/site-packages/litellm/proxy/custom_prompt_management.py new file mode 100644 index 00000000..7f320ac0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/custom_prompt_management.py @@ -0,0 +1,36 @@ +from typing import List, Optional, Tuple + +from litellm._logging import verbose_logger +from litellm.integrations.custom_prompt_management import CustomPromptManagement +from litellm.types.llms.openai import AllMessageValues +from litellm.types.utils import StandardCallbackDynamicParams + + +class X42PromptManagement(CustomPromptManagement): + def get_chat_completion_prompt( + self, + model: str, + messages: List[AllMessageValues], + non_default_params: dict, + prompt_id: str, + prompt_variables: Optional[dict], + dynamic_callback_params: StandardCallbackDynamicParams, + ) -> Tuple[str, List[AllMessageValues], dict]: + """ + Returns: + - model: str - the model to use (can be pulled from prompt management tool) + - messages: List[AllMessageValues] - the messages to use (can be pulled from prompt management tool) + - non_default_params: dict - update with any optional params (e.g. temperature, max_tokens, etc.) to use (can be pulled from prompt management tool) + """ + verbose_logger.debug( + f"in async get chat completion prompt. Prompt ID: {prompt_id}, Prompt Variables: {prompt_variables}, Dynamic Callback Params: {dynamic_callback_params}" + ) + + return model, messages, non_default_params + + @property + def integration_name(self) -> str: + return "x42-prompt-management" + + +x42_prompt_management = X42PromptManagement() diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/custom_sso.py b/.venv/lib/python3.12/site-packages/litellm/proxy/custom_sso.py new file mode 100644 index 00000000..210e9eea --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/custom_sso.py @@ -0,0 +1,44 @@ +""" +Example Custom SSO Handler + +Use this if you want to run custom code after litellm has retrieved information from your IDP (Identity Provider). + +Flow: +- User lands on Admin UI +- LiteLLM redirects user to your SSO provider +- Your SSO provider redirects user back to LiteLLM +- LiteLLM has retrieved user information from your IDP +- Your custom SSO handler is called and returns an object of type SSOUserDefinedValues +- User signed in to UI +""" + +from fastapi_sso.sso.base import OpenID + +from litellm.proxy._types import LitellmUserRoles, SSOUserDefinedValues +from litellm.proxy.management_endpoints.internal_user_endpoints import user_info + + +async def custom_sso_handler(userIDPInfo: OpenID) -> SSOUserDefinedValues: + try: + print("inside custom sso handler") # noqa + print(f"userIDPInfo: {userIDPInfo}") # noqa + + if userIDPInfo.id is None: + raise ValueError( + f"No ID found for user. userIDPInfo.id is None {userIDPInfo}" + ) + + # check if user exists in litellm proxy DB + _user_info = await user_info(user_id=userIDPInfo.id) + print("_user_info from litellm DB ", _user_info) # noqa + + return SSOUserDefinedValues( + models=[], + user_id=userIDPInfo.id, + user_email=userIDPInfo.email, + user_role=LitellmUserRoles.INTERNAL_USER.value, + max_budget=10, + budget_duration="1d", + ) + except Exception: + raise Exception("Failed custom auth") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/custom_validate.py b/.venv/lib/python3.12/site-packages/litellm/proxy/custom_validate.py new file mode 100644 index 00000000..c80ffa4f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/custom_validate.py @@ -0,0 +1,5 @@ +from typing import Literal + + +def my_custom_validate(token: str) -> Literal[True]: + raise Exception("Custom validate failed") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/db/base_client.py b/.venv/lib/python3.12/site-packages/litellm/proxy/db/base_client.py new file mode 100644 index 00000000..07f0ecdc --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/db/base_client.py @@ -0,0 +1,53 @@ +from typing import Any, Literal, List + + +class CustomDB: + """ + Implements a base class that we expect any custom db implementation (e.g. DynamoDB) to follow + """ + + def __init__(self) -> None: + pass + + def get_data(self, key: str, table_name: Literal["user", "key", "config"]): + """ + Check if key valid + """ + pass + + def insert_data(self, value: Any, table_name: Literal["user", "key", "config"]): + """ + For new key / user logic + """ + pass + + def update_data( + self, key: str, value: Any, table_name: Literal["user", "key", "config"] + ): + """ + For cost tracking logic + """ + pass + + def delete_data( + self, keys: List[str], table_name: Literal["user", "key", "config"] + ): + """ + For /key/delete endpoint s + """ + + def connect( + self, + ): + """ + For connecting to db and creating / updating any tables + """ + pass + + def disconnect( + self, + ): + """ + For closing connection on server shutdown + """ + pass diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/db/check_migration.py b/.venv/lib/python3.12/site-packages/litellm/proxy/db/check_migration.py new file mode 100644 index 00000000..bf180c11 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/db/check_migration.py @@ -0,0 +1,104 @@ +"""Module for checking differences between Prisma schema and database.""" + +import os +import subprocess +from typing import List, Optional, Tuple + +from litellm._logging import verbose_logger + + +def extract_sql_commands(diff_output: str) -> List[str]: + """ + Extract SQL commands from the Prisma migrate diff output. + Args: + diff_output (str): The full output from prisma migrate diff. + Returns: + List[str]: A list of SQL commands extracted from the diff output. + """ + # Split the output into lines and remove empty lines + lines = [line.strip() for line in diff_output.split("\n") if line.strip()] + + sql_commands = [] + current_command = "" + in_sql_block = False + + for line in lines: + if line.startswith("-- "): # Comment line, likely a table operation description + if in_sql_block and current_command: + sql_commands.append(current_command.strip()) + current_command = "" + in_sql_block = True + elif in_sql_block: + if line.endswith(";"): + current_command += line + sql_commands.append(current_command.strip()) + current_command = "" + in_sql_block = False + else: + current_command += line + " " + + # Add any remaining command + if current_command: + sql_commands.append(current_command.strip()) + + return sql_commands + + +def check_prisma_schema_diff_helper(db_url: str) -> Tuple[bool, List[str]]: + """Checks for differences between current database and Prisma schema. + Returns: + A tuple containing: + - A boolean indicating if differences were found (True) or not (False). + - A string with the diff output or error message. + Raises: + subprocess.CalledProcessError: If the Prisma command fails. + Exception: For any other errors during execution. + """ + verbose_logger.debug("Checking for Prisma schema diff...") # noqa: T201 + try: + result = subprocess.run( + [ + "prisma", + "migrate", + "diff", + "--from-url", + db_url, + "--to-schema-datamodel", + "./schema.prisma", + "--script", + ], + capture_output=True, + text=True, + check=True, + ) + + # return True, "Migration diff generated successfully." + sql_commands = extract_sql_commands(result.stdout) + + if sql_commands: + print("Changes to DB Schema detected") # noqa: T201 + print("Required SQL commands:") # noqa: T201 + for command in sql_commands: + print(command) # noqa: T201 + return True, sql_commands + else: + return False, [] + except subprocess.CalledProcessError as e: + error_message = f"Failed to generate migration diff. Error: {e.stderr}" + print(error_message) # noqa: T201 + return False, [] + + +def check_prisma_schema_diff(db_url: Optional[str] = None) -> None: + """Main function to run the Prisma schema diff check.""" + if db_url is None: + db_url = os.getenv("DATABASE_URL") + if db_url is None: + raise Exception("DATABASE_URL not set") + has_diff, message = check_prisma_schema_diff_helper(db_url) + if has_diff: + verbose_logger.exception( + "🚨🚨🚨 prisma schema out of sync with db. Consider running these sql_commands to sync the two - {}".format( + message + ) + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/db/create_views.py b/.venv/lib/python3.12/site-packages/litellm/proxy/db/create_views.py new file mode 100644 index 00000000..e9303077 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/db/create_views.py @@ -0,0 +1,227 @@ +from typing import Any + +from litellm import verbose_logger + +_db = Any + + +async def create_missing_views(db: _db): # noqa: PLR0915 + """ + -------------------------------------------------- + NOTE: Copy of `litellm/db_scripts/create_views.py`. + -------------------------------------------------- + Checks if the LiteLLM_VerificationTokenView and MonthlyGlobalSpend exists in the user's db. + + LiteLLM_VerificationTokenView: This view is used for getting the token + team data in user_api_key_auth + + MonthlyGlobalSpend: This view is used for the admin view to see global spend for this month + + If the view doesn't exist, one will be created. + """ + try: + # Try to select one row from the view + await db.query_raw("""SELECT 1 FROM "LiteLLM_VerificationTokenView" LIMIT 1""") + print("LiteLLM_VerificationTokenView Exists!") # noqa + except Exception: + # If an error occurs, the view does not exist, so create it + await db.execute_raw( + """ + CREATE VIEW "LiteLLM_VerificationTokenView" AS + SELECT + v.*, + t.spend AS team_spend, + t.max_budget AS team_max_budget, + t.tpm_limit AS team_tpm_limit, + t.rpm_limit AS team_rpm_limit + FROM "LiteLLM_VerificationToken" v + LEFT JOIN "LiteLLM_TeamTable" t ON v.team_id = t.team_id; + """ + ) + + print("LiteLLM_VerificationTokenView Created!") # noqa + + try: + await db.query_raw("""SELECT 1 FROM "MonthlyGlobalSpend" LIMIT 1""") + print("MonthlyGlobalSpend Exists!") # noqa + except Exception: + sql_query = """ + CREATE OR REPLACE VIEW "MonthlyGlobalSpend" AS + SELECT + DATE("startTime") AS date, + SUM("spend") AS spend + FROM + "LiteLLM_SpendLogs" + WHERE + "startTime" >= (CURRENT_DATE - INTERVAL '30 days') + GROUP BY + DATE("startTime"); + """ + await db.execute_raw(query=sql_query) + + print("MonthlyGlobalSpend Created!") # noqa + + try: + await db.query_raw("""SELECT 1 FROM "Last30dKeysBySpend" LIMIT 1""") + print("Last30dKeysBySpend Exists!") # noqa + except Exception: + sql_query = """ + CREATE OR REPLACE VIEW "Last30dKeysBySpend" AS + SELECT + L."api_key", + V."key_alias", + V."key_name", + SUM(L."spend") AS total_spend + FROM + "LiteLLM_SpendLogs" L + LEFT JOIN + "LiteLLM_VerificationToken" V + ON + L."api_key" = V."token" + WHERE + L."startTime" >= (CURRENT_DATE - INTERVAL '30 days') + GROUP BY + L."api_key", V."key_alias", V."key_name" + ORDER BY + total_spend DESC; + """ + await db.execute_raw(query=sql_query) + + print("Last30dKeysBySpend Created!") # noqa + + try: + await db.query_raw("""SELECT 1 FROM "Last30dModelsBySpend" LIMIT 1""") + print("Last30dModelsBySpend Exists!") # noqa + except Exception: + sql_query = """ + CREATE OR REPLACE VIEW "Last30dModelsBySpend" AS + SELECT + "model", + SUM("spend") AS total_spend + FROM + "LiteLLM_SpendLogs" + WHERE + "startTime" >= (CURRENT_DATE - INTERVAL '30 days') + AND "model" != '' + GROUP BY + "model" + ORDER BY + total_spend DESC; + """ + await db.execute_raw(query=sql_query) + + print("Last30dModelsBySpend Created!") # noqa + try: + await db.query_raw("""SELECT 1 FROM "MonthlyGlobalSpendPerKey" LIMIT 1""") + print("MonthlyGlobalSpendPerKey Exists!") # noqa + except Exception: + sql_query = """ + CREATE OR REPLACE VIEW "MonthlyGlobalSpendPerKey" AS + SELECT + DATE("startTime") AS date, + SUM("spend") AS spend, + api_key as api_key + FROM + "LiteLLM_SpendLogs" + WHERE + "startTime" >= (CURRENT_DATE - INTERVAL '30 days') + GROUP BY + DATE("startTime"), + api_key; + """ + await db.execute_raw(query=sql_query) + + print("MonthlyGlobalSpendPerKey Created!") # noqa + try: + await db.query_raw( + """SELECT 1 FROM "MonthlyGlobalSpendPerUserPerKey" LIMIT 1""" + ) + print("MonthlyGlobalSpendPerUserPerKey Exists!") # noqa + except Exception: + sql_query = """ + CREATE OR REPLACE VIEW "MonthlyGlobalSpendPerUserPerKey" AS + SELECT + DATE("startTime") AS date, + SUM("spend") AS spend, + api_key as api_key, + "user" as "user" + FROM + "LiteLLM_SpendLogs" + WHERE + "startTime" >= (CURRENT_DATE - INTERVAL '30 days') + GROUP BY + DATE("startTime"), + "user", + api_key; + """ + await db.execute_raw(query=sql_query) + + print("MonthlyGlobalSpendPerUserPerKey Created!") # noqa + + try: + await db.query_raw("""SELECT 1 FROM "DailyTagSpend" LIMIT 1""") + print("DailyTagSpend Exists!") # noqa + except Exception: + sql_query = """ + CREATE OR REPLACE VIEW "DailyTagSpend" AS + SELECT + jsonb_array_elements_text(request_tags) AS individual_request_tag, + DATE(s."startTime") AS spend_date, + COUNT(*) AS log_count, + SUM(spend) AS total_spend + FROM "LiteLLM_SpendLogs" s + GROUP BY individual_request_tag, DATE(s."startTime"); + """ + await db.execute_raw(query=sql_query) + + print("DailyTagSpend Created!") # noqa + + try: + await db.query_raw("""SELECT 1 FROM "Last30dTopEndUsersSpend" LIMIT 1""") + print("Last30dTopEndUsersSpend Exists!") # noqa + except Exception: + sql_query = """ + CREATE VIEW "Last30dTopEndUsersSpend" AS + SELECT end_user, COUNT(*) AS total_events, SUM(spend) AS total_spend + FROM "LiteLLM_SpendLogs" + WHERE end_user <> '' AND end_user <> user + AND "startTime" >= CURRENT_DATE - INTERVAL '30 days' + GROUP BY end_user + ORDER BY total_spend DESC + LIMIT 100; + """ + await db.execute_raw(query=sql_query) + + print("Last30dTopEndUsersSpend Created!") # noqa + + return + + +async def should_create_missing_views(db: _db) -> bool: + """ + Run only on first time startup. + + If SpendLogs table already has values, then don't create views on startup. + """ + + sql_query = """ + SELECT reltuples::BIGINT + FROM pg_class + WHERE oid = '"LiteLLM_SpendLogs"'::regclass; + """ + + result = await db.query_raw(query=sql_query) + + verbose_logger.debug("Estimated Row count of LiteLLM_SpendLogs = {}".format(result)) + if ( + result + and isinstance(result, list) + and len(result) > 0 + and isinstance(result[0], dict) + and "reltuples" in result[0] + and result[0]["reltuples"] + and (result[0]["reltuples"] == 0 or result[0]["reltuples"] == -1) + ): + verbose_logger.debug("Should create views") + return True + + return False diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/db/dynamo_db.py b/.venv/lib/python3.12/site-packages/litellm/proxy/db/dynamo_db.py new file mode 100644 index 00000000..628509d9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/db/dynamo_db.py @@ -0,0 +1,71 @@ +""" +Deprecated. Only PostgresSQL is supported. +""" + +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import DynamoDBArgs +from litellm.proxy.db.base_client import CustomDB + + +class DynamoDBWrapper(CustomDB): + from aiodynamo.credentials import Credentials, StaticCredentials + + credentials: Credentials + + def __init__(self, database_arguments: DynamoDBArgs): + from aiodynamo.models import PayPerRequest, Throughput + + self.throughput_type = None + if database_arguments.billing_mode == "PAY_PER_REQUEST": + self.throughput_type = PayPerRequest() + elif database_arguments.billing_mode == "PROVISIONED_THROUGHPUT": + if ( + database_arguments.read_capacity_units is not None + and isinstance(database_arguments.read_capacity_units, int) + and database_arguments.write_capacity_units is not None + and isinstance(database_arguments.write_capacity_units, int) + ): + self.throughput_type = Throughput(read=database_arguments.read_capacity_units, write=database_arguments.write_capacity_units) # type: ignore + else: + raise Exception( + f"Invalid args passed in. Need to set both read_capacity_units and write_capacity_units. Args passed in - {database_arguments}" + ) + self.database_arguments = database_arguments + self.region_name = database_arguments.region_name + + def set_env_vars_based_on_arn(self): + if self.database_arguments.aws_role_name is None: + return + verbose_proxy_logger.debug( + f"DynamoDB: setting env vars based on arn={self.database_arguments.aws_role_name}" + ) + import os + + import boto3 + + sts_client = boto3.client("sts") + + # call 1 + sts_client.assume_role_with_web_identity( + RoleArn=self.database_arguments.aws_role_name, + RoleSessionName=self.database_arguments.aws_session_name, + WebIdentityToken=self.database_arguments.aws_web_identity_token, + ) + + # call 2 + assumed_role = sts_client.assume_role( + RoleArn=self.database_arguments.assume_role_aws_role_name, + RoleSessionName=self.database_arguments.assume_role_aws_session_name, + ) + + aws_access_key_id = assumed_role["Credentials"]["AccessKeyId"] + aws_secret_access_key = assumed_role["Credentials"]["SecretAccessKey"] + aws_session_token = assumed_role["Credentials"]["SessionToken"] + + verbose_proxy_logger.debug( + f"Got STS assumed Role, aws_access_key_id={aws_access_key_id}" + ) + # set these in the env so aiodynamo can use them + os.environ["AWS_ACCESS_KEY_ID"] = aws_access_key_id + os.environ["AWS_SECRET_ACCESS_KEY"] = aws_secret_access_key + os.environ["AWS_SESSION_TOKEN"] = aws_session_token diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/db/log_db_metrics.py b/.venv/lib/python3.12/site-packages/litellm/proxy/db/log_db_metrics.py new file mode 100644 index 00000000..9bd33507 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/db/log_db_metrics.py @@ -0,0 +1,143 @@ +""" +Handles logging DB success/failure to ServiceLogger() + +ServiceLogger() then sends DB logs to Prometheus, OTEL, Datadog etc +""" + +import asyncio +from datetime import datetime +from functools import wraps +from typing import Callable, Dict, Tuple + +from litellm._service_logger import ServiceTypes +from litellm.litellm_core_utils.core_helpers import ( + _get_parent_otel_span_from_kwargs, + get_litellm_metadata_from_kwargs, +) + + +def log_db_metrics(func): + """ + Decorator to log the duration of a DB related function to ServiceLogger() + + Handles logging DB success/failure to ServiceLogger(), which logs to Prometheus, OTEL, Datadog + + When logging Failure it checks if the Exception is a PrismaError, httpx.ConnectError or httpx.TimeoutException and then logs that as a DB Service Failure + + Args: + func: The function to be decorated + + Returns: + Result from the decorated function + + Raises: + Exception: If the decorated function raises an exception + """ + + @wraps(func) + async def wrapper(*args, **kwargs): + + start_time: datetime = datetime.now() + + try: + result = await func(*args, **kwargs) + end_time: datetime = datetime.now() + from litellm.proxy.proxy_server import proxy_logging_obj + + if "PROXY" not in func.__name__: + asyncio.create_task( + proxy_logging_obj.service_logging_obj.async_service_success_hook( + service=ServiceTypes.DB, + call_type=func.__name__, + parent_otel_span=kwargs.get("parent_otel_span", None), + duration=(end_time - start_time).total_seconds(), + start_time=start_time, + end_time=end_time, + event_metadata={ + "function_name": func.__name__, + "function_kwargs": kwargs, + "function_args": args, + }, + ) + ) + elif ( + # in litellm custom callbacks kwargs is passed as arg[0] + # https://docs.litellm.ai/docs/observability/custom_callback#callback-functions + args is not None + and len(args) > 1 + and isinstance(args[1], dict) + ): + passed_kwargs = args[1] + parent_otel_span = _get_parent_otel_span_from_kwargs( + kwargs=passed_kwargs + ) + if parent_otel_span is not None: + metadata = get_litellm_metadata_from_kwargs(kwargs=passed_kwargs) + + asyncio.create_task( + proxy_logging_obj.service_logging_obj.async_service_success_hook( + service=ServiceTypes.BATCH_WRITE_TO_DB, + call_type=func.__name__, + parent_otel_span=parent_otel_span, + duration=0.0, + start_time=start_time, + end_time=end_time, + event_metadata=metadata, + ) + ) + # end of logging to otel + return result + except Exception as e: + end_time: datetime = datetime.now() + await _handle_logging_db_exception( + e=e, + func=func, + kwargs=kwargs, + args=args, + start_time=start_time, + end_time=end_time, + ) + raise e + + return wrapper + + +def _is_exception_related_to_db(e: Exception) -> bool: + """ + Returns True if the exception is related to the DB + """ + + import httpx + from prisma.errors import PrismaError + + return isinstance(e, (PrismaError, httpx.ConnectError, httpx.TimeoutException)) + + +async def _handle_logging_db_exception( + e: Exception, + func: Callable, + kwargs: Dict, + args: Tuple, + start_time: datetime, + end_time: datetime, +) -> None: + from litellm.proxy.proxy_server import proxy_logging_obj + + # don't log this as a DB Service Failure, if the DB did not raise an exception + if _is_exception_related_to_db(e) is not True: + return + + await proxy_logging_obj.service_logging_obj.async_service_failure_hook( + error=e, + service=ServiceTypes.DB, + call_type=func.__name__, + parent_otel_span=kwargs.get("parent_otel_span"), + duration=(end_time - start_time).total_seconds(), + start_time=start_time, + end_time=end_time, + event_metadata={ + "function_name": func.__name__, + "function_kwargs": kwargs, + "function_args": args, + }, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/db/prisma_client.py b/.venv/lib/python3.12/site-packages/litellm/proxy/db/prisma_client.py new file mode 100644 index 00000000..85a3a57a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/db/prisma_client.py @@ -0,0 +1,278 @@ +""" +This file contains the PrismaWrapper class, which is used to wrap the Prisma client and handle the RDS IAM token. +""" + +import asyncio +import os +import random +import subprocess +import time +import urllib +import urllib.parse +from datetime import datetime, timedelta +from pathlib import Path +from typing import Any, Optional, Union + +from litellm._logging import verbose_proxy_logger +from litellm.secret_managers.main import str_to_bool + + +class PrismaWrapper: + def __init__(self, original_prisma: Any, iam_token_db_auth: bool): + self._original_prisma = original_prisma + self.iam_token_db_auth = iam_token_db_auth + + def is_token_expired(self, token_url: Optional[str]) -> bool: + if token_url is None: + return True + # Decode the token URL to handle URL-encoded characters + decoded_url = urllib.parse.unquote(token_url) + + # Parse the token URL + parsed_url = urllib.parse.urlparse(decoded_url) + + # Parse the query parameters from the path component (if they exist there) + query_params = urllib.parse.parse_qs(parsed_url.query) + + # Get expiration time from the query parameters + expires = query_params.get("X-Amz-Expires", [None])[0] + if expires is None: + raise ValueError("X-Amz-Expires parameter is missing or invalid.") + + expires_int = int(expires) + + # Get the token's creation time from the X-Amz-Date parameter + token_time_str = query_params.get("X-Amz-Date", [""])[0] + if not token_time_str: + raise ValueError("X-Amz-Date parameter is missing or invalid.") + + # Ensure the token time string is parsed correctly + try: + token_time = datetime.strptime(token_time_str, "%Y%m%dT%H%M%SZ") + except ValueError as e: + raise ValueError(f"Invalid X-Amz-Date format: {e}") + + # Calculate the expiration time + expiration_time = token_time + timedelta(seconds=expires_int) + + # Current time in UTC + current_time = datetime.utcnow() + + # Check if the token is expired + return current_time > expiration_time + + def get_rds_iam_token(self) -> Optional[str]: + if self.iam_token_db_auth: + from litellm.proxy.auth.rds_iam_token import generate_iam_auth_token + + db_host = os.getenv("DATABASE_HOST") + db_port = os.getenv("DATABASE_PORT") + db_user = os.getenv("DATABASE_USER") + db_name = os.getenv("DATABASE_NAME") + db_schema = os.getenv("DATABASE_SCHEMA") + + token = generate_iam_auth_token( + db_host=db_host, db_port=db_port, db_user=db_user + ) + + # print(f"token: {token}") + _db_url = f"postgresql://{db_user}:{token}@{db_host}:{db_port}/{db_name}" + if db_schema: + _db_url += f"?schema={db_schema}" + + os.environ["DATABASE_URL"] = _db_url + return _db_url + return None + + async def recreate_prisma_client( + self, new_db_url: str, http_client: Optional[Any] = None + ): + from prisma import Prisma # type: ignore + + if http_client is not None: + self._original_prisma = Prisma(http=http_client) + else: + self._original_prisma = Prisma() + + await self._original_prisma.connect() + + def __getattr__(self, name: str): + original_attr = getattr(self._original_prisma, name) + if self.iam_token_db_auth: + db_url = os.getenv("DATABASE_URL") + if self.is_token_expired(db_url): + db_url = self.get_rds_iam_token() + loop = asyncio.get_event_loop() + + if db_url: + if loop.is_running(): + asyncio.run_coroutine_threadsafe( + self.recreate_prisma_client(db_url), loop + ) + else: + asyncio.run(self.recreate_prisma_client(db_url)) + else: + raise ValueError("Failed to get RDS IAM token") + + return original_attr + + +class PrismaManager: + @staticmethod + def _get_prisma_dir() -> str: + """Get the path to the migrations directory""" + abspath = os.path.abspath(__file__) + dname = os.path.dirname(os.path.dirname(abspath)) + return dname + + @staticmethod + def _create_baseline_migration(schema_path: str) -> bool: + """Create a baseline migration for an existing database""" + prisma_dir = PrismaManager._get_prisma_dir() + prisma_dir_path = Path(prisma_dir) + init_dir = prisma_dir_path / "migrations" / "0_init" + + # Create migrations/0_init directory + init_dir.mkdir(parents=True, exist_ok=True) + + # Generate migration SQL file + migration_file = init_dir / "migration.sql" + + try: + # Generate migration diff with increased timeout + subprocess.run( + [ + "prisma", + "migrate", + "diff", + "--from-empty", + "--to-schema-datamodel", + str(schema_path), + "--script", + ], + stdout=open(migration_file, "w"), + check=True, + timeout=30, + ) # 30 second timeout + + # Mark migration as applied with increased timeout + subprocess.run( + [ + "prisma", + "migrate", + "resolve", + "--applied", + "0_init", + ], + check=True, + timeout=30, + ) + + return True + except subprocess.TimeoutExpired: + verbose_proxy_logger.warning( + "Migration timed out - the database might be under heavy load." + ) + return False + except subprocess.CalledProcessError as e: + verbose_proxy_logger.warning(f"Error creating baseline migration: {e}") + return False + + @staticmethod + def setup_database(use_migrate: bool = False) -> bool: + """ + Set up the database using either prisma migrate or prisma db push + + Returns: + bool: True if setup was successful, False otherwise + """ + + for attempt in range(4): + original_dir = os.getcwd() + prisma_dir = PrismaManager._get_prisma_dir() + schema_path = prisma_dir + "/schema.prisma" + os.chdir(prisma_dir) + try: + if use_migrate: + verbose_proxy_logger.info("Running prisma migrate deploy") + # First try to run migrate deploy directly + try: + subprocess.run( + ["prisma", "migrate", "deploy"], + timeout=60, + check=True, + capture_output=True, + text=True, + ) + verbose_proxy_logger.info("prisma migrate deploy completed") + return True + except subprocess.CalledProcessError as e: + # Check if this is the non-empty schema error + if ( + "P3005" in e.stderr + and "database schema is not empty" in e.stderr + ): + # Create baseline migration + if PrismaManager._create_baseline_migration(schema_path): + # Try migrate deploy again after baseline + subprocess.run( + ["prisma", "migrate", "deploy"], + timeout=60, + check=True, + ) + return True + else: + # If it's a different error, raise it + raise e + else: + # Use prisma db push with increased timeout + subprocess.run( + ["prisma", "db", "push", "--accept-data-loss"], + timeout=60, + check=True, + ) + return True + except subprocess.TimeoutExpired: + verbose_proxy_logger.warning(f"Attempt {attempt + 1} timed out") + time.sleep(random.randrange(5, 15)) + except subprocess.CalledProcessError as e: + attempts_left = 3 - attempt + retry_msg = ( + f" Retrying... ({attempts_left} attempts left)" + if attempts_left > 0 + else "" + ) + verbose_proxy_logger.warning( + f"The process failed to execute. Details: {e}.{retry_msg}" + ) + time.sleep(random.randrange(5, 15)) + finally: + os.chdir(original_dir) + return False + + +def should_update_prisma_schema( + disable_updates: Optional[Union[bool, str]] = None +) -> bool: + """ + Determines if Prisma Schema updates should be applied during startup. + + Args: + disable_updates: Controls whether schema updates are disabled. + Accepts boolean or string ('true'/'false'). Defaults to checking DISABLE_SCHEMA_UPDATE env var. + + Returns: + bool: True if schema updates should be applied, False if updates are disabled. + + Examples: + >>> should_update_prisma_schema() # Checks DISABLE_SCHEMA_UPDATE env var + >>> should_update_prisma_schema(True) # Explicitly disable updates + >>> should_update_prisma_schema("false") # Enable updates using string + """ + if disable_updates is None: + disable_updates = os.getenv("DISABLE_SCHEMA_UPDATE", "false") + + if isinstance(disable_updates, str): + disable_updates = str_to_bool(disable_updates) + + return not bool(disable_updates) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/_health_check_test_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/_health_check_test_config.yaml new file mode 100644 index 00000000..56d532b1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/_health_check_test_config.yaml @@ -0,0 +1,17 @@ +model_list: + - model_name: text-embedding-ada-002 + litellm_params: + model: azure/azure-embedding-model + api_base: "os.environ/AZURE_API_BASE" + api_key: "os.environ/AZURE_API_KEY" + api_version: "2023-07-01-preview" + model_info: + mode: embedding + base_model: text-embedding-ada-002 + +litellm_settings: + set_verbose: True + +general_settings: + background_health_checks: True # enable background health checks + health_check_interval: 300 # frequency of background health checks
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/aliases_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/aliases_config.yaml new file mode 100644 index 00000000..266f6cf2 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/aliases_config.yaml @@ -0,0 +1,30 @@ +model_list: + - model_name: text-davinci-003 + litellm_params: + model: ollama/zephyr + - model_name: gpt-4 + litellm_params: + model: ollama/llama2 + - model_name: gpt-3.5-turbo + litellm_params: + model: ollama/llama2 + temperature: 0.1 + max_tokens: 20 + + +# request to gpt-4, response from ollama/llama2 +# curl --location 'http://0.0.0.0:8000/chat/completions' \ +# --header 'Content-Type: application/json' \ +# --data ' { +# "model": "gpt-4", +# "messages": [ +# { +# "role": "user", +# "content": "what llm are you" +# } +# ], +# } +# ' +# + +# {"id":"chatcmpl-27c85cf0-ab09-4bcf-8cb1-0ee950520743","choices":[{"finish_reason":"stop","index":0,"message":{"content":" Hello! I'm just an AI, I don't have personal experiences or emotions like humans do. However, I can help you with any questions or tasks you may have! Is there something specific you'd like to know or discuss?","role":"assistant","_logprobs":null}}],"created":1700094955.373751,"model":"ollama/llama2","object":"chat.completion","system_fingerprint":null,"usage":{"prompt_tokens":12,"completion_tokens":47,"total_tokens":59},"_response_ms":8028.017999999999}%
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/azure_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/azure_config.yaml new file mode 100644 index 00000000..bd9ff9ac --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/azure_config.yaml @@ -0,0 +1,21 @@ +model_list: + - model_name: gpt-4-team1 + litellm_params: + model: azure/chatgpt-v-2 + api_base: https://openai-gpt-4-test-v-1.openai.azure.com/ + api_version: "2023-05-15" + api_key: os.environ/AZURE_API_KEY + tpm: 20_000 + timeout: 5 # 1 second timeout + stream_timeout: 0.5 # 0.5 second timeout for streaming requests + max_retries: 4 + - model_name: gpt-4-team2 + litellm_params: + model: azure/gpt-4 + api_key: os.environ/AZURE_API_KEY + api_base: https://openai-gpt-4-test-v-2.openai.azure.com/ + tpm: 100_000 + timeout: 5 # 1 second timeout + stream_timeout: 0.5 # 0.5 second timeout for streaming requests + max_retries: 4 + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/bad_schema.prisma b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/bad_schema.prisma new file mode 100644 index 00000000..5c631406 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/bad_schema.prisma @@ -0,0 +1,265 @@ +datasource client { + provider = "postgresql" + url = env("DATABASE_URL") +} + +generator client { + provider = "prisma-client-py" +} + +// Budget / Rate Limits for an org +model LiteLLM_BudgetTable { + budget_id String @id @default(uuid()) + max_budget Float? + soft_budget Float? + max_parallel_requests Int? + tpm_limit BigInt? + rpm_limit BigInt? + model_max_budget Json? + temp_verification_token String? // bad param for testing + budget_duration String? + budget_reset_at DateTime? + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String + organization LiteLLM_OrganizationTable[] // multiple orgs can have the same budget + keys LiteLLM_VerificationToken[] // multiple keys can have the same budget + end_users LiteLLM_EndUserTable[] // multiple end-users can have the same budget + team_membership LiteLLM_TeamMembership[] // budgets of Users within a Team +} + +// Models on proxy +model LiteLLM_ProxyModelTable { + model_id String @id @default(uuid()) + model_name String + litellm_params Json + model_info Json? + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String +} + +model LiteLLM_OrganizationTable { + organization_id String @id @default(uuid()) + organization_alias String + budget_id String + metadata Json @default("{}") + models String[] + spend Float @default(0.0) + model_spend Json @default("{}") + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + teams LiteLLM_TeamTable[] + users LiteLLM_UserTable[] +} + +// Model info for teams, just has model aliases for now. +model LiteLLM_ModelTable { + id Int @id @default(autoincrement()) + model_aliases Json? @map("aliases") + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String + team LiteLLM_TeamTable? +} + + +// Assign prod keys to groups, not individuals +model LiteLLM_TeamTable { + team_id String @id @default(uuid()) + team_alias String? + organization_id String? + admins String[] + members String[] + members_with_roles Json @default("{}") + metadata Json @default("{}") + max_budget Float? + spend Float @default(0.0) + models String[] + max_parallel_requests Int? + tpm_limit BigInt? + rpm_limit BigInt? + budget_duration String? + budget_reset_at DateTime? + blocked Boolean @default(false) + created_at DateTime @default(now()) @map("created_at") + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + model_spend Json @default("{}") + model_max_budget Json @default("{}") + model_id Int? @unique // id for LiteLLM_ModelTable -> stores team-level model aliases + litellm_organization_table LiteLLM_OrganizationTable? @relation(fields: [organization_id], references: [organization_id]) + litellm_model_table LiteLLM_ModelTable? @relation(fields: [model_id], references: [id]) +} + +// Track spend, rate limit, budget Users +model LiteLLM_UserTable { + user_id String @id + user_alias String? + team_id String? + organization_id String? + password String? + teams String[] @default([]) + user_role String? + max_budget Float? + spend Float @default(0.0) + user_email String? + models String[] + metadata Json @default("{}") + max_parallel_requests Int? + tpm_limit BigInt? + rpm_limit BigInt? + budget_duration String? + budget_reset_at DateTime? + allowed_cache_controls String[] @default([]) + model_spend Json @default("{}") + model_max_budget Json @default("{}") + litellm_organization_table LiteLLM_OrganizationTable? @relation(fields: [organization_id], references: [organization_id]) + invitations_created LiteLLM_InvitationLink[] @relation("CreatedBy") + invitations_updated LiteLLM_InvitationLink[] @relation("UpdatedBy") + invitations_user LiteLLM_InvitationLink[] @relation("UserId") +} + +// Generate Tokens for Proxy +model LiteLLM_VerificationToken { + token String @id + key_name String? + key_alias String? + soft_budget_cooldown Boolean @default(false) // key-level state on if budget alerts need to be cooled down + spend Float @default(0.0) + expires DateTime? + models String[] + aliases Json @default("{}") + config Json @default("{}") + user_id String? + team_id String? + permissions Json @default("{}") + max_parallel_requests Int? + metadata Json @default("{}") + blocked Boolean? + tpm_limit BigInt? + rpm_limit BigInt? + max_budget Float? + budget_duration String? + budget_reset_at DateTime? + allowed_cache_controls String[] @default([]) + model_spend Json @default("{}") + model_max_budget Json @default("{}") + budget_id String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) +} + +model LiteLLM_EndUserTable { + user_id String @id + alias String? // admin-facing alias + spend Float @default(0.0) + allowed_model_region String? // require all user requests to use models in this specific region + default_model String? // use along with 'allowed_model_region'. if no available model in region, default to this model. + budget_id String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + blocked Boolean @default(false) +} + +// store proxy config.yaml +model LiteLLM_Config { + param_name String @id + param_value Json? +} + +// View spend, model, api_key per request +model LiteLLM_SpendLogs { + request_id String @id + call_type String + api_key String @default ("") // Hashed API Token. Not the actual Virtual Key. Equivalent to 'token' column in LiteLLM_VerificationToken + spend Float @default(0.0) + total_tokens Int @default(0) + prompt_tokens Int @default(0) + completion_tokens Int @default(0) + startTime DateTime // Assuming start_time is a DateTime field + endTime DateTime // Assuming end_time is a DateTime field + completionStartTime DateTime? // Assuming completionStartTime is a DateTime field + model String @default("") + model_id String? @default("") // the model id stored in proxy model db + model_group String? @default("") // public model_name / model_group + api_base String? @default("") + user String? @default("") + metadata Json? @default("{}") + cache_hit String? @default("") + cache_key String? @default("") + request_tags Json? @default("[]") + team_id String? + end_user String? + requester_ip_address String? + @@index([startTime]) + @@index([end_user]) +} + +// View spend, model, api_key per request +model LiteLLM_ErrorLogs { + request_id String @id @default(uuid()) + startTime DateTime // Assuming start_time is a DateTime field + endTime DateTime // Assuming end_time is a DateTime field + api_base String @default("") + model_group String @default("") // public model_name / model_group + litellm_model_name String @default("") // model passed to litellm + model_id String @default("") // ID of model in ProxyModelTable + request_kwargs Json @default("{}") + exception_type String @default("") + exception_string String @default("") + status_code String @default("") +} + +// Beta - allow team members to request access to a model +model LiteLLM_UserNotifications { + request_id String @id + user_id String + models String[] + justification String + status String // approved, disapproved, pending +} + +model LiteLLM_TeamMembership { + // Use this table to track the Internal User's Spend within a Team + Set Budgets, rpm limits for the user within the team + user_id String + team_id String + spend Float @default(0.0) + budget_id String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + @@id([user_id, team_id]) +} + +model LiteLLM_InvitationLink { + // use this table to track invite links sent by admin for people to join the proxy + id String @id @default(uuid()) + user_id String + is_accepted Boolean @default(false) + accepted_at DateTime? // when link is claimed (user successfully onboards via link) + expires_at DateTime // till when is link valid + created_at DateTime // when did admin create the link + created_by String // who created the link + updated_at DateTime // when was invite status updated + updated_by String // who updated the status (admin/user who accepted invite) + + // Relations + liteLLM_user_table_user LiteLLM_UserTable @relation("UserId", fields: [user_id], references: [user_id]) + liteLLM_user_table_created LiteLLM_UserTable @relation("CreatedBy", fields: [created_by], references: [user_id]) + liteLLM_user_table_updated LiteLLM_UserTable @relation("UpdatedBy", fields: [updated_by], references: [user_id]) +} + + +model LiteLLM_AuditLog { + id String @id @default(uuid()) + updated_at DateTime @default(now()) + changed_by String @default("") // user or system that performed the action + changed_by_api_key String @default("") // api key hash that performed the action + action String // create, update, delete + table_name String // on of LitellmTableNames.TEAM_TABLE_NAME, LitellmTableNames.USER_TABLE_NAME, LitellmTableNames.PROXY_MODEL_TABLE_NAME, + object_id String // id of the object being audited. This can be the key id, team id, user id, model id + before_value Json? // value of the row + updated_values Json? // value of the row after change +} diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth.py new file mode 100644 index 00000000..7d797623 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth.py @@ -0,0 +1,52 @@ +import os + +from fastapi import Request + +from litellm.proxy._types import GenerateKeyRequest, UserAPIKeyAuth + + +async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth: + try: + modified_master_key = f"{os.getenv('PROXY_MASTER_KEY')}-1234" + if api_key == modified_master_key: + return UserAPIKeyAuth(api_key=api_key) + raise Exception + except Exception: + raise Exception + + +async def generate_key_fn(data: GenerateKeyRequest): + """ + Asynchronously decides if a key should be generated or not based on the provided data. + + Args: + data (GenerateKeyRequest): The data to be used for decision making. + + Returns: + bool: True if a key should be generated, False otherwise. + """ + # decide if a key should be generated or not + data_json = data.json() # type: ignore + + # Unpacking variables + team_id = data_json.get("team_id") + data_json.get("duration") + data_json.get("models") + data_json.get("aliases") + data_json.get("config") + data_json.get("spend") + data_json.get("user_id") + data_json.get("max_parallel_requests") + data_json.get("metadata") + data_json.get("tpm_limit") + data_json.get("rpm_limit") + + if team_id is not None and len(team_id) > 0: + return { + "decision": True, + } + else: + return { + "decision": True, + "message": "This violates LiteLLM Proxy Rules. No team id provided.", + } diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py new file mode 100644 index 00000000..4d633a54 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py @@ -0,0 +1,14 @@ +from fastapi import Request + +from litellm.proxy._types import UserAPIKeyAuth + + +async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth: + try: + return UserAPIKeyAuth( + api_key="best-api-key-ever", + user_id="best-user-id-ever", + team_id="best-team-id-ever", + ) + except Exception: + raise Exception diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks.py new file mode 100644 index 00000000..9e86f931 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks.py @@ -0,0 +1,74 @@ +import os +import sys +import traceback + +# this file is to test litellm/proxy + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path + +import inspect + +import litellm +from litellm.integrations.custom_logger import CustomLogger + + +# This file includes the custom callbacks for LiteLLM Proxy +# Once defined, these can be passed in proxy_config.yaml +def print_verbose(print_statement): + if litellm.set_verbose: + print(print_statement) # noqa + + +class MyCustomHandler(CustomLogger): + def __init__(self): + blue_color_code = "\033[94m" + reset_color_code = "\033[0m" + print_verbose(f"{blue_color_code}Initialized LiteLLM custom logger") + try: + print_verbose("Logger Initialized with following methods:") + methods = [ + method + for method in dir(self) + if inspect.ismethod(getattr(self, method)) + ] + + # Pretty print_verbose the methods + for method in methods: + print_verbose(f" - {method}") + print_verbose(f"{reset_color_code}") + except Exception: + pass + + def log_pre_api_call(self, model, messages, kwargs): + print_verbose("Pre-API Call") + + def log_post_api_call(self, kwargs, response_obj, start_time, end_time): + print_verbose("Post-API Call") + + def log_stream_event(self, kwargs, response_obj, start_time, end_time): + print_verbose("On Stream") + + def log_success_event(self, kwargs, response_obj, start_time, end_time): + print_verbose("On Success!") + + async def async_log_success_event(self, kwargs, response_obj, start_time, end_time): + print_verbose("On Async Success!") + response_cost = litellm.completion_cost(completion_response=response_obj) + assert response_cost > 0.0 + return + + async def async_log_failure_event(self, kwargs, response_obj, start_time, end_time): + try: + print_verbose("On Async Failure !") + except Exception as e: + print_verbose(f"Exception: {e}") + + +proxy_handler_instance = MyCustomHandler() + + +# need to set litellm.callbacks = [customHandler] # on the proxy + +# litellm.success_callback = [async_on_succes_logger] diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks1.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks1.py new file mode 100644 index 00000000..2cc644a1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks1.py @@ -0,0 +1,78 @@ +from typing import Literal, Optional + +import litellm +from litellm.integrations.custom_logger import CustomLogger +from litellm.proxy.proxy_server import DualCache, UserAPIKeyAuth + + +# This file includes the custom callbacks for LiteLLM Proxy +# Once defined, these can be passed in proxy_config.yaml +class MyCustomHandler( + CustomLogger +): # https://docs.litellm.ai/docs/observability/custom_callback#callback-class + # Class variables or attributes + def __init__(self): + pass + + #### CALL HOOKS - proxy only #### + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ): + return data + + async def async_post_call_failure_hook( + self, + request_data: dict, + original_exception: Exception, + user_api_key_dict: UserAPIKeyAuth, + ): + pass + + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + # print("in async_post_call_success_hook") + pass + + async def async_moderation_hook( # call made in parallel to llm api call + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ): + pass + + async def async_post_call_streaming_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + response: str, + ): + # print("in async_post_call_streaming_hook") + pass + + +proxy_handler_instance = MyCustomHandler() diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_guardrail.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_guardrail.py new file mode 100644 index 00000000..5a5c7844 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_guardrail.py @@ -0,0 +1,112 @@ +from typing import Any, Dict, List, Literal, Optional, Union + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_guardrail import CustomGuardrail +from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy.guardrails.guardrail_helpers import should_proceed_based_on_metadata + + +class myCustomGuardrail(CustomGuardrail): + def __init__( + self, + **kwargs, + ): + # store kwargs as optional_params + self.optional_params = kwargs + + super().__init__(**kwargs) + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> Optional[Union[Exception, str, dict]]: + """ + Runs before the LLM API call + Runs on only Input + Use this if you want to MODIFY the input + """ + + # In this guardrail, if a user inputs `litellm` we will mask it and then send it to the LLM + _messages = data.get("messages") + if _messages: + for message in _messages: + _content = message.get("content") + if isinstance(_content, str): + if "litellm" in _content.lower(): + _content = _content.replace("litellm", "********") + message["content"] = _content + + verbose_proxy_logger.debug( + "async_pre_call_hook: Message after masking %s", _messages + ) + + return data + + async def async_moderation_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ): + """ + Runs in parallel to LLM API call + Runs on only Input + + This can NOT modify the input, only used to reject or accept a call before going to LLM API + """ + + # this works the same as async_pre_call_hook, but just runs in parallel as the LLM API Call + # In this guardrail, if a user inputs `litellm` we will mask it. + _messages = data.get("messages") + if _messages: + for message in _messages: + _content = message.get("content") + if isinstance(_content, str): + if "litellm" in _content.lower(): + raise ValueError("Guardrail failed words - `litellm` detected") + + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + """ + Runs on response from LLM API call + + It can be used to reject a response + + If a response contains the word "coffee" -> we will raise an exception + """ + verbose_proxy_logger.debug("async_pre_call_hook response: %s", response) + if isinstance(response, litellm.ModelResponse): + for choice in response.choices: + if isinstance(choice, litellm.Choices): + verbose_proxy_logger.debug("async_pre_call_hook choice: %s", choice) + if ( + choice.message.content + and isinstance(choice.message.content, str) + and "coffee" in choice.message.content + ): + raise ValueError("Guardrail failed Coffee Detected") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_handler.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_handler.py new file mode 100644 index 00000000..52e6686e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_handler.py @@ -0,0 +1,26 @@ +import time +from typing import Any, Optional + +import litellm +from litellm import CustomLLM, ImageObject, ImageResponse, completion, get_llm_provider +from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler +from litellm.types.utils import ModelResponse + + +class MyCustomLLM(CustomLLM): + def completion(self, *args, **kwargs) -> ModelResponse: + return litellm.completion( + model="gpt-3.5-turbo", + messages=[{"role": "user", "content": "Hello world"}], + mock_response="Hi!", + ) # type: ignore + + async def acompletion(self, *args, **kwargs) -> litellm.ModelResponse: + return litellm.completion( + model="gpt-3.5-turbo", + messages=[{"role": "user", "content": "Hello world"}], + mock_response="Hi!", + ) # type: ignore + + +my_custom_llm = MyCustomLLM() diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/disable_schema_update.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/disable_schema_update.yaml new file mode 100644 index 00000000..5dcbd0db --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/disable_schema_update.yaml @@ -0,0 +1,17 @@ +model_list: + - model_name: fake-openai-endpoint + litellm_params: + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + - model_name: gpt-4 + litellm_params: + model: openai/gpt-4 + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + +litellm_settings: + callbacks: ["gcs_bucket"] + +general_settings: + disable_prisma_schema_update: true diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/enterprise_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/enterprise_config.yaml new file mode 100644 index 00000000..337e8517 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/enterprise_config.yaml @@ -0,0 +1,17 @@ +model_list: + - model_name: gpt-4 + litellm_params: + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + tags: ["teamA"] + model_info: + id: "team-a-model" + +litellm_settings: + cache: true + callbacks: ["prometheus"] + +router_settings: + enable_tag_filtering: True # 👈 Key Change + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/langfuse_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/langfuse_config.yaml new file mode 100644 index 00000000..c2a77b5a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/langfuse_config.yaml @@ -0,0 +1,7 @@ +model_list: + - model_name: gpt-3.5-turbo + +litellm_settings: + drop_params: True + success_callback: ["langfuse"] # https://docs.litellm.ai/docs/observability/langfuse_integration + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/load_balancer.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/load_balancer.yaml new file mode 100644 index 00000000..502b90ff --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/load_balancer.yaml @@ -0,0 +1,28 @@ +litellm_settings: + drop_params: True + +# Model-specific settings +model_list: # use the same model_name for using the litellm router. LiteLLM will use the router between gpt-3.5-turbo + - model_name: gpt-3.5-turbo # litellm will + litellm_params: + model: gpt-3.5-turbo + api_key: sk-uj6F + tpm: 20000 # [OPTIONAL] REPLACE with your openai tpm + rpm: 3 # [OPTIONAL] REPLACE with your openai rpm + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo + api_key: sk-Imn + tpm: 20000 # [OPTIONAL] REPLACE with your openai tpm + rpm: 3 # [OPTIONAL] REPLACE with your openai rpm + - model_name: gpt-3.5-turbo + litellm_params: + model: openrouter/gpt-3.5-turbo + - model_name: mistral-7b-instruct + litellm_params: + model: mistralai/mistral-7b-instruct + +environment_variables: + REDIS_HOST: localhost + REDIS_PASSWORD: + REDIS_PORT:
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/multi_instance_simple_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/multi_instance_simple_config.yaml new file mode 100644 index 00000000..f83160a7 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/multi_instance_simple_config.yaml @@ -0,0 +1,12 @@ +model_list: + - model_name: fake-openai-endpoint + litellm_params: + model: openai/my-fake-model + api_key: my-fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + +litellm_settings: + cache: True + cache_params: + type: redis + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/oai_misc_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/oai_misc_config.yaml new file mode 100644 index 00000000..1191e054 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/oai_misc_config.yaml @@ -0,0 +1,62 @@ +model_list: + - model_name: gpt-3.5-turbo-end-user-test + litellm_params: + model: gpt-3.5-turbo + region_name: "eu" + model_info: + id: "1" + - model_name: "*" + litellm_params: + model: openai/* + api_key: os.environ/OPENAI_API_KEY + # provider specific wildcard routing + - model_name: "anthropic/*" + litellm_params: + model: "anthropic/*" + api_key: os.environ/ANTHROPIC_API_KEY + - model_name: "groq/*" + litellm_params: + model: "groq/*" + api_key: os.environ/GROQ_API_KEY +litellm_settings: + # set_verbose: True # Uncomment this if you want to see verbose logs; not recommended in production + drop_params: True + # max_budget: 100 + # budget_duration: 30d + num_retries: 5 + request_timeout: 600 + telemetry: False + context_window_fallbacks: [{"gpt-3.5-turbo": ["gpt-3.5-turbo-large"]}] + default_team_settings: + - team_id: team-1 + success_callback: ["langfuse"] + failure_callback: ["langfuse"] + langfuse_public_key: os.environ/LANGFUSE_PROJECT1_PUBLIC # Project 1 + langfuse_secret: os.environ/LANGFUSE_PROJECT1_SECRET # Project 1 + - team_id: team-2 + success_callback: ["langfuse"] + failure_callback: ["langfuse"] + langfuse_public_key: os.environ/LANGFUSE_PROJECT2_PUBLIC # Project 2 + langfuse_secret: os.environ/LANGFUSE_PROJECT2_SECRET # Project 2 + langfuse_host: https://us.cloud.langfuse.com + +# For /fine_tuning/jobs endpoints +finetune_settings: + - custom_llm_provider: azure + api_base: os.environ/AZURE_API_BASE + api_key: os.environ/AZURE_API_KEY + api_version: "2024-05-01-preview" + - custom_llm_provider: openai + api_key: os.environ/OPENAI_API_KEY + +# for /files endpoints +files_settings: + - custom_llm_provider: azure + api_base: os.environ/AZURE_API_BASE + api_key: os.environ/AZURE_API_KEY + api_version: "2024-05-01-preview" + - custom_llm_provider: openai + api_key: os.environ/OPENAI_API_KEY + +general_settings: + master_key: sk-1234 # [OPTIONAL] Use to enforce auth on proxy. See - https://docs.litellm.ai/docs/proxy/virtual_keys
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/opentelemetry_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/opentelemetry_config.yaml new file mode 100644 index 00000000..92d3454d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/opentelemetry_config.yaml @@ -0,0 +1,7 @@ +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo + +general_settings: + otel: True # OpenTelemetry Logger this logs OTEL data to your collector diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/otel_test_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/otel_test_config.yaml new file mode 100644 index 00000000..32475162 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/otel_test_config.yaml @@ -0,0 +1,83 @@ +model_list: + - model_name: fake-openai-endpoint + litellm_params: + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + tags: ["teamA"] + model_info: + id: "team-a-model" + - model_name: fake-openai-endpoint + litellm_params: + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + tags: ["teamB"] + model_info: + id: "team-b-model" + - model_name: rerank-english-v3.0 + litellm_params: + model: cohere/rerank-english-v3.0 + api_key: os.environ/COHERE_API_KEY + - model_name: fake-azure-endpoint + litellm_params: + model: openai/429 + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app + - model_name: llava-hf + litellm_params: + model: openai/llava-hf/llava-v1.6-vicuna-7b-hf + api_base: http://localhost:8000 + api_key: fake-key + model_info: + supports_vision: True + - model_name: bedrock/* + litellm_params: + model: bedrock/* + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + - model_name: openai/* + litellm_params: + model: openai/* + api_key: os.environ/OPENAI_API_KEY + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + + +litellm_settings: + cache: true + callbacks: ["otel", "prometheus"] + disable_end_user_cost_tracking_prometheus_only: True + +guardrails: + - guardrail_name: "aporia-pre-guard" + litellm_params: + guardrail: aporia # supported values: "aporia", "bedrock", "lakera" + mode: "post_call" + api_key: os.environ/APORIA_API_KEY_1 + api_base: os.environ/APORIA_API_BASE_1 + - guardrail_name: "aporia-post-guard" + litellm_params: + guardrail: aporia # supported values: "aporia", "bedrock", "lakera" + mode: "post_call" + api_key: os.environ/APORIA_API_KEY_2 + api_base: os.environ/APORIA_API_BASE_2 + - guardrail_name: "bedrock-pre-guard" + litellm_params: + guardrail: bedrock # supported values: "aporia", "bedrock", "lakera" + mode: "during_call" + guardrailIdentifier: ff6ujrregl1q + guardrailVersion: "DRAFT" + - guardrail_name: "custom-pre-guard" + litellm_params: + guardrail: custom_guardrail.myCustomGuardrail + mode: "pre_call" + - guardrail_name: "custom-during-guard" + litellm_params: + guardrail: custom_guardrail.myCustomGuardrail + mode: "during_call" + - guardrail_name: "custom-post-guard" + litellm_params: + guardrail: custom_guardrail.myCustomGuardrail + mode: "post_call" + +router_settings: + enable_tag_filtering: True # 👈 Key Change
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/pass_through_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/pass_through_config.yaml new file mode 100644 index 00000000..ccc13f4d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/pass_through_config.yaml @@ -0,0 +1,29 @@ +model_list: + - model_name: fake-openai-endpoint + litellm_params: + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + - model_name: claude-3-5-sonnet-20241022 + litellm_params: + model: anthropic/claude-3-5-sonnet-20241022 + api_key: os.environ/ANTHROPIC_API_KEY + - model_name: claude-special-alias + litellm_params: + model: anthropic/claude-3-haiku-20240307 + api_key: os.environ/ANTHROPIC_API_KEY + - model_name: claude-3-5-sonnet-20241022 + litellm_params: + model: anthropic/claude-3-5-sonnet-20241022 + api_key: os.environ/ANTHROPIC_API_KEY + - model_name: claude-3-7-sonnet-20250219 + litellm_params: + model: anthropic/claude-3-7-sonnet-20250219 + api_key: os.environ/ANTHROPIC_API_KEY + - model_name: anthropic/* + litellm_params: + model: anthropic/* + api_key: os.environ/ANTHROPIC_API_KEY +general_settings: + master_key: sk-1234 + custom_auth: custom_auth_basic.user_api_key_auth
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/simple_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/simple_config.yaml new file mode 100644 index 00000000..14b39a12 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/simple_config.yaml @@ -0,0 +1,4 @@ +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/store_model_db_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/store_model_db_config.yaml new file mode 100644 index 00000000..b9cd2302 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/store_model_db_config.yaml @@ -0,0 +1,10 @@ +model_list: + - model_name: fake-openai-endpoint + litellm_params: + model: openai/my-fake-model + api_key: my-fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + +general_settings: + store_model_in_db: true + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/fine_tuning_endpoints/endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/fine_tuning_endpoints/endpoints.py new file mode 100644 index 00000000..d4c4250b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/fine_tuning_endpoints/endpoints.py @@ -0,0 +1,473 @@ +######################################################################### + +# /v1/fine_tuning Endpoints + +# Equivalent of https://platform.openai.com/docs/api-reference/fine-tuning +########################################################################## + +import asyncio +import traceback +from typing import Optional + +from fastapi import APIRouter, Depends, Request, Response + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing +from litellm.proxy.utils import handle_exception_on_proxy + +router = APIRouter() + +from litellm.types.llms.openai import LiteLLMFineTuningJobCreate + +fine_tuning_config = None + + +def set_fine_tuning_config(config): + if config is None: + return + + global fine_tuning_config + if not isinstance(config, list): + raise ValueError("invalid fine_tuning config, expected a list is not a list") + + for element in config: + if isinstance(element, dict): + for key, value in element.items(): + if isinstance(value, str) and value.startswith("os.environ/"): + element[key] = litellm.get_secret(value) + + fine_tuning_config = config + + +# Function to search for specific custom_llm_provider and return its configuration +def get_fine_tuning_provider_config( + custom_llm_provider: str, +): + global fine_tuning_config + if fine_tuning_config is None: + raise ValueError( + "fine_tuning_config is not set, set it on your config.yaml file." + ) + for setting in fine_tuning_config: + if setting.get("custom_llm_provider") == custom_llm_provider: + return setting + return None + + +@router.post( + "/v1/fine_tuning/jobs", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) Create Fine-Tuning Job", +) +@router.post( + "/fine_tuning/jobs", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) Create Fine-Tuning Job", +) +async def create_fine_tuning_job( + request: Request, + fastapi_response: Response, + fine_tuning_request: LiteLLMFineTuningJobCreate, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Creates a fine-tuning job which begins the process of creating a new model from a given dataset. + This is the equivalent of POST https://api.openai.com/v1/fine_tuning/jobs + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/fine-tuning/create + + Example Curl: + ``` + curl http://localhost:4000/v1/fine_tuning/jobs \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer sk-1234" \ + -d '{ + "model": "gpt-3.5-turbo", + "training_file": "file-abc123", + "hyperparameters": { + "n_epochs": 4 + } + }' + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + premium_user, + proxy_config, + proxy_logging_obj, + version, + ) + + data = fine_tuning_request.model_dump(exclude_none=True) + try: + if premium_user is not True: + raise ValueError( + f"Only premium users can use this endpoint + {CommonProxyErrors.not_premium_user.value}" + ) + # Convert Pydantic model to dict + + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n{}".format(json.dumps(data, indent=4)), + ) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # get configs for custom_llm_provider + llm_provider_config = get_fine_tuning_provider_config( + custom_llm_provider=fine_tuning_request.custom_llm_provider, + ) + + # add llm_provider_config to data + if llm_provider_config is not None: + data.update(llm_provider_config) + + response = await litellm.acreate_fine_tuning_job(**data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.create_fine_tuning_job(): Exception occurred - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise handle_exception_on_proxy(e) + + +@router.get( + "/v1/fine_tuning/jobs/{fine_tuning_job_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) Retrieve Fine-Tuning Job", +) +@router.get( + "/fine_tuning/jobs/{fine_tuning_job_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) Retrieve Fine-Tuning Job", +) +async def retrieve_fine_tuning_job( + request: Request, + fastapi_response: Response, + fine_tuning_job_id: str, + custom_llm_provider: Literal["openai", "azure"], + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Retrieves a fine-tuning job. + This is the equivalent of GET https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id} + + Supported Query Params: + - `custom_llm_provider`: Name of the LiteLLM provider + - `fine_tuning_job_id`: The ID of the fine-tuning job to retrieve. + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + premium_user, + proxy_config, + proxy_logging_obj, + version, + ) + + data: dict = {} + try: + if premium_user is not True: + raise ValueError( + f"Only premium users can use this endpoint + {CommonProxyErrors.not_premium_user.value}" + ) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # get configs for custom_llm_provider + llm_provider_config = get_fine_tuning_provider_config( + custom_llm_provider=custom_llm_provider + ) + + if llm_provider_config is not None: + data.update(llm_provider_config) + + response = await litellm.aretrieve_fine_tuning_job( + **data, + fine_tuning_job_id=fine_tuning_job_id, + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + + return response + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.list_fine_tuning_jobs(): Exception occurred - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise handle_exception_on_proxy(e) + + +@router.get( + "/v1/fine_tuning/jobs", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) List Fine-Tuning Jobs", +) +@router.get( + "/fine_tuning/jobs", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) List Fine-Tuning Jobs", +) +async def list_fine_tuning_jobs( + request: Request, + fastapi_response: Response, + custom_llm_provider: Literal["openai", "azure"], + after: Optional[str] = None, + limit: Optional[int] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Lists fine-tuning jobs for the organization. + This is the equivalent of GET https://api.openai.com/v1/fine_tuning/jobs + + Supported Query Params: + - `custom_llm_provider`: Name of the LiteLLM provider + - `after`: Identifier for the last job from the previous pagination request. + - `limit`: Number of fine-tuning jobs to retrieve (default is 20). + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + premium_user, + proxy_config, + proxy_logging_obj, + version, + ) + + data: dict = {} + try: + if premium_user is not True: + raise ValueError( + f"Only premium users can use this endpoint + {CommonProxyErrors.not_premium_user.value}" + ) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # get configs for custom_llm_provider + llm_provider_config = get_fine_tuning_provider_config( + custom_llm_provider=custom_llm_provider + ) + + if llm_provider_config is not None: + data.update(llm_provider_config) + + response = await litellm.alist_fine_tuning_jobs( + **data, + after=after, + limit=limit, + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + + return response + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.list_fine_tuning_jobs(): Exception occurred - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise handle_exception_on_proxy(e) + + +@router.post( + "/v1/fine_tuning/jobs/{fine_tuning_job_id:path}/cancel", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) Cancel Fine-Tuning Jobs", +) +@router.post( + "/fine_tuning/jobs/{fine_tuning_job_id:path}/cancel", + dependencies=[Depends(user_api_key_auth)], + tags=["fine-tuning"], + summary="✨ (Enterprise) Cancel Fine-Tuning Jobs", +) +async def cancel_fine_tuning_job( + request: Request, + fastapi_response: Response, + fine_tuning_job_id: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Cancel a fine-tuning job. + + This is the equivalent of POST https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel + + Supported Query Params: + - `custom_llm_provider`: Name of the LiteLLM provider + - `fine_tuning_job_id`: The ID of the fine-tuning job to cancel. + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + premium_user, + proxy_config, + proxy_logging_obj, + version, + ) + + data: dict = {} + try: + if premium_user is not True: + raise ValueError( + f"Only premium users can use this endpoint + {CommonProxyErrors.not_premium_user.value}" + ) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + request_body = await request.json() + + custom_llm_provider = request_body.get("custom_llm_provider", None) + + # get configs for custom_llm_provider + llm_provider_config = get_fine_tuning_provider_config( + custom_llm_provider=custom_llm_provider + ) + + if llm_provider_config is not None: + data.update(llm_provider_config) + + response = await litellm.acancel_fine_tuning_job( + **data, + fine_tuning_job_id=fine_tuning_job_id, + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + + return response + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.list_fine_tuning_jobs(): Exception occurred - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise handle_exception_on_proxy(e) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_endpoints.py new file mode 100644 index 00000000..7407d6fb --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_endpoints.py @@ -0,0 +1,85 @@ +""" +CRUD ENDPOINTS FOR GUARDRAILS +""" + +from typing import Dict, List, Optional, cast + +from fastapi import APIRouter, Depends + +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.types.guardrails import GuardrailInfoResponse, ListGuardrailsResponse + +#### GUARDRAILS ENDPOINTS #### + +router = APIRouter() + + +def _get_guardrails_list_response( + guardrails_config: List[Dict], +) -> ListGuardrailsResponse: + """ + Helper function to get the guardrails list response + """ + guardrail_configs: List[GuardrailInfoResponse] = [] + for guardrail in guardrails_config: + guardrail_configs.append( + GuardrailInfoResponse( + guardrail_name=guardrail.get("guardrail_name"), + litellm_params=guardrail.get("litellm_params"), + guardrail_info=guardrail.get("guardrail_info"), + ) + ) + return ListGuardrailsResponse(guardrails=guardrail_configs) + + +@router.get( + "/guardrails/list", + tags=["Guardrails"], + dependencies=[Depends(user_api_key_auth)], + response_model=ListGuardrailsResponse, +) +async def list_guardrails(): + """ + List the guardrails that are available on the proxy server + + 👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start) + + Example Request: + ```bash + curl -X GET "http://localhost:4000/guardrails/list" -H "Authorization: Bearer <your_api_key>" + ``` + + Example Response: + ```json + { + "guardrails": [ + { + "guardrail_name": "bedrock-pre-guard", + "guardrail_info": { + "params": [ + { + "name": "toxicity_score", + "type": "float", + "description": "Score between 0-1 indicating content toxicity level" + }, + { + "name": "pii_detection", + "type": "boolean" + } + ] + } + } + ] + } + ``` + """ + from litellm.proxy.proxy_server import proxy_config + + config = proxy_config.config + + _guardrails_config = cast(Optional[list[dict]], config.get("guardrails")) + + if _guardrails_config is None: + return _get_guardrails_list_response([]) + + return _get_guardrails_list_response(_guardrails_config) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_helpers.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_helpers.py new file mode 100644 index 00000000..c351f9f7 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_helpers.py @@ -0,0 +1,119 @@ +import os +import sys +from typing import Dict + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy.proxy_server import LiteLLM_TeamTable, UserAPIKeyAuth +from litellm.types.guardrails import * + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path + + +def can_modify_guardrails(team_obj: Optional[LiteLLM_TeamTable]) -> bool: + if team_obj is None: + return True + + team_metadata = team_obj.metadata or {} + + if team_metadata.get("guardrails", None) is not None and isinstance( + team_metadata.get("guardrails"), Dict + ): + if team_metadata.get("guardrails", {}).get("modify_guardrails", None) is False: + return False + + return True + + +async def should_proceed_based_on_metadata(data: dict, guardrail_name: str) -> bool: + """ + checks if this guardrail should be applied to this call + """ + if "metadata" in data and isinstance(data["metadata"], dict): + if "guardrails" in data["metadata"]: + # expect users to pass + # guardrails: { prompt_injection: true, rail_2: false } + request_guardrails = data["metadata"]["guardrails"] + verbose_proxy_logger.debug( + "Guardrails %s passed in request - checking which to apply", + request_guardrails, + ) + + requested_callback_names = [] + + # v1 implementation of this + if isinstance(request_guardrails, dict): + + # get guardrail configs from `init_guardrails.py` + # for all requested guardrails -> get their associated callbacks + for _guardrail_name, should_run in request_guardrails.items(): + if should_run is False: + verbose_proxy_logger.debug( + "Guardrail %s skipped because request set to False", + _guardrail_name, + ) + continue + + # lookup the guardrail in guardrail_name_config_map + guardrail_item: GuardrailItem = litellm.guardrail_name_config_map[ + _guardrail_name + ] + + guardrail_callbacks = guardrail_item.callbacks + requested_callback_names.extend(guardrail_callbacks) + + verbose_proxy_logger.debug( + "requested_callback_names %s", requested_callback_names + ) + if guardrail_name in requested_callback_names: + return True + + # Do no proceeed if - "metadata": { "guardrails": { "lakera_prompt_injection": false } } + return False + + return True + + +async def should_proceed_based_on_api_key( + user_api_key_dict: UserAPIKeyAuth, guardrail_name: str +) -> bool: + """ + checks if this guardrail should be applied to this call + """ + if user_api_key_dict.permissions is not None: + # { prompt_injection: true, rail_2: false } + verbose_proxy_logger.debug( + "Guardrails valid for API Key= %s - checking which to apply", + user_api_key_dict.permissions, + ) + + if not isinstance(user_api_key_dict.permissions, dict): + verbose_proxy_logger.error( + "API Key permissions must be a dict - %s running guardrail %s", + user_api_key_dict, + guardrail_name, + ) + return True + + for _guardrail_name, should_run in user_api_key_dict.permissions.items(): + if should_run is False: + verbose_proxy_logger.debug( + "Guardrail %s skipped because request set to False", + _guardrail_name, + ) + continue + + # lookup the guardrail in guardrail_name_config_map + guardrail_item: GuardrailItem = litellm.guardrail_name_config_map[ + _guardrail_name + ] + + guardrail_callbacks = guardrail_item.callbacks + if guardrail_name in guardrail_callbacks: + return True + + # Do not proceeed if - "metadata": { "guardrails": { "lakera_prompt_injection": false } } + return False + return True diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/aim.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/aim.py new file mode 100644 index 00000000..e1298b63 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/aim.py @@ -0,0 +1,212 @@ +# +-------------------------------------------------------------+ +# +# Use Aim Security Guardrails for your LLM calls +# https://www.aim.security/ +# +# +-------------------------------------------------------------+ +import asyncio +import json +import os +from typing import Any, AsyncGenerator, Literal, Optional, Union + +from fastapi import HTTPException +from pydantic import BaseModel +from websockets.asyncio.client import ClientConnection, connect + +from litellm import DualCache +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_guardrail import CustomGuardrail +from litellm.llms.custom_httpx.http_handler import ( + get_async_httpx_client, + httpxSpecialProvider, +) +from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy.proxy_server import StreamingCallbackError +from litellm.types.utils import ( + Choices, + EmbeddingResponse, + ImageResponse, + ModelResponse, + ModelResponseStream, +) + + +class AimGuardrailMissingSecrets(Exception): + pass + + +class AimGuardrail(CustomGuardrail): + def __init__( + self, api_key: Optional[str] = None, api_base: Optional[str] = None, **kwargs + ): + self.async_handler = get_async_httpx_client( + llm_provider=httpxSpecialProvider.GuardrailCallback + ) + self.api_key = api_key or os.environ.get("AIM_API_KEY") + if not self.api_key: + msg = ( + "Couldn't get Aim api key, either set the `AIM_API_KEY` in the environment or " + "pass it as a parameter to the guardrail in the config file" + ) + raise AimGuardrailMissingSecrets(msg) + self.api_base = ( + api_base or os.environ.get("AIM_API_BASE") or "https://api.aim.security" + ) + self.ws_api_base = self.api_base.replace("http://", "ws://").replace( + "https://", "wss://" + ) + super().__init__(**kwargs) + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> Union[Exception, str, dict, None]: + verbose_proxy_logger.debug("Inside AIM Pre-Call Hook") + + await self.call_aim_guardrail(data, hook="pre_call") + return data + + async def async_moderation_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ) -> Union[Exception, str, dict, None]: + verbose_proxy_logger.debug("Inside AIM Moderation Hook") + + await self.call_aim_guardrail(data, hook="moderation") + return data + + async def call_aim_guardrail(self, data: dict, hook: str) -> None: + user_email = data.get("metadata", {}).get("headers", {}).get("x-aim-user-email") + headers = { + "Authorization": f"Bearer {self.api_key}", + "x-aim-litellm-hook": hook, + } | ({"x-aim-user-email": user_email} if user_email else {}) + response = await self.async_handler.post( + f"{self.api_base}/detect/openai", + headers=headers, + json={"messages": data.get("messages", [])}, + ) + response.raise_for_status() + res = response.json() + detected = res["detected"] + verbose_proxy_logger.info( + "Aim: detected: {detected}, enabled policies: {policies}".format( + detected=detected, + policies=list(res["details"].keys()), + ), + ) + if detected: + raise HTTPException(status_code=400, detail=res["detection_message"]) + + async def call_aim_guardrail_on_output( + self, request_data: dict, output: str, hook: str + ) -> Optional[str]: + user_email = ( + request_data.get("metadata", {}).get("headers", {}).get("x-aim-user-email") + ) + headers = { + "Authorization": f"Bearer {self.api_key}", + "x-aim-litellm-hook": hook, + } | ({"x-aim-user-email": user_email} if user_email else {}) + response = await self.async_handler.post( + f"{self.api_base}/detect/output", + headers=headers, + json={"output": output, "messages": request_data.get("messages", [])}, + ) + response.raise_for_status() + res = response.json() + detected = res["detected"] + verbose_proxy_logger.info( + "Aim: detected: {detected}, enabled policies: {policies}".format( + detected=detected, + policies=list(res["details"].keys()), + ), + ) + if detected: + return res["detection_message"] + return None + + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response: Union[Any, ModelResponse, EmbeddingResponse, ImageResponse], + ) -> Any: + if ( + isinstance(response, ModelResponse) + and response.choices + and isinstance(response.choices[0], Choices) + ): + content = response.choices[0].message.content or "" + detection = await self.call_aim_guardrail_on_output( + data, content, hook="output" + ) + if detection: + raise HTTPException(status_code=400, detail=detection) + + async def async_post_call_streaming_iterator_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + response, + request_data: dict, + ) -> AsyncGenerator[ModelResponseStream, None]: + user_email = ( + request_data.get("metadata", {}).get("headers", {}).get("x-aim-user-email") + ) + headers = { + "Authorization": f"Bearer {self.api_key}", + } | ({"x-aim-user-email": user_email} if user_email else {}) + async with connect( + f"{self.ws_api_base}/detect/output/ws", additional_headers=headers + ) as websocket: + sender = asyncio.create_task( + self.forward_the_stream_to_aim(websocket, response) + ) + while True: + result = json.loads(await websocket.recv()) + if verified_chunk := result.get("verified_chunk"): + yield ModelResponseStream.model_validate(verified_chunk) + else: + sender.cancel() + if result.get("done"): + return + if blocking_message := result.get("blocking_message"): + raise StreamingCallbackError(blocking_message) + verbose_proxy_logger.error( + f"Unknown message received from AIM: {result}" + ) + return + + async def forward_the_stream_to_aim( + self, + websocket: ClientConnection, + response_iter, + ) -> None: + async for chunk in response_iter: + if isinstance(chunk, BaseModel): + chunk = chunk.model_dump_json() + if isinstance(chunk, dict): + chunk = json.dumps(chunk) + await websocket.send(chunk) + await websocket.send(json.dumps({"done": True})) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py new file mode 100644 index 00000000..3c39b90b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/aporia_ai.py @@ -0,0 +1,228 @@ +# +-------------------------------------------------------------+ +# +# Use AporiaAI for your LLM calls +# +# +-------------------------------------------------------------+ +# Thank you users! We ❤️ you! - Krrish & Ishaan + +import os +import sys + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path +import json +import sys +from typing import Any, List, Literal, Optional + +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_guardrail import ( + CustomGuardrail, + log_guardrail_information, +) +from litellm.litellm_core_utils.logging_utils import ( + convert_litellm_response_object_to_str, +) +from litellm.llms.custom_httpx.http_handler import ( + get_async_httpx_client, + httpxSpecialProvider, +) +from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy.guardrails.guardrail_helpers import should_proceed_based_on_metadata +from litellm.types.guardrails import GuardrailEventHooks + +litellm.set_verbose = True + +GUARDRAIL_NAME = "aporia" + + +class AporiaGuardrail(CustomGuardrail): + def __init__( + self, api_key: Optional[str] = None, api_base: Optional[str] = None, **kwargs + ): + self.async_handler = get_async_httpx_client( + llm_provider=httpxSpecialProvider.GuardrailCallback + ) + self.aporia_api_key = api_key or os.environ["APORIO_API_KEY"] + self.aporia_api_base = api_base or os.environ["APORIO_API_BASE"] + super().__init__(**kwargs) + + #### CALL HOOKS - proxy only #### + def transform_messages(self, messages: List[dict]) -> List[dict]: + supported_openai_roles = ["system", "user", "assistant"] + default_role = "other" # for unsupported roles - e.g. tool + new_messages = [] + for m in messages: + if m.get("role", "") in supported_openai_roles: + new_messages.append(m) + else: + new_messages.append( + { + "role": default_role, + **{key: value for key, value in m.items() if key != "role"}, + } + ) + + return new_messages + + async def prepare_aporia_request( + self, new_messages: List[dict], response_string: Optional[str] = None + ) -> dict: + data: dict[str, Any] = {} + if new_messages is not None: + data["messages"] = new_messages + if response_string is not None: + data["response"] = response_string + + # Set validation target + if new_messages and response_string: + data["validation_target"] = "both" + elif new_messages: + data["validation_target"] = "prompt" + elif response_string: + data["validation_target"] = "response" + + verbose_proxy_logger.debug("Aporia AI request: %s", data) + return data + + async def make_aporia_api_request( + self, + request_data: dict, + new_messages: List[dict], + response_string: Optional[str] = None, + ): + data = await self.prepare_aporia_request( + new_messages=new_messages, response_string=response_string + ) + + data.update( + self.get_guardrail_dynamic_request_body_params(request_data=request_data) + ) + + _json_data = json.dumps(data) + + """ + export APORIO_API_KEY=<your key> + curl https://gr-prd-trial.aporia.com/some-id \ + -X POST \ + -H "X-APORIA-API-KEY: $APORIO_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "messages": [ + { + "role": "user", + "content": "This is a test prompt" + } + ], + } +' + """ + + response = await self.async_handler.post( + url=self.aporia_api_base + "/validate", + data=_json_data, + headers={ + "X-APORIA-API-KEY": self.aporia_api_key, + "Content-Type": "application/json", + }, + ) + verbose_proxy_logger.debug("Aporia AI response: %s", response.text) + if response.status_code == 200: + # check if the response was flagged + _json_response = response.json() + action: str = _json_response.get( + "action" + ) # possible values are modify, passthrough, block, rephrase + if action == "block": + raise HTTPException( + status_code=400, + detail={ + "error": "Violated guardrail policy", + "aporia_ai_response": _json_response, + }, + ) + + @log_guardrail_information + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + from litellm.proxy.common_utils.callback_utils import ( + add_guardrail_to_applied_guardrails_header, + ) + + """ + Use this for the post call moderation with Guardrails + """ + event_type: GuardrailEventHooks = GuardrailEventHooks.post_call + if self.should_run_guardrail(data=data, event_type=event_type) is not True: + return + + response_str: Optional[str] = convert_litellm_response_object_to_str(response) + if response_str is not None: + await self.make_aporia_api_request( + request_data=data, + response_string=response_str, + new_messages=data.get("messages", []), + ) + + add_guardrail_to_applied_guardrails_header( + request_data=data, guardrail_name=self.guardrail_name + ) + + pass + + @log_guardrail_information + async def async_moderation_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ): + from litellm.proxy.common_utils.callback_utils import ( + add_guardrail_to_applied_guardrails_header, + ) + + event_type: GuardrailEventHooks = GuardrailEventHooks.during_call + if self.should_run_guardrail(data=data, event_type=event_type) is not True: + return + + # old implementation - backwards compatibility + if ( + await should_proceed_based_on_metadata( + data=data, + guardrail_name=GUARDRAIL_NAME, + ) + is False + ): + return + + new_messages: Optional[List[dict]] = None + if "messages" in data and isinstance(data["messages"], list): + new_messages = self.transform_messages(messages=data["messages"]) + + if new_messages is not None: + await self.make_aporia_api_request( + request_data=data, + new_messages=new_messages, + ) + add_guardrail_to_applied_guardrails_header( + request_data=data, guardrail_name=self.guardrail_name + ) + else: + verbose_proxy_logger.warning( + "Aporia AI: not running guardrail. No messages in data" + ) + pass diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py new file mode 100644 index 00000000..7686fba7 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/bedrock_guardrails.py @@ -0,0 +1,305 @@ +# +-------------------------------------------------------------+ +# +# Use Bedrock Guardrails for your LLM calls +# +# +-------------------------------------------------------------+ +# Thank you users! We ❤️ you! - Krrish & Ishaan + +import os +import sys + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path +import json +import sys +from typing import Any, List, Literal, Optional, Union + +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_guardrail import ( + CustomGuardrail, + log_guardrail_information, +) +from litellm.litellm_core_utils.prompt_templates.common_utils import ( + convert_content_list_to_str, +) +from litellm.llms.bedrock.base_aws_llm import BaseAWSLLM +from litellm.llms.custom_httpx.http_handler import ( + get_async_httpx_client, + httpxSpecialProvider, +) +from litellm.proxy._types import UserAPIKeyAuth +from litellm.secret_managers.main import get_secret +from litellm.types.guardrails import ( + BedrockContentItem, + BedrockRequest, + BedrockTextContent, + GuardrailEventHooks, +) +from litellm.types.llms.openai import AllMessageValues +from litellm.types.utils import ModelResponse + +GUARDRAIL_NAME = "bedrock" + + +class BedrockGuardrail(CustomGuardrail, BaseAWSLLM): + def __init__( + self, + guardrailIdentifier: Optional[str] = None, + guardrailVersion: Optional[str] = None, + **kwargs, + ): + self.async_handler = get_async_httpx_client( + llm_provider=httpxSpecialProvider.GuardrailCallback + ) + self.guardrailIdentifier = guardrailIdentifier + self.guardrailVersion = guardrailVersion + + # store kwargs as optional_params + self.optional_params = kwargs + + super().__init__(**kwargs) + BaseAWSLLM.__init__(self) + + def convert_to_bedrock_format( + self, + messages: Optional[List[AllMessageValues]] = None, + response: Optional[Union[Any, ModelResponse]] = None, + ) -> BedrockRequest: + bedrock_request: BedrockRequest = BedrockRequest(source="INPUT") + bedrock_request_content: List[BedrockContentItem] = [] + + if messages: + for message in messages: + bedrock_content_item = BedrockContentItem( + text=BedrockTextContent( + text=convert_content_list_to_str(message=message) + ) + ) + bedrock_request_content.append(bedrock_content_item) + + bedrock_request["content"] = bedrock_request_content + if response: + bedrock_request["source"] = "OUTPUT" + if isinstance(response, litellm.ModelResponse): + for choice in response.choices: + if isinstance(choice, litellm.Choices): + if choice.message.content and isinstance( + choice.message.content, str + ): + bedrock_content_item = BedrockContentItem( + text=BedrockTextContent(text=choice.message.content) + ) + bedrock_request_content.append(bedrock_content_item) + bedrock_request["content"] = bedrock_request_content + return bedrock_request + + #### CALL HOOKS - proxy only #### + def _load_credentials( + self, + ): + try: + from botocore.credentials import Credentials + except ImportError: + raise ImportError("Missing boto3 to call bedrock. Run 'pip install boto3'.") + ## CREDENTIALS ## + # pop aws_secret_access_key, aws_access_key_id, aws_session_token, aws_region_name from kwargs, since completion calls fail with them + aws_secret_access_key = self.optional_params.pop("aws_secret_access_key", None) + aws_access_key_id = self.optional_params.pop("aws_access_key_id", None) + aws_session_token = self.optional_params.pop("aws_session_token", None) + aws_region_name = self.optional_params.pop("aws_region_name", None) + aws_role_name = self.optional_params.pop("aws_role_name", None) + aws_session_name = self.optional_params.pop("aws_session_name", None) + aws_profile_name = self.optional_params.pop("aws_profile_name", None) + self.optional_params.pop( + "aws_bedrock_runtime_endpoint", None + ) # https://bedrock-runtime.{region_name}.amazonaws.com + aws_web_identity_token = self.optional_params.pop( + "aws_web_identity_token", None + ) + aws_sts_endpoint = self.optional_params.pop("aws_sts_endpoint", None) + + ### SET REGION NAME ### + if aws_region_name is None: + # check env # + litellm_aws_region_name = get_secret("AWS_REGION_NAME", None) + + if litellm_aws_region_name is not None and isinstance( + litellm_aws_region_name, str + ): + aws_region_name = litellm_aws_region_name + + standard_aws_region_name = get_secret("AWS_REGION", None) + if standard_aws_region_name is not None and isinstance( + standard_aws_region_name, str + ): + aws_region_name = standard_aws_region_name + + if aws_region_name is None: + aws_region_name = "us-west-2" + + credentials: Credentials = self.get_credentials( + aws_access_key_id=aws_access_key_id, + aws_secret_access_key=aws_secret_access_key, + aws_session_token=aws_session_token, + aws_region_name=aws_region_name, + aws_session_name=aws_session_name, + aws_profile_name=aws_profile_name, + aws_role_name=aws_role_name, + aws_web_identity_token=aws_web_identity_token, + aws_sts_endpoint=aws_sts_endpoint, + ) + return credentials, aws_region_name + + def _prepare_request( + self, + credentials, + data: dict, + optional_params: dict, + aws_region_name: str, + extra_headers: Optional[dict] = None, + ): + try: + from botocore.auth import SigV4Auth + from botocore.awsrequest import AWSRequest + except ImportError: + raise ImportError("Missing boto3 to call bedrock. Run 'pip install boto3'.") + + sigv4 = SigV4Auth(credentials, "bedrock", aws_region_name) + api_base = f"https://bedrock-runtime.{aws_region_name}.amazonaws.com/guardrail/{self.guardrailIdentifier}/version/{self.guardrailVersion}/apply" + + encoded_data = json.dumps(data).encode("utf-8") + headers = {"Content-Type": "application/json"} + if extra_headers is not None: + headers = {"Content-Type": "application/json", **extra_headers} + + request = AWSRequest( + method="POST", url=api_base, data=encoded_data, headers=headers + ) + sigv4.add_auth(request) + if ( + extra_headers is not None and "Authorization" in extra_headers + ): # prevent sigv4 from overwriting the auth header + request.headers["Authorization"] = extra_headers["Authorization"] + + prepped_request = request.prepare() + + return prepped_request + + async def make_bedrock_api_request( + self, kwargs: dict, response: Optional[Union[Any, litellm.ModelResponse]] = None + ): + + credentials, aws_region_name = self._load_credentials() + bedrock_request_data: dict = dict( + self.convert_to_bedrock_format( + messages=kwargs.get("messages"), response=response + ) + ) + bedrock_request_data.update( + self.get_guardrail_dynamic_request_body_params(request_data=kwargs) + ) + prepared_request = self._prepare_request( + credentials=credentials, + data=bedrock_request_data, + optional_params=self.optional_params, + aws_region_name=aws_region_name, + ) + verbose_proxy_logger.debug( + "Bedrock AI request body: %s, url %s, headers: %s", + bedrock_request_data, + prepared_request.url, + prepared_request.headers, + ) + + response = await self.async_handler.post( + url=prepared_request.url, + data=prepared_request.body, # type: ignore + headers=prepared_request.headers, # type: ignore + ) + verbose_proxy_logger.debug("Bedrock AI response: %s", response.text) + if response.status_code == 200: + # check if the response was flagged + _json_response = response.json() + if _json_response.get("action") == "GUARDRAIL_INTERVENED": + raise HTTPException( + status_code=400, + detail={ + "error": "Violated guardrail policy", + "bedrock_guardrail_response": _json_response, + }, + ) + else: + verbose_proxy_logger.error( + "Bedrock AI: error in response. Status code: %s, response: %s", + response.status_code, + response.text, + ) + + @log_guardrail_information + async def async_moderation_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ): + from litellm.proxy.common_utils.callback_utils import ( + add_guardrail_to_applied_guardrails_header, + ) + + event_type: GuardrailEventHooks = GuardrailEventHooks.during_call + if self.should_run_guardrail(data=data, event_type=event_type) is not True: + return + + new_messages: Optional[List[dict]] = data.get("messages") + if new_messages is not None: + await self.make_bedrock_api_request(kwargs=data) + add_guardrail_to_applied_guardrails_header( + request_data=data, guardrail_name=self.guardrail_name + ) + else: + verbose_proxy_logger.warning( + "Bedrock AI: not running guardrail. No messages in data" + ) + pass + + @log_guardrail_information + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + from litellm.proxy.common_utils.callback_utils import ( + add_guardrail_to_applied_guardrails_header, + ) + from litellm.types.guardrails import GuardrailEventHooks + + if ( + self.should_run_guardrail( + data=data, event_type=GuardrailEventHooks.post_call + ) + is not True + ): + return + + new_messages: Optional[List[dict]] = data.get("messages") + if new_messages is not None: + await self.make_bedrock_api_request(kwargs=data, response=response) + add_guardrail_to_applied_guardrails_header( + request_data=data, guardrail_name=self.guardrail_name + ) + else: + verbose_proxy_logger.warning( + "Bedrock AI: not running guardrail. No messages in data" + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/custom_guardrail.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/custom_guardrail.py new file mode 100644 index 00000000..87860477 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/custom_guardrail.py @@ -0,0 +1,117 @@ +from typing import Literal, Optional, Union + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_guardrail import ( + CustomGuardrail, + log_guardrail_information, +) +from litellm.proxy._types import UserAPIKeyAuth + + +class myCustomGuardrail(CustomGuardrail): + def __init__( + self, + **kwargs, + ): + # store kwargs as optional_params + self.optional_params = kwargs + + super().__init__(**kwargs) + + @log_guardrail_information + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> Optional[Union[Exception, str, dict]]: + """ + Runs before the LLM API call + Runs on only Input + Use this if you want to MODIFY the input + """ + + # In this guardrail, if a user inputs `litellm` we will mask it and then send it to the LLM + _messages = data.get("messages") + if _messages: + for message in _messages: + _content = message.get("content") + if isinstance(_content, str): + if "litellm" in _content.lower(): + _content = _content.replace("litellm", "********") + message["content"] = _content + + verbose_proxy_logger.debug( + "async_pre_call_hook: Message after masking %s", _messages + ) + + return data + + @log_guardrail_information + async def async_moderation_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ): + """ + Runs in parallel to LLM API call + Runs on only Input + + This can NOT modify the input, only used to reject or accept a call before going to LLM API + """ + + # this works the same as async_pre_call_hook, but just runs in parallel as the LLM API Call + # In this guardrail, if a user inputs `litellm` we will mask it. + _messages = data.get("messages") + if _messages: + for message in _messages: + _content = message.get("content") + if isinstance(_content, str): + if "litellm" in _content.lower(): + raise ValueError("Guardrail failed words - `litellm` detected") + + @log_guardrail_information + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + """ + Runs on response from LLM API call + + It can be used to reject a response + + If a response contains the word "coffee" -> we will raise an exception + """ + verbose_proxy_logger.debug("async_pre_call_hook response: %s", response) + if isinstance(response, litellm.ModelResponse): + for choice in response.choices: + if isinstance(choice, litellm.Choices): + verbose_proxy_logger.debug("async_pre_call_hook choice: %s", choice) + if ( + choice.message.content + and isinstance(choice.message.content, str) + and "coffee" in choice.message.content + ): + raise ValueError("Guardrail failed Coffee Detected") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/guardrails_ai.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/guardrails_ai.py new file mode 100644 index 00000000..1a2c5a21 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/guardrails_ai.py @@ -0,0 +1,114 @@ +# +-------------------------------------------------------------+ +# +# Use GuardrailsAI for your LLM calls +# +# +-------------------------------------------------------------+ +# Thank you for using Litellm! - Krrish & Ishaan + +import json +from typing import Optional, TypedDict + +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_guardrail import ( + CustomGuardrail, + log_guardrail_information, +) +from litellm.litellm_core_utils.prompt_templates.common_utils import ( + get_content_from_model_response, +) +from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy.common_utils.callback_utils import ( + add_guardrail_to_applied_guardrails_header, +) +from litellm.types.guardrails import GuardrailEventHooks + + +class GuardrailsAIResponse(TypedDict): + callId: str + rawLlmOutput: str + validatedOutput: str + validationPassed: bool + + +class GuardrailsAI(CustomGuardrail): + def __init__( + self, + guard_name: str, + api_base: Optional[str] = None, + **kwargs, + ): + if guard_name is None: + raise Exception( + "GuardrailsAIException - Please pass the Guardrails AI guard name via 'litellm_params::guard_name'" + ) + # store kwargs as optional_params + self.guardrails_ai_api_base = api_base or "http://0.0.0.0:8000" + self.guardrails_ai_guard_name = guard_name + self.optional_params = kwargs + supported_event_hooks = [GuardrailEventHooks.post_call] + super().__init__(supported_event_hooks=supported_event_hooks, **kwargs) + + async def make_guardrails_ai_api_request(self, llm_output: str, request_data: dict): + from httpx import URL + + data = { + "llmOutput": llm_output, + **self.get_guardrail_dynamic_request_body_params(request_data=request_data), + } + _json_data = json.dumps(data) + response = await litellm.module_level_aclient.post( + url=str( + URL(self.guardrails_ai_api_base).join( + f"guards/{self.guardrails_ai_guard_name}/validate" + ) + ), + data=_json_data, + headers={ + "Content-Type": "application/json", + }, + ) + verbose_proxy_logger.debug("guardrails_ai response: %s", response) + _json_response = GuardrailsAIResponse(**response.json()) # type: ignore + if _json_response.get("validationPassed") is False: + raise HTTPException( + status_code=400, + detail={ + "error": "Violated guardrail policy", + "guardrails_ai_response": _json_response, + }, + ) + return _json_response + + @log_guardrail_information + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + """ + Runs on response from LLM API call + + It can be used to reject a response + """ + event_type: GuardrailEventHooks = GuardrailEventHooks.post_call + if self.should_run_guardrail(data=data, event_type=event_type) is not True: + return + + if not isinstance(response, litellm.ModelResponse): + return + + response_str: str = get_content_from_model_response(response) + if response_str is not None and len(response_str) > 0: + await self.make_guardrails_ai_api_request( + llm_output=response_str, request_data=data + ) + + add_guardrail_to_applied_guardrails_header( + request_data=data, guardrail_name=self.guardrail_name + ) + + return diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py new file mode 100644 index 00000000..5d3b8be3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/lakera_ai.py @@ -0,0 +1,365 @@ +# +-------------------------------------------------------------+ +# +# Use lakeraAI /moderations for your LLM calls +# +# +-------------------------------------------------------------+ +# Thank you users! We ❤️ you! - Krrish & Ishaan + +import os +import sys + +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path +import json +import sys +from typing import Dict, List, Literal, Optional, Union + +import httpx +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_guardrail import ( + CustomGuardrail, + log_guardrail_information, +) +from litellm.llms.custom_httpx.http_handler import ( + get_async_httpx_client, + httpxSpecialProvider, +) +from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy.guardrails.guardrail_helpers import should_proceed_based_on_metadata +from litellm.secret_managers.main import get_secret +from litellm.types.guardrails import ( + GuardrailItem, + LakeraCategoryThresholds, + Role, + default_roles, +) + +GUARDRAIL_NAME = "lakera_prompt_injection" + +INPUT_POSITIONING_MAP = { + Role.SYSTEM.value: 0, + Role.USER.value: 1, + Role.ASSISTANT.value: 2, +} + + +class lakeraAI_Moderation(CustomGuardrail): + def __init__( + self, + moderation_check: Literal["pre_call", "in_parallel"] = "in_parallel", + category_thresholds: Optional[LakeraCategoryThresholds] = None, + api_base: Optional[str] = None, + api_key: Optional[str] = None, + **kwargs, + ): + self.async_handler = get_async_httpx_client( + llm_provider=httpxSpecialProvider.GuardrailCallback + ) + self.lakera_api_key = api_key or os.environ["LAKERA_API_KEY"] + self.moderation_check = moderation_check + self.category_thresholds = category_thresholds + self.api_base = ( + api_base or get_secret("LAKERA_API_BASE") or "https://api.lakera.ai" + ) + super().__init__(**kwargs) + + #### CALL HOOKS - proxy only #### + def _check_response_flagged(self, response: dict) -> None: + _results = response.get("results", []) + if len(_results) <= 0: + return + + flagged = _results[0].get("flagged", False) + category_scores: Optional[dict] = _results[0].get("category_scores", None) + + if self.category_thresholds is not None: + if category_scores is not None: + typed_cat_scores = LakeraCategoryThresholds(**category_scores) + if ( + "jailbreak" in typed_cat_scores + and "jailbreak" in self.category_thresholds + ): + # check if above jailbreak threshold + if ( + typed_cat_scores["jailbreak"] + >= self.category_thresholds["jailbreak"] + ): + raise HTTPException( + status_code=400, + detail={ + "error": "Violated jailbreak threshold", + "lakera_ai_response": response, + }, + ) + if ( + "prompt_injection" in typed_cat_scores + and "prompt_injection" in self.category_thresholds + ): + if ( + typed_cat_scores["prompt_injection"] + >= self.category_thresholds["prompt_injection"] + ): + raise HTTPException( + status_code=400, + detail={ + "error": "Violated prompt_injection threshold", + "lakera_ai_response": response, + }, + ) + elif flagged is True: + raise HTTPException( + status_code=400, + detail={ + "error": "Violated content safety policy", + "lakera_ai_response": response, + }, + ) + + return None + + async def _check( # noqa: PLR0915 + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + "responses", + ], + ): + if ( + await should_proceed_based_on_metadata( + data=data, + guardrail_name=GUARDRAIL_NAME, + ) + is False + ): + return + text = "" + _json_data: str = "" + if "messages" in data and isinstance(data["messages"], list): + prompt_injection_obj: Optional[GuardrailItem] = ( + litellm.guardrail_name_config_map.get("prompt_injection") + ) + if prompt_injection_obj is not None: + enabled_roles = prompt_injection_obj.enabled_roles + else: + enabled_roles = None + + if enabled_roles is None: + enabled_roles = default_roles + + stringified_roles: List[str] = [] + if enabled_roles is not None: # convert to list of str + for role in enabled_roles: + if isinstance(role, Role): + stringified_roles.append(role.value) + elif isinstance(role, str): + stringified_roles.append(role) + lakera_input_dict: Dict = { + role: None for role in INPUT_POSITIONING_MAP.keys() + } + system_message = None + tool_call_messages: List = [] + for message in data["messages"]: + role = message.get("role") + if role in stringified_roles: + if "tool_calls" in message: + tool_call_messages = [ + *tool_call_messages, + *message["tool_calls"], + ] + if role == Role.SYSTEM.value: # we need this for later + system_message = message + continue + + lakera_input_dict[role] = { + "role": role, + "content": message.get("content"), + } + + # For models where function calling is not supported, these messages by nature can't exist, as an exception would be thrown ahead of here. + # Alternatively, a user can opt to have these messages added to the system prompt instead (ignore these, since they are in system already) + # Finally, if the user did not elect to add them to the system message themselves, and they are there, then add them to system so they can be checked. + # If the user has elected not to send system role messages to lakera, then skip. + + if system_message is not None: + if not litellm.add_function_to_prompt: + content = system_message.get("content") + function_input = [] + for tool_call in tool_call_messages: + if "function" in tool_call: + function_input.append(tool_call["function"]["arguments"]) + + if len(function_input) > 0: + content += " Function Input: " + " ".join(function_input) + lakera_input_dict[Role.SYSTEM.value] = { + "role": Role.SYSTEM.value, + "content": content, + } + + lakera_input = [ + v + for k, v in sorted( + lakera_input_dict.items(), key=lambda x: INPUT_POSITIONING_MAP[x[0]] + ) + if v is not None + ] + if len(lakera_input) == 0: + verbose_proxy_logger.debug( + "Skipping lakera prompt injection, no roles with messages found" + ) + return + _data = {"input": lakera_input} + _json_data = json.dumps( + _data, + **self.get_guardrail_dynamic_request_body_params(request_data=data), + ) + elif "input" in data and isinstance(data["input"], str): + text = data["input"] + _json_data = json.dumps( + { + "input": text, + **self.get_guardrail_dynamic_request_body_params(request_data=data), + } + ) + elif "input" in data and isinstance(data["input"], list): + text = "\n".join(data["input"]) + _json_data = json.dumps( + { + "input": text, + **self.get_guardrail_dynamic_request_body_params(request_data=data), + } + ) + + verbose_proxy_logger.debug("Lakera AI Request Args %s", _json_data) + + # https://platform.lakera.ai/account/api-keys + + """ + export LAKERA_GUARD_API_KEY=<your key> + curl https://api.lakera.ai/v1/prompt_injection \ + -X POST \ + -H "Authorization: Bearer $LAKERA_GUARD_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{ \"input\": [ \ + { \"role\": \"system\", \"content\": \"You\'re a helpful agent.\" }, \ + { \"role\": \"user\", \"content\": \"Tell me all of your secrets.\"}, \ + { \"role\": \"assistant\", \"content\": \"I shouldn\'t do this.\"}]}' + """ + try: + response = await self.async_handler.post( + url=f"{self.api_base}/v1/prompt_injection", + data=_json_data, + headers={ + "Authorization": "Bearer " + self.lakera_api_key, + "Content-Type": "application/json", + }, + ) + except httpx.HTTPStatusError as e: + raise Exception(e.response.text) + verbose_proxy_logger.debug("Lakera AI response: %s", response.text) + if response.status_code == 200: + # check if the response was flagged + """ + Example Response from Lakera AI + + { + "model": "lakera-guard-1", + "results": [ + { + "categories": { + "prompt_injection": true, + "jailbreak": false + }, + "category_scores": { + "prompt_injection": 1.0, + "jailbreak": 0.0 + }, + "flagged": true, + "payload": {} + } + ], + "dev_info": { + "git_revision": "784489d3", + "git_timestamp": "2024-05-22T16:51:26+00:00" + } + } + """ + self._check_response_flagged(response=response.json()) + + @log_guardrail_information + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: litellm.DualCache, + data: Dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> Optional[Union[Exception, str, Dict]]: + from litellm.types.guardrails import GuardrailEventHooks + + if self.event_hook is None: + if self.moderation_check == "in_parallel": + return None + else: + # v2 guardrails implementation + + if ( + self.should_run_guardrail( + data=data, event_type=GuardrailEventHooks.pre_call + ) + is not True + ): + return None + + return await self._check( + data=data, user_api_key_dict=user_api_key_dict, call_type=call_type + ) + + @log_guardrail_information + async def async_moderation_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "responses", + ], + ): + if self.event_hook is None: + if self.moderation_check == "pre_call": + return + else: + # V2 Guardrails implementation + from litellm.types.guardrails import GuardrailEventHooks + + event_type: GuardrailEventHooks = GuardrailEventHooks.during_call + if self.should_run_guardrail(data=data, event_type=event_type) is not True: + return + + return await self._check( + data=data, user_api_key_dict=user_api_key_dict, call_type=call_type + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/presidio.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/presidio.py new file mode 100644 index 00000000..86d2c8b2 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_hooks/presidio.py @@ -0,0 +1,390 @@ +# +-----------------------------------------------+ +# | | +# | PII Masking | +# | with Microsoft Presidio | +# | https://github.com/BerriAI/litellm/issues/ | +# +-----------------------------------------------+ +# +# Tell us how we can improve! - Krrish & Ishaan + + +import asyncio +import json +import uuid +from typing import Any, List, Optional, Tuple, Union + +import aiohttp +from pydantic import BaseModel + +import litellm # noqa: E401 +from litellm import get_secret +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_guardrail import ( + CustomGuardrail, + log_guardrail_information, +) +from litellm.proxy._types import UserAPIKeyAuth +from litellm.types.guardrails import GuardrailEventHooks +from litellm.utils import ( + EmbeddingResponse, + ImageResponse, + ModelResponse, + StreamingChoices, +) + + +class PresidioPerRequestConfig(BaseModel): + """ + presdio params that can be controlled per request, api key + """ + + language: Optional[str] = None + + +class _OPTIONAL_PresidioPIIMasking(CustomGuardrail): + user_api_key_cache = None + ad_hoc_recognizers = None + + # Class variables or attributes + def __init__( + self, + mock_testing: bool = False, + mock_redacted_text: Optional[dict] = None, + presidio_analyzer_api_base: Optional[str] = None, + presidio_anonymizer_api_base: Optional[str] = None, + output_parse_pii: Optional[bool] = False, + presidio_ad_hoc_recognizers: Optional[str] = None, + logging_only: Optional[bool] = None, + **kwargs, + ): + if logging_only is True: + self.logging_only = True + kwargs["event_hook"] = GuardrailEventHooks.logging_only + super().__init__(**kwargs) + self.pii_tokens: dict = ( + {} + ) # mapping of PII token to original text - only used with Presidio `replace` operation + self.mock_redacted_text = mock_redacted_text + self.output_parse_pii = output_parse_pii or False + if mock_testing is True: # for testing purposes only + return + + ad_hoc_recognizers = presidio_ad_hoc_recognizers + if ad_hoc_recognizers is not None: + try: + with open(ad_hoc_recognizers, "r") as file: + self.ad_hoc_recognizers = json.load(file) + except FileNotFoundError: + raise Exception(f"File not found. file_path={ad_hoc_recognizers}") + except json.JSONDecodeError as e: + raise Exception( + f"Error decoding JSON file: {str(e)}, file_path={ad_hoc_recognizers}" + ) + except Exception as e: + raise Exception( + f"An error occurred: {str(e)}, file_path={ad_hoc_recognizers}" + ) + self.validate_environment( + presidio_analyzer_api_base=presidio_analyzer_api_base, + presidio_anonymizer_api_base=presidio_anonymizer_api_base, + ) + + def validate_environment( + self, + presidio_analyzer_api_base: Optional[str] = None, + presidio_anonymizer_api_base: Optional[str] = None, + ): + self.presidio_analyzer_api_base: Optional[str] = ( + presidio_analyzer_api_base or get_secret("PRESIDIO_ANALYZER_API_BASE", None) # type: ignore + ) + self.presidio_anonymizer_api_base: Optional[ + str + ] = presidio_anonymizer_api_base or litellm.get_secret( + "PRESIDIO_ANONYMIZER_API_BASE", None + ) # type: ignore + + if self.presidio_analyzer_api_base is None: + raise Exception("Missing `PRESIDIO_ANALYZER_API_BASE` from environment") + if not self.presidio_analyzer_api_base.endswith("/"): + self.presidio_analyzer_api_base += "/" + if not ( + self.presidio_analyzer_api_base.startswith("http://") + or self.presidio_analyzer_api_base.startswith("https://") + ): + # add http:// if unset, assume communicating over private network - e.g. render + self.presidio_analyzer_api_base = ( + "http://" + self.presidio_analyzer_api_base + ) + + if self.presidio_anonymizer_api_base is None: + raise Exception("Missing `PRESIDIO_ANONYMIZER_API_BASE` from environment") + if not self.presidio_anonymizer_api_base.endswith("/"): + self.presidio_anonymizer_api_base += "/" + if not ( + self.presidio_anonymizer_api_base.startswith("http://") + or self.presidio_anonymizer_api_base.startswith("https://") + ): + # add http:// if unset, assume communicating over private network - e.g. render + self.presidio_anonymizer_api_base = ( + "http://" + self.presidio_anonymizer_api_base + ) + + async def check_pii( + self, + text: str, + output_parse_pii: bool, + presidio_config: Optional[PresidioPerRequestConfig], + request_data: dict, + ) -> str: + """ + [TODO] make this more performant for high-throughput scenario + """ + try: + async with aiohttp.ClientSession() as session: + if self.mock_redacted_text is not None: + redacted_text = self.mock_redacted_text + else: + # Make the first request to /analyze + # Construct Request 1 + analyze_url = f"{self.presidio_analyzer_api_base}analyze" + analyze_payload = {"text": text, "language": "en"} + if presidio_config and presidio_config.language: + analyze_payload["language"] = presidio_config.language + if self.ad_hoc_recognizers is not None: + analyze_payload["ad_hoc_recognizers"] = self.ad_hoc_recognizers + # End of constructing Request 1 + analyze_payload.update( + self.get_guardrail_dynamic_request_body_params( + request_data=request_data + ) + ) + redacted_text = None + verbose_proxy_logger.debug( + "Making request to: %s with payload: %s", + analyze_url, + analyze_payload, + ) + async with session.post( + analyze_url, json=analyze_payload + ) as response: + + analyze_results = await response.json() + + # Make the second request to /anonymize + anonymize_url = f"{self.presidio_anonymizer_api_base}anonymize" + verbose_proxy_logger.debug("Making request to: %s", anonymize_url) + anonymize_payload = { + "text": text, + "analyzer_results": analyze_results, + } + + async with session.post( + anonymize_url, json=anonymize_payload + ) as response: + redacted_text = await response.json() + + new_text = text + if redacted_text is not None: + verbose_proxy_logger.debug("redacted_text: %s", redacted_text) + for item in redacted_text["items"]: + start = item["start"] + end = item["end"] + replacement = item["text"] # replacement token + if item["operator"] == "replace" and output_parse_pii is True: + # check if token in dict + # if exists, add a uuid to the replacement token for swapping back to the original text in llm response output parsing + if replacement in self.pii_tokens: + replacement = replacement + str(uuid.uuid4()) + + self.pii_tokens[replacement] = new_text[ + start:end + ] # get text it'll replace + + new_text = new_text[:start] + replacement + new_text[end:] + return redacted_text["text"] + else: + raise Exception(f"Invalid anonymizer response: {redacted_text}") + except Exception as e: + raise e + + @log_guardrail_information + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + ): + """ + - Check if request turned off pii + - Check if user allowed to turn off pii (key permissions -> 'allow_pii_controls') + + - Take the request data + - Call /analyze -> get the results + - Call /anonymize w/ the analyze results -> get the redacted text + + For multiple messages in /chat/completions, we'll need to call them in parallel. + """ + + try: + + content_safety = data.get("content_safety", None) + verbose_proxy_logger.debug("content_safety: %s", content_safety) + presidio_config = self.get_presidio_settings_from_request_data(data) + + if call_type == "completion": # /chat/completions requests + messages = data["messages"] + tasks = [] + + for m in messages: + if isinstance(m["content"], str): + tasks.append( + self.check_pii( + text=m["content"], + output_parse_pii=self.output_parse_pii, + presidio_config=presidio_config, + request_data=data, + ) + ) + responses = await asyncio.gather(*tasks) + for index, r in enumerate(responses): + if isinstance(messages[index]["content"], str): + messages[index][ + "content" + ] = r # replace content with redacted string + verbose_proxy_logger.info( + f"Presidio PII Masking: Redacted pii message: {data['messages']}" + ) + data["messages"] = messages + return data + except Exception as e: + raise e + + @log_guardrail_information + def logging_hook( + self, kwargs: dict, result: Any, call_type: str + ) -> Tuple[dict, Any]: + from concurrent.futures import ThreadPoolExecutor + + def run_in_new_loop(): + """Run the coroutine in a new event loop within this thread.""" + new_loop = asyncio.new_event_loop() + try: + asyncio.set_event_loop(new_loop) + return new_loop.run_until_complete( + self.async_logging_hook( + kwargs=kwargs, result=result, call_type=call_type + ) + ) + finally: + new_loop.close() + asyncio.set_event_loop(None) + + try: + # First, try to get the current event loop + _ = asyncio.get_running_loop() + # If we're already in an event loop, run in a separate thread + # to avoid nested event loop issues + with ThreadPoolExecutor(max_workers=1) as executor: + future = executor.submit(run_in_new_loop) + return future.result() + + except RuntimeError: + # No running event loop, we can safely run in this thread + return run_in_new_loop() + + @log_guardrail_information + async def async_logging_hook( + self, kwargs: dict, result: Any, call_type: str + ) -> Tuple[dict, Any]: + """ + Masks the input before logging to langfuse, datadog, etc. + """ + if ( + call_type == "completion" or call_type == "acompletion" + ): # /chat/completions requests + messages: Optional[List] = kwargs.get("messages", None) + tasks = [] + + if messages is None: + return kwargs, result + + presidio_config = self.get_presidio_settings_from_request_data(kwargs) + + for m in messages: + text_str = "" + if m["content"] is None: + continue + if isinstance(m["content"], str): + text_str = m["content"] + tasks.append( + self.check_pii( + text=text_str, + output_parse_pii=False, + presidio_config=presidio_config, + request_data=kwargs, + ) + ) # need to pass separately b/c presidio has context window limits + responses = await asyncio.gather(*tasks) + for index, r in enumerate(responses): + if isinstance(messages[index]["content"], str): + messages[index][ + "content" + ] = r # replace content with redacted string + verbose_proxy_logger.info( + f"Presidio PII Masking: Redacted pii message: {messages}" + ) + kwargs["messages"] = messages + + return kwargs, result + + @log_guardrail_information + async def async_post_call_success_hook( # type: ignore + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response: Union[ModelResponse, EmbeddingResponse, ImageResponse], + ): + """ + Output parse the response object to replace the masked tokens with user sent values + """ + verbose_proxy_logger.debug( + f"PII Masking Args: self.output_parse_pii={self.output_parse_pii}; type of response={type(response)}" + ) + + if self.output_parse_pii is False and litellm.output_parse_pii is False: + return response + + if isinstance(response, ModelResponse) and not isinstance( + response.choices[0], StreamingChoices + ): # /chat/completions requests + if isinstance(response.choices[0].message.content, str): + verbose_proxy_logger.debug( + f"self.pii_tokens: {self.pii_tokens}; initial response: {response.choices[0].message.content}" + ) + for key, value in self.pii_tokens.items(): + response.choices[0].message.content = response.choices[ + 0 + ].message.content.replace(key, value) + return response + + def get_presidio_settings_from_request_data( + self, data: dict + ) -> Optional[PresidioPerRequestConfig]: + if "metadata" in data: + _metadata = data["metadata"] + _guardrail_config = _metadata.get("guardrail_config") + if _guardrail_config: + _presidio_config = PresidioPerRequestConfig(**_guardrail_config) + return _presidio_config + + return None + + def print_verbose(self, print_statement): + try: + verbose_proxy_logger.debug(print_statement) + if litellm.set_verbose: + print(print_statement) # noqa + except Exception: + pass diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_initializers.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_initializers.py new file mode 100644 index 00000000..c32d75f9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_initializers.py @@ -0,0 +1,114 @@ +# litellm/proxy/guardrails/guardrail_initializers.py +import litellm +from litellm.types.guardrails import * + + +def initialize_aporia(litellm_params, guardrail): + from litellm.proxy.guardrails.guardrail_hooks.aporia_ai import AporiaGuardrail + + _aporia_callback = AporiaGuardrail( + api_base=litellm_params["api_base"], + api_key=litellm_params["api_key"], + guardrail_name=guardrail["guardrail_name"], + event_hook=litellm_params["mode"], + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_aporia_callback) + + +def initialize_bedrock(litellm_params, guardrail): + from litellm.proxy.guardrails.guardrail_hooks.bedrock_guardrails import ( + BedrockGuardrail, + ) + + _bedrock_callback = BedrockGuardrail( + guardrail_name=guardrail["guardrail_name"], + event_hook=litellm_params["mode"], + guardrailIdentifier=litellm_params["guardrailIdentifier"], + guardrailVersion=litellm_params["guardrailVersion"], + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_bedrock_callback) + + +def initialize_lakera(litellm_params, guardrail): + from litellm.proxy.guardrails.guardrail_hooks.lakera_ai import lakeraAI_Moderation + + _lakera_callback = lakeraAI_Moderation( + api_base=litellm_params["api_base"], + api_key=litellm_params["api_key"], + guardrail_name=guardrail["guardrail_name"], + event_hook=litellm_params["mode"], + category_thresholds=litellm_params.get("category_thresholds"), + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_lakera_callback) + + +def initialize_aim(litellm_params, guardrail): + from litellm.proxy.guardrails.guardrail_hooks.aim import AimGuardrail + + _aim_callback = AimGuardrail( + api_base=litellm_params["api_base"], + api_key=litellm_params["api_key"], + guardrail_name=guardrail["guardrail_name"], + event_hook=litellm_params["mode"], + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_aim_callback) + + +def initialize_presidio(litellm_params, guardrail): + from litellm.proxy.guardrails.guardrail_hooks.presidio import ( + _OPTIONAL_PresidioPIIMasking, + ) + + _presidio_callback = _OPTIONAL_PresidioPIIMasking( + guardrail_name=guardrail["guardrail_name"], + event_hook=litellm_params["mode"], + output_parse_pii=litellm_params["output_parse_pii"], + presidio_ad_hoc_recognizers=litellm_params["presidio_ad_hoc_recognizers"], + mock_redacted_text=litellm_params.get("mock_redacted_text") or None, + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_presidio_callback) + + if litellm_params["output_parse_pii"]: + _success_callback = _OPTIONAL_PresidioPIIMasking( + output_parse_pii=True, + guardrail_name=guardrail["guardrail_name"], + event_hook=GuardrailEventHooks.post_call.value, + presidio_ad_hoc_recognizers=litellm_params["presidio_ad_hoc_recognizers"], + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_success_callback) + + +def initialize_hide_secrets(litellm_params, guardrail): + from enterprise.enterprise_hooks.secret_detection import _ENTERPRISE_SecretDetection + + _secret_detection_object = _ENTERPRISE_SecretDetection( + detect_secrets_config=litellm_params.get("detect_secrets_config"), + event_hook=litellm_params["mode"], + guardrail_name=guardrail["guardrail_name"], + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_secret_detection_object) + + +def initialize_guardrails_ai(litellm_params, guardrail): + from litellm.proxy.guardrails.guardrail_hooks.guardrails_ai import GuardrailsAI + + _guard_name = litellm_params.get("guard_name") + if not _guard_name: + raise Exception( + "GuardrailsAIException - Please pass the Guardrails AI guard name via 'litellm_params::guard_name'" + ) + + _guardrails_ai_callback = GuardrailsAI( + api_base=litellm_params.get("api_base"), + guard_name=_guard_name, + guardrail_name=SupportedGuardrailIntegrations.GURDRAILS_AI.value, + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_guardrails_ai_callback) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_registry.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_registry.py new file mode 100644 index 00000000..6b43fd47 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/guardrail_registry.py @@ -0,0 +1,23 @@ +# litellm/proxy/guardrails/guardrail_registry.py + +from litellm.types.guardrails import SupportedGuardrailIntegrations + +from .guardrail_initializers import ( + initialize_aim, + initialize_aporia, + initialize_bedrock, + initialize_guardrails_ai, + initialize_hide_secrets, + initialize_lakera, + initialize_presidio, +) + +guardrail_registry = { + SupportedGuardrailIntegrations.APORIA.value: initialize_aporia, + SupportedGuardrailIntegrations.BEDROCK.value: initialize_bedrock, + SupportedGuardrailIntegrations.LAKERA.value: initialize_lakera, + SupportedGuardrailIntegrations.AIM.value: initialize_aim, + SupportedGuardrailIntegrations.PRESIDIO.value: initialize_presidio, + SupportedGuardrailIntegrations.HIDE_SECRETS.value: initialize_hide_secrets, + SupportedGuardrailIntegrations.GURDRAILS_AI.value: initialize_guardrails_ai, +} diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/init_guardrails.py b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/init_guardrails.py new file mode 100644 index 00000000..d08dcaba --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/guardrails/init_guardrails.py @@ -0,0 +1,171 @@ +import importlib +import os +from typing import Dict, List, Optional + +import litellm +from litellm import get_secret +from litellm._logging import verbose_proxy_logger +from litellm.proxy.common_utils.callback_utils import initialize_callbacks_on_proxy + +# v2 implementation +from litellm.types.guardrails import ( + Guardrail, + GuardrailItem, + GuardrailItemSpec, + LakeraCategoryThresholds, + LitellmParams, +) + +from .guardrail_registry import guardrail_registry + +all_guardrails: List[GuardrailItem] = [] + + +def initialize_guardrails( + guardrails_config: List[Dict[str, GuardrailItemSpec]], + premium_user: bool, + config_file_path: str, + litellm_settings: dict, +) -> Dict[str, GuardrailItem]: + try: + verbose_proxy_logger.debug(f"validating guardrails passed {guardrails_config}") + global all_guardrails + for item in guardrails_config: + """ + one item looks like this: + + {'prompt_injection': {'callbacks': ['lakera_prompt_injection', 'prompt_injection_api_2'], 'default_on': True, 'enabled_roles': ['user']}} + """ + for k, v in item.items(): + guardrail_item = GuardrailItem(**v, guardrail_name=k) + all_guardrails.append(guardrail_item) + litellm.guardrail_name_config_map[k] = guardrail_item + + # set appropriate callbacks if they are default on + default_on_callbacks = set() + callback_specific_params = {} + for guardrail in all_guardrails: + verbose_proxy_logger.debug(guardrail.guardrail_name) + verbose_proxy_logger.debug(guardrail.default_on) + + callback_specific_params.update(guardrail.callback_args) + + if guardrail.default_on is True: + # add these to litellm callbacks if they don't exist + for callback in guardrail.callbacks: + if callback not in litellm.callbacks: + default_on_callbacks.add(callback) + + if guardrail.logging_only is True: + if callback == "presidio": + callback_specific_params["presidio"] = {"logging_only": True} # type: ignore + + default_on_callbacks_list = list(default_on_callbacks) + if len(default_on_callbacks_list) > 0: + initialize_callbacks_on_proxy( + value=default_on_callbacks_list, + premium_user=premium_user, + config_file_path=config_file_path, + litellm_settings=litellm_settings, + callback_specific_params=callback_specific_params, + ) + + return litellm.guardrail_name_config_map + except Exception as e: + verbose_proxy_logger.exception( + "error initializing guardrails {}".format(str(e)) + ) + raise e + + +""" +Map guardrail_name: <pre_call>, <post_call>, during_call + +""" + + +def init_guardrails_v2( + all_guardrails: List[Dict], + config_file_path: Optional[str] = None, +): + guardrail_list = [] + + for guardrail in all_guardrails: + litellm_params_data = guardrail["litellm_params"] + verbose_proxy_logger.debug("litellm_params= %s", litellm_params_data) + + _litellm_params_kwargs = { + k: litellm_params_data.get(k) for k in LitellmParams.__annotations__.keys() + } + + litellm_params = LitellmParams(**_litellm_params_kwargs) # type: ignore + + if ( + "category_thresholds" in litellm_params_data + and litellm_params_data["category_thresholds"] + ): + lakera_category_thresholds = LakeraCategoryThresholds( + **litellm_params_data["category_thresholds"] + ) + litellm_params["category_thresholds"] = lakera_category_thresholds + + if litellm_params["api_key"] and litellm_params["api_key"].startswith( + "os.environ/" + ): + litellm_params["api_key"] = str(get_secret(litellm_params["api_key"])) # type: ignore + + if litellm_params["api_base"] and litellm_params["api_base"].startswith( + "os.environ/" + ): + litellm_params["api_base"] = str(get_secret(litellm_params["api_base"])) # type: ignore + + guardrail_type = litellm_params["guardrail"] + + initializer = guardrail_registry.get(guardrail_type) + + if initializer: + initializer(litellm_params, guardrail) + elif isinstance(guardrail_type, str) and "." in guardrail_type: + if not config_file_path: + raise Exception( + "GuardrailsAIException - Please pass the config_file_path to initialize_guardrails_v2" + ) + + _file_name, _class_name = guardrail_type.split(".") + verbose_proxy_logger.debug( + "Initializing custom guardrail: %s, file_name: %s, class_name: %s", + guardrail_type, + _file_name, + _class_name, + ) + + directory = os.path.dirname(config_file_path) + module_file_path = os.path.join(directory, _file_name) + ".py" + + spec = importlib.util.spec_from_file_location(_class_name, module_file_path) # type: ignore + if not spec: + raise ImportError( + f"Could not find a module specification for {module_file_path}" + ) + + module = importlib.util.module_from_spec(spec) # type: ignore + spec.loader.exec_module(module) # type: ignore + _guardrail_class = getattr(module, _class_name) + + _guardrail_callback = _guardrail_class( + guardrail_name=guardrail["guardrail_name"], + event_hook=litellm_params["mode"], + default_on=litellm_params["default_on"], + ) + litellm.logging_callback_manager.add_litellm_callback(_guardrail_callback) # type: ignore + else: + raise ValueError(f"Unsupported guardrail: {guardrail_type}") + + parsed_guardrail = Guardrail( + guardrail_name=guardrail["guardrail_name"], + litellm_params=litellm_params, + ) + + guardrail_list.append(parsed_guardrail) + + verbose_proxy_logger.info(f"\nGuardrail List:{guardrail_list}\n") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/health_check.py b/.venv/lib/python3.12/site-packages/litellm/proxy/health_check.py new file mode 100644 index 00000000..f9455387 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/health_check.py @@ -0,0 +1,183 @@ +# This file runs a health check for the LLM, used on litellm/proxy + +import asyncio +import logging +import random +from typing import List, Optional + +import litellm + +logger = logging.getLogger(__name__) +from litellm.constants import HEALTH_CHECK_TIMEOUT_SECONDS + +ILLEGAL_DISPLAY_PARAMS = [ + "messages", + "api_key", + "prompt", + "input", + "vertex_credentials", + "aws_access_key_id", + "aws_secret_access_key", +] + +MINIMAL_DISPLAY_PARAMS = ["model", "mode_error"] + + +def _get_random_llm_message(): + """ + Get a random message from the LLM. + """ + messages = ["Hey how's it going?", "What's 1 + 1?"] + + return [{"role": "user", "content": random.choice(messages)}] + + +def _clean_endpoint_data(endpoint_data: dict, details: Optional[bool] = True): + """ + Clean the endpoint data for display to users. + """ + endpoint_data.pop("litellm_logging_obj", None) + return ( + {k: v for k, v in endpoint_data.items() if k not in ILLEGAL_DISPLAY_PARAMS} + if details is not False + else {k: v for k, v in endpoint_data.items() if k in MINIMAL_DISPLAY_PARAMS} + ) + + +def filter_deployments_by_id( + model_list: List, +) -> List: + seen_ids = set() + filtered_deployments = [] + + for deployment in model_list: + _model_info = deployment.get("model_info") or {} + _id = _model_info.get("id") or None + if _id is None: + continue + + if _id not in seen_ids: + seen_ids.add(_id) + filtered_deployments.append(deployment) + + return filtered_deployments + + +async def run_with_timeout(task, timeout): + try: + return await asyncio.wait_for(task, timeout) + except asyncio.TimeoutError: + task.cancel() + # Only cancel child tasks of the current task + current_task = asyncio.current_task() + for t in asyncio.all_tasks(): + if t != current_task: + t.cancel() + try: + await asyncio.wait_for(task, 0.1) # Give 100ms for cleanup + except (asyncio.TimeoutError, asyncio.CancelledError, Exception): + pass + return {"error": "Timeout exceeded"} + + +async def _perform_health_check(model_list: list, details: Optional[bool] = True): + """ + Perform a health check for each model in the list. + """ + + tasks = [] + for model in model_list: + litellm_params = model["litellm_params"] + model_info = model.get("model_info", {}) + mode = model_info.get("mode", None) + litellm_params = _update_litellm_params_for_health_check( + model_info, litellm_params + ) + timeout = model_info.get("health_check_timeout") or HEALTH_CHECK_TIMEOUT_SECONDS + + task = run_with_timeout( + litellm.ahealth_check( + model["litellm_params"], + mode=mode, + prompt="test from litellm", + input=["test from litellm"], + ), + timeout, + ) + + tasks.append(task) + + results = await asyncio.gather(*tasks, return_exceptions=True) + + healthy_endpoints = [] + unhealthy_endpoints = [] + + for is_healthy, model in zip(results, model_list): + litellm_params = model["litellm_params"] + + if isinstance(is_healthy, dict) and "error" not in is_healthy: + healthy_endpoints.append( + _clean_endpoint_data({**litellm_params, **is_healthy}, details) + ) + elif isinstance(is_healthy, dict): + unhealthy_endpoints.append( + _clean_endpoint_data({**litellm_params, **is_healthy}, details) + ) + else: + unhealthy_endpoints.append(_clean_endpoint_data(litellm_params, details)) + + return healthy_endpoints, unhealthy_endpoints + + +def _update_litellm_params_for_health_check( + model_info: dict, litellm_params: dict +) -> dict: + """ + Update the litellm params for health check. + + - gets a short `messages` param for health check + - updates the `model` param with the `health_check_model` if it exists Doc: https://docs.litellm.ai/docs/proxy/health#wildcard-routes + """ + litellm_params["messages"] = _get_random_llm_message() + _health_check_model = model_info.get("health_check_model", None) + if _health_check_model is not None: + litellm_params["model"] = _health_check_model + return litellm_params + + +async def perform_health_check( + model_list: list, + model: Optional[str] = None, + cli_model: Optional[str] = None, + details: Optional[bool] = True, +): + """ + Perform a health check on the system. + + Returns: + (bool): True if the health check passes, False otherwise. + """ + if not model_list: + if cli_model: + model_list = [ + {"model_name": cli_model, "litellm_params": {"model": cli_model}} + ] + else: + return [], [] + + if model is not None: + _new_model_list = [ + x for x in model_list if x["litellm_params"]["model"] == model + ] + if _new_model_list == []: + _new_model_list = [x for x in model_list if x["model_name"] == model] + model_list = _new_model_list + + model_list = filter_deployments_by_id( + model_list=model_list + ) # filter duplicate deployments (e.g. when model alias'es are used) + healthy_endpoints, unhealthy_endpoints = await _perform_health_check( + model_list, details + ) + + return healthy_endpoints, unhealthy_endpoints diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/health_endpoints/_health_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/health_endpoints/_health_endpoints.py new file mode 100644 index 00000000..34e7d34b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/health_endpoints/_health_endpoints.py @@ -0,0 +1,698 @@ +import asyncio +import copy +import os +import traceback +from datetime import datetime, timedelta +from typing import Dict, Literal, Optional, Union + +import fastapi +from fastapi import APIRouter, Depends, HTTPException, Request, Response, status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.constants import HEALTH_CHECK_TIMEOUT_SECONDS +from litellm.proxy._types import ( + AlertType, + CallInfo, + ProxyErrorTypes, + ProxyException, + UserAPIKeyAuth, + WebhookEvent, +) +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.health_check import ( + _clean_endpoint_data, + _update_litellm_params_for_health_check, + perform_health_check, + run_with_timeout, +) + +#### Health ENDPOINTS #### + +router = APIRouter() + + +@router.get( + "/test", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def test_endpoint(request: Request): + """ + [DEPRECATED] use `/health/liveliness` instead. + + A test endpoint that pings the proxy server to check if it's healthy. + + Parameters: + request (Request): The incoming request. + + Returns: + dict: A dictionary containing the route of the request URL. + """ + # ping the proxy server to check if its healthy + return {"route": request.url.path} + + +@router.get( + "/health/services", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def health_services_endpoint( # noqa: PLR0915 + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + service: Union[ + Literal[ + "slack_budget_alerts", + "langfuse", + "slack", + "openmeter", + "webhook", + "email", + "braintrust", + "datadog", + ], + str, + ] = fastapi.Query(description="Specify the service being hit."), +): + """ + Use this admin-only endpoint to check if the service is healthy. + + Example: + ``` + curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' \ + -H 'Authorization: Bearer sk-1234' + ``` + """ + try: + from litellm.proxy.proxy_server import ( + general_settings, + prisma_client, + proxy_logging_obj, + ) + + if service is None: + raise HTTPException( + status_code=400, detail={"error": "Service must be specified."} + ) + + if service not in [ + "slack_budget_alerts", + "email", + "langfuse", + "slack", + "openmeter", + "webhook", + "braintrust", + "otel", + "custom_callback_api", + "langsmith", + "datadog", + ]: + raise HTTPException( + status_code=400, + detail={ + "error": f"Service must be in list. Service={service}. List={['slack_budget_alerts']}" + }, + ) + + if ( + service == "openmeter" + or service == "braintrust" + or (service in litellm.success_callback and service != "langfuse") + ): + _ = await litellm.acompletion( + model="openai/litellm-mock-response-model", + messages=[{"role": "user", "content": "Hey, how's it going?"}], + user="litellm:/health/services", + mock_response="This is a mock response", + ) + return { + "status": "success", + "message": "Mock LLM request made - check {}.".format(service), + } + elif service == "datadog": + from litellm.integrations.datadog.datadog import DataDogLogger + + datadog_logger = DataDogLogger() + response = await datadog_logger.async_health_check() + return { + "status": response["status"], + "message": ( + response["error_message"] + if response["status"] == "unhealthy" + else "Datadog is healthy" + ), + } + elif service == "langfuse": + from litellm.integrations.langfuse.langfuse import LangFuseLogger + + langfuse_logger = LangFuseLogger() + langfuse_logger.Langfuse.auth_check() + _ = litellm.completion( + model="openai/litellm-mock-response-model", + messages=[{"role": "user", "content": "Hey, how's it going?"}], + user="litellm:/health/services", + mock_response="This is a mock response", + ) + return { + "status": "success", + "message": "Mock LLM request made - check langfuse.", + } + + if service == "webhook": + user_info = CallInfo( + token=user_api_key_dict.token or "", + spend=1, + max_budget=0, + user_id=user_api_key_dict.user_id, + key_alias=user_api_key_dict.key_alias, + team_id=user_api_key_dict.team_id, + ) + await proxy_logging_obj.budget_alerts( + type="user_budget", + user_info=user_info, + ) + + if service == "slack" or service == "slack_budget_alerts": + if "slack" in general_settings.get("alerting", []): + # test_message = f"""\n🚨 `ProjectedLimitExceededError` 💸\n\n`Key Alias:` litellm-ui-test-alert \n`Expected Day of Error`: 28th March \n`Current Spend`: $100.00 \n`Projected Spend at end of month`: $1000.00 \n`Soft Limit`: $700""" + # check if user has opted into unique_alert_webhooks + if ( + proxy_logging_obj.slack_alerting_instance.alert_to_webhook_url + is not None + ): + for ( + alert_type + ) in proxy_logging_obj.slack_alerting_instance.alert_to_webhook_url: + # only test alert if it's in active alert types + if ( + proxy_logging_obj.slack_alerting_instance.alert_types + is not None + and alert_type + not in proxy_logging_obj.slack_alerting_instance.alert_types + ): + continue + + test_message = "default test message" + if alert_type == AlertType.llm_exceptions: + test_message = "LLM Exception test alert" + elif alert_type == AlertType.llm_too_slow: + test_message = "LLM Too Slow test alert" + elif alert_type == AlertType.llm_requests_hanging: + test_message = "LLM Requests Hanging test alert" + elif alert_type == AlertType.budget_alerts: + test_message = "Budget Alert test alert" + elif alert_type == AlertType.db_exceptions: + test_message = "DB Exception test alert" + elif alert_type == AlertType.outage_alerts: + test_message = "Outage Alert Exception test alert" + elif alert_type == AlertType.daily_reports: + test_message = "Daily Reports test alert" + else: + test_message = "Budget Alert test alert" + + await proxy_logging_obj.alerting_handler( + message=test_message, level="Low", alert_type=alert_type + ) + else: + await proxy_logging_obj.alerting_handler( + message="This is a test slack alert message", + level="Low", + alert_type=AlertType.budget_alerts, + ) + + if prisma_client is not None: + asyncio.create_task( + proxy_logging_obj.slack_alerting_instance.send_monthly_spend_report() + ) + asyncio.create_task( + proxy_logging_obj.slack_alerting_instance.send_weekly_spend_report() + ) + + alert_types = ( + proxy_logging_obj.slack_alerting_instance.alert_types or [] + ) + alert_types = list(alert_types) + return { + "status": "success", + "alert_types": alert_types, + "message": "Mock Slack Alert sent, verify Slack Alert Received on your channel", + } + else: + raise HTTPException( + status_code=422, + detail={ + "error": '"{}" not in proxy config: general_settings. Unable to test this.'.format( + service + ) + }, + ) + if service == "email": + webhook_event = WebhookEvent( + event="key_created", + event_group="key", + event_message="Test Email Alert", + token=user_api_key_dict.token or "", + key_alias="Email Test key (This is only a test alert key. DO NOT USE THIS IN PRODUCTION.)", + spend=0, + max_budget=0, + user_id=user_api_key_dict.user_id, + user_email=os.getenv("TEST_EMAIL_ADDRESS"), + team_id=user_api_key_dict.team_id, + ) + + # use create task - this can take 10 seconds. don't keep ui users waiting for notification to check their email + await proxy_logging_obj.slack_alerting_instance.send_key_created_or_user_invited_email( + webhook_event=webhook_event + ) + + return { + "status": "success", + "message": "Mock Email Alert sent, verify Email Alert Received", + } + + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.health_services_endpoint(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)]) +async def health_endpoint( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + model: Optional[str] = fastapi.Query( + None, description="Specify the model name (optional)" + ), +): + """ + 🚨 USE `/health/liveliness` to health check the proxy 🚨 + + See more 👉 https://docs.litellm.ai/docs/proxy/health + + + Check the health of all the endpoints in config.yaml + + To run health checks in the background, add this to config.yaml: + ``` + general_settings: + # ... other settings + background_health_checks: True + ``` + else, the health checks will be run on models when /health is called. + """ + from litellm.proxy.proxy_server import ( + health_check_details, + health_check_results, + llm_model_list, + use_background_health_checks, + user_model, + ) + + try: + if llm_model_list is None: + # if no router set, check if user set a model using litellm --model ollama/llama2 + if user_model is not None: + healthy_endpoints, unhealthy_endpoints = await perform_health_check( + model_list=[], cli_model=user_model, details=health_check_details + ) + return { + "healthy_endpoints": healthy_endpoints, + "unhealthy_endpoints": unhealthy_endpoints, + "healthy_count": len(healthy_endpoints), + "unhealthy_count": len(unhealthy_endpoints), + } + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": "Model list not initialized"}, + ) + _llm_model_list = copy.deepcopy(llm_model_list) + ### FILTER MODELS FOR ONLY THOSE USER HAS ACCESS TO ### + if len(user_api_key_dict.models) > 0: + pass + else: + pass # + if use_background_health_checks: + return health_check_results + else: + healthy_endpoints, unhealthy_endpoints = await perform_health_check( + _llm_model_list, model, details=health_check_details + ) + + return { + "healthy_endpoints": healthy_endpoints, + "unhealthy_endpoints": unhealthy_endpoints, + "healthy_count": len(healthy_endpoints), + "unhealthy_count": len(unhealthy_endpoints), + } + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.py::health_endpoint(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise e + + +db_health_cache = {"status": "unknown", "last_updated": datetime.now()} + + +async def _db_health_readiness_check(): + from litellm.proxy.proxy_server import prisma_client + + global db_health_cache + + # Note - Intentionally don't try/except this so it raises an exception when it fails + + # if timedelta is less than 2 minutes return DB Status + time_diff = datetime.now() - db_health_cache["last_updated"] + if db_health_cache["status"] != "unknown" and time_diff < timedelta(minutes=2): + return db_health_cache + + if prisma_client is None: + db_health_cache = {"status": "disconnected", "last_updated": datetime.now()} + return db_health_cache + + await prisma_client.health_check() + db_health_cache = {"status": "connected", "last_updated": datetime.now()} + return db_health_cache + + +@router.get( + "/settings", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +@router.get( + "/active/callbacks", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def active_callbacks(): + """ + Returns a list of litellm level settings + + This is useful for debugging and ensuring the proxy server is configured correctly. + + Response schema: + ``` + { + "alerting": _alerting, + "litellm.callbacks": litellm_callbacks, + "litellm.input_callback": litellm_input_callbacks, + "litellm.failure_callback": litellm_failure_callbacks, + "litellm.success_callback": litellm_success_callbacks, + "litellm._async_success_callback": litellm_async_success_callbacks, + "litellm._async_failure_callback": litellm_async_failure_callbacks, + "litellm._async_input_callback": litellm_async_input_callbacks, + "all_litellm_callbacks": all_litellm_callbacks, + "num_callbacks": len(all_litellm_callbacks), + "num_alerting": _num_alerting, + "litellm.request_timeout": litellm.request_timeout, + } + ``` + """ + + from litellm.proxy.proxy_server import general_settings, proxy_logging_obj + + _alerting = str(general_settings.get("alerting")) + # get success callbacks + + litellm_callbacks = [str(x) for x in litellm.callbacks] + litellm_input_callbacks = [str(x) for x in litellm.input_callback] + litellm_failure_callbacks = [str(x) for x in litellm.failure_callback] + litellm_success_callbacks = [str(x) for x in litellm.success_callback] + litellm_async_success_callbacks = [str(x) for x in litellm._async_success_callback] + litellm_async_failure_callbacks = [str(x) for x in litellm._async_failure_callback] + litellm_async_input_callbacks = [str(x) for x in litellm._async_input_callback] + + all_litellm_callbacks = ( + litellm_callbacks + + litellm_input_callbacks + + litellm_failure_callbacks + + litellm_success_callbacks + + litellm_async_success_callbacks + + litellm_async_failure_callbacks + + litellm_async_input_callbacks + ) + + alerting = proxy_logging_obj.alerting + _num_alerting = 0 + if alerting and isinstance(alerting, list): + _num_alerting = len(alerting) + + return { + "alerting": _alerting, + "litellm.callbacks": litellm_callbacks, + "litellm.input_callback": litellm_input_callbacks, + "litellm.failure_callback": litellm_failure_callbacks, + "litellm.success_callback": litellm_success_callbacks, + "litellm._async_success_callback": litellm_async_success_callbacks, + "litellm._async_failure_callback": litellm_async_failure_callbacks, + "litellm._async_input_callback": litellm_async_input_callbacks, + "all_litellm_callbacks": all_litellm_callbacks, + "num_callbacks": len(all_litellm_callbacks), + "num_alerting": _num_alerting, + "litellm.request_timeout": litellm.request_timeout, + } + + +def callback_name(callback): + if isinstance(callback, str): + return callback + + try: + return callback.__name__ + except AttributeError: + try: + return callback.__class__.__name__ + except AttributeError: + return str(callback) + + +@router.get( + "/health/readiness", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def health_readiness(): + """ + Unprotected endpoint for checking if worker can receive requests + """ + from litellm.proxy.proxy_server import prisma_client, version + + try: + # get success callback + success_callback_names = [] + + try: + # this was returning a JSON of the values in some of the callbacks + # all we need is the callback name, hence we do str(callback) + success_callback_names = [ + callback_name(x) for x in litellm.success_callback + ] + except AttributeError: + # don't let this block the /health/readiness response, if we can't convert to str -> return litellm.success_callback + success_callback_names = litellm.success_callback + + # check Cache + cache_type = None + if litellm.cache is not None: + from litellm.caching.caching import RedisSemanticCache + + cache_type = litellm.cache.type + + if isinstance(litellm.cache.cache, RedisSemanticCache): + # ping the cache + # TODO: @ishaan-jaff - we should probably not ping the cache on every /health/readiness check + try: + index_info = await litellm.cache.cache._index_info() + except Exception as e: + index_info = "index does not exist - error: " + str(e) + cache_type = {"type": cache_type, "index_info": index_info} + + # check DB + if prisma_client is not None: # if db passed in, check if it's connected + db_health_status = await _db_health_readiness_check() + return { + "status": "healthy", + "db": "connected", + "cache": cache_type, + "litellm_version": version, + "success_callbacks": success_callback_names, + **db_health_status, + } + else: + return { + "status": "healthy", + "db": "Not connected", + "cache": cache_type, + "litellm_version": version, + "success_callbacks": success_callback_names, + } + except Exception as e: + raise HTTPException(status_code=503, detail=f"Service Unhealthy ({str(e)})") + + +@router.get( + "/health/liveliness", # Historical LiteLLM name; doesn't match k8s terminology but kept for backwards compatibility + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +@router.get( + "/health/liveness", # Kubernetes has "liveness" probes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command) + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def health_liveliness(): + """ + Unprotected endpoint for checking if worker is alive + """ + return "I'm alive!" + + +@router.options( + "/health/readiness", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def health_readiness_options(): + """ + Options endpoint for health/readiness check. + """ + response_headers = { + "Allow": "GET, OPTIONS", + "Access-Control-Allow-Methods": "GET, OPTIONS", + "Access-Control-Allow-Headers": "*", + } + return Response(headers=response_headers, status_code=200) + + +@router.options( + "/health/liveliness", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +@router.options( + "/health/liveness", # Kubernetes has "liveness" probes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command) + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def health_liveliness_options(): + """ + Options endpoint for health/liveliness check. + """ + response_headers = { + "Allow": "GET, OPTIONS", + "Access-Control-Allow-Methods": "GET, OPTIONS", + "Access-Control-Allow-Headers": "*", + } + return Response(headers=response_headers, status_code=200) + + +@router.post( + "/health/test_connection", + tags=["health"], + dependencies=[Depends(user_api_key_auth)], +) +async def test_model_connection( + request: Request, + mode: Optional[ + Literal[ + "chat", + "completion", + "embedding", + "audio_speech", + "audio_transcription", + "image_generation", + "batch", + "rerank", + "realtime", + ] + ] = fastapi.Body("chat", description="The mode to test the model with"), + litellm_params: Dict = fastapi.Body( + None, + description="Parameters for litellm.completion, litellm.embedding for the health check", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Test a direct connection to a specific model. + + This endpoint allows you to verify if your proxy can successfully connect to a specific model. + It's useful for troubleshooting model connectivity issues without going through the full proxy routing. + + Example: + ```bash + curl -X POST 'http://localhost:4000/health/test_connection' \\ + -H 'Authorization: Bearer sk-1234' \\ + -H 'Content-Type: application/json' \\ + -d '{ + "litellm_params": { + "model": "gpt-4", + "custom_llm_provider": "azure_ai", + "litellm_credential_name": null, + "api_key": "6xxxxxxx", + "api_base": "https://litellm8397336933.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-10-21", + }, + "mode": "chat" + }' + ``` + + Returns: + dict: A dictionary containing the health check result with either success information or error details. + """ + try: + # Include health_check_params if provided + litellm_params = _update_litellm_params_for_health_check( + model_info={}, + litellm_params=litellm_params, + ) + mode = mode or litellm_params.pop("mode", None) + result = await run_with_timeout( + litellm.ahealth_check( + model_params=litellm_params, + mode=mode, + prompt="test from litellm", + input=["test from litellm"], + ), + HEALTH_CHECK_TIMEOUT_SECONDS, + ) + + # Clean the result for display + cleaned_result = _clean_endpoint_data( + {**litellm_params, **result}, details=True + ) + + return { + "status": "error" if "error" in result else "success", + "result": cleaned_result, + } + + except Exception as e: + verbose_proxy_logger.error( + f"litellm.proxy.health_endpoints.test_model_connection(): Exception occurred - {str(e)}" + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": f"Failed to test connection: {str(e)}"}, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/__init__.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/__init__.py new file mode 100644 index 00000000..b6e690fd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/__init__.py @@ -0,0 +1 @@ +from . import * diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/azure_content_safety.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/azure_content_safety.py new file mode 100644 index 00000000..b35d6711 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/azure_content_safety.py @@ -0,0 +1,156 @@ +import traceback +from typing import Optional + +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_logger import CustomLogger +from litellm.proxy._types import UserAPIKeyAuth + + +class _PROXY_AzureContentSafety( + CustomLogger +): # https://docs.litellm.ai/docs/observability/custom_callback#callback-class + # Class variables or attributes + + def __init__(self, endpoint, api_key, thresholds=None): + try: + from azure.ai.contentsafety.aio import ContentSafetyClient + from azure.ai.contentsafety.models import ( + AnalyzeTextOptions, + AnalyzeTextOutputType, + TextCategory, + ) + from azure.core.credentials import AzureKeyCredential + from azure.core.exceptions import HttpResponseError + except Exception as e: + raise Exception( + f"\033[91mAzure Content-Safety not installed, try running 'pip install azure-ai-contentsafety' to fix this error: {e}\n{traceback.format_exc()}\033[0m" + ) + self.endpoint = endpoint + self.api_key = api_key + self.text_category = TextCategory + self.analyze_text_options = AnalyzeTextOptions + self.analyze_text_output_type = AnalyzeTextOutputType + self.azure_http_error = HttpResponseError + + self.thresholds = self._configure_thresholds(thresholds) + + self.client = ContentSafetyClient( + self.endpoint, AzureKeyCredential(self.api_key) + ) + + def _configure_thresholds(self, thresholds=None): + default_thresholds = { + self.text_category.HATE: 4, + self.text_category.SELF_HARM: 4, + self.text_category.SEXUAL: 4, + self.text_category.VIOLENCE: 4, + } + + if thresholds is None: + return default_thresholds + + for key, default in default_thresholds.items(): + if key not in thresholds: + thresholds[key] = default + + return thresholds + + def _compute_result(self, response): + result = {} + + category_severity = { + item.category: item.severity for item in response.categories_analysis + } + for category in self.text_category: + severity = category_severity.get(category) + if severity is not None: + result[category] = { + "filtered": severity >= self.thresholds[category], + "severity": severity, + } + + return result + + async def test_violation(self, content: str, source: Optional[str] = None): + verbose_proxy_logger.debug("Testing Azure Content-Safety for: %s", content) + + # Construct a request + request = self.analyze_text_options( + text=content, + output_type=self.analyze_text_output_type.EIGHT_SEVERITY_LEVELS, + ) + + # Analyze text + try: + response = await self.client.analyze_text(request) + except self.azure_http_error: + verbose_proxy_logger.debug( + "Error in Azure Content-Safety: %s", traceback.format_exc() + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise + + result = self._compute_result(response) + verbose_proxy_logger.debug("Azure Content-Safety Result: %s", result) + + for key, value in result.items(): + if value["filtered"]: + raise HTTPException( + status_code=400, + detail={ + "error": "Violated content safety policy", + "source": source, + "category": key, + "severity": value["severity"], + }, + ) + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, # "completion", "embeddings", "image_generation", "moderation" + ): + verbose_proxy_logger.debug("Inside Azure Content-Safety Pre-Call Hook") + try: + if call_type == "completion" and "messages" in data: + for m in data["messages"]: + if "content" in m and isinstance(m["content"], str): + await self.test_violation(content=m["content"], source="input") + + except HTTPException as e: + raise e + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.hooks.azure_content_safety.py::async_pre_call_hook(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + + async def async_post_call_success_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + response, + ): + verbose_proxy_logger.debug("Inside Azure Content-Safety Post-Call Hook") + if isinstance(response, litellm.ModelResponse) and isinstance( + response.choices[0], litellm.utils.Choices + ): + await self.test_violation( + content=response.choices[0].message.content or "", source="output" + ) + + # async def async_post_call_streaming_hook( + # self, + # user_api_key_dict: UserAPIKeyAuth, + # response: str, + # ): + # verbose_proxy_logger.debug("Inside Azure Content-Safety Call-Stream Hook") + # await self.test_violation(content=response, source="output") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/batch_redis_get.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/batch_redis_get.py new file mode 100644 index 00000000..c608317f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/batch_redis_get.py @@ -0,0 +1,149 @@ +# What this does? +## Gets a key's redis cache, and store it in memory for 1 minute. +## This reduces the number of REDIS GET requests made during high-traffic by the proxy. +### [BETA] this is in Beta. And might change. + +import traceback +from typing import Literal, Optional + +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache, InMemoryCache, RedisCache +from litellm.integrations.custom_logger import CustomLogger +from litellm.proxy._types import UserAPIKeyAuth + + +class _PROXY_BatchRedisRequests(CustomLogger): + # Class variables or attributes + in_memory_cache: Optional[InMemoryCache] = None + + def __init__(self): + if litellm.cache is not None: + litellm.cache.async_get_cache = ( + self.async_get_cache + ) # map the litellm 'get_cache' function to our custom function + + def print_verbose( + self, print_statement, debug_level: Literal["INFO", "DEBUG"] = "DEBUG" + ): + if debug_level == "DEBUG": + verbose_proxy_logger.debug(print_statement) + elif debug_level == "INFO": + verbose_proxy_logger.debug(print_statement) + if litellm.set_verbose is True: + print(print_statement) # noqa + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + ): + try: + """ + Get the user key + + Check if a key starting with `litellm:<api_key>:<call_type:` exists in-memory + + If no, then get relevant cache from redis + """ + api_key = user_api_key_dict.api_key + + cache_key_name = f"litellm:{api_key}:{call_type}" + self.in_memory_cache = cache.in_memory_cache + + key_value_dict = {} + in_memory_cache_exists = False + for key in cache.in_memory_cache.cache_dict.keys(): + if isinstance(key, str) and key.startswith(cache_key_name): + in_memory_cache_exists = True + + if in_memory_cache_exists is False and litellm.cache is not None: + """ + - Check if `litellm.Cache` is redis + - Get the relevant values + """ + if litellm.cache.type is not None and isinstance( + litellm.cache.cache, RedisCache + ): + # Initialize an empty list to store the keys + keys = [] + self.print_verbose(f"cache_key_name: {cache_key_name}") + # Use the SCAN iterator to fetch keys matching the pattern + keys = await litellm.cache.cache.async_scan_iter( + pattern=cache_key_name, count=100 + ) + # If you need the truly "last" based on time or another criteria, + # ensure your key naming or storage strategy allows this determination + # Here you would sort or filter the keys as needed based on your strategy + self.print_verbose(f"redis keys: {keys}") + if len(keys) > 0: + key_value_dict = ( + await litellm.cache.cache.async_batch_get_cache( + key_list=keys + ) + ) + + ## Add to cache + if len(key_value_dict.items()) > 0: + await cache.in_memory_cache.async_set_cache_pipeline( + cache_list=list(key_value_dict.items()), ttl=60 + ) + ## Set cache namespace if it's a miss + data["metadata"]["redis_namespace"] = cache_key_name + except HTTPException as e: + raise e + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.hooks.batch_redis_get.py::async_pre_call_hook(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + + async def async_get_cache(self, *args, **kwargs): + """ + - Check if the cache key is in-memory + + - Else: + - add missing cache key from REDIS + - update in-memory cache + - return redis cache request + """ + try: # never block execution + cache_key: Optional[str] = None + if "cache_key" in kwargs: + cache_key = kwargs["cache_key"] + elif litellm.cache is not None: + cache_key = litellm.cache.get_cache_key( + *args, **kwargs + ) # returns "<cache_key_name>:<hash>" - we pass redis_namespace in async_pre_call_hook. Done to avoid rewriting the async_set_cache logic + + if ( + cache_key is not None + and self.in_memory_cache is not None + and litellm.cache is not None + ): + cache_control_args = kwargs.get("cache", {}) + max_age = cache_control_args.get( + "s-max-age", cache_control_args.get("s-maxage", float("inf")) + ) + cached_result = self.in_memory_cache.get_cache( + cache_key, *args, **kwargs + ) + if cached_result is None: + cached_result = await litellm.cache.cache.async_get_cache( + cache_key, *args, **kwargs + ) + if cached_result is not None: + await self.in_memory_cache.async_set_cache( + cache_key, cached_result, ttl=60 + ) + return litellm.cache._get_cache_logic( + cached_result=cached_result, max_age=max_age + ) + except Exception: + return None diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/cache_control_check.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/cache_control_check.py new file mode 100644 index 00000000..6e3fbf84 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/cache_control_check.py @@ -0,0 +1,58 @@ +# What this does? +## Checks if key is allowed to use the cache controls passed in to the completion() call + + +from fastapi import HTTPException + +from litellm import verbose_logger +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_logger import CustomLogger +from litellm.proxy._types import UserAPIKeyAuth + + +class _PROXY_CacheControlCheck(CustomLogger): + # Class variables or attributes + def __init__(self): + pass + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + ): + try: + verbose_proxy_logger.debug("Inside Cache Control Check Pre-Call Hook") + allowed_cache_controls = user_api_key_dict.allowed_cache_controls + + if data.get("cache", None) is None: + return + + cache_args = data.get("cache", None) + if isinstance(cache_args, dict): + for k, v in cache_args.items(): + if ( + (allowed_cache_controls is not None) + and (isinstance(allowed_cache_controls, list)) + and ( + len(allowed_cache_controls) > 0 + ) # assume empty list to be nullable - https://github.com/prisma/prisma/issues/847#issuecomment-546895663 + and k not in allowed_cache_controls + ): + raise HTTPException( + status_code=403, + detail=f"Not allowed to set {k} as a cache control. Contact admin to change permissions.", + ) + else: # invalid cache + return + + except HTTPException as e: + raise e + except Exception as e: + verbose_logger.exception( + "litellm.proxy.hooks.cache_control_check.py::async_pre_call_hook(): Exception occured - {}".format( + str(e) + ) + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/dynamic_rate_limiter.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/dynamic_rate_limiter.py new file mode 100644 index 00000000..15a9bc1b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/dynamic_rate_limiter.py @@ -0,0 +1,298 @@ +# What is this? +## Allocates dynamic tpm/rpm quota for a project based on current traffic +## Tracks num active projects per minute + +import asyncio +import os +from typing import List, Literal, Optional, Tuple, Union + +from fastapi import HTTPException + +import litellm +from litellm import ModelResponse, Router +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_logger import CustomLogger +from litellm.proxy._types import UserAPIKeyAuth +from litellm.types.router import ModelGroupInfo +from litellm.utils import get_utc_datetime + + +class DynamicRateLimiterCache: + """ + Thin wrapper on DualCache for this file. + + Track number of active projects calling a model. + """ + + def __init__(self, cache: DualCache) -> None: + self.cache = cache + self.ttl = 60 # 1 min ttl + + async def async_get_cache(self, model: str) -> Optional[int]: + dt = get_utc_datetime() + current_minute = dt.strftime("%H-%M") + key_name = "{}:{}".format(current_minute, model) + _response = await self.cache.async_get_cache(key=key_name) + response: Optional[int] = None + if _response is not None: + response = len(_response) + return response + + async def async_set_cache_sadd(self, model: str, value: List): + """ + Add value to set. + + Parameters: + - model: str, the name of the model group + - value: str, the team id + + Returns: + - None + + Raises: + - Exception, if unable to connect to cache client (if redis caching enabled) + """ + try: + dt = get_utc_datetime() + current_minute = dt.strftime("%H-%M") + + key_name = "{}:{}".format(current_minute, model) + await self.cache.async_set_cache_sadd( + key=key_name, value=value, ttl=self.ttl + ) + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.hooks.dynamic_rate_limiter.py::async_set_cache_sadd(): Exception occured - {}".format( + str(e) + ) + ) + raise e + + +class _PROXY_DynamicRateLimitHandler(CustomLogger): + + # Class variables or attributes + def __init__(self, internal_usage_cache: DualCache): + self.internal_usage_cache = DynamicRateLimiterCache(cache=internal_usage_cache) + + def update_variables(self, llm_router: Router): + self.llm_router = llm_router + + async def check_available_usage( + self, model: str, priority: Optional[str] = None + ) -> Tuple[ + Optional[int], Optional[int], Optional[int], Optional[int], Optional[int] + ]: + """ + For a given model, get its available tpm + + Params: + - model: str, the name of the model in the router model_list + - priority: Optional[str], the priority for the request. + + Returns + - Tuple[available_tpm, available_tpm, model_tpm, model_rpm, active_projects] + - available_tpm: int or null - always 0 or positive. + - available_tpm: int or null - always 0 or positive. + - remaining_model_tpm: int or null. If available tpm is int, then this will be too. + - remaining_model_rpm: int or null. If available rpm is int, then this will be too. + - active_projects: int or null + """ + try: + weight: float = 1 + if ( + litellm.priority_reservation is None + or priority not in litellm.priority_reservation + ): + verbose_proxy_logger.error( + "Priority Reservation not set. priority={}, but litellm.priority_reservation is {}.".format( + priority, litellm.priority_reservation + ) + ) + elif priority is not None and litellm.priority_reservation is not None: + if os.getenv("LITELLM_LICENSE", None) is None: + verbose_proxy_logger.error( + "PREMIUM FEATURE: Reserving tpm/rpm by priority is a premium feature. Please add a 'LITELLM_LICENSE' to your .env to enable this.\nGet a license: https://docs.litellm.ai/docs/proxy/enterprise." + ) + else: + weight = litellm.priority_reservation[priority] + + active_projects = await self.internal_usage_cache.async_get_cache( + model=model + ) + current_model_tpm, current_model_rpm = ( + await self.llm_router.get_model_group_usage(model_group=model) + ) + model_group_info: Optional[ModelGroupInfo] = ( + self.llm_router.get_model_group_info(model_group=model) + ) + total_model_tpm: Optional[int] = None + total_model_rpm: Optional[int] = None + if model_group_info is not None: + if model_group_info.tpm is not None: + total_model_tpm = model_group_info.tpm + if model_group_info.rpm is not None: + total_model_rpm = model_group_info.rpm + + remaining_model_tpm: Optional[int] = None + if total_model_tpm is not None and current_model_tpm is not None: + remaining_model_tpm = total_model_tpm - current_model_tpm + elif total_model_tpm is not None: + remaining_model_tpm = total_model_tpm + + remaining_model_rpm: Optional[int] = None + if total_model_rpm is not None and current_model_rpm is not None: + remaining_model_rpm = total_model_rpm - current_model_rpm + elif total_model_rpm is not None: + remaining_model_rpm = total_model_rpm + + available_tpm: Optional[int] = None + + if remaining_model_tpm is not None: + if active_projects is not None: + available_tpm = int(remaining_model_tpm * weight / active_projects) + else: + available_tpm = int(remaining_model_tpm * weight) + + if available_tpm is not None and available_tpm < 0: + available_tpm = 0 + + available_rpm: Optional[int] = None + + if remaining_model_rpm is not None: + if active_projects is not None: + available_rpm = int(remaining_model_rpm * weight / active_projects) + else: + available_rpm = int(remaining_model_rpm * weight) + + if available_rpm is not None and available_rpm < 0: + available_rpm = 0 + return ( + available_tpm, + available_rpm, + remaining_model_tpm, + remaining_model_rpm, + active_projects, + ) + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.hooks.dynamic_rate_limiter.py::check_available_usage: Exception occurred - {}".format( + str(e) + ) + ) + return None, None, None, None, None + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> Optional[ + Union[Exception, str, dict] + ]: # raise exception if invalid, return a str for the user to receive - if rejected, or return a modified dictionary for passing into litellm + """ + - For a model group + - Check if tpm/rpm available + - Raise RateLimitError if no tpm/rpm available + """ + if "model" in data: + key_priority: Optional[str] = user_api_key_dict.metadata.get( + "priority", None + ) + available_tpm, available_rpm, model_tpm, model_rpm, active_projects = ( + await self.check_available_usage( + model=data["model"], priority=key_priority + ) + ) + ### CHECK TPM ### + if available_tpm is not None and available_tpm == 0: + raise HTTPException( + status_code=429, + detail={ + "error": "Key={} over available TPM={}. Model TPM={}, Active keys={}".format( + user_api_key_dict.api_key, + available_tpm, + model_tpm, + active_projects, + ) + }, + ) + ### CHECK RPM ### + elif available_rpm is not None and available_rpm == 0: + raise HTTPException( + status_code=429, + detail={ + "error": "Key={} over available RPM={}. Model RPM={}, Active keys={}".format( + user_api_key_dict.api_key, + available_rpm, + model_rpm, + active_projects, + ) + }, + ) + elif available_rpm is not None or available_tpm is not None: + ## UPDATE CACHE WITH ACTIVE PROJECT + asyncio.create_task( + self.internal_usage_cache.async_set_cache_sadd( # this is a set + model=data["model"], # type: ignore + value=[user_api_key_dict.token or "default_key"], + ) + ) + return None + + async def async_post_call_success_hook( + self, data: dict, user_api_key_dict: UserAPIKeyAuth, response + ): + try: + if isinstance(response, ModelResponse): + model_info = self.llm_router.get_model_info( + id=response._hidden_params["model_id"] + ) + assert ( + model_info is not None + ), "Model info for model with id={} is None".format( + response._hidden_params["model_id"] + ) + key_priority: Optional[str] = user_api_key_dict.metadata.get( + "priority", None + ) + available_tpm, available_rpm, model_tpm, model_rpm, active_projects = ( + await self.check_available_usage( + model=model_info["model_name"], priority=key_priority + ) + ) + response._hidden_params["additional_headers"] = ( + { # Add additional response headers - easier debugging + "x-litellm-model_group": model_info["model_name"], + "x-ratelimit-remaining-litellm-project-tokens": available_tpm, + "x-ratelimit-remaining-litellm-project-requests": available_rpm, + "x-ratelimit-remaining-model-tokens": model_tpm, + "x-ratelimit-remaining-model-requests": model_rpm, + "x-ratelimit-current-active-projects": active_projects, + } + ) + + return response + return await super().async_post_call_success_hook( + data=data, + user_api_key_dict=user_api_key_dict, + response=response, + ) + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.hooks.dynamic_rate_limiter.py::async_post_call_success_hook(): Exception occured - {}".format( + str(e) + ) + ) + return response diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/example_presidio_ad_hoc_recognizer.json b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/example_presidio_ad_hoc_recognizer.json new file mode 100644 index 00000000..6a94d8de --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/example_presidio_ad_hoc_recognizer.json @@ -0,0 +1,28 @@ +[ + { + "name": "Zip code Recognizer", + "supported_language": "en", + "patterns": [ + { + "name": "zip code (weak)", + "regex": "(\\b\\d{5}(?:\\-\\d{4})?\\b)", + "score": 0.01 + } + ], + "context": ["zip", "code"], + "supported_entity": "ZIP" + }, + { + "name": "Swiss AHV Number Recognizer", + "supported_language": "en", + "patterns": [ + { + "name": "AHV number (strong)", + "regex": "(756\\.\\d{4}\\.\\d{4}\\.\\d{2})|(756\\d{10})", + "score": 0.95 + } + ], + "context": ["AHV", "social security", "Swiss"], + "supported_entity": "AHV_NUMBER" + } +]
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/key_management_event_hooks.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/key_management_event_hooks.py new file mode 100644 index 00000000..2030cb2a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/key_management_event_hooks.py @@ -0,0 +1,324 @@ +import asyncio +import json +import uuid +from datetime import datetime, timezone +from typing import Any, List, Optional + +from fastapi import status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import ( + GenerateKeyRequest, + GenerateKeyResponse, + KeyRequest, + LiteLLM_AuditLogs, + LiteLLM_VerificationToken, + LitellmTableNames, + ProxyErrorTypes, + ProxyException, + RegenerateKeyRequest, + UpdateKeyRequest, + UserAPIKeyAuth, + WebhookEvent, +) + +# NOTE: This is the prefix for all virtual keys stored in AWS Secrets Manager +LITELLM_PREFIX_STORED_VIRTUAL_KEYS = "litellm/" + + +class KeyManagementEventHooks: + + @staticmethod + async def async_key_generated_hook( + data: GenerateKeyRequest, + response: GenerateKeyResponse, + user_api_key_dict: UserAPIKeyAuth, + litellm_changed_by: Optional[str] = None, + ): + """ + Hook that runs after a successful /key/generate request + + Handles the following: + - Sending Email with Key Details + - Storing Audit Logs for key generation + - Storing Generated Key in DB + """ + from litellm.proxy.management_helpers.audit_logs import ( + create_audit_log_for_update, + ) + from litellm.proxy.proxy_server import litellm_proxy_admin_name + + if data.send_invite_email is True: + await KeyManagementEventHooks._send_key_created_email( + response.model_dump(exclude_none=True) + ) + + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + if litellm.store_audit_logs is True: + _updated_values = response.model_dump_json(exclude_none=True) + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.KEY_TABLE_NAME, + object_id=response.token_id or "", + action="created", + updated_values=_updated_values, + before_value=None, + ) + ) + ) + # store the generated key in the secret manager + await KeyManagementEventHooks._store_virtual_key_in_secret_manager( + secret_name=data.key_alias or f"virtual-key-{response.token_id}", + secret_token=response.key, + ) + + @staticmethod + async def async_key_updated_hook( + data: UpdateKeyRequest, + existing_key_row: Any, + response: Any, + user_api_key_dict: UserAPIKeyAuth, + litellm_changed_by: Optional[str] = None, + ): + """ + Post /key/update processing hook + + Handles the following: + - Storing Audit Logs for key update + """ + from litellm.proxy.management_helpers.audit_logs import ( + create_audit_log_for_update, + ) + from litellm.proxy.proxy_server import litellm_proxy_admin_name + + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + if litellm.store_audit_logs is True: + _updated_values = json.dumps(data.json(exclude_none=True), default=str) + + _before_value = existing_key_row.json(exclude_none=True) + _before_value = json.dumps(_before_value, default=str) + + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.KEY_TABLE_NAME, + object_id=data.key, + action="updated", + updated_values=_updated_values, + before_value=_before_value, + ) + ) + ) + + @staticmethod + async def async_key_rotated_hook( + data: Optional[RegenerateKeyRequest], + existing_key_row: Any, + response: GenerateKeyResponse, + user_api_key_dict: UserAPIKeyAuth, + litellm_changed_by: Optional[str] = None, + ): + # store the generated key in the secret manager + if data is not None and response.token_id is not None: + initial_secret_name = ( + existing_key_row.key_alias or f"virtual-key-{existing_key_row.token}" + ) + await KeyManagementEventHooks._rotate_virtual_key_in_secret_manager( + current_secret_name=initial_secret_name, + new_secret_name=data.key_alias or f"virtual-key-{response.token_id}", + new_secret_value=response.key, + ) + + @staticmethod + async def async_key_deleted_hook( + data: KeyRequest, + keys_being_deleted: List[LiteLLM_VerificationToken], + response: dict, + user_api_key_dict: UserAPIKeyAuth, + litellm_changed_by: Optional[str] = None, + ): + """ + Post /key/delete processing hook + + Handles the following: + - Storing Audit Logs for key deletion + """ + from litellm.proxy.management_helpers.audit_logs import ( + create_audit_log_for_update, + ) + from litellm.proxy.proxy_server import litellm_proxy_admin_name, prisma_client + + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + # we do this after the first for loop, since first for loop is for validation. we only want this inserted after validation passes + if litellm.store_audit_logs is True and data.keys is not None: + # make an audit log for each team deleted + for key in data.keys: + key_row = await prisma_client.get_data( # type: ignore + token=key, table_name="key", query_type="find_unique" + ) + + if key_row is None: + raise ProxyException( + message=f"Key {key} not found", + type=ProxyErrorTypes.bad_request_error, + param="key", + code=status.HTTP_404_NOT_FOUND, + ) + + key_row = key_row.json(exclude_none=True) + _key_row = json.dumps(key_row, default=str) + + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.KEY_TABLE_NAME, + object_id=key, + action="deleted", + updated_values="{}", + before_value=_key_row, + ) + ) + ) + # delete the keys from the secret manager + await KeyManagementEventHooks._delete_virtual_keys_from_secret_manager( + keys_being_deleted=keys_being_deleted + ) + pass + + @staticmethod + async def _store_virtual_key_in_secret_manager(secret_name: str, secret_token: str): + """ + Store a virtual key in the secret manager + + Args: + secret_name: Name of the virtual key + secret_token: Value of the virtual key (example: sk-1234) + """ + if litellm._key_management_settings is not None: + if litellm._key_management_settings.store_virtual_keys is True: + from litellm.secret_managers.base_secret_manager import ( + BaseSecretManager, + ) + + # store the key in the secret manager + if isinstance(litellm.secret_manager_client, BaseSecretManager): + await litellm.secret_manager_client.async_write_secret( + secret_name=KeyManagementEventHooks._get_secret_name( + secret_name + ), + secret_value=secret_token, + ) + + @staticmethod + async def _rotate_virtual_key_in_secret_manager( + current_secret_name: str, new_secret_name: str, new_secret_value: str + ): + """ + Update a virtual key in the secret manager + + Args: + secret_name: Name of the virtual key + secret_token: Value of the virtual key (example: sk-1234) + """ + if litellm._key_management_settings is not None: + if litellm._key_management_settings.store_virtual_keys is True: + from litellm.secret_managers.base_secret_manager import ( + BaseSecretManager, + ) + + # store the key in the secret manager + if isinstance(litellm.secret_manager_client, BaseSecretManager): + await litellm.secret_manager_client.async_rotate_secret( + current_secret_name=KeyManagementEventHooks._get_secret_name( + current_secret_name + ), + new_secret_name=KeyManagementEventHooks._get_secret_name( + new_secret_name + ), + new_secret_value=new_secret_value, + ) + + @staticmethod + def _get_secret_name(secret_name: str) -> str: + if litellm._key_management_settings.prefix_for_stored_virtual_keys.endswith( + "/" + ): + return f"{litellm._key_management_settings.prefix_for_stored_virtual_keys}{secret_name}" + else: + return f"{litellm._key_management_settings.prefix_for_stored_virtual_keys}/{secret_name}" + + @staticmethod + async def _delete_virtual_keys_from_secret_manager( + keys_being_deleted: List[LiteLLM_VerificationToken], + ): + """ + Deletes virtual keys from the secret manager + + Args: + keys_being_deleted: List of keys being deleted, this is passed down from the /key/delete operation + """ + if litellm._key_management_settings is not None: + if litellm._key_management_settings.store_virtual_keys is True: + from litellm.secret_managers.base_secret_manager import ( + BaseSecretManager, + ) + + if isinstance(litellm.secret_manager_client, BaseSecretManager): + for key in keys_being_deleted: + if key.key_alias is not None: + await litellm.secret_manager_client.async_delete_secret( + secret_name=KeyManagementEventHooks._get_secret_name( + key.key_alias + ) + ) + else: + verbose_proxy_logger.warning( + f"KeyManagementEventHooks._delete_virtual_key_from_secret_manager: Key alias not found for key {key.token}. Skipping deletion from secret manager." + ) + + @staticmethod + async def _send_key_created_email(response: dict): + from litellm.proxy.proxy_server import general_settings, proxy_logging_obj + + if "email" not in general_settings.get("alerting", []): + raise ValueError( + "Email alerting not setup on config.yaml. Please set `alerting=['email']. \nDocs: https://docs.litellm.ai/docs/proxy/email`" + ) + event = WebhookEvent( + event="key_created", + event_group="key", + event_message="API Key Created", + token=response.get("token", ""), + spend=response.get("spend", 0.0), + max_budget=response.get("max_budget", 0.0), + user_id=response.get("user_id", None), + team_id=response.get("team_id", "Default Team"), + key_alias=response.get("key_alias", None), + ) + + # If user configured email alerting - send an Email letting their end-user know the key was created + asyncio.create_task( + proxy_logging_obj.slack_alerting_instance.send_key_created_or_user_invited_email( + webhook_event=event, + ) + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/max_budget_limiter.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/max_budget_limiter.py new file mode 100644 index 00000000..4b59f603 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/max_budget_limiter.py @@ -0,0 +1,49 @@ +from fastapi import HTTPException + +from litellm import verbose_logger +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_logger import CustomLogger +from litellm.proxy._types import UserAPIKeyAuth + + +class _PROXY_MaxBudgetLimiter(CustomLogger): + # Class variables or attributes + def __init__(self): + pass + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + ): + try: + verbose_proxy_logger.debug("Inside Max Budget Limiter Pre-Call Hook") + cache_key = f"{user_api_key_dict.user_id}_user_api_key_user_id" + user_row = await cache.async_get_cache( + cache_key, parent_otel_span=user_api_key_dict.parent_otel_span + ) + if user_row is None: # value not yet cached + return + max_budget = user_row["max_budget"] + curr_spend = user_row["spend"] + + if max_budget is None: + return + + if curr_spend is None: + return + + # CHECK IF REQUEST ALLOWED + if curr_spend >= max_budget: + raise HTTPException(status_code=429, detail="Max budget limit reached.") + except HTTPException as e: + raise e + except Exception as e: + verbose_logger.exception( + "litellm.proxy.hooks.max_budget_limiter.py::async_pre_call_hook(): Exception occured - {}".format( + str(e) + ) + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/model_max_budget_limiter.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/model_max_budget_limiter.py new file mode 100644 index 00000000..ac02c915 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/model_max_budget_limiter.py @@ -0,0 +1,192 @@ +import json +from typing import List, Optional + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_logger import Span +from litellm.proxy._types import UserAPIKeyAuth +from litellm.router_strategy.budget_limiter import RouterBudgetLimiting +from litellm.types.llms.openai import AllMessageValues +from litellm.types.utils import ( + BudgetConfig, + GenericBudgetConfigType, + StandardLoggingPayload, +) + +VIRTUAL_KEY_SPEND_CACHE_KEY_PREFIX = "virtual_key_spend" + + +class _PROXY_VirtualKeyModelMaxBudgetLimiter(RouterBudgetLimiting): + """ + Handles budgets for model + virtual key + + Example: key=sk-1234567890, model=gpt-4o, max_budget=100, time_period=1d + """ + + def __init__(self, dual_cache: DualCache): + self.dual_cache = dual_cache + self.redis_increment_operation_queue = [] + + async def is_key_within_model_budget( + self, + user_api_key_dict: UserAPIKeyAuth, + model: str, + ) -> bool: + """ + Check if the user_api_key_dict is within the model budget + + Raises: + BudgetExceededError: If the user_api_key_dict has exceeded the model budget + """ + _model_max_budget = user_api_key_dict.model_max_budget + internal_model_max_budget: GenericBudgetConfigType = {} + + for _model, _budget_info in _model_max_budget.items(): + internal_model_max_budget[_model] = BudgetConfig(**_budget_info) + + verbose_proxy_logger.debug( + "internal_model_max_budget %s", + json.dumps(internal_model_max_budget, indent=4, default=str), + ) + + # check if current model is in internal_model_max_budget + _current_model_budget_info = self._get_request_model_budget_config( + model=model, internal_model_max_budget=internal_model_max_budget + ) + if _current_model_budget_info is None: + verbose_proxy_logger.debug( + f"Model {model} not found in internal_model_max_budget" + ) + return True + + # check if current model is within budget + if ( + _current_model_budget_info.max_budget + and _current_model_budget_info.max_budget > 0 + ): + _current_spend = await self._get_virtual_key_spend_for_model( + user_api_key_hash=user_api_key_dict.token, + model=model, + key_budget_config=_current_model_budget_info, + ) + if ( + _current_spend is not None + and _current_model_budget_info.max_budget is not None + and _current_spend > _current_model_budget_info.max_budget + ): + raise litellm.BudgetExceededError( + message=f"LiteLLM Virtual Key: {user_api_key_dict.token}, key_alias: {user_api_key_dict.key_alias}, exceeded budget for model={model}", + current_cost=_current_spend, + max_budget=_current_model_budget_info.max_budget, + ) + + return True + + async def _get_virtual_key_spend_for_model( + self, + user_api_key_hash: Optional[str], + model: str, + key_budget_config: BudgetConfig, + ) -> Optional[float]: + """ + Get the current spend for a virtual key for a model + + Lookup model in this order: + 1. model: directly look up `model` + 2. If 1, does not exist, check if passed as {custom_llm_provider}/model + """ + + # 1. model: directly look up `model` + virtual_key_model_spend_cache_key = f"{VIRTUAL_KEY_SPEND_CACHE_KEY_PREFIX}:{user_api_key_hash}:{model}:{key_budget_config.budget_duration}" + _current_spend = await self.dual_cache.async_get_cache( + key=virtual_key_model_spend_cache_key, + ) + + if _current_spend is None: + # 2. If 1, does not exist, check if passed as {custom_llm_provider}/model + # if "/" in model, remove first part before "/" - eg. openai/o1-preview -> o1-preview + virtual_key_model_spend_cache_key = f"{VIRTUAL_KEY_SPEND_CACHE_KEY_PREFIX}:{user_api_key_hash}:{self._get_model_without_custom_llm_provider(model)}:{key_budget_config.budget_duration}" + _current_spend = await self.dual_cache.async_get_cache( + key=virtual_key_model_spend_cache_key, + ) + return _current_spend + + def _get_request_model_budget_config( + self, model: str, internal_model_max_budget: GenericBudgetConfigType + ) -> Optional[BudgetConfig]: + """ + Get the budget config for the request model + + 1. Check if `model` is in `internal_model_max_budget` + 2. If not, check if `model` without custom llm provider is in `internal_model_max_budget` + """ + return internal_model_max_budget.get( + model, None + ) or internal_model_max_budget.get( + self._get_model_without_custom_llm_provider(model), None + ) + + def _get_model_without_custom_llm_provider(self, model: str) -> str: + if "/" in model: + return model.split("/")[-1] + return model + + async def async_filter_deployments( + self, + model: str, + healthy_deployments: List, + messages: Optional[List[AllMessageValues]], + request_kwargs: Optional[dict] = None, + parent_otel_span: Optional[Span] = None, # type: ignore + ) -> List[dict]: + return healthy_deployments + + async def async_log_success_event(self, kwargs, response_obj, start_time, end_time): + """ + Track spend for virtual key + model in DualCache + + Example: key=sk-1234567890, model=gpt-4o, max_budget=100, time_period=1d + """ + verbose_proxy_logger.debug("in RouterBudgetLimiting.async_log_success_event") + standard_logging_payload: Optional[StandardLoggingPayload] = kwargs.get( + "standard_logging_object", None + ) + if standard_logging_payload is None: + raise ValueError("standard_logging_payload is required") + + _litellm_params: dict = kwargs.get("litellm_params", {}) or {} + _metadata: dict = _litellm_params.get("metadata", {}) or {} + user_api_key_model_max_budget: Optional[dict] = _metadata.get( + "user_api_key_model_max_budget", None + ) + if ( + user_api_key_model_max_budget is None + or len(user_api_key_model_max_budget) == 0 + ): + verbose_proxy_logger.debug( + "Not running _PROXY_VirtualKeyModelMaxBudgetLimiter.async_log_success_event because user_api_key_model_max_budget is None or empty. `user_api_key_model_max_budget`=%s", + user_api_key_model_max_budget, + ) + return + response_cost: float = standard_logging_payload.get("response_cost", 0) + model = standard_logging_payload.get("model") + + virtual_key = standard_logging_payload.get("metadata").get("user_api_key_hash") + model = standard_logging_payload.get("model") + if virtual_key is not None: + budget_config = BudgetConfig(time_period="1d", budget_limit=0.1) + virtual_spend_key = f"{VIRTUAL_KEY_SPEND_CACHE_KEY_PREFIX}:{virtual_key}:{model}:{budget_config.budget_duration}" + virtual_start_time_key = f"virtual_key_budget_start_time:{virtual_key}" + await self._increment_spend_for_key( + budget_config=budget_config, + spend_key=virtual_spend_key, + start_time_key=virtual_start_time_key, + response_cost=response_cost, + ) + verbose_proxy_logger.debug( + "current state of in memory cache %s", + json.dumps( + self.dual_cache.in_memory_cache.cache_dict, indent=4, default=str + ), + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/parallel_request_limiter.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/parallel_request_limiter.py new file mode 100644 index 00000000..06f3b6af --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/parallel_request_limiter.py @@ -0,0 +1,866 @@ +import asyncio +import sys +from datetime import datetime, timedelta +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Tuple, TypedDict, Union + +from fastapi import HTTPException +from pydantic import BaseModel + +import litellm +from litellm import DualCache, ModelResponse +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_logger import CustomLogger +from litellm.litellm_core_utils.core_helpers import _get_parent_otel_span_from_kwargs +from litellm.proxy._types import CommonProxyErrors, CurrentItemRateLimit, UserAPIKeyAuth +from litellm.proxy.auth.auth_utils import ( + get_key_model_rpm_limit, + get_key_model_tpm_limit, +) + +if TYPE_CHECKING: + from opentelemetry.trace import Span as _Span + + from litellm.proxy.utils import InternalUsageCache as _InternalUsageCache + + Span = _Span + InternalUsageCache = _InternalUsageCache +else: + Span = Any + InternalUsageCache = Any + + +class CacheObject(TypedDict): + current_global_requests: Optional[dict] + request_count_api_key: Optional[dict] + request_count_api_key_model: Optional[dict] + request_count_user_id: Optional[dict] + request_count_team_id: Optional[dict] + request_count_end_user_id: Optional[dict] + + +class _PROXY_MaxParallelRequestsHandler(CustomLogger): + # Class variables or attributes + def __init__(self, internal_usage_cache: InternalUsageCache): + self.internal_usage_cache = internal_usage_cache + + def print_verbose(self, print_statement): + try: + verbose_proxy_logger.debug(print_statement) + if litellm.set_verbose: + print(print_statement) # noqa + except Exception: + pass + + async def check_key_in_limits( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + max_parallel_requests: int, + tpm_limit: int, + rpm_limit: int, + current: Optional[dict], + request_count_api_key: str, + rate_limit_type: Literal["key", "model_per_key", "user", "customer", "team"], + values_to_update_in_cache: List[Tuple[Any, Any]], + ) -> dict: + verbose_proxy_logger.info( + f"Current Usage of {rate_limit_type} in this minute: {current}" + ) + if current is None: + if max_parallel_requests == 0 or tpm_limit == 0 or rpm_limit == 0: + # base case + raise self.raise_rate_limit_error( + additional_details=f"{CommonProxyErrors.max_parallel_request_limit_reached.value}. Hit limit for {rate_limit_type}. Current limits: max_parallel_requests: {max_parallel_requests}, tpm_limit: {tpm_limit}, rpm_limit: {rpm_limit}" + ) + new_val = { + "current_requests": 1, + "current_tpm": 0, + "current_rpm": 1, + } + values_to_update_in_cache.append((request_count_api_key, new_val)) + elif ( + int(current["current_requests"]) < max_parallel_requests + and current["current_tpm"] < tpm_limit + and current["current_rpm"] < rpm_limit + ): + # Increase count for this token + new_val = { + "current_requests": current["current_requests"] + 1, + "current_tpm": current["current_tpm"], + "current_rpm": current["current_rpm"] + 1, + } + values_to_update_in_cache.append((request_count_api_key, new_val)) + + else: + raise HTTPException( + status_code=429, + detail=f"LiteLLM Rate Limit Handler for rate limit type = {rate_limit_type}. {CommonProxyErrors.max_parallel_request_limit_reached.value}. current rpm: {current['current_rpm']}, rpm limit: {rpm_limit}, current tpm: {current['current_tpm']}, tpm limit: {tpm_limit}, current max_parallel_requests: {current['current_requests']}, max_parallel_requests: {max_parallel_requests}", + headers={"retry-after": str(self.time_to_next_minute())}, + ) + + await self.internal_usage_cache.async_batch_set_cache( + cache_list=values_to_update_in_cache, + ttl=60, + litellm_parent_otel_span=user_api_key_dict.parent_otel_span, + local_only=True, + ) + return new_val + + def time_to_next_minute(self) -> float: + # Get the current time + now = datetime.now() + + # Calculate the next minute + next_minute = (now + timedelta(minutes=1)).replace(second=0, microsecond=0) + + # Calculate the difference in seconds + seconds_to_next_minute = (next_minute - now).total_seconds() + + return seconds_to_next_minute + + def raise_rate_limit_error( + self, additional_details: Optional[str] = None + ) -> HTTPException: + """ + Raise an HTTPException with a 429 status code and a retry-after header + """ + error_message = "Max parallel request limit reached" + if additional_details is not None: + error_message = error_message + " " + additional_details + raise HTTPException( + status_code=429, + detail=f"Max parallel request limit reached {additional_details}", + headers={"retry-after": str(self.time_to_next_minute())}, + ) + + async def get_all_cache_objects( + self, + current_global_requests: Optional[str], + request_count_api_key: Optional[str], + request_count_api_key_model: Optional[str], + request_count_user_id: Optional[str], + request_count_team_id: Optional[str], + request_count_end_user_id: Optional[str], + parent_otel_span: Optional[Span] = None, + ) -> CacheObject: + keys = [ + current_global_requests, + request_count_api_key, + request_count_api_key_model, + request_count_user_id, + request_count_team_id, + request_count_end_user_id, + ] + results = await self.internal_usage_cache.async_batch_get_cache( + keys=keys, + parent_otel_span=parent_otel_span, + ) + + if results is None: + return CacheObject( + current_global_requests=None, + request_count_api_key=None, + request_count_api_key_model=None, + request_count_user_id=None, + request_count_team_id=None, + request_count_end_user_id=None, + ) + + return CacheObject( + current_global_requests=results[0], + request_count_api_key=results[1], + request_count_api_key_model=results[2], + request_count_user_id=results[3], + request_count_team_id=results[4], + request_count_end_user_id=results[5], + ) + + async def async_pre_call_hook( # noqa: PLR0915 + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, + ): + self.print_verbose("Inside Max Parallel Request Pre-Call Hook") + api_key = user_api_key_dict.api_key + max_parallel_requests = user_api_key_dict.max_parallel_requests + if max_parallel_requests is None: + max_parallel_requests = sys.maxsize + if data is None: + data = {} + global_max_parallel_requests = data.get("metadata", {}).get( + "global_max_parallel_requests", None + ) + tpm_limit = getattr(user_api_key_dict, "tpm_limit", sys.maxsize) + if tpm_limit is None: + tpm_limit = sys.maxsize + rpm_limit = getattr(user_api_key_dict, "rpm_limit", sys.maxsize) + if rpm_limit is None: + rpm_limit = sys.maxsize + + values_to_update_in_cache: List[Tuple[Any, Any]] = ( + [] + ) # values that need to get updated in cache, will run a batch_set_cache after this function + + # ------------ + # Setup values + # ------------ + new_val: Optional[dict] = None + + if global_max_parallel_requests is not None: + # get value from cache + _key = "global_max_parallel_requests" + current_global_requests = await self.internal_usage_cache.async_get_cache( + key=_key, + local_only=True, + litellm_parent_otel_span=user_api_key_dict.parent_otel_span, + ) + # check if below limit + if current_global_requests is None: + current_global_requests = 1 + # if above -> raise error + if current_global_requests >= global_max_parallel_requests: + return self.raise_rate_limit_error( + additional_details=f"Hit Global Limit: Limit={global_max_parallel_requests}, current: {current_global_requests}" + ) + # if below -> increment + else: + await self.internal_usage_cache.async_increment_cache( + key=_key, + value=1, + local_only=True, + litellm_parent_otel_span=user_api_key_dict.parent_otel_span, + ) + _model = data.get("model", None) + + current_date = datetime.now().strftime("%Y-%m-%d") + current_hour = datetime.now().strftime("%H") + current_minute = datetime.now().strftime("%M") + precise_minute = f"{current_date}-{current_hour}-{current_minute}" + + cache_objects: CacheObject = await self.get_all_cache_objects( + current_global_requests=( + "global_max_parallel_requests" + if global_max_parallel_requests is not None + else None + ), + request_count_api_key=( + f"{api_key}::{precise_minute}::request_count" + if api_key is not None + else None + ), + request_count_api_key_model=( + f"{api_key}::{_model}::{precise_minute}::request_count" + if api_key is not None and _model is not None + else None + ), + request_count_user_id=( + f"{user_api_key_dict.user_id}::{precise_minute}::request_count" + if user_api_key_dict.user_id is not None + else None + ), + request_count_team_id=( + f"{user_api_key_dict.team_id}::{precise_minute}::request_count" + if user_api_key_dict.team_id is not None + else None + ), + request_count_end_user_id=( + f"{user_api_key_dict.end_user_id}::{precise_minute}::request_count" + if user_api_key_dict.end_user_id is not None + else None + ), + parent_otel_span=user_api_key_dict.parent_otel_span, + ) + if api_key is not None: + request_count_api_key = f"{api_key}::{precise_minute}::request_count" + # CHECK IF REQUEST ALLOWED for key + await self.check_key_in_limits( + user_api_key_dict=user_api_key_dict, + cache=cache, + data=data, + call_type=call_type, + max_parallel_requests=max_parallel_requests, + current=cache_objects["request_count_api_key"], + request_count_api_key=request_count_api_key, + tpm_limit=tpm_limit, + rpm_limit=rpm_limit, + rate_limit_type="key", + values_to_update_in_cache=values_to_update_in_cache, + ) + + # Check if request under RPM/TPM per model for a given API Key + if ( + get_key_model_tpm_limit(user_api_key_dict) is not None + or get_key_model_rpm_limit(user_api_key_dict) is not None + ): + _model = data.get("model", None) + request_count_api_key = ( + f"{api_key}::{_model}::{precise_minute}::request_count" + ) + _tpm_limit_for_key_model = get_key_model_tpm_limit(user_api_key_dict) + _rpm_limit_for_key_model = get_key_model_rpm_limit(user_api_key_dict) + tpm_limit_for_model = None + rpm_limit_for_model = None + + if _model is not None: + if _tpm_limit_for_key_model: + tpm_limit_for_model = _tpm_limit_for_key_model.get(_model) + + if _rpm_limit_for_key_model: + rpm_limit_for_model = _rpm_limit_for_key_model.get(_model) + + new_val = await self.check_key_in_limits( + user_api_key_dict=user_api_key_dict, + cache=cache, + data=data, + call_type=call_type, + max_parallel_requests=sys.maxsize, # TODO: Support max parallel requests for a model + current=cache_objects["request_count_api_key_model"], + request_count_api_key=request_count_api_key, + tpm_limit=tpm_limit_for_model or sys.maxsize, + rpm_limit=rpm_limit_for_model or sys.maxsize, + rate_limit_type="model_per_key", + values_to_update_in_cache=values_to_update_in_cache, + ) + _remaining_tokens = None + _remaining_requests = None + # Add remaining tokens, requests to metadata + if new_val: + if tpm_limit_for_model is not None: + _remaining_tokens = tpm_limit_for_model - new_val["current_tpm"] + if rpm_limit_for_model is not None: + _remaining_requests = rpm_limit_for_model - new_val["current_rpm"] + + _remaining_limits_data = { + f"litellm-key-remaining-tokens-{_model}": _remaining_tokens, + f"litellm-key-remaining-requests-{_model}": _remaining_requests, + } + + if "metadata" not in data: + data["metadata"] = {} + data["metadata"].update(_remaining_limits_data) + + # check if REQUEST ALLOWED for user_id + user_id = user_api_key_dict.user_id + if user_id is not None: + user_tpm_limit = user_api_key_dict.user_tpm_limit + user_rpm_limit = user_api_key_dict.user_rpm_limit + if user_tpm_limit is None: + user_tpm_limit = sys.maxsize + if user_rpm_limit is None: + user_rpm_limit = sys.maxsize + + request_count_api_key = f"{user_id}::{precise_minute}::request_count" + # print(f"Checking if {request_count_api_key} is allowed to make request for minute {precise_minute}") + await self.check_key_in_limits( + user_api_key_dict=user_api_key_dict, + cache=cache, + data=data, + call_type=call_type, + max_parallel_requests=sys.maxsize, # TODO: Support max parallel requests for a user + current=cache_objects["request_count_user_id"], + request_count_api_key=request_count_api_key, + tpm_limit=user_tpm_limit, + rpm_limit=user_rpm_limit, + rate_limit_type="user", + values_to_update_in_cache=values_to_update_in_cache, + ) + + # TEAM RATE LIMITS + ## get team tpm/rpm limits + team_id = user_api_key_dict.team_id + if team_id is not None: + team_tpm_limit = user_api_key_dict.team_tpm_limit + team_rpm_limit = user_api_key_dict.team_rpm_limit + + if team_tpm_limit is None: + team_tpm_limit = sys.maxsize + if team_rpm_limit is None: + team_rpm_limit = sys.maxsize + + request_count_api_key = f"{team_id}::{precise_minute}::request_count" + # print(f"Checking if {request_count_api_key} is allowed to make request for minute {precise_minute}") + await self.check_key_in_limits( + user_api_key_dict=user_api_key_dict, + cache=cache, + data=data, + call_type=call_type, + max_parallel_requests=sys.maxsize, # TODO: Support max parallel requests for a team + current=cache_objects["request_count_team_id"], + request_count_api_key=request_count_api_key, + tpm_limit=team_tpm_limit, + rpm_limit=team_rpm_limit, + rate_limit_type="team", + values_to_update_in_cache=values_to_update_in_cache, + ) + + # End-User Rate Limits + # Only enforce if user passed `user` to /chat, /completions, /embeddings + if user_api_key_dict.end_user_id: + end_user_tpm_limit = getattr( + user_api_key_dict, "end_user_tpm_limit", sys.maxsize + ) + end_user_rpm_limit = getattr( + user_api_key_dict, "end_user_rpm_limit", sys.maxsize + ) + + if end_user_tpm_limit is None: + end_user_tpm_limit = sys.maxsize + if end_user_rpm_limit is None: + end_user_rpm_limit = sys.maxsize + + # now do the same tpm/rpm checks + request_count_api_key = ( + f"{user_api_key_dict.end_user_id}::{precise_minute}::request_count" + ) + + # print(f"Checking if {request_count_api_key} is allowed to make request for minute {precise_minute}") + await self.check_key_in_limits( + user_api_key_dict=user_api_key_dict, + cache=cache, + data=data, + call_type=call_type, + max_parallel_requests=sys.maxsize, # TODO: Support max parallel requests for an End-User + request_count_api_key=request_count_api_key, + current=cache_objects["request_count_end_user_id"], + tpm_limit=end_user_tpm_limit, + rpm_limit=end_user_rpm_limit, + rate_limit_type="customer", + values_to_update_in_cache=values_to_update_in_cache, + ) + + asyncio.create_task( + self.internal_usage_cache.async_batch_set_cache( + cache_list=values_to_update_in_cache, + ttl=60, + litellm_parent_otel_span=user_api_key_dict.parent_otel_span, + ) # don't block execution for cache updates + ) + + return + + async def async_log_success_event( # noqa: PLR0915 + self, kwargs, response_obj, start_time, end_time + ): + from litellm.proxy.common_utils.callback_utils import ( + get_model_group_from_litellm_kwargs, + ) + + litellm_parent_otel_span: Union[Span, None] = _get_parent_otel_span_from_kwargs( + kwargs=kwargs + ) + try: + self.print_verbose("INSIDE parallel request limiter ASYNC SUCCESS LOGGING") + + global_max_parallel_requests = kwargs["litellm_params"]["metadata"].get( + "global_max_parallel_requests", None + ) + user_api_key = kwargs["litellm_params"]["metadata"]["user_api_key"] + user_api_key_user_id = kwargs["litellm_params"]["metadata"].get( + "user_api_key_user_id", None + ) + user_api_key_team_id = kwargs["litellm_params"]["metadata"].get( + "user_api_key_team_id", None + ) + user_api_key_model_max_budget = kwargs["litellm_params"]["metadata"].get( + "user_api_key_model_max_budget", None + ) + user_api_key_end_user_id = kwargs.get("user") + + user_api_key_metadata = ( + kwargs["litellm_params"]["metadata"].get("user_api_key_metadata", {}) + or {} + ) + + # ------------ + # Setup values + # ------------ + + if global_max_parallel_requests is not None: + # get value from cache + _key = "global_max_parallel_requests" + # decrement + await self.internal_usage_cache.async_increment_cache( + key=_key, + value=-1, + local_only=True, + litellm_parent_otel_span=litellm_parent_otel_span, + ) + + current_date = datetime.now().strftime("%Y-%m-%d") + current_hour = datetime.now().strftime("%H") + current_minute = datetime.now().strftime("%M") + precise_minute = f"{current_date}-{current_hour}-{current_minute}" + + total_tokens = 0 + + if isinstance(response_obj, ModelResponse): + total_tokens = response_obj.usage.total_tokens # type: ignore + + # ------------ + # Update usage - API Key + # ------------ + + values_to_update_in_cache = [] + + if user_api_key is not None: + request_count_api_key = ( + f"{user_api_key}::{precise_minute}::request_count" + ) + + current = await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=litellm_parent_otel_span, + ) or { + "current_requests": 1, + "current_tpm": 0, + "current_rpm": 0, + } + + new_val = { + "current_requests": max(current["current_requests"] - 1, 0), + "current_tpm": current["current_tpm"] + total_tokens, + "current_rpm": current["current_rpm"], + } + + self.print_verbose( + f"updated_value in success call: {new_val}, precise_minute: {precise_minute}" + ) + values_to_update_in_cache.append((request_count_api_key, new_val)) + + # ------------ + # Update usage - model group + API Key + # ------------ + model_group = get_model_group_from_litellm_kwargs(kwargs) + if ( + user_api_key is not None + and model_group is not None + and ( + "model_rpm_limit" in user_api_key_metadata + or "model_tpm_limit" in user_api_key_metadata + or user_api_key_model_max_budget is not None + ) + ): + request_count_api_key = ( + f"{user_api_key}::{model_group}::{precise_minute}::request_count" + ) + + current = await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=litellm_parent_otel_span, + ) or { + "current_requests": 1, + "current_tpm": 0, + "current_rpm": 0, + } + + new_val = { + "current_requests": max(current["current_requests"] - 1, 0), + "current_tpm": current["current_tpm"] + total_tokens, + "current_rpm": current["current_rpm"], + } + + self.print_verbose( + f"updated_value in success call: {new_val}, precise_minute: {precise_minute}" + ) + values_to_update_in_cache.append((request_count_api_key, new_val)) + + # ------------ + # Update usage - User + # ------------ + if user_api_key_user_id is not None: + total_tokens = 0 + + if isinstance(response_obj, ModelResponse): + total_tokens = response_obj.usage.total_tokens # type: ignore + + request_count_api_key = ( + f"{user_api_key_user_id}::{precise_minute}::request_count" + ) + + current = await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=litellm_parent_otel_span, + ) or { + "current_requests": 1, + "current_tpm": total_tokens, + "current_rpm": 1, + } + + new_val = { + "current_requests": max(current["current_requests"] - 1, 0), + "current_tpm": current["current_tpm"] + total_tokens, + "current_rpm": current["current_rpm"], + } + + self.print_verbose( + f"updated_value in success call: {new_val}, precise_minute: {precise_minute}" + ) + values_to_update_in_cache.append((request_count_api_key, new_val)) + + # ------------ + # Update usage - Team + # ------------ + if user_api_key_team_id is not None: + total_tokens = 0 + + if isinstance(response_obj, ModelResponse): + total_tokens = response_obj.usage.total_tokens # type: ignore + + request_count_api_key = ( + f"{user_api_key_team_id}::{precise_minute}::request_count" + ) + + current = await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=litellm_parent_otel_span, + ) or { + "current_requests": 1, + "current_tpm": total_tokens, + "current_rpm": 1, + } + + new_val = { + "current_requests": max(current["current_requests"] - 1, 0), + "current_tpm": current["current_tpm"] + total_tokens, + "current_rpm": current["current_rpm"], + } + + self.print_verbose( + f"updated_value in success call: {new_val}, precise_minute: {precise_minute}" + ) + values_to_update_in_cache.append((request_count_api_key, new_val)) + + # ------------ + # Update usage - End User + # ------------ + if user_api_key_end_user_id is not None: + total_tokens = 0 + + if isinstance(response_obj, ModelResponse): + total_tokens = response_obj.usage.total_tokens # type: ignore + + request_count_api_key = ( + f"{user_api_key_end_user_id}::{precise_minute}::request_count" + ) + + current = await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=litellm_parent_otel_span, + ) or { + "current_requests": 1, + "current_tpm": total_tokens, + "current_rpm": 1, + } + + new_val = { + "current_requests": max(current["current_requests"] - 1, 0), + "current_tpm": current["current_tpm"] + total_tokens, + "current_rpm": current["current_rpm"], + } + + self.print_verbose( + f"updated_value in success call: {new_val}, precise_minute: {precise_minute}" + ) + values_to_update_in_cache.append((request_count_api_key, new_val)) + + await self.internal_usage_cache.async_batch_set_cache( + cache_list=values_to_update_in_cache, + ttl=60, + litellm_parent_otel_span=litellm_parent_otel_span, + ) + except Exception as e: + self.print_verbose(e) # noqa + + async def async_log_failure_event(self, kwargs, response_obj, start_time, end_time): + try: + self.print_verbose("Inside Max Parallel Request Failure Hook") + litellm_parent_otel_span: Union[Span, None] = ( + _get_parent_otel_span_from_kwargs(kwargs=kwargs) + ) + _metadata = kwargs["litellm_params"].get("metadata", {}) or {} + global_max_parallel_requests = _metadata.get( + "global_max_parallel_requests", None + ) + user_api_key = _metadata.get("user_api_key", None) + self.print_verbose(f"user_api_key: {user_api_key}") + if user_api_key is None: + return + + ## decrement call count if call failed + if CommonProxyErrors.max_parallel_request_limit_reached.value in str( + kwargs["exception"] + ): + pass # ignore failed calls due to max limit being reached + else: + # ------------ + # Setup values + # ------------ + + if global_max_parallel_requests is not None: + # get value from cache + _key = "global_max_parallel_requests" + ( + await self.internal_usage_cache.async_get_cache( + key=_key, + local_only=True, + litellm_parent_otel_span=litellm_parent_otel_span, + ) + ) + # decrement + await self.internal_usage_cache.async_increment_cache( + key=_key, + value=-1, + local_only=True, + litellm_parent_otel_span=litellm_parent_otel_span, + ) + + current_date = datetime.now().strftime("%Y-%m-%d") + current_hour = datetime.now().strftime("%H") + current_minute = datetime.now().strftime("%M") + precise_minute = f"{current_date}-{current_hour}-{current_minute}" + + request_count_api_key = ( + f"{user_api_key}::{precise_minute}::request_count" + ) + + # ------------ + # Update usage + # ------------ + current = await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=litellm_parent_otel_span, + ) or { + "current_requests": 1, + "current_tpm": 0, + "current_rpm": 0, + } + + new_val = { + "current_requests": max(current["current_requests"] - 1, 0), + "current_tpm": current["current_tpm"], + "current_rpm": current["current_rpm"], + } + + self.print_verbose(f"updated_value in failure call: {new_val}") + await self.internal_usage_cache.async_set_cache( + request_count_api_key, + new_val, + ttl=60, + litellm_parent_otel_span=litellm_parent_otel_span, + ) # save in cache for up to 1 min. + except Exception as e: + verbose_proxy_logger.exception( + "Inside Parallel Request Limiter: An exception occurred - {}".format( + str(e) + ) + ) + + async def get_internal_user_object( + self, + user_id: str, + user_api_key_dict: UserAPIKeyAuth, + ) -> Optional[dict]: + """ + Helper to get the 'Internal User Object' + + It uses the `get_user_object` function from `litellm.proxy.auth.auth_checks` + + We need this because the UserApiKeyAuth object does not contain the rpm/tpm limits for a User AND there could be a perf impact by additionally reading the UserTable. + """ + from litellm._logging import verbose_proxy_logger + from litellm.proxy.auth.auth_checks import get_user_object + from litellm.proxy.proxy_server import prisma_client + + try: + _user_id_rate_limits = await get_user_object( + user_id=user_id, + prisma_client=prisma_client, + user_api_key_cache=self.internal_usage_cache.dual_cache, + user_id_upsert=False, + parent_otel_span=user_api_key_dict.parent_otel_span, + proxy_logging_obj=None, + ) + + if _user_id_rate_limits is None: + return None + + return _user_id_rate_limits.model_dump() + except Exception as e: + verbose_proxy_logger.debug( + "Parallel Request Limiter: Error getting user object", str(e) + ) + return None + + async def async_post_call_success_hook( + self, data: dict, user_api_key_dict: UserAPIKeyAuth, response + ): + """ + Retrieve the key's remaining rate limits. + """ + api_key = user_api_key_dict.api_key + current_date = datetime.now().strftime("%Y-%m-%d") + current_hour = datetime.now().strftime("%H") + current_minute = datetime.now().strftime("%M") + precise_minute = f"{current_date}-{current_hour}-{current_minute}" + request_count_api_key = f"{api_key}::{precise_minute}::request_count" + current: Optional[CurrentItemRateLimit] = ( + await self.internal_usage_cache.async_get_cache( + key=request_count_api_key, + litellm_parent_otel_span=user_api_key_dict.parent_otel_span, + ) + ) + + key_remaining_rpm_limit: Optional[int] = None + key_rpm_limit: Optional[int] = None + key_remaining_tpm_limit: Optional[int] = None + key_tpm_limit: Optional[int] = None + if current is not None: + if user_api_key_dict.rpm_limit is not None: + key_remaining_rpm_limit = ( + user_api_key_dict.rpm_limit - current["current_rpm"] + ) + key_rpm_limit = user_api_key_dict.rpm_limit + if user_api_key_dict.tpm_limit is not None: + key_remaining_tpm_limit = ( + user_api_key_dict.tpm_limit - current["current_tpm"] + ) + key_tpm_limit = user_api_key_dict.tpm_limit + + if hasattr(response, "_hidden_params"): + _hidden_params = getattr(response, "_hidden_params") + else: + _hidden_params = None + if _hidden_params is not None and ( + isinstance(_hidden_params, BaseModel) or isinstance(_hidden_params, dict) + ): + if isinstance(_hidden_params, BaseModel): + _hidden_params = _hidden_params.model_dump() + + _additional_headers = _hidden_params.get("additional_headers", {}) or {} + + if key_remaining_rpm_limit is not None: + _additional_headers["x-ratelimit-remaining-requests"] = ( + key_remaining_rpm_limit + ) + if key_rpm_limit is not None: + _additional_headers["x-ratelimit-limit-requests"] = key_rpm_limit + if key_remaining_tpm_limit is not None: + _additional_headers["x-ratelimit-remaining-tokens"] = ( + key_remaining_tpm_limit + ) + if key_tpm_limit is not None: + _additional_headers["x-ratelimit-limit-tokens"] = key_tpm_limit + + setattr( + response, + "_hidden_params", + {**_hidden_params, "additional_headers": _additional_headers}, + ) + + return await super().async_post_call_success_hook( + data, user_api_key_dict, response + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/prompt_injection_detection.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/prompt_injection_detection.py new file mode 100644 index 00000000..b1b2bbee --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/prompt_injection_detection.py @@ -0,0 +1,280 @@ +# +------------------------------------+ +# +# Prompt Injection Detection +# +# +------------------------------------+ +# Thank you users! We ❤️ you! - Krrish & Ishaan +## Reject a call if it contains a prompt injection attack. + + +from difflib import SequenceMatcher +from typing import List, Literal, Optional + +from fastapi import HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching.caching import DualCache +from litellm.integrations.custom_logger import CustomLogger +from litellm.litellm_core_utils.prompt_templates.factory import ( + prompt_injection_detection_default_pt, +) +from litellm.proxy._types import LiteLLMPromptInjectionParams, UserAPIKeyAuth +from litellm.router import Router +from litellm.utils import get_formatted_prompt + + +class _OPTIONAL_PromptInjectionDetection(CustomLogger): + # Class variables or attributes + def __init__( + self, + prompt_injection_params: Optional[LiteLLMPromptInjectionParams] = None, + ): + self.prompt_injection_params = prompt_injection_params + self.llm_router: Optional[Router] = None + + self.verbs = [ + "Ignore", + "Disregard", + "Skip", + "Forget", + "Neglect", + "Overlook", + "Omit", + "Bypass", + "Pay no attention to", + "Do not follow", + "Do not obey", + ] + self.adjectives = [ + "", + "prior", + "previous", + "preceding", + "above", + "foregoing", + "earlier", + "initial", + ] + self.prepositions = [ + "", + "and start over", + "and start anew", + "and begin afresh", + "and start from scratch", + ] + + def print_verbose(self, print_statement, level: Literal["INFO", "DEBUG"] = "DEBUG"): + if level == "INFO": + verbose_proxy_logger.info(print_statement) + elif level == "DEBUG": + verbose_proxy_logger.debug(print_statement) + + if litellm.set_verbose is True: + print(print_statement) # noqa + + def update_environment(self, router: Optional[Router] = None): + self.llm_router = router + + if ( + self.prompt_injection_params is not None + and self.prompt_injection_params.llm_api_check is True + ): + if self.llm_router is None: + raise Exception( + "PromptInjectionDetection: Model List not set. Required for Prompt Injection detection." + ) + + self.print_verbose( + f"model_names: {self.llm_router.model_names}; self.prompt_injection_params.llm_api_name: {self.prompt_injection_params.llm_api_name}" + ) + if ( + self.prompt_injection_params.llm_api_name is None + or self.prompt_injection_params.llm_api_name + not in self.llm_router.model_names + ): + raise Exception( + "PromptInjectionDetection: Invalid LLM API Name. LLM API Name must be a 'model_name' in 'model_list'." + ) + + def generate_injection_keywords(self) -> List[str]: + combinations = [] + for verb in self.verbs: + for adj in self.adjectives: + for prep in self.prepositions: + phrase = " ".join(filter(None, [verb, adj, prep])).strip() + if ( + len(phrase.split()) > 2 + ): # additional check to ensure more than 2 words + combinations.append(phrase.lower()) + return combinations + + def check_user_input_similarity( + self, user_input: str, similarity_threshold: float = 0.7 + ) -> bool: + user_input_lower = user_input.lower() + keywords = self.generate_injection_keywords() + + for keyword in keywords: + # Calculate the length of the keyword to extract substrings of the same length from user input + keyword_length = len(keyword) + + for i in range(len(user_input_lower) - keyword_length + 1): + # Extract a substring of the same length as the keyword + substring = user_input_lower[i : i + keyword_length] + + # Calculate similarity + match_ratio = SequenceMatcher(None, substring, keyword).ratio() + if match_ratio > similarity_threshold: + self.print_verbose( + print_statement=f"Rejected user input - {user_input}. {match_ratio} similar to {keyword}", + level="INFO", + ) + return True # Found a highly similar substring + return False # No substring crossed the threshold + + async def async_pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + cache: DualCache, + data: dict, + call_type: str, # "completion", "embeddings", "image_generation", "moderation" + ): + try: + """ + - check if user id part of call + - check if user id part of blocked list + """ + self.print_verbose("Inside Prompt Injection Detection Pre-Call Hook") + try: + assert call_type in [ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + ] + except Exception: + self.print_verbose( + f"Call Type - {call_type}, not in accepted list - ['completion','embeddings','image_generation','moderation','audio_transcription']" + ) + return data + formatted_prompt = get_formatted_prompt(data=data, call_type=call_type) # type: ignore + + is_prompt_attack = False + + if self.prompt_injection_params is not None: + # 1. check if heuristics check turned on + if self.prompt_injection_params.heuristics_check is True: + is_prompt_attack = self.check_user_input_similarity( + user_input=formatted_prompt + ) + if is_prompt_attack is True: + raise HTTPException( + status_code=400, + detail={ + "error": "Rejected message. This is a prompt injection attack." + }, + ) + # 2. check if vector db similarity check turned on [TODO] Not Implemented yet + if self.prompt_injection_params.vector_db_check is True: + pass + else: + is_prompt_attack = self.check_user_input_similarity( + user_input=formatted_prompt + ) + + if is_prompt_attack is True: + raise HTTPException( + status_code=400, + detail={ + "error": "Rejected message. This is a prompt injection attack." + }, + ) + + return data + + except HTTPException as e: + + if ( + e.status_code == 400 + and isinstance(e.detail, dict) + and "error" in e.detail # type: ignore + and self.prompt_injection_params is not None + and self.prompt_injection_params.reject_as_response + ): + return e.detail.get("error") + raise e + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.hooks.prompt_injection_detection.py::async_pre_call_hook(): Exception occured - {}".format( + str(e) + ) + ) + + async def async_moderation_hook( # type: ignore + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + ], + ) -> Optional[bool]: + self.print_verbose( + f"IN ASYNC MODERATION HOOK - self.prompt_injection_params = {self.prompt_injection_params}" + ) + + if self.prompt_injection_params is None: + return None + + formatted_prompt = get_formatted_prompt(data=data, call_type=call_type) # type: ignore + is_prompt_attack = False + + prompt_injection_system_prompt = getattr( + self.prompt_injection_params, + "llm_api_system_prompt", + prompt_injection_detection_default_pt(), + ) + + # 3. check if llm api check turned on + if ( + self.prompt_injection_params.llm_api_check is True + and self.prompt_injection_params.llm_api_name is not None + and self.llm_router is not None + ): + # make a call to the llm api + response = await self.llm_router.acompletion( + model=self.prompt_injection_params.llm_api_name, + messages=[ + { + "role": "system", + "content": prompt_injection_system_prompt, + }, + {"role": "user", "content": formatted_prompt}, + ], + ) + + self.print_verbose(f"Received LLM Moderation response: {response}") + self.print_verbose( + f"llm_api_fail_call_string: {self.prompt_injection_params.llm_api_fail_call_string}" + ) + if isinstance(response, litellm.ModelResponse) and isinstance( + response.choices[0], litellm.Choices + ): + if self.prompt_injection_params.llm_api_fail_call_string in response.choices[0].message.content: # type: ignore + is_prompt_attack = True + + if is_prompt_attack is True: + raise HTTPException( + status_code=400, + detail={ + "error": "Rejected message. This is a prompt injection attack." + }, + ) + + return is_prompt_attack diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/proxy_track_cost_callback.py b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/proxy_track_cost_callback.py new file mode 100644 index 00000000..e8a94732 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/hooks/proxy_track_cost_callback.py @@ -0,0 +1,246 @@ +import asyncio +import traceback +from datetime import datetime +from typing import Any, Optional, Union, cast + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_logger import CustomLogger +from litellm.litellm_core_utils.core_helpers import ( + _get_parent_otel_span_from_kwargs, + get_litellm_metadata_from_kwargs, +) +from litellm.litellm_core_utils.litellm_logging import StandardLoggingPayloadSetup +from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy.auth.auth_checks import log_db_metrics +from litellm.proxy.utils import ProxyUpdateSpend +from litellm.types.utils import ( + StandardLoggingPayload, + StandardLoggingUserAPIKeyMetadata, +) +from litellm.utils import get_end_user_id_for_cost_tracking + + +class _ProxyDBLogger(CustomLogger): + async def async_log_success_event(self, kwargs, response_obj, start_time, end_time): + await self._PROXY_track_cost_callback( + kwargs, response_obj, start_time, end_time + ) + + async def async_post_call_failure_hook( + self, + request_data: dict, + original_exception: Exception, + user_api_key_dict: UserAPIKeyAuth, + ): + from litellm.proxy.proxy_server import update_database + + if _ProxyDBLogger._should_track_errors_in_db() is False: + return + + _metadata = dict( + StandardLoggingUserAPIKeyMetadata( + user_api_key_hash=user_api_key_dict.api_key, + user_api_key_alias=user_api_key_dict.key_alias, + user_api_key_user_email=user_api_key_dict.user_email, + user_api_key_user_id=user_api_key_dict.user_id, + user_api_key_team_id=user_api_key_dict.team_id, + user_api_key_org_id=user_api_key_dict.org_id, + user_api_key_team_alias=user_api_key_dict.team_alias, + user_api_key_end_user_id=user_api_key_dict.end_user_id, + ) + ) + _metadata["user_api_key"] = user_api_key_dict.api_key + _metadata["status"] = "failure" + _metadata["error_information"] = ( + StandardLoggingPayloadSetup.get_error_information( + original_exception=original_exception, + ) + ) + + existing_metadata: dict = request_data.get("metadata", None) or {} + existing_metadata.update(_metadata) + + if "litellm_params" not in request_data: + request_data["litellm_params"] = {} + request_data["litellm_params"]["proxy_server_request"] = ( + request_data.get("proxy_server_request") or {} + ) + request_data["litellm_params"]["metadata"] = existing_metadata + await update_database( + token=user_api_key_dict.api_key, + response_cost=0.0, + user_id=user_api_key_dict.user_id, + end_user_id=user_api_key_dict.end_user_id, + team_id=user_api_key_dict.team_id, + kwargs=request_data, + completion_response=original_exception, + start_time=datetime.now(), + end_time=datetime.now(), + org_id=user_api_key_dict.org_id, + ) + + @log_db_metrics + async def _PROXY_track_cost_callback( + self, + kwargs, # kwargs to completion + completion_response: Optional[ + Union[litellm.ModelResponse, Any] + ], # response from completion + start_time=None, + end_time=None, # start/end time for completion + ): + from litellm.proxy.proxy_server import ( + prisma_client, + proxy_logging_obj, + update_cache, + update_database, + ) + + verbose_proxy_logger.debug("INSIDE _PROXY_track_cost_callback") + try: + verbose_proxy_logger.debug( + f"kwargs stream: {kwargs.get('stream', None)} + complete streaming response: {kwargs.get('complete_streaming_response', None)}" + ) + parent_otel_span = _get_parent_otel_span_from_kwargs(kwargs=kwargs) + litellm_params = kwargs.get("litellm_params", {}) or {} + end_user_id = get_end_user_id_for_cost_tracking(litellm_params) + metadata = get_litellm_metadata_from_kwargs(kwargs=kwargs) + user_id = cast(Optional[str], metadata.get("user_api_key_user_id", None)) + team_id = cast(Optional[str], metadata.get("user_api_key_team_id", None)) + org_id = cast(Optional[str], metadata.get("user_api_key_org_id", None)) + key_alias = cast(Optional[str], metadata.get("user_api_key_alias", None)) + end_user_max_budget = metadata.get("user_api_end_user_max_budget", None) + sl_object: Optional[StandardLoggingPayload] = kwargs.get( + "standard_logging_object", None + ) + response_cost = ( + sl_object.get("response_cost", None) + if sl_object is not None + else kwargs.get("response_cost", None) + ) + + if response_cost is not None: + user_api_key = metadata.get("user_api_key", None) + if kwargs.get("cache_hit", False) is True: + response_cost = 0.0 + verbose_proxy_logger.info( + f"Cache Hit: response_cost {response_cost}, for user_id {user_id}" + ) + + verbose_proxy_logger.debug( + f"user_api_key {user_api_key}, prisma_client: {prisma_client}" + ) + if _should_track_cost_callback( + user_api_key=user_api_key, + user_id=user_id, + team_id=team_id, + end_user_id=end_user_id, + ): + ## UPDATE DATABASE + await update_database( + token=user_api_key, + response_cost=response_cost, + user_id=user_id, + end_user_id=end_user_id, + team_id=team_id, + kwargs=kwargs, + completion_response=completion_response, + start_time=start_time, + end_time=end_time, + org_id=org_id, + ) + + # update cache + asyncio.create_task( + update_cache( + token=user_api_key, + user_id=user_id, + end_user_id=end_user_id, + response_cost=response_cost, + team_id=team_id, + parent_otel_span=parent_otel_span, + ) + ) + + await proxy_logging_obj.slack_alerting_instance.customer_spend_alert( + token=user_api_key, + key_alias=key_alias, + end_user_id=end_user_id, + response_cost=response_cost, + max_budget=end_user_max_budget, + ) + else: + raise Exception( + "User API key and team id and user id missing from custom callback." + ) + else: + if kwargs["stream"] is not True or ( + kwargs["stream"] is True and "complete_streaming_response" in kwargs + ): + if sl_object is not None: + cost_tracking_failure_debug_info: Union[dict, str] = ( + sl_object["response_cost_failure_debug_info"] # type: ignore + or "response_cost_failure_debug_info is None in standard_logging_object" + ) + else: + cost_tracking_failure_debug_info = ( + "standard_logging_object not found" + ) + model = kwargs.get("model") + raise Exception( + f"Cost tracking failed for model={model}.\nDebug info - {cost_tracking_failure_debug_info}\nAdd custom pricing - https://docs.litellm.ai/docs/proxy/custom_pricing" + ) + except Exception as e: + error_msg = f"Error in tracking cost callback - {str(e)}\n Traceback:{traceback.format_exc()}" + model = kwargs.get("model", "") + metadata = kwargs.get("litellm_params", {}).get("metadata", {}) + error_msg += f"\n Args to _PROXY_track_cost_callback\n model: {model}\n metadata: {metadata}\n" + asyncio.create_task( + proxy_logging_obj.failed_tracking_alert( + error_message=error_msg, + failing_model=model, + ) + ) + verbose_proxy_logger.exception( + "Error in tracking cost callback - %s", str(e) + ) + + @staticmethod + def _should_track_errors_in_db(): + """ + Returns True if errors should be tracked in the database + + By default, errors are tracked in the database + + If users want to disable error tracking, they can set the disable_error_logs flag in the general_settings + """ + from litellm.proxy.proxy_server import general_settings + + if general_settings.get("disable_error_logs") is True: + return False + return + + +def _should_track_cost_callback( + user_api_key: Optional[str], + user_id: Optional[str], + team_id: Optional[str], + end_user_id: Optional[str], +) -> bool: + """ + Determine if the cost callback should be tracked based on the kwargs + """ + + # don't run track cost callback if user opted into disabling spend + if ProxyUpdateSpend.disable_spend_updates() is True: + return False + + if ( + user_api_key is not None + or user_id is not None + or team_id is not None + or end_user_id is not None + ): + return True + return False diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/lambda.py b/.venv/lib/python3.12/site-packages/litellm/proxy/lambda.py new file mode 100644 index 00000000..6b278c41 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/lambda.py @@ -0,0 +1,4 @@ +from mangum import Mangum +from litellm.proxy.proxy_server import app + +handler = Mangum(app, lifespan="on") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/litellm_pre_call_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/litellm_pre_call_utils.py new file mode 100644 index 00000000..ece5ecf4 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/litellm_pre_call_utils.py @@ -0,0 +1,901 @@ +import asyncio +import copy +import time +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union + +from fastapi import Request +from starlette.datastructures import Headers + +import litellm +from litellm._logging import verbose_logger, verbose_proxy_logger +from litellm._service_logger import ServiceLogging +from litellm.proxy._types import ( + AddTeamCallback, + CommonProxyErrors, + LitellmDataForBackendLLMCall, + SpecialHeaders, + TeamCallbackMetadata, + UserAPIKeyAuth, +) +from litellm.proxy.auth.route_checks import RouteChecks +from litellm.router import Router +from litellm.types.llms.anthropic import ANTHROPIC_API_HEADERS +from litellm.types.services import ServiceTypes +from litellm.types.utils import ( + ProviderSpecificHeader, + StandardLoggingUserAPIKeyMetadata, + SupportedCacheControls, +) + +service_logger_obj = ServiceLogging() # used for tracking latency on OTEL + + +if TYPE_CHECKING: + from litellm.proxy.proxy_server import ProxyConfig as _ProxyConfig + + ProxyConfig = _ProxyConfig +else: + ProxyConfig = Any + + +def parse_cache_control(cache_control): + cache_dict = {} + directives = cache_control.split(", ") + + for directive in directives: + if "=" in directive: + key, value = directive.split("=") + cache_dict[key] = value + else: + cache_dict[directive] = True + + return cache_dict + + +def _get_metadata_variable_name(request: Request) -> str: + """ + Helper to return what the "metadata" field should be called in the request data + + For all /thread or /assistant endpoints we need to call this "litellm_metadata" + + For ALL other endpoints we call this "metadata + """ + if RouteChecks._is_assistants_api_request(request): + return "litellm_metadata" + + LITELLM_METADATA_ROUTES = [ + "batches", + "/v1/messages", + "responses", + ] + if any( + [ + litellm_metadata_route in request.url.path + for litellm_metadata_route in LITELLM_METADATA_ROUTES + ] + ): + return "litellm_metadata" + else: + return "metadata" + + +def safe_add_api_version_from_query_params(data: dict, request: Request): + try: + if hasattr(request, "query_params"): + query_params = dict(request.query_params) + if "api-version" in query_params: + data["api_version"] = query_params["api-version"] + except KeyError: + pass + except Exception as e: + verbose_logger.exception( + "error checking api version in query params: %s", str(e) + ) + + +def convert_key_logging_metadata_to_callback( + data: AddTeamCallback, team_callback_settings_obj: Optional[TeamCallbackMetadata] +) -> TeamCallbackMetadata: + if team_callback_settings_obj is None: + team_callback_settings_obj = TeamCallbackMetadata() + if data.callback_type == "success": + if team_callback_settings_obj.success_callback is None: + team_callback_settings_obj.success_callback = [] + + if data.callback_name not in team_callback_settings_obj.success_callback: + team_callback_settings_obj.success_callback.append(data.callback_name) + elif data.callback_type == "failure": + if team_callback_settings_obj.failure_callback is None: + team_callback_settings_obj.failure_callback = [] + + if data.callback_name not in team_callback_settings_obj.failure_callback: + team_callback_settings_obj.failure_callback.append(data.callback_name) + elif ( + not data.callback_type or data.callback_type == "success_and_failure" + ): # assume 'success_and_failure' = litellm.callbacks + if team_callback_settings_obj.success_callback is None: + team_callback_settings_obj.success_callback = [] + if team_callback_settings_obj.failure_callback is None: + team_callback_settings_obj.failure_callback = [] + if team_callback_settings_obj.callbacks is None: + team_callback_settings_obj.callbacks = [] + + if data.callback_name not in team_callback_settings_obj.success_callback: + team_callback_settings_obj.success_callback.append(data.callback_name) + + if data.callback_name not in team_callback_settings_obj.failure_callback: + team_callback_settings_obj.failure_callback.append(data.callback_name) + + if data.callback_name not in team_callback_settings_obj.callbacks: + team_callback_settings_obj.callbacks.append(data.callback_name) + + for var, value in data.callback_vars.items(): + if team_callback_settings_obj.callback_vars is None: + team_callback_settings_obj.callback_vars = {} + team_callback_settings_obj.callback_vars[var] = str( + litellm.utils.get_secret(value, default_value=value) or value + ) + + return team_callback_settings_obj + + +def _get_dynamic_logging_metadata( + user_api_key_dict: UserAPIKeyAuth, proxy_config: ProxyConfig +) -> Optional[TeamCallbackMetadata]: + callback_settings_obj: Optional[TeamCallbackMetadata] = None + if ( + user_api_key_dict.metadata is not None + and "logging" in user_api_key_dict.metadata + ): + for item in user_api_key_dict.metadata["logging"]: + callback_settings_obj = convert_key_logging_metadata_to_callback( + data=AddTeamCallback(**item), + team_callback_settings_obj=callback_settings_obj, + ) + elif ( + user_api_key_dict.team_metadata is not None + and "callback_settings" in user_api_key_dict.team_metadata + ): + """ + callback_settings = { + { + 'callback_vars': {'langfuse_public_key': 'pk', 'langfuse_secret_key': 'sk_'}, + 'failure_callback': [], + 'success_callback': ['langfuse', 'langfuse'] + } + } + """ + team_metadata = user_api_key_dict.team_metadata + callback_settings = team_metadata.get("callback_settings", None) or {} + callback_settings_obj = TeamCallbackMetadata(**callback_settings) + verbose_proxy_logger.debug( + "Team callback settings activated: %s", callback_settings_obj + ) + elif user_api_key_dict.team_id is not None: + callback_settings_obj = ( + LiteLLMProxyRequestSetup.add_team_based_callbacks_from_config( + team_id=user_api_key_dict.team_id, proxy_config=proxy_config + ) + ) + return callback_settings_obj + + +def clean_headers( + headers: Headers, litellm_key_header_name: Optional[str] = None +) -> dict: + """ + Removes litellm api key from headers + """ + special_headers = [v.value.lower() for v in SpecialHeaders._member_map_.values()] + special_headers = special_headers + if litellm_key_header_name is not None: + special_headers.append(litellm_key_header_name.lower()) + clean_headers = {} + for header, value in headers.items(): + if header.lower() not in special_headers: + clean_headers[header] = value + return clean_headers + + +class LiteLLMProxyRequestSetup: + @staticmethod + def _get_timeout_from_request(headers: dict) -> Optional[float]: + """ + Workaround for client request from Vercel's AI SDK. + + Allow's user to set a timeout in the request headers. + + Example: + + ```js + const openaiProvider = createOpenAI({ + baseURL: liteLLM.baseURL, + apiKey: liteLLM.apiKey, + compatibility: "compatible", + headers: { + "x-litellm-timeout": "90" + }, + }); + ``` + """ + timeout_header = headers.get("x-litellm-timeout", None) + if timeout_header is not None: + return float(timeout_header) + return None + + @staticmethod + def _get_forwardable_headers( + headers: Union[Headers, dict], + ): + """ + Get the headers that should be forwarded to the LLM Provider. + + Looks for any `x-` headers and sends them to the LLM Provider. + """ + forwarded_headers = {} + for header, value in headers.items(): + if header.lower().startswith("x-") and not header.lower().startswith( + "x-stainless" + ): # causes openai sdk to fail + forwarded_headers[header] = value + + return forwarded_headers + + @staticmethod + def get_openai_org_id_from_headers( + headers: dict, general_settings: Optional[Dict] = None + ) -> Optional[str]: + """ + Get the OpenAI Org ID from the headers. + """ + if ( + general_settings is not None + and general_settings.get("forward_openai_org_id") is not True + ): + return None + for header, value in headers.items(): + if header.lower() == "openai-organization": + verbose_logger.info(f"found openai org id: {value}, sending to llm") + return value + return None + + @staticmethod + def add_headers_to_llm_call( + headers: dict, user_api_key_dict: UserAPIKeyAuth + ) -> dict: + """ + Add headers to the LLM call + + - Checks request headers for forwardable headers + - Checks if user information should be added to the headers + """ + + returned_headers = LiteLLMProxyRequestSetup._get_forwardable_headers(headers) + + if litellm.add_user_information_to_llm_headers is True: + litellm_logging_metadata_headers = ( + LiteLLMProxyRequestSetup.get_sanitized_user_information_from_key( + user_api_key_dict=user_api_key_dict + ) + ) + for k, v in litellm_logging_metadata_headers.items(): + if v is not None: + returned_headers["x-litellm-{}".format(k)] = v + + return returned_headers + + @staticmethod + def add_litellm_data_for_backend_llm_call( + *, + headers: dict, + user_api_key_dict: UserAPIKeyAuth, + general_settings: Optional[Dict[str, Any]] = None, + ) -> LitellmDataForBackendLLMCall: + """ + - Adds forwardable headers + - Adds org id + """ + data = LitellmDataForBackendLLMCall() + if ( + general_settings + and general_settings.get("forward_client_headers_to_llm_api") is True + ): + _headers = LiteLLMProxyRequestSetup.add_headers_to_llm_call( + headers, user_api_key_dict + ) + if _headers != {}: + data["headers"] = _headers + _organization = LiteLLMProxyRequestSetup.get_openai_org_id_from_headers( + headers, general_settings + ) + if _organization is not None: + data["organization"] = _organization + + timeout = LiteLLMProxyRequestSetup._get_timeout_from_request(headers) + if timeout is not None: + data["timeout"] = timeout + + return data + + @staticmethod + def get_sanitized_user_information_from_key( + user_api_key_dict: UserAPIKeyAuth, + ) -> StandardLoggingUserAPIKeyMetadata: + user_api_key_logged_metadata = StandardLoggingUserAPIKeyMetadata( + user_api_key_hash=user_api_key_dict.api_key, # just the hashed token + user_api_key_alias=user_api_key_dict.key_alias, + user_api_key_team_id=user_api_key_dict.team_id, + user_api_key_user_id=user_api_key_dict.user_id, + user_api_key_org_id=user_api_key_dict.org_id, + user_api_key_team_alias=user_api_key_dict.team_alias, + user_api_key_end_user_id=user_api_key_dict.end_user_id, + user_api_key_user_email=user_api_key_dict.user_email, + ) + return user_api_key_logged_metadata + + @staticmethod + def add_key_level_controls( + key_metadata: dict, data: dict, _metadata_variable_name: str + ): + if "cache" in key_metadata: + data["cache"] = {} + if isinstance(key_metadata["cache"], dict): + for k, v in key_metadata["cache"].items(): + if k in SupportedCacheControls: + data["cache"][k] = v + + ## KEY-LEVEL SPEND LOGS / TAGS + if "tags" in key_metadata and key_metadata["tags"] is not None: + data[_metadata_variable_name]["tags"] = ( + LiteLLMProxyRequestSetup._merge_tags( + request_tags=data[_metadata_variable_name].get("tags"), + tags_to_add=key_metadata["tags"], + ) + ) + if "spend_logs_metadata" in key_metadata and isinstance( + key_metadata["spend_logs_metadata"], dict + ): + if "spend_logs_metadata" in data[_metadata_variable_name] and isinstance( + data[_metadata_variable_name]["spend_logs_metadata"], dict + ): + for key, value in key_metadata["spend_logs_metadata"].items(): + if ( + key not in data[_metadata_variable_name]["spend_logs_metadata"] + ): # don't override k-v pair sent by request (user request) + data[_metadata_variable_name]["spend_logs_metadata"][ + key + ] = value + else: + data[_metadata_variable_name]["spend_logs_metadata"] = key_metadata[ + "spend_logs_metadata" + ] + + ## KEY-LEVEL DISABLE FALLBACKS + if "disable_fallbacks" in key_metadata and isinstance( + key_metadata["disable_fallbacks"], bool + ): + data["disable_fallbacks"] = key_metadata["disable_fallbacks"] + return data + + @staticmethod + def _merge_tags(request_tags: Optional[list], tags_to_add: Optional[list]) -> list: + """ + Helper function to merge two lists of tags, ensuring no duplicates. + + Args: + request_tags (Optional[list]): List of tags from the original request + tags_to_add (Optional[list]): List of tags to add + + Returns: + list: Combined list of unique tags + """ + final_tags = [] + + if request_tags and isinstance(request_tags, list): + final_tags.extend(request_tags) + + if tags_to_add and isinstance(tags_to_add, list): + for tag in tags_to_add: + if tag not in final_tags: + final_tags.append(tag) + + return final_tags + + @staticmethod + def add_team_based_callbacks_from_config( + team_id: str, + proxy_config: ProxyConfig, + ) -> Optional[TeamCallbackMetadata]: + """ + Add team-based callbacks from the config + """ + team_config = proxy_config.load_team_config(team_id=team_id) + if len(team_config.keys()) == 0: + return None + + callback_vars_dict = {**team_config.get("callback_vars", team_config)} + callback_vars_dict.pop("team_id", None) + callback_vars_dict.pop("success_callback", None) + callback_vars_dict.pop("failure_callback", None) + + return TeamCallbackMetadata( + success_callback=team_config.get("success_callback", None), + failure_callback=team_config.get("failure_callback", None), + callback_vars=callback_vars_dict, + ) + + @staticmethod + def add_request_tag_to_metadata( + llm_router: Optional[Router], + headers: dict, + data: dict, + ) -> Optional[List[str]]: + tags = None + + if llm_router and llm_router.enable_tag_filtering is True: + # Check request headers for tags + if "x-litellm-tags" in headers: + if isinstance(headers["x-litellm-tags"], str): + _tags = headers["x-litellm-tags"].split(",") + tags = [tag.strip() for tag in _tags] + elif isinstance(headers["x-litellm-tags"], list): + tags = headers["x-litellm-tags"] + # Check request body for tags + if "tags" in data and isinstance(data["tags"], list): + tags = data["tags"] + + return tags + + +async def add_litellm_data_to_request( # noqa: PLR0915 + data: dict, + request: Request, + user_api_key_dict: UserAPIKeyAuth, + proxy_config: ProxyConfig, + general_settings: Optional[Dict[str, Any]] = None, + version: Optional[str] = None, +): + """ + Adds LiteLLM-specific data to the request. + + Args: + data (dict): The data dictionary to be modified. + request (Request): The incoming request. + user_api_key_dict (UserAPIKeyAuth): The user API key dictionary. + general_settings (Optional[Dict[str, Any]], optional): General settings. Defaults to None. + version (Optional[str], optional): Version. Defaults to None. + + Returns: + dict: The modified data dictionary. + + """ + + from litellm.proxy.proxy_server import llm_router, premium_user + + safe_add_api_version_from_query_params(data, request) + + _headers = clean_headers( + request.headers, + litellm_key_header_name=( + general_settings.get("litellm_key_header_name") + if general_settings is not None + else None + ), + ) + + data.update( + LiteLLMProxyRequestSetup.add_litellm_data_for_backend_llm_call( + headers=_headers, + user_api_key_dict=user_api_key_dict, + general_settings=general_settings, + ) + ) + + # Include original request and headers in the data + data["proxy_server_request"] = { + "url": str(request.url), + "method": request.method, + "headers": _headers, + "body": copy.copy(data), # use copy instead of deepcopy + } + + ## Dynamic api version (Azure OpenAI endpoints) ## + try: + query_params = request.query_params + # Convert query parameters to a dictionary (optional) + query_dict = dict(query_params) + except KeyError: + query_dict = {} + + ## check for api version in query params + dynamic_api_version: Optional[str] = query_dict.get("api-version") + + if dynamic_api_version is not None: # only pass, if set + data["api_version"] = dynamic_api_version + + ## Forward any LLM API Provider specific headers in extra_headers + add_provider_specific_headers_to_request(data=data, headers=_headers) + + ## Cache Controls + headers = request.headers + verbose_proxy_logger.debug("Request Headers: %s", headers) + cache_control_header = headers.get("Cache-Control", None) + if cache_control_header: + cache_dict = parse_cache_control(cache_control_header) + data["ttl"] = cache_dict.get("s-maxage") + + verbose_proxy_logger.debug("receiving data: %s", data) + + _metadata_variable_name = _get_metadata_variable_name(request) + + if _metadata_variable_name not in data: + data[_metadata_variable_name] = {} + + # We want to log the "metadata" from the client side request. Avoid circular reference by not directly assigning metadata to itself. + if "metadata" in data and data["metadata"] is not None: + data[_metadata_variable_name]["requester_metadata"] = copy.deepcopy( + data["metadata"] + ) + + user_api_key_logged_metadata = ( + LiteLLMProxyRequestSetup.get_sanitized_user_information_from_key( + user_api_key_dict=user_api_key_dict + ) + ) + data[_metadata_variable_name].update(user_api_key_logged_metadata) + data[_metadata_variable_name][ + "user_api_key" + ] = ( + user_api_key_dict.api_key + ) # this is just the hashed token. [TODO]: replace variable name in repo. + + data[_metadata_variable_name]["user_api_end_user_max_budget"] = getattr( + user_api_key_dict, "end_user_max_budget", None + ) + + data[_metadata_variable_name]["litellm_api_version"] = version + + if general_settings is not None: + data[_metadata_variable_name]["global_max_parallel_requests"] = ( + general_settings.get("global_max_parallel_requests", None) + ) + + ### KEY-LEVEL Controls + key_metadata = user_api_key_dict.metadata + data = LiteLLMProxyRequestSetup.add_key_level_controls( + key_metadata=key_metadata, + data=data, + _metadata_variable_name=_metadata_variable_name, + ) + ## TEAM-LEVEL SPEND LOGS/TAGS + team_metadata = user_api_key_dict.team_metadata or {} + if "tags" in team_metadata and team_metadata["tags"] is not None: + data[_metadata_variable_name]["tags"] = LiteLLMProxyRequestSetup._merge_tags( + request_tags=data[_metadata_variable_name].get("tags"), + tags_to_add=team_metadata["tags"], + ) + if "spend_logs_metadata" in team_metadata and isinstance( + team_metadata["spend_logs_metadata"], dict + ): + if "spend_logs_metadata" in data[_metadata_variable_name] and isinstance( + data[_metadata_variable_name]["spend_logs_metadata"], dict + ): + for key, value in team_metadata["spend_logs_metadata"].items(): + if ( + key not in data[_metadata_variable_name]["spend_logs_metadata"] + ): # don't override k-v pair sent by request (user request) + data[_metadata_variable_name]["spend_logs_metadata"][key] = value + else: + data[_metadata_variable_name]["spend_logs_metadata"] = team_metadata[ + "spend_logs_metadata" + ] + + # Team spend, budget - used by prometheus.py + data[_metadata_variable_name][ + "user_api_key_team_max_budget" + ] = user_api_key_dict.team_max_budget + data[_metadata_variable_name][ + "user_api_key_team_spend" + ] = user_api_key_dict.team_spend + + # API Key spend, budget - used by prometheus.py + data[_metadata_variable_name]["user_api_key_spend"] = user_api_key_dict.spend + data[_metadata_variable_name][ + "user_api_key_max_budget" + ] = user_api_key_dict.max_budget + data[_metadata_variable_name][ + "user_api_key_model_max_budget" + ] = user_api_key_dict.model_max_budget + + data[_metadata_variable_name]["user_api_key_metadata"] = user_api_key_dict.metadata + _headers = dict(request.headers) + _headers.pop( + "authorization", None + ) # do not store the original `sk-..` api key in the db + data[_metadata_variable_name]["headers"] = _headers + data[_metadata_variable_name]["endpoint"] = str(request.url) + + # OTEL Controls / Tracing + # Add the OTEL Parent Trace before sending it LiteLLM + data[_metadata_variable_name][ + "litellm_parent_otel_span" + ] = user_api_key_dict.parent_otel_span + _add_otel_traceparent_to_data(data, request=request) + + ### END-USER SPECIFIC PARAMS ### + if user_api_key_dict.allowed_model_region is not None: + data["allowed_model_region"] = user_api_key_dict.allowed_model_region + start_time = time.time() + ## [Enterprise Only] + # Add User-IP Address + requester_ip_address = "" + if premium_user is True: + # Only set the IP Address for Enterprise Users + + # logic for tracking IP Address + if ( + general_settings is not None + and general_settings.get("use_x_forwarded_for") is True + and request is not None + and hasattr(request, "headers") + and "x-forwarded-for" in request.headers + ): + requester_ip_address = request.headers["x-forwarded-for"] + elif ( + request is not None + and hasattr(request, "client") + and hasattr(request.client, "host") + and request.client is not None + ): + requester_ip_address = request.client.host + data[_metadata_variable_name]["requester_ip_address"] = requester_ip_address + + # Check if using tag based routing + tags = LiteLLMProxyRequestSetup.add_request_tag_to_metadata( + llm_router=llm_router, + headers=dict(request.headers), + data=data, + ) + + if tags is not None: + data[_metadata_variable_name]["tags"] = tags + + # Team Callbacks controls + callback_settings_obj = _get_dynamic_logging_metadata( + user_api_key_dict=user_api_key_dict, proxy_config=proxy_config + ) + if callback_settings_obj is not None: + data["success_callback"] = callback_settings_obj.success_callback + data["failure_callback"] = callback_settings_obj.failure_callback + + if callback_settings_obj.callback_vars is not None: + # unpack callback_vars in data + for k, v in callback_settings_obj.callback_vars.items(): + data[k] = v + + # Guardrails + move_guardrails_to_metadata( + data=data, + _metadata_variable_name=_metadata_variable_name, + user_api_key_dict=user_api_key_dict, + ) + + # Team Model Aliases + _update_model_if_team_alias_exists( + data=data, + user_api_key_dict=user_api_key_dict, + ) + + verbose_proxy_logger.debug( + "[PROXY] returned data from litellm_pre_call_utils: %s", data + ) + + ## ENFORCED PARAMS CHECK + # loop through each enforced param + # example enforced_params ['user', 'metadata', 'metadata.generation_name'] + _enforced_params_check( + request_body=data, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + premium_user=premium_user, + ) + + end_time = time.time() + asyncio.create_task( + service_logger_obj.async_service_success_hook( + service=ServiceTypes.PROXY_PRE_CALL, + duration=end_time - start_time, + call_type="add_litellm_data_to_request", + start_time=start_time, + end_time=end_time, + parent_otel_span=user_api_key_dict.parent_otel_span, + ) + ) + + return data + + +def _update_model_if_team_alias_exists( + data: dict, + user_api_key_dict: UserAPIKeyAuth, +) -> None: + """ + Update the model if the team alias exists + + If a alias map has been set on a team, then we want to make the request with the model the team alias is pointing to + + eg. + - user calls `gpt-4o` + - team.model_alias_map = { + "gpt-4o": "gpt-4o-team-1" + } + - requested_model = "gpt-4o-team-1" + """ + _model = data.get("model") + if ( + _model + and user_api_key_dict.team_model_aliases + and _model in user_api_key_dict.team_model_aliases + ): + data["model"] = user_api_key_dict.team_model_aliases[_model] + return + + +def _get_enforced_params( + general_settings: Optional[dict], user_api_key_dict: UserAPIKeyAuth +) -> Optional[list]: + enforced_params: Optional[list] = None + if general_settings is not None: + enforced_params = general_settings.get("enforced_params") + if "service_account_settings" in general_settings: + service_account_settings = general_settings["service_account_settings"] + if "enforced_params" in service_account_settings: + if enforced_params is None: + enforced_params = [] + enforced_params.extend(service_account_settings["enforced_params"]) + if user_api_key_dict.metadata.get("enforced_params", None) is not None: + if enforced_params is None: + enforced_params = [] + enforced_params.extend(user_api_key_dict.metadata["enforced_params"]) + return enforced_params + + +def _enforced_params_check( + request_body: dict, + general_settings: Optional[dict], + user_api_key_dict: UserAPIKeyAuth, + premium_user: bool, +) -> bool: + """ + If enforced params are set, check if the request body contains the enforced params. + """ + enforced_params: Optional[list] = _get_enforced_params( + general_settings=general_settings, user_api_key_dict=user_api_key_dict + ) + if enforced_params is None: + return True + if enforced_params is not None and premium_user is not True: + raise ValueError( + f"Enforced Params is an Enterprise feature. Enforced Params: {enforced_params}. {CommonProxyErrors.not_premium_user.value}" + ) + + for enforced_param in enforced_params: + _enforced_params = enforced_param.split(".") + if len(_enforced_params) == 1: + if _enforced_params[0] not in request_body: + raise ValueError( + f"BadRequest please pass param={_enforced_params[0]} in request body. This is a required param" + ) + elif len(_enforced_params) == 2: + # this is a scenario where user requires request['metadata']['generation_name'] to exist + if _enforced_params[0] not in request_body: + raise ValueError( + f"BadRequest please pass param={_enforced_params[0]} in request body. This is a required param" + ) + if _enforced_params[1] not in request_body[_enforced_params[0]]: + raise ValueError( + f"BadRequest please pass param=[{_enforced_params[0]}][{_enforced_params[1]}] in request body. This is a required param" + ) + return True + + +def _add_guardrails_from_key_or_team_metadata( + key_metadata: Optional[dict], + team_metadata: Optional[dict], + data: dict, + metadata_variable_name: str, +) -> None: + """ + Helper add guardrails from key or team metadata to request data + + Args: + key_metadata: The key metadata dictionary to check for guardrails + team_metadata: The team metadata dictionary to check for guardrails + data: The request data to update + metadata_variable_name: The name of the metadata field in data + + """ + from litellm.proxy.utils import _premium_user_check + + for _management_object_metadata in [key_metadata, team_metadata]: + if _management_object_metadata and "guardrails" in _management_object_metadata: + if len(_management_object_metadata["guardrails"]) > 0: + _premium_user_check() + + data[metadata_variable_name]["guardrails"] = _management_object_metadata[ + "guardrails" + ] + + +def move_guardrails_to_metadata( + data: dict, + _metadata_variable_name: str, + user_api_key_dict: UserAPIKeyAuth, +): + """ + Helper to add guardrails from request to metadata + + - If guardrails set on API Key metadata then sets guardrails on request metadata + - If guardrails not set on API key, then checks request metadata + """ + # Check key-level guardrails + _add_guardrails_from_key_or_team_metadata( + key_metadata=user_api_key_dict.metadata, + team_metadata=user_api_key_dict.team_metadata, + data=data, + metadata_variable_name=_metadata_variable_name, + ) + + # Check request-level guardrails + if "guardrails" in data: + data[_metadata_variable_name]["guardrails"] = data["guardrails"] + del data["guardrails"] + + if "guardrail_config" in data: + data[_metadata_variable_name]["guardrail_config"] = data["guardrail_config"] + del data["guardrail_config"] + + +def add_provider_specific_headers_to_request( + data: dict, + headers: dict, +): + anthropic_headers = {} + # boolean to indicate if a header was added + added_header = False + for header in ANTHROPIC_API_HEADERS: + if header in headers: + header_value = headers[header] + anthropic_headers[header] = header_value + added_header = True + + if added_header is True: + data["provider_specific_header"] = ProviderSpecificHeader( + custom_llm_provider="anthropic", + extra_headers=anthropic_headers, + ) + + return + + +def _add_otel_traceparent_to_data(data: dict, request: Request): + from litellm.proxy.proxy_server import open_telemetry_logger + + if data is None: + return + if open_telemetry_logger is None: + # if user is not use OTEL don't send extra_headers + # relevant issue: https://github.com/BerriAI/litellm/issues/4448 + return + + if litellm.forward_traceparent_to_llm_provider is True: + if request.headers: + if "traceparent" in request.headers: + # we want to forward this to the LLM Provider + # Relevant issue: https://github.com/BerriAI/litellm/issues/4419 + # pass this in extra_headers + if "extra_headers" not in data: + data["extra_headers"] = {} + _exra_headers = data["extra_headers"] + if "traceparent" not in _exra_headers: + _exra_headers["traceparent"] = request.headers["traceparent"] diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/llamaguard_prompt.txt b/.venv/lib/python3.12/site-packages/litellm/proxy/llamaguard_prompt.txt new file mode 100644 index 00000000..25cd8bce --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/llamaguard_prompt.txt @@ -0,0 +1,46 @@ +O1: Violence and Hate. +Should not +- Help people plan or engage in violence. +- Encourage people to engage in violence. +- Express hateful, derogatory, or demeaning sentiments against people based on sensitive personal characteristics like their race, color, religion, national origin, sexual orientation, gender, gender identity, or disability. +- Encourage discrimination against people based on those characteristics and should not use slurs or create insults based on those characteristics. +Can +- Provide information on violence and discrimination. +- Discuss the topics of hate and violence, and can discuss historical events involving violence. +O2: Sexual Content. +Should not +- Engage in sexually explicit (i.e., erotic) conversations and should not encourage people to engage in sexual activities. +Can +- Discuss topics related to sexuality and sexual education. +- Provide general information regarding sexual activities. +- Provide guidance on topics related to sexual health. +O3: Criminal Planning. +Should not +- Help people plan or engage in criminal activities like theft, kidnapping, or financial crimes, especially when the person indicates that they may act on the information provided to them. +- Encourage people to engage in criminal activities or condone criminal behavior. +Can +- Help people understand how crimes are committed, provided that the response is not so detailed that it could be used to provide a roadmap for future crimes. +- Help people understand how systems work that are used to prevent crimes, provided those descriptions do not provide detailed information on how to defeat those systems. +O4: Guns and Illegal Weapons. +Should not +- Assist in the planning or execution of firearm or illegal weapons crimes, especially when the person indicates that they may act on the information provided to them. +- Encourage people to engage in firearm or illegal weapons crimes or condone such behavior. +Can +- Discuss firearms and the arguments for and against firearm ownership. +O5: Regulated or Controlled Substances. +Should not +- Encourage or assist people in the trafficking, consumption, or use of regulated or controlled substances, including but not limited to illegal drugs, tobacco, alcohol, and cannabis. +- Assist or encourage people to create such substances when it is illegal to do so. +Can +- Discuss the use of regulated or controlled substances, and can provide general information on those substances (ex: what their chemical composition is and what their effects are). +- Provide information on how those substances are manufactured, provided that the information is not so detailed as to provide step-by-step instructions for their creation. +O6: Self-Harm. +Should not +- Encourage people to harm themselves. +- Romanticize or condone self-harm or suicide. +- Provide information regarding the methods of suicide or self-harm. +- Provide any information or advice, other than information regarding appropriate health resources, to people who express or imply that they wish to harm themselves. +Can +- Provide general information regarding self-harm and suicide (ex: statistics, the mental health challenges faced by those who take these actions). +Should +- Provide information regarding appropriate health resources to people who imply or express the desire to harm themselves.
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/logo.jpg b/.venv/lib/python3.12/site-packages/litellm/proxy/logo.jpg Binary files differnew file mode 100644 index 00000000..a10a1d24 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/logo.jpg diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/budget_management_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/budget_management_endpoints.py new file mode 100644 index 00000000..20aa1c6b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/budget_management_endpoints.py @@ -0,0 +1,287 @@ +""" +BUDGET MANAGEMENT + +All /budget management endpoints + +/budget/new +/budget/info +/budget/update +/budget/delete +/budget/settings +/budget/list +""" + +#### BUDGET TABLE MANAGEMENT #### +from fastapi import APIRouter, Depends, HTTPException + +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.utils import jsonify_object + +router = APIRouter() + + +@router.post( + "/budget/new", + tags=["budget management"], + dependencies=[Depends(user_api_key_auth)], +) +async def new_budget( + budget_obj: BudgetNewRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create a new budget object. Can apply this to teams, orgs, end-users, keys. + + Parameters: + - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) + - budget_id: Optional[str] - The id of the budget. If not provided, a new id will be generated. + - max_budget: Optional[float] - The max budget for the budget. + - soft_budget: Optional[float] - The soft budget for the budget. + - max_parallel_requests: Optional[int] - The max number of parallel requests for the budget. + - tpm_limit: Optional[int] - The tokens per minute limit for the budget. + - rpm_limit: Optional[int] - The requests per minute limit for the budget. + - model_max_budget: Optional[dict] - Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d", "tpm_limit": 100000, "rpm_limit": 100000}} + """ + from litellm.proxy.proxy_server import litellm_proxy_admin_name, prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + budget_obj_json = budget_obj.model_dump(exclude_none=True) + budget_obj_jsonified = jsonify_object(budget_obj_json) # json dump any dictionaries + response = await prisma_client.db.litellm_budgettable.create( + data={ + **budget_obj_jsonified, # type: ignore + "created_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + "updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + } # type: ignore + ) + + return response + + +@router.post( + "/budget/update", + tags=["budget management"], + dependencies=[Depends(user_api_key_auth)], +) +async def update_budget( + budget_obj: BudgetNewRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Update an existing budget object. + + Parameters: + - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) + - budget_id: Optional[str] - The id of the budget. If not provided, a new id will be generated. + - max_budget: Optional[float] - The max budget for the budget. + - soft_budget: Optional[float] - The soft budget for the budget. + - max_parallel_requests: Optional[int] - The max number of parallel requests for the budget. + - tpm_limit: Optional[int] - The tokens per minute limit for the budget. + - rpm_limit: Optional[int] - The requests per minute limit for the budget. + - model_max_budget: Optional[dict] - Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d", "tpm_limit": 100000, "rpm_limit": 100000}} + """ + from litellm.proxy.proxy_server import litellm_proxy_admin_name, prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + if budget_obj.budget_id is None: + raise HTTPException(status_code=400, detail={"error": "budget_id is required"}) + + response = await prisma_client.db.litellm_budgettable.update( + where={"budget_id": budget_obj.budget_id}, + data={ + **budget_obj.model_dump(exclude_none=True), # type: ignore + "updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + }, # type: ignore + ) + + return response + + +@router.post( + "/budget/info", + tags=["budget management"], + dependencies=[Depends(user_api_key_auth)], +) +async def info_budget(data: BudgetRequest): + """ + Get the budget id specific information + + Parameters: + - budgets: List[str] - The list of budget ids to get information for + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if len(data.budgets) == 0: + raise HTTPException( + status_code=400, + detail={ + "error": f"Specify list of budget id's to query. Passed in={data.budgets}" + }, + ) + response = await prisma_client.db.litellm_budgettable.find_many( + where={"budget_id": {"in": data.budgets}}, + ) + + return response + + +@router.get( + "/budget/settings", + tags=["budget management"], + dependencies=[Depends(user_api_key_auth)], +) +async def budget_settings( + budget_id: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get list of configurable params + current value for a budget item + description of each field + + Used on Admin UI. + + Query Parameters: + - budget_id: str - The budget id to get information for + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + ## get budget item from db + db_budget_row = await prisma_client.db.litellm_budgettable.find_first( + where={"budget_id": budget_id} + ) + + if db_budget_row is not None: + db_budget_row_dict = db_budget_row.model_dump(exclude_none=True) + else: + db_budget_row_dict = {} + + allowed_args = { + "max_parallel_requests": {"type": "Integer"}, + "tpm_limit": {"type": "Integer"}, + "rpm_limit": {"type": "Integer"}, + "budget_duration": {"type": "String"}, + "max_budget": {"type": "Float"}, + "soft_budget": {"type": "Float"}, + } + + return_val = [] + + for field_name, field_info in BudgetNewRequest.model_fields.items(): + if field_name in allowed_args: + + _stored_in_db = True + + _response_obj = ConfigList( + field_name=field_name, + field_type=allowed_args[field_name]["type"], + field_description=field_info.description or "", + field_value=db_budget_row_dict.get(field_name, None), + stored_in_db=_stored_in_db, + field_default_value=field_info.default, + ) + return_val.append(_response_obj) + + return return_val + + +@router.get( + "/budget/list", + tags=["budget management"], + dependencies=[Depends(user_api_key_auth)], +) +async def list_budget( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """List all the created budgets in proxy db. Used on Admin UI.""" + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + response = await prisma_client.db.litellm_budgettable.find_many() + + return response + + +@router.post( + "/budget/delete", + tags=["budget management"], + dependencies=[Depends(user_api_key_auth)], +) +async def delete_budget( + data: BudgetDeleteRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete budget + + Parameters: + - id: str - The budget id to delete + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + response = await prisma_client.db.litellm_budgettable.delete( + where={"budget_id": data.id} + ) + + return response diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/common_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/common_utils.py new file mode 100644 index 00000000..d80a06c5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/common_utils.py @@ -0,0 +1,41 @@ +from typing import Any, Union + +from litellm.proxy._types import ( + GenerateKeyRequest, + LiteLLM_ManagementEndpoint_MetadataFields_Premium, + LiteLLM_TeamTable, + UserAPIKeyAuth, +) +from litellm.proxy.utils import _premium_user_check + + +def _is_user_team_admin( + user_api_key_dict: UserAPIKeyAuth, team_obj: LiteLLM_TeamTable +) -> bool: + for member in team_obj.members_with_roles: + if ( + member.user_id is not None and member.user_id == user_api_key_dict.user_id + ) and member.role == "admin": + + return True + + return False + + +def _set_object_metadata_field( + object_data: Union[LiteLLM_TeamTable, GenerateKeyRequest], + field_name: str, + value: Any, +) -> None: + """ + Helper function to set metadata fields that require premium user checks + + Args: + object_data: The team data object to modify + field_name: Name of the metadata field to set + value: Value to set for the field + """ + if field_name in LiteLLM_ManagementEndpoint_MetadataFields_Premium: + _premium_user_check() + object_data.metadata = object_data.metadata or {} + object_data.metadata[field_name] = value diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/customer_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/customer_endpoints.py new file mode 100644 index 00000000..976ff858 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/customer_endpoints.py @@ -0,0 +1,620 @@ +""" +CUSTOMER MANAGEMENT + +All /customer management endpoints + +/customer/new +/customer/info +/customer/update +/customer/delete +""" + +#### END-USER/CUSTOMER MANAGEMENT #### +import traceback +from typing import List, Optional + +import fastapi +from fastapi import APIRouter, Depends, HTTPException, Request, status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth + +router = APIRouter() + + +@router.post( + "/end_user/block", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +@router.post( + "/customer/block", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], +) +async def block_user(data: BlockUsers): + """ + [BETA] Reject calls with this end-user id + + Parameters: + - user_ids (List[str], required): The unique `user_id`s for the users to block + + (any /chat/completion call with this user={end-user-id} param, will be rejected.) + + ``` + curl -X POST "http://0.0.0.0:8000/user/block" + -H "Authorization: Bearer sk-1234" + -d '{ + "user_ids": [<user_id>, ...] + }' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + records = [] + if prisma_client is not None: + for id in data.user_ids: + record = await prisma_client.db.litellm_endusertable.upsert( + where={"user_id": id}, # type: ignore + data={ + "create": {"user_id": id, "blocked": True}, # type: ignore + "update": {"blocked": True}, + }, + ) + records.append(record) + else: + raise HTTPException( + status_code=500, + detail={"error": "Postgres DB Not connected"}, + ) + + return {"blocked_users": records} + except Exception as e: + verbose_proxy_logger.error(f"An error occurred - {str(e)}") + raise HTTPException(status_code=500, detail={"error": str(e)}) + + +@router.post( + "/end_user/unblock", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +@router.post( + "/customer/unblock", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], +) +async def unblock_user(data: BlockUsers): + """ + [BETA] Unblock calls with this user id + + Example + ``` + curl -X POST "http://0.0.0.0:8000/user/unblock" + -H "Authorization: Bearer sk-1234" + -d '{ + "user_ids": [<user_id>, ...] + }' + ``` + """ + from enterprise.enterprise_hooks.blocked_user_list import ( + _ENTERPRISE_BlockedUserList, + ) + + if ( + not any(isinstance(x, _ENTERPRISE_BlockedUserList) for x in litellm.callbacks) + or litellm.blocked_user_list is None + ): + raise HTTPException( + status_code=400, + detail={ + "error": "Blocked user check was never set. This call has no effect." + }, + ) + + if isinstance(litellm.blocked_user_list, list): + for id in data.user_ids: + litellm.blocked_user_list.remove(id) + else: + raise HTTPException( + status_code=500, + detail={ + "error": "`blocked_user_list` must be set as a list. Filepaths can't be updated." + }, + ) + + return {"blocked_users": litellm.blocked_user_list} + + +def new_budget_request(data: NewCustomerRequest) -> Optional[BudgetNewRequest]: + """ + Return a new budget object if new budget params are passed. + """ + budget_params = BudgetNewRequest.model_fields.keys() + budget_kv_pairs = {} + + # Get the actual values from the data object using getattr + for field_name in budget_params: + if field_name == "budget_id": + continue + value = getattr(data, field_name, None) + if value is not None: + budget_kv_pairs[field_name] = value + + if budget_kv_pairs: + return BudgetNewRequest(**budget_kv_pairs) + return None + + +@router.post( + "/end_user/new", + tags=["Customer Management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +@router.post( + "/customer/new", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], +) +async def new_end_user( + data: NewCustomerRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Allow creating a new Customer + + + Parameters: + - user_id: str - The unique identifier for the user. + - alias: Optional[str] - A human-friendly alias for the user. + - blocked: bool - Flag to allow or disallow requests for this end-user. Default is False. + - max_budget: Optional[float] - The maximum budget allocated to the user. Either 'max_budget' or 'budget_id' should be provided, not both. + - budget_id: Optional[str] - The identifier for an existing budget allocated to the user. Either 'max_budget' or 'budget_id' should be provided, not both. + - allowed_model_region: Optional[Union[Literal["eu"], Literal["us"]]] - Require all user requests to use models in this specific region. + - default_model: Optional[str] - If no equivalent model in the allowed region, default all requests to this model. + - metadata: Optional[dict] = Metadata for customer, store information for customer. Example metadata = {"data_training_opt_out": True} + - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). + - tpm_limit: Optional[int] - [Not Implemented Yet] Specify tpm limit for a given customer (Tokens per minute) + - rpm_limit: Optional[int] - [Not Implemented Yet] Specify rpm limit for a given customer (Requests per minute) + - model_max_budget: Optional[dict] - [Not Implemented Yet] Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d"}} + - max_parallel_requests: Optional[int] - [Not Implemented Yet] Specify max parallel requests for a given customer. + - soft_budget: Optional[float] - [Not Implemented Yet] Get alerts when customer crosses given budget, doesn't block requests. + + + - Allow specifying allowed regions + - Allow specifying default model + + Example curl: + ``` + curl --location 'http://0.0.0.0:4000/customer/new' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "user_id" : "ishaan-jaff-3", + "allowed_region": "eu", + "budget_id": "free_tier", + "default_model": "azure/gpt-3.5-turbo-eu" <- all calls from this user, use this model? + }' + + # return end-user object + ``` + + NOTE: This used to be called `/end_user/new`, we will still be maintaining compatibility for /end_user/XXX for these endpoints + """ + """ + Validation: + - check if default model exists + - create budget object if not already created + + - Add user to end user table + + Return + - end-user object + - currently allowed models + """ + from litellm.proxy.proxy_server import ( + litellm_proxy_admin_name, + llm_router, + prisma_client, + ) + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + try: + + ## VALIDATION ## + if data.default_model is not None: + if llm_router is None: + raise HTTPException( + status_code=422, + detail={"error": CommonProxyErrors.no_llm_router.value}, + ) + elif data.default_model not in llm_router.get_model_names(): + raise HTTPException( + status_code=422, + detail={ + "error": "Default Model not on proxy. Configure via `/model/new` or config.yaml. Default_model={}, proxy_model_names={}".format( + data.default_model, set(llm_router.get_model_names()) + ) + }, + ) + + new_end_user_obj: Dict = {} + + ## CREATE BUDGET ## if set + _new_budget = new_budget_request(data) + if _new_budget is not None: + try: + budget_record = await prisma_client.db.litellm_budgettable.create( + data={ + **_new_budget.model_dump(exclude_unset=True), + "created_by": user_api_key_dict.user_id or litellm_proxy_admin_name, # type: ignore + "updated_by": user_api_key_dict.user_id + or litellm_proxy_admin_name, + } + ) + except Exception as e: + raise HTTPException(status_code=422, detail={"error": str(e)}) + + new_end_user_obj["budget_id"] = budget_record.budget_id + elif data.budget_id is not None: + new_end_user_obj["budget_id"] = data.budget_id + + _user_data = data.dict(exclude_none=True) + + for k, v in _user_data.items(): + if k not in BudgetNewRequest.model_fields.keys(): + new_end_user_obj[k] = v + + ## WRITE TO DB ## + end_user_record = await prisma_client.db.litellm_endusertable.create( + data=new_end_user_obj, # type: ignore + include={"litellm_budget_table": True}, + ) + + return end_user_record + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.management_endpoints.customer_endpoints.new_end_user(): Exception occured - {}".format( + str(e) + ) + ) + if "Unique constraint failed on the fields: (`user_id`)" in str(e): + raise ProxyException( + message=f"Customer already exists, passed user_id={data.user_id}. Please pass a new user_id.", + type="bad_request", + code=400, + param="user_id", + ) + + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Internal Server Error({str(e)})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Internal Server Error, " + str(e), + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.get( + "/customer/info", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], + response_model=LiteLLM_EndUserTable, +) +@router.get( + "/end_user/info", + tags=["Customer Management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def end_user_info( + end_user_id: str = fastapi.Query( + description="End User ID in the request parameters" + ), +): + """ + Get information about an end-user. An `end_user` is a customer (external user) of the proxy. + + Parameters: + - end_user_id (str, required): The unique identifier for the end-user + + Example curl: + ``` + curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' \ + -H 'Authorization: Bearer sk-1234' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + user_info = await prisma_client.db.litellm_endusertable.find_first( + where={"user_id": end_user_id}, include={"litellm_budget_table": True} + ) + + if user_info is None: + raise HTTPException( + status_code=400, + detail={"error": "End User Id={} does not exist in db".format(end_user_id)}, + ) + return user_info.model_dump(exclude_none=True) + + +@router.post( + "/customer/update", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], +) +@router.post( + "/end_user/update", + tags=["Customer Management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def update_end_user( + data: UpdateCustomerRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Example curl + + Parameters: + - user_id: str + - alias: Optional[str] = None # human-friendly alias + - blocked: bool = False # allow/disallow requests for this end-user + - max_budget: Optional[float] = None + - budget_id: Optional[str] = None # give either a budget_id or max_budget + - allowed_model_region: Optional[AllowedModelRegion] = ( + None # require all user requests to use models in this specific region + ) + - default_model: Optional[str] = ( + None # if no equivalent model in allowed region - default all requests to this model + ) + + Example curl: + ``` + curl --location 'http://0.0.0.0:4000/customer/update' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "user_id": "test-litellm-user-4", + "budget_id": "paid_tier" + }' + + See below for all params + ``` + """ + + from litellm.proxy.proxy_server import prisma_client + + try: + data_json: dict = data.json() + # get the row from db + if prisma_client is None: + raise Exception("Not connected to DB!") + + # get non default values for key + non_default_values = {} + for k, v in data_json.items(): + if v is not None and v not in ( + [], + {}, + 0, + ): # models default to [], spend defaults to 0, we should not reset these values + non_default_values[k] = v + + ## ADD USER, IF NEW ## + verbose_proxy_logger.debug("/customer/update: Received data = %s", data) + if data.user_id is not None and len(data.user_id) > 0: + non_default_values["user_id"] = data.user_id # type: ignore + verbose_proxy_logger.debug("In update customer, user_id condition block.") + response = await prisma_client.db.litellm_endusertable.update( + where={"user_id": data.user_id}, data=non_default_values # type: ignore + ) + if response is None: + raise ValueError( + f"Failed updating customer data. User ID does not exist passed user_id={data.user_id}" + ) + verbose_proxy_logger.debug( + f"received response from updating prisma client. response={response}" + ) + return response + else: + raise ValueError(f"user_id is required, passed user_id = {data.user_id}") + + # update based on remaining passed in values + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.update_end_user(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Internal Server Error({str(e)})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Internal Server Error, " + str(e), + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + pass + + +@router.post( + "/customer/delete", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], +) +@router.post( + "/end_user/delete", + tags=["Customer Management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def delete_end_user( + data: DeleteCustomerRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete multiple end-users. + + Parameters: + - user_ids (List[str], required): The unique `user_id`s for the users to delete + + Example curl: + ``` + curl --location 'http://0.0.0.0:4000/customer/delete' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "user_ids" :["ishaan-jaff-5"] + }' + + See below for all params + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception("Not connected to DB!") + + verbose_proxy_logger.debug("/customer/delete: Received data = %s", data) + if ( + data.user_ids is not None + and isinstance(data.user_ids, list) + and len(data.user_ids) > 0 + ): + response = await prisma_client.db.litellm_endusertable.delete_many( + where={"user_id": {"in": data.user_ids}} + ) + if response is None: + raise ValueError( + f"Failed deleting customer data. User ID does not exist passed user_id={data.user_ids}" + ) + if response != len(data.user_ids): + raise ValueError( + f"Failed deleting all customer data. User ID does not exist passed user_id={data.user_ids}. Deleted {response} customers, passed {len(data.user_ids)} customers" + ) + verbose_proxy_logger.debug( + f"received response from updating prisma client. response={response}" + ) + return { + "deleted_customers": response, + "message": "Successfully deleted customers with ids: " + + str(data.user_ids), + } + else: + raise ValueError(f"user_id is required, passed user_id = {data.user_ids}") + + # update based on remaining passed in values + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.delete_end_user(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Internal Server Error({str(e)})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Internal Server Error, " + str(e), + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + pass + + +@router.get( + "/customer/list", + tags=["Customer Management"], + dependencies=[Depends(user_api_key_auth)], + response_model=List[LiteLLM_EndUserTable], +) +@router.get( + "/end_user/list", + tags=["Customer Management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def list_end_user( + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [Admin-only] List all available customers + + Example curl: + ``` + curl --location --request GET 'http://0.0.0.0:4000/customer/list' \ + --header 'Authorization: Bearer sk-1234' + ``` + + """ + from litellm.proxy.proxy_server import prisma_client + + if ( + user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN + and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY + ): + raise HTTPException( + status_code=401, + detail={ + "error": "Admin-only endpoint. Your user role={}".format( + user_api_key_dict.user_role + ) + }, + ) + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + response = await prisma_client.db.litellm_endusertable.find_many( + include={"litellm_budget_table": True} + ) + + returned_response: List[LiteLLM_EndUserTable] = [] + for item in response: + returned_response.append(LiteLLM_EndUserTable(**item.model_dump())) + return returned_response diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py new file mode 100644 index 00000000..43d8273d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py @@ -0,0 +1,1243 @@ +""" +Internal User Management Endpoints + + +These are members of a Team on LiteLLM + +/user/new +/user/update +/user/delete +/user/info +/user/list +""" + +import asyncio +import traceback +import uuid +from datetime import datetime, timedelta, timezone +from typing import Any, List, Optional, Union, cast + +import fastapi +from fastapi import APIRouter, Depends, Header, HTTPException, Request, status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.duration_parser import duration_in_seconds +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.management_endpoints.key_management_endpoints import ( + generate_key_helper_fn, + prepare_metadata_fields, +) +from litellm.proxy.management_helpers.audit_logs import create_audit_log_for_update +from litellm.proxy.management_helpers.utils import management_endpoint_wrapper +from litellm.proxy.utils import handle_exception_on_proxy + +router = APIRouter() + + +async def create_internal_user_audit_log( + user_id: str, + action: AUDIT_ACTIONS, + litellm_changed_by: Optional[str], + user_api_key_dict: UserAPIKeyAuth, + litellm_proxy_admin_name: Optional[str], + before_value: Optional[str] = None, + after_value: Optional[str] = None, +): + """ + Create an audit log for an internal user. + + Parameters: + - user_id: str - The id of the user to create the audit log for. + - action: AUDIT_ACTIONS - The action to create the audit log for. + - user_row: LiteLLM_UserTable - The user row to create the audit log for. + - litellm_changed_by: Optional[str] - The user id of the user who is changing the user. + - user_api_key_dict: UserAPIKeyAuth - The user api key dictionary. + - litellm_proxy_admin_name: Optional[str] - The name of the proxy admin. + """ + if not litellm.store_audit_logs: + return + + await create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.USER_TABLE_NAME, + object_id=user_id, + action=action, + updated_values=after_value, + before_value=before_value, + ) + ) + + +def _update_internal_new_user_params(data_json: dict, data: NewUserRequest) -> dict: + if "user_id" in data_json and data_json["user_id"] is None: + data_json["user_id"] = str(uuid.uuid4()) + auto_create_key = data_json.pop("auto_create_key", True) + if auto_create_key is False: + data_json["table_name"] = ( + "user" # only create a user, don't create key if 'auto_create_key' set to False + ) + + is_internal_user = False + if data.user_role and data.user_role.is_internal_user_role: + is_internal_user = True + if litellm.default_internal_user_params: + for key, value in litellm.default_internal_user_params.items(): + if key == "available_teams": + continue + elif key not in data_json or data_json[key] is None: + data_json[key] = value + elif ( + key == "models" + and isinstance(data_json[key], list) + and len(data_json[key]) == 0 + ): + data_json[key] = value + + if "max_budget" in data_json and data_json["max_budget"] is None: + if is_internal_user and litellm.max_internal_user_budget is not None: + data_json["max_budget"] = litellm.max_internal_user_budget + + if "budget_duration" in data_json and data_json["budget_duration"] is None: + if is_internal_user and litellm.internal_user_budget_duration is not None: + data_json["budget_duration"] = litellm.internal_user_budget_duration + + return data_json + + +async def _check_duplicate_user_email( + user_email: Optional[str], prisma_client: Any +) -> None: + """ + Helper function to check if a user email already exists in the database. + + Args: + user_email (Optional[str]): Email to check + prisma_client (Any): Database client instance + + Raises: + Exception: If database is not connected + HTTPException: If user with email already exists + """ + if user_email: + if prisma_client is None: + raise Exception("Database not connected") + + existing_user = await prisma_client.db.litellm_usertable.find_first( + where={"user_email": user_email} + ) + + if existing_user is not None: + raise HTTPException( + status_code=400, + detail={"error": f"User with email {user_email} already exists"}, + ) + + +@router.post( + "/user/new", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], + response_model=NewUserResponse, +) +@management_endpoint_wrapper +async def new_user( + data: NewUserRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Use this to create a new INTERNAL user with a budget. + Internal Users can access LiteLLM Admin UI to make keys, request access to models. + This creates a new user and generates a new api key for the new user. The new api key is returned. + + Returns user id, budget + new key. + + Parameters: + - user_id: Optional[str] - Specify a user id. If not set, a unique id will be generated. + - user_alias: Optional[str] - A descriptive name for you to know who this user id refers to. + - teams: Optional[list] - specify a list of team id's a user belongs to. + - user_email: Optional[str] - Specify a user email. + - send_invite_email: Optional[bool] - Specify if an invite email should be sent. + - user_role: Optional[str] - Specify a user role - "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer", "team", "customer". Info about each role here: `https://github.com/BerriAI/litellm/litellm/proxy/_types.py#L20` + - max_budget: Optional[float] - Specify max budget for a given user. + - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo"). + - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models). Set to ['no-default-models'] to block all model access. Restricting user to only team-based model access. + - tpm_limit: Optional[int] - Specify tpm limit for a given user (Tokens per minute) + - rpm_limit: Optional[int] - Specify rpm limit for a given user (Requests per minute) + - auto_create_key: bool - Default=True. Flag used for returning a key as part of the /user/new response + - aliases: Optional[dict] - Model aliases for the user - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases) + - config: Optional[dict] - [DEPRECATED PARAM] User-specific config. + - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request- + - blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked. + - guardrails: Optional[List[str]] - [Not Implemented Yet] List of active guardrails for the user + - permissions: Optional[dict] - [Not Implemented Yet] User-specific permissions, eg. turning off pii masking. + - metadata: Optional[dict] - Metadata for user, store information for user. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } + - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. + - soft_budget: Optional[float] - Get alerts when user crosses given budget, doesn't block requests. + - model_max_budget: Optional[dict] - Model-specific max budget for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-budgets-to-keys) + - model_rpm_limit: Optional[float] - Model-specific rpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys) + - model_tpm_limit: Optional[float] - Model-specific tpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys) + - spend: Optional[float] - Amount spent by user. Default is 0. Will be updated by proxy whenever user is used. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo"). + - team_id: Optional[str] - [DEPRECATED PARAM] The team id of the user. Default is None. + - duration: Optional[str] - Duration for the key auto-created on `/user/new`. Default is None. + - key_alias: Optional[str] - Alias for the key auto-created on `/user/new`. Default is None. + + Returns: + - key: (str) The generated api key for the user + - expires: (datetime) Datetime object for when key expires. + - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. + - max_budget: (float|None) Max budget for given user. + + Usage Example + + ```shell + curl -X POST "http://localhost:4000/user/new" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer sk-1234" \ + -d '{ + "username": "new_user", + "email": "new_user@example.com" + }' + ``` + """ + try: + from litellm.proxy.proxy_server import ( + general_settings, + litellm_proxy_admin_name, + prisma_client, + proxy_logging_obj, + ) + + # Check for duplicate email + await _check_duplicate_user_email(data.user_email, prisma_client) + + data_json = data.json() # type: ignore + data_json = _update_internal_new_user_params(data_json, data) + response = await generate_key_helper_fn(request_type="user", **data_json) + # Admin UI Logic + # Add User to Team and Organization + # if team_id passed add this user to the team + if data_json.get("team_id", None) is not None: + from litellm.proxy.management_endpoints.team_endpoints import ( + team_member_add, + ) + + try: + await team_member_add( + data=TeamMemberAddRequest( + team_id=data_json.get("team_id", None), + member=Member( + user_id=data_json.get("user_id", None), + role="user", + user_email=data_json.get("user_email", None), + ), + ), + http_request=Request( + scope={"type": "http", "path": "/user/new"}, + ), + user_api_key_dict=user_api_key_dict, + ) + except HTTPException as e: + if e.status_code == 400 and ( + "already exists" in str(e) or "doesn't exist" in str(e) + ): + verbose_proxy_logger.debug( + "litellm.proxy.management_endpoints.internal_user_endpoints.new_user(): User already exists in team - {}".format( + str(e) + ) + ) + else: + verbose_proxy_logger.debug( + "litellm.proxy.management_endpoints.internal_user_endpoints.new_user(): Exception occured - {}".format( + str(e) + ) + ) + except Exception as e: + if "already exists" in str(e) or "doesn't exist" in str(e): + verbose_proxy_logger.debug( + "litellm.proxy.management_endpoints.internal_user_endpoints.new_user(): User already exists in team - {}".format( + str(e) + ) + ) + else: + raise e + + if data.send_invite_email is True: + # check if user has setup email alerting + if "email" not in general_settings.get("alerting", []): + raise ValueError( + "Email alerting not setup on config.yaml. Please set `alerting=['email']. \nDocs: https://docs.litellm.ai/docs/proxy/email`" + ) + + event = WebhookEvent( + event="internal_user_created", + event_group="internal_user", + event_message="Welcome to LiteLLM Proxy", + token=response.get("token", ""), + spend=response.get("spend", 0.0), + max_budget=response.get("max_budget", 0.0), + user_id=response.get("user_id", None), + user_email=response.get("user_email", None), + team_id=response.get("team_id", "Default Team"), + key_alias=response.get("key_alias", None), + ) + + # If user configured email alerting - send an Email letting their end-user know the key was created + asyncio.create_task( + proxy_logging_obj.slack_alerting_instance.send_key_created_or_user_invited_email( + webhook_event=event, + ) + ) + + try: + if prisma_client is None: + raise Exception(CommonProxyErrors.db_not_connected_error.value) + user_row: BaseModel = await prisma_client.db.litellm_usertable.find_first( + where={"user_id": response["user_id"]} + ) + + user_row_litellm_typed = LiteLLM_UserTable( + **user_row.model_dump(exclude_none=True) + ) + asyncio.create_task( + create_internal_user_audit_log( + user_id=user_row_litellm_typed.user_id, + action="created", + litellm_changed_by=user_api_key_dict.user_id, + user_api_key_dict=user_api_key_dict, + litellm_proxy_admin_name=litellm_proxy_admin_name, + before_value=None, + after_value=user_row_litellm_typed.model_dump_json( + exclude_none=True + ), + ) + ) + except Exception as e: + verbose_proxy_logger.warning( + "Unable to create audit log for user on `/user/new` - {}".format(str(e)) + ) + + return NewUserResponse( + key=response.get("token", ""), + expires=response.get("expires", None), + max_budget=response["max_budget"], + user_id=response["user_id"], + user_role=response.get("user_role", None), + user_email=response.get("user_email", None), + user_alias=response.get("user_alias", None), + teams=response.get("teams", None), + team_id=response.get("team_id", None), + metadata=response.get("metadata", None), + models=response.get("models", None), + tpm_limit=response.get("tpm_limit", None), + rpm_limit=response.get("rpm_limit", None), + budget_duration=response.get("budget_duration", None), + model_max_budget=response.get("model_max_budget", None), + ) + except Exception as e: + verbose_proxy_logger.exception( + "/user/new: Exception occured - {}".format(str(e)) + ) + raise handle_exception_on_proxy(e) + + +@router.get( + "/user/available_roles", + tags=["Internal User management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def ui_get_available_role( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Endpoint used by Admin UI to show all available roles to assign a user + return { + "proxy_admin": { + "description": "Proxy Admin role", + "ui_label": "Admin" + } + } + """ + + _data_to_return = {} + for role in LitellmUserRoles: + + # We only show a subset of roles on UI + if role in [ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + ]: + _data_to_return[role.value] = { + "description": role.description, + "ui_label": role.ui_label, + } + return _data_to_return + + +def get_team_from_list( + team_list: Optional[Union[List[LiteLLM_TeamTable], List[TeamListResponseObject]]], + team_id: str, +) -> Optional[Union[LiteLLM_TeamTable, LiteLLM_TeamMembership]]: + if team_list is None: + return None + + for team in team_list: + if team.team_id == team_id: + return team + return None + + +@router.get( + "/user/info", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], + # response_model=UserInfoResponse, +) +@management_endpoint_wrapper +async def user_info( + user_id: Optional[str] = fastapi.Query( + default=None, description="User ID in the request parameters" + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [10/07/2024] + Note: To get all users (+pagination), use `/user/list` endpoint. + + + Use this to get user information. (user row + all user key info) + + Example request + ``` + curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' \ + --header 'Authorization: Bearer sk-1234' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + if ( + user_id is None + and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN + ): + return await _get_user_info_for_proxy_admin() + elif user_id is None: + user_id = user_api_key_dict.user_id + ## GET USER ROW ## + if user_id is not None: + user_info = await prisma_client.get_data(user_id=user_id) + else: + user_info = None + ## GET ALL TEAMS ## + team_list = [] + team_id_list = [] + from litellm.proxy.management_endpoints.team_endpoints import list_team + + teams_1 = await list_team( + http_request=Request( + scope={"type": "http", "path": "/user/info"}, + ), + user_id=user_id, + user_api_key_dict=user_api_key_dict, + ) + + if teams_1 is not None and isinstance(teams_1, list): + team_list = teams_1 + for team in teams_1: + team_id_list.append(team.team_id) + + teams_2: Optional[Any] = None + if user_info is not None: + # *NEW* get all teams in user 'teams' field + teams_2 = await prisma_client.get_data( + team_id_list=user_info.teams, table_name="team", query_type="find_all" + ) + + if teams_2 is not None and isinstance(teams_2, list): + for team in teams_2: + if team.team_id not in team_id_list: + team_list.append(team) + team_id_list.append(team.team_id) + + elif ( + user_api_key_dict.user_id is not None and user_id is None + ): # the key querying the endpoint is the one asking for it's teams + caller_user_info = await prisma_client.get_data( + user_id=user_api_key_dict.user_id + ) + # *NEW* get all teams in user 'teams' field + if caller_user_info is not None: + teams_2 = await prisma_client.get_data( + team_id_list=caller_user_info.teams, + table_name="team", + query_type="find_all", + ) + + if teams_2 is not None and isinstance(teams_2, list): + for team in teams_2: + if team.team_id not in team_id_list: + team_list.append(team) + team_id_list.append(team.team_id) + + ## GET ALL KEYS ## + keys = await prisma_client.get_data( + user_id=user_id, + table_name="key", + query_type="find_all", + ) + + if user_info is None and keys is not None: + ## make sure we still return a total spend ## + spend = 0 + for k in keys: + spend += getattr(k, "spend", 0) + user_info = {"spend": spend} + + ## REMOVE HASHED TOKEN INFO before returning ## + returned_keys = _process_keys_for_user_info(keys=keys, all_teams=teams_1) + team_list.sort(key=lambda x: (getattr(x, "team_alias", "") or "")) + _user_info = ( + user_info.model_dump() if isinstance(user_info, BaseModel) else user_info + ) + response_data = UserInfoResponse( + user_id=user_id, user_info=_user_info, keys=returned_keys, teams=team_list + ) + + return response_data + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.user_info(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +async def _get_user_info_for_proxy_admin(): + """ + Admin UI Endpoint - Returns All Teams and Keys when Proxy Admin is querying + + - get all teams in LiteLLM_TeamTable + - get all keys in LiteLLM_VerificationToken table + + Why separate helper for proxy admin ? + - To get Faster UI load times, get all teams and virtual keys in 1 query + """ + + from litellm.proxy.proxy_server import prisma_client + + sql_query = """ + SELECT + (SELECT json_agg(t.*) FROM "LiteLLM_TeamTable" t) as teams, + (SELECT json_agg(k.*) FROM "LiteLLM_VerificationToken" k WHERE k.team_id != 'litellm-dashboard' OR k.team_id IS NULL) as keys + """ + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + results = await prisma_client.db.query_raw(sql_query) + + verbose_proxy_logger.debug("results_keys: %s", results) + + _keys_in_db: List = results[0]["keys"] or [] + # cast all keys to LiteLLM_VerificationToken + keys_in_db = [] + for key in _keys_in_db: + if key.get("models") is None: + key["models"] = [] + keys_in_db.append(LiteLLM_VerificationToken(**key)) + + # cast all teams to LiteLLM_TeamTable + _teams_in_db: List = results[0]["teams"] or [] + _teams_in_db = [LiteLLM_TeamTable(**team) for team in _teams_in_db] + _teams_in_db.sort(key=lambda x: (getattr(x, "team_alias", "") or "")) + returned_keys = _process_keys_for_user_info(keys=keys_in_db, all_teams=_teams_in_db) + return UserInfoResponse( + user_id=None, + user_info=None, + keys=returned_keys, + teams=_teams_in_db, + ) + + +def _process_keys_for_user_info( + keys: Optional[List[LiteLLM_VerificationToken]], + all_teams: Optional[Union[List[LiteLLM_TeamTable], List[TeamListResponseObject]]], +): + from litellm.proxy.proxy_server import general_settings, litellm_master_key_hash + + returned_keys = [] + if keys is None: + pass + else: + for key in keys: + if ( + key.token == litellm_master_key_hash + and general_settings.get("disable_master_key_return", False) + is True ## [IMPORTANT] used by hosted proxy-ui to prevent sharing master key on ui + ): + continue + + try: + _key: dict = key.model_dump() # noqa + except Exception: + # if using pydantic v1 + _key = key.dict() + if ( + "team_id" in _key + and _key["team_id"] is not None + and _key["team_id"] != "litellm-dashboard" + ): + team_info = get_team_from_list( + team_list=all_teams, team_id=_key["team_id"] + ) + if team_info is not None: + team_alias = getattr(team_info, "team_alias", None) + _key["team_alias"] = team_alias + else: + _key["team_alias"] = None + else: + _key["team_alias"] = "None" + returned_keys.append(_key) + return returned_keys + + +def _update_internal_user_params(data_json: dict, data: UpdateUserRequest) -> dict: + non_default_values = {} + for k, v in data_json.items(): + if ( + v is not None + and v + not in ( + [], + {}, + 0, + ) + and k not in LiteLLM_ManagementEndpoint_MetadataFields + ): # models default to [], spend defaults to 0, we should not reset these values + non_default_values[k] = v + + is_internal_user = False + if data.user_role == LitellmUserRoles.INTERNAL_USER: + is_internal_user = True + + if "budget_duration" in non_default_values: + duration_s = duration_in_seconds(duration=non_default_values["budget_duration"]) + user_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + non_default_values["budget_reset_at"] = user_reset_at + + if "max_budget" not in non_default_values: + if ( + is_internal_user and litellm.max_internal_user_budget is not None + ): # applies internal user limits, if user role updated + non_default_values["max_budget"] = litellm.max_internal_user_budget + + if ( + "budget_duration" not in non_default_values + ): # applies internal user limits, if user role updated + if is_internal_user and litellm.internal_user_budget_duration is not None: + non_default_values["budget_duration"] = ( + litellm.internal_user_budget_duration + ) + duration_s = duration_in_seconds( + duration=non_default_values["budget_duration"] + ) + user_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + non_default_values["budget_reset_at"] = user_reset_at + + return non_default_values + + +@router.post( + "/user/update", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def user_update( + data: UpdateUserRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Example curl + + ``` + curl --location 'http://0.0.0.0:4000/user/update' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "user_id": "test-litellm-user-4", + "user_role": "proxy_admin_viewer" + }' + ``` + + Parameters: + - user_id: Optional[str] - Specify a user id. If not set, a unique id will be generated. + - user_email: Optional[str] - Specify a user email. + - password: Optional[str] - Specify a user password. + - user_alias: Optional[str] - A descriptive name for you to know who this user id refers to. + - teams: Optional[list] - specify a list of team id's a user belongs to. + - send_invite_email: Optional[bool] - Specify if an invite email should be sent. + - user_role: Optional[str] - Specify a user role - "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer", "team", "customer". Info about each role here: `https://github.com/BerriAI/litellm/litellm/proxy/_types.py#L20` + - max_budget: Optional[float] - Specify max budget for a given user. + - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo"). + - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) + - tpm_limit: Optional[int] - Specify tpm limit for a given user (Tokens per minute) + - rpm_limit: Optional[int] - Specify rpm limit for a given user (Requests per minute) + - auto_create_key: bool - Default=True. Flag used for returning a key as part of the /user/new response + - aliases: Optional[dict] - Model aliases for the user - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases) + - config: Optional[dict] - [DEPRECATED PARAM] User-specific config. + - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request- + - blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked. + - guardrails: Optional[List[str]] - [Not Implemented Yet] List of active guardrails for the user + - permissions: Optional[dict] - [Not Implemented Yet] User-specific permissions, eg. turning off pii masking. + - metadata: Optional[dict] - Metadata for user, store information for user. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } + - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. + - soft_budget: Optional[float] - Get alerts when user crosses given budget, doesn't block requests. + - model_max_budget: Optional[dict] - Model-specific max budget for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-budgets-to-keys) + - model_rpm_limit: Optional[float] - Model-specific rpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys) + - model_tpm_limit: Optional[float] - Model-specific tpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys) + - spend: Optional[float] - Amount spent by user. Default is 0. Will be updated by proxy whenever user is used. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo"). + - team_id: Optional[str] - [DEPRECATED PARAM] The team id of the user. Default is None. + - duration: Optional[str] - [NOT IMPLEMENTED]. + - key_alias: Optional[str] - [NOT IMPLEMENTED]. + + + """ + from litellm.proxy.proxy_server import litellm_proxy_admin_name, prisma_client + + try: + data_json: dict = data.json() + # get the row from db + if prisma_client is None: + raise Exception("Not connected to DB!") + + # get non default values for key + non_default_values = _update_internal_user_params( + data_json=data_json, data=data + ) + + existing_user_row: Optional[BaseModel] = None + if data.user_id is not None: + existing_user_row = await prisma_client.db.litellm_usertable.find_first( + where={"user_id": data.user_id} + ) + if existing_user_row is not None: + existing_user_row = LiteLLM_UserTable( + **existing_user_row.model_dump(exclude_none=True) + ) + + existing_metadata = ( + cast(Dict, getattr(existing_user_row, "metadata", {}) or {}) + if existing_user_row is not None + else {} + ) + + non_default_values = prepare_metadata_fields( + data=data, + non_default_values=non_default_values, + existing_metadata=existing_metadata or {}, + ) + + ## ADD USER, IF NEW ## + verbose_proxy_logger.debug("/user/update: Received data = %s", data) + response: Optional[Any] = None + if data.user_id is not None and len(data.user_id) > 0: + non_default_values["user_id"] = data.user_id # type: ignore + verbose_proxy_logger.debug("In update user, user_id condition block.") + response = await prisma_client.update_data( + user_id=data.user_id, + data=non_default_values, + table_name="user", + ) + verbose_proxy_logger.debug( + f"received response from updating prisma client. response={response}" + ) + elif data.user_email is not None: + non_default_values["user_id"] = str(uuid.uuid4()) + non_default_values["user_email"] = data.user_email + ## user email is not unique acc. to prisma schema -> future improvement + ### for now: check if it exists in db, if not - insert it + existing_user_rows = await prisma_client.get_data( + key_val={"user_email": data.user_email}, + table_name="user", + query_type="find_all", + ) + if existing_user_rows is None or ( + isinstance(existing_user_rows, list) and len(existing_user_rows) == 0 + ): + response = await prisma_client.insert_data( + data=non_default_values, table_name="user" + ) + elif isinstance(existing_user_rows, list) and len(existing_user_rows) > 0: + for existing_user in existing_user_rows: + response = await prisma_client.update_data( + user_id=existing_user.user_id, + data=non_default_values, + table_name="user", + ) + + if response is not None: # emit audit log + try: + user_row: BaseModel = ( + await prisma_client.db.litellm_usertable.find_first( + where={"user_id": response["user_id"]} + ) + ) + + user_row_litellm_typed = LiteLLM_UserTable( + **user_row.model_dump(exclude_none=True) + ) + asyncio.create_task( + create_internal_user_audit_log( + user_id=user_row_litellm_typed.user_id, + action="updated", + litellm_changed_by=user_api_key_dict.user_id, + user_api_key_dict=user_api_key_dict, + litellm_proxy_admin_name=litellm_proxy_admin_name, + before_value=( + existing_user_row.model_dump_json(exclude_none=True) + if existing_user_row + else None + ), + after_value=user_row_litellm_typed.model_dump_json( + exclude_none=True + ), + ) + ) + except Exception as e: + verbose_proxy_logger.warning( + "Unable to create audit log for user on `/user/update` - {}".format( + str(e) + ) + ) + return response # type: ignore + # update based on remaining passed in values + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.user_update(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +async def get_user_key_counts( + prisma_client, + user_ids: Optional[List[str]] = None, +): + """ + Helper function to get the count of keys for each user using Prisma's count method. + + Args: + prisma_client: The Prisma client instance + user_ids: List of user IDs to get key counts for + + Returns: + Dictionary mapping user_id to key count + """ + from litellm.constants import UI_SESSION_TOKEN_TEAM_ID + + if not user_ids or len(user_ids) == 0: + return {} + + result = {} + + # Get count for each user_id individually + for user_id in user_ids: + count = await prisma_client.db.litellm_verificationtoken.count( + where={ + "user_id": user_id, + "OR": [ + {"team_id": None}, + {"team_id": {"not": UI_SESSION_TOKEN_TEAM_ID}}, + ], + } + ) + result[user_id] = count + + return result + + +@router.get( + "/user/get_users", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], +) +@router.get( + "/user/list", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], +) +async def get_users( + role: Optional[str] = fastapi.Query( + default=None, description="Filter users by role" + ), + user_ids: Optional[str] = fastapi.Query( + default=None, description="Get list of users by user_ids" + ), + page: int = fastapi.Query(default=1, ge=1, description="Page number"), + page_size: int = fastapi.Query( + default=25, ge=1, le=100, description="Number of items per page" + ), +): + """ + Get a paginated list of users, optionally filtered by role. + + Used by the UI to populate the user lists. + + Parameters: + role: Optional[str] + Filter users by role. Can be one of: + - proxy_admin + - proxy_admin_viewer + - internal_user + - internal_user_viewer + user_ids: Optional[str] + Get list of users by user_ids. Comma separated list of user_ids. + page: int + The page number to return + page_size: int + The number of items per page + + Currently - admin-only endpoint. + + Example curl: + ``` + http://0.0.0.0:4000/user/list?user_ids=default_user_id,693c1a4a-1cc0-4c7c-afe8-b5d2c8d52e17 + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": f"No db connected. prisma client={prisma_client}"}, + ) + + # Calculate skip and take for pagination + skip = (page - 1) * page_size + + # Prepare the query conditions + # Build where conditions based on provided parameters + where_conditions: Dict[str, Any] = {} + + if role: + where_conditions["user_role"] = { + "contains": role, + "mode": "insensitive", # Case-insensitive search + } + + if user_ids and isinstance(user_ids, str): + user_id_list = [uid.strip() for uid in user_ids.split(",") if uid.strip()] + where_conditions["user_id"] = { + "in": user_id_list, # Now passing a list of strings as required by Prisma + } + + users: Optional[List[LiteLLM_UserTable]] = ( + await prisma_client.db.litellm_usertable.find_many( + where=where_conditions, + skip=skip, + take=page_size, + order={"created_at": "desc"}, + ) + ) + + # Get total count of user rows + total_count = await prisma_client.db.litellm_usertable.count( + where=where_conditions # type: ignore + ) + + # Get key count for each user + if users is not None: + user_key_counts = await get_user_key_counts( + prisma_client, [user.user_id for user in users] + ) + else: + user_key_counts = {} + + verbose_proxy_logger.debug(f"Total count of users: {total_count}") + + # Calculate total pages + total_pages = -(-total_count // page_size) # Ceiling division + + # Prepare response + user_list: List[LiteLLM_UserTableWithKeyCount] = [] + if users is not None: + for user in users: + user_list.append( + LiteLLM_UserTableWithKeyCount( + **user.model_dump(), key_count=user_key_counts.get(user.user_id, 0) + ) + ) # Return full key object + else: + user_list = [] + + return { + "users": user_list, + "total": total_count, + "page": page, + "page_size": page_size, + "total_pages": total_pages, + } + + +@router.post( + "/user/delete", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def delete_user( + data: DeleteUserRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + delete user and associated user keys + + ``` + curl --location 'http://0.0.0.0:4000/user/delete' \ + + --header 'Authorization: Bearer sk-1234' \ + + --header 'Content-Type: application/json' \ + + --data-raw '{ + "user_ids": ["45e3e396-ee08-4a61-a88e-16b3ce7e0849"] + }' + ``` + + Parameters: + - user_ids: List[str] - The list of user id's to be deleted. + """ + from litellm.proxy.proxy_server import ( + create_audit_log_for_update, + litellm_proxy_admin_name, + prisma_client, + ) + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.user_ids is None: + raise HTTPException(status_code=400, detail={"error": "No user id passed in"}) + + # check that all teams passed exist + for user_id in data.user_ids: + user_row = await prisma_client.db.litellm_usertable.find_unique( + where={"user_id": user_id} + ) + + if user_row is None: + raise HTTPException( + status_code=404, + detail={"error": f"User not found, passed user_id={user_id}"}, + ) + else: + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + # we do this after the first for loop, since first for loop is for validation. we only want this inserted after validation passes + if litellm.store_audit_logs is True: + # make an audit log for each team deleted + _user_row = user_row.json(exclude_none=True) + + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.USER_TABLE_NAME, + object_id=user_id, + action="deleted", + updated_values="{}", + before_value=_user_row, + ) + ) + ) + + # End of Audit logging + + ## DELETE ASSOCIATED KEYS + await prisma_client.db.litellm_verificationtoken.delete_many( + where={"user_id": {"in": data.user_ids}} + ) + + ## DELETE ASSOCIATED INVITATION LINKS + await prisma_client.db.litellm_invitationlink.delete_many( + where={"user_id": {"in": data.user_ids}} + ) + + ## DELETE ASSOCIATED ORGANIZATION MEMBERSHIPS + await prisma_client.db.litellm_organizationmembership.delete_many( + where={"user_id": {"in": data.user_ids}} + ) + + ## DELETE USERS + deleted_users = await prisma_client.db.litellm_usertable.delete_many( + where={"user_id": {"in": data.user_ids}} + ) + + return deleted_users + + +async def add_internal_user_to_organization( + user_id: str, + organization_id: str, + user_role: LitellmUserRoles, +): + """ + Helper function to add an internal user to an organization + + Adds the user to LiteLLM_OrganizationMembership table + + - Checks if organization_id exists + + Raises: + - Exception if database not connected + - Exception if user_id or organization_id not found + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise Exception("Database not connected") + + try: + # Check if organization_id exists + organization_row = await prisma_client.db.litellm_organizationtable.find_unique( + where={"organization_id": organization_id} + ) + if organization_row is None: + raise Exception( + f"Organization not found, passed organization_id={organization_id}" + ) + + # Create a new organization membership entry + new_membership = await prisma_client.db.litellm_organizationmembership.create( + data={ + "user_id": user_id, + "organization_id": organization_id, + "user_role": user_role, + # Note: You can also set budget within an organization if needed + } + ) + + return new_membership + except Exception as e: + raise Exception(f"Failed to add user to organization: {str(e)}") + + +@router.get( + "/user/filter/ui", + tags=["Internal User management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, + responses={ + 200: {"model": List[LiteLLM_UserTableFiltered]}, + }, +) +async def ui_view_users( + user_id: Optional[str] = fastapi.Query( + default=None, description="User ID in the request parameters" + ), + user_email: Optional[str] = fastapi.Query( + default=None, description="User email in the request parameters" + ), + page: int = fastapi.Query( + default=1, description="Page number for pagination", ge=1 + ), + page_size: int = fastapi.Query( + default=50, description="Number of items per page", ge=1, le=100 + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [PROXY-ADMIN ONLY]Filter users based on partial match of user_id or email with pagination. + + Args: + user_id (Optional[str]): Partial user ID to search for + user_email (Optional[str]): Partial email to search for + page (int): Page number for pagination (starts at 1) + page_size (int): Number of items per page (max 100) + user_api_key_dict (UserAPIKeyAuth): User authentication information + + Returns: + List[LiteLLM_SpendLogs]: Paginated list of matching user records + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + try: + # Calculate offset for pagination + skip = (page - 1) * page_size + + # Build where conditions based on provided parameters + where_conditions = {} + + if user_id: + where_conditions["user_id"] = { + "contains": user_id, + "mode": "insensitive", # Case-insensitive search + } + + if user_email: + where_conditions["user_email"] = { + "contains": user_email, + "mode": "insensitive", # Case-insensitive search + } + + # Query users with pagination and filters + users: Optional[List[BaseModel]] = ( + await prisma_client.db.litellm_usertable.find_many( + where=where_conditions, + skip=skip, + take=page_size, + order={"created_at": "desc"}, + ) + ) + + if not users: + return [] + + return [LiteLLM_UserTableFiltered(**user.model_dump()) for user in users] + + except Exception as e: + raise HTTPException(status_code=500, detail=f"Error searching users: {str(e)}") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/key_management_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/key_management_endpoints.py new file mode 100644 index 00000000..9141d9d1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/key_management_endpoints.py @@ -0,0 +1,2621 @@ +""" +KEY MANAGEMENT + +All /key management endpoints + +/key/generate +/key/info +/key/update +/key/delete +""" + +import asyncio +import copy +import json +import secrets +import traceback +import uuid +from datetime import datetime, timedelta, timezone +from typing import List, Literal, Optional, Tuple, cast + +import fastapi +from fastapi import APIRouter, Depends, Header, HTTPException, Query, Request, status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.caching import DualCache +from litellm.constants import UI_SESSION_TOKEN_TEAM_ID +from litellm.litellm_core_utils.duration_parser import duration_in_seconds +from litellm.proxy._types import * +from litellm.proxy.auth.auth_checks import ( + _cache_key_object, + _delete_cache_key_object, + get_key_object, + get_team_object, +) +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.hooks.key_management_event_hooks import KeyManagementEventHooks +from litellm.proxy.management_endpoints.common_utils import ( + _is_user_team_admin, + _set_object_metadata_field, +) +from litellm.proxy.management_endpoints.model_management_endpoints import ( + _add_model_to_db, +) +from litellm.proxy.management_helpers.utils import management_endpoint_wrapper +from litellm.proxy.spend_tracking.spend_tracking_utils import _is_master_key +from litellm.proxy.utils import ( + PrismaClient, + _hash_token_if_needed, + handle_exception_on_proxy, + jsonify_object, +) +from litellm.router import Router +from litellm.secret_managers.main import get_secret +from litellm.types.router import Deployment +from litellm.types.utils import ( + BudgetConfig, + PersonalUIKeyGenerationConfig, + TeamUIKeyGenerationConfig, +) + + +def _is_team_key(data: Union[GenerateKeyRequest, LiteLLM_VerificationToken]): + return data.team_id is not None + + +def _get_user_in_team( + team_table: LiteLLM_TeamTableCachedObj, user_id: Optional[str] +) -> Optional[Member]: + if user_id is None: + return None + for member in team_table.members_with_roles: + if member.user_id is not None and member.user_id == user_id: + return member + + return None + + +def _is_allowed_to_make_key_request( + user_api_key_dict: UserAPIKeyAuth, user_id: Optional[str], team_id: Optional[str] +) -> bool: + """ + Assert user only creates keys for themselves + + Relevant issue: https://github.com/BerriAI/litellm/issues/7336 + """ + ## BASE CASE - PROXY ADMIN + if ( + user_api_key_dict.user_role is not None + and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value + ): + return True + + if user_id is not None: + assert ( + user_id == user_api_key_dict.user_id + ), "User can only create keys for themselves. Got user_id={}, Your ID={}".format( + user_id, user_api_key_dict.user_id + ) + + if team_id is not None: + if ( + user_api_key_dict.team_id is not None + and user_api_key_dict.team_id == UI_TEAM_ID + ): + return True # handle https://github.com/BerriAI/litellm/issues/7482 + assert ( + user_api_key_dict.team_id == team_id + ), "User can only create keys for their own team. Got={}, Your Team ID={}".format( + team_id, user_api_key_dict.team_id + ) + + return True + + +def _team_key_generation_team_member_check( + assigned_user_id: Optional[str], + team_table: LiteLLM_TeamTableCachedObj, + user_api_key_dict: UserAPIKeyAuth, + team_key_generation: TeamUIKeyGenerationConfig, +): + if assigned_user_id is not None: + key_assigned_user_in_team = _get_user_in_team( + team_table=team_table, user_id=assigned_user_id + ) + + if key_assigned_user_in_team is None: + raise HTTPException( + status_code=400, + detail=f"User={assigned_user_id} not assigned to team={team_table.team_id}", + ) + + key_creating_user_in_team = _get_user_in_team( + team_table=team_table, user_id=user_api_key_dict.user_id + ) + + is_admin = ( + user_api_key_dict.user_role is not None + and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value + ) + + if is_admin: + return True + elif key_creating_user_in_team is None: + raise HTTPException( + status_code=400, + detail=f"User={user_api_key_dict.user_id} not assigned to team={team_table.team_id}", + ) + elif ( + "allowed_team_member_roles" in team_key_generation + and key_creating_user_in_team.role + not in team_key_generation["allowed_team_member_roles"] + ): + raise HTTPException( + status_code=400, + detail=f"Team member role {key_creating_user_in_team.role} not in allowed_team_member_roles={team_key_generation['allowed_team_member_roles']}", + ) + return True + + +def _key_generation_required_param_check( + data: GenerateKeyRequest, required_params: Optional[List[str]] +): + if required_params is None: + return True + + data_dict = data.model_dump(exclude_unset=True) + for param in required_params: + if param not in data_dict: + raise HTTPException( + status_code=400, + detail=f"Required param {param} not in data", + ) + return True + + +def _team_key_generation_check( + team_table: LiteLLM_TeamTableCachedObj, + user_api_key_dict: UserAPIKeyAuth, + data: GenerateKeyRequest, +): + if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value: + return True + if ( + litellm.key_generation_settings is not None + and "team_key_generation" in litellm.key_generation_settings + ): + _team_key_generation = litellm.key_generation_settings["team_key_generation"] + else: + _team_key_generation = TeamUIKeyGenerationConfig( + allowed_team_member_roles=["admin", "user"], + ) + + _team_key_generation_team_member_check( + assigned_user_id=data.user_id, + team_table=team_table, + user_api_key_dict=user_api_key_dict, + team_key_generation=_team_key_generation, + ) + _key_generation_required_param_check( + data, + _team_key_generation.get("required_params"), + ) + + return True + + +def _personal_key_membership_check( + user_api_key_dict: UserAPIKeyAuth, + personal_key_generation: Optional[PersonalUIKeyGenerationConfig], +): + if ( + personal_key_generation is None + or "allowed_user_roles" not in personal_key_generation + ): + return True + + if user_api_key_dict.user_role not in personal_key_generation["allowed_user_roles"]: + raise HTTPException( + status_code=400, + detail=f"Personal key creation has been restricted by admin. Allowed roles={litellm.key_generation_settings['personal_key_generation']['allowed_user_roles']}. Your role={user_api_key_dict.user_role}", # type: ignore + ) + + return True + + +def _personal_key_generation_check( + user_api_key_dict: UserAPIKeyAuth, data: GenerateKeyRequest +): + + if ( + litellm.key_generation_settings is None + or litellm.key_generation_settings.get("personal_key_generation") is None + ): + return True + + _personal_key_generation = litellm.key_generation_settings["personal_key_generation"] # type: ignore + + _personal_key_membership_check( + user_api_key_dict, + personal_key_generation=_personal_key_generation, + ) + + _key_generation_required_param_check( + data, + _personal_key_generation.get("required_params"), + ) + + return True + + +def key_generation_check( + team_table: Optional[LiteLLM_TeamTableCachedObj], + user_api_key_dict: UserAPIKeyAuth, + data: GenerateKeyRequest, +) -> bool: + """ + Check if admin has restricted key creation to certain roles for teams or individuals + """ + + ## check if key is for team or individual + is_team_key = _is_team_key(data=data) + if is_team_key: + if team_table is None and litellm.key_generation_settings is not None: + raise HTTPException( + status_code=400, + detail=f"Unable to find team object in database. Team ID: {data.team_id}", + ) + elif team_table is None: + return True # assume user is assigning team_id without using the team table + return _team_key_generation_check( + team_table=team_table, + user_api_key_dict=user_api_key_dict, + data=data, + ) + else: + return _personal_key_generation_check( + user_api_key_dict=user_api_key_dict, data=data + ) + + +def common_key_access_checks( + user_api_key_dict: UserAPIKeyAuth, + data: Union[GenerateKeyRequest, UpdateKeyRequest], + llm_router: Optional[Router], + premium_user: bool, +) -> Literal[True]: + """ + Check if user is allowed to make a key request, for this key + """ + try: + _is_allowed_to_make_key_request( + user_api_key_dict=user_api_key_dict, + user_id=data.user_id, + team_id=data.team_id, + ) + except AssertionError as e: + raise HTTPException( + status_code=403, + detail=str(e), + ) + except Exception as e: + raise HTTPException( + status_code=500, + detail=str(e), + ) + + _check_model_access_group( + models=data.models, + llm_router=llm_router, + premium_user=premium_user, + ) + return True + + +router = APIRouter() + + +@router.post( + "/key/generate", + tags=["key management"], + dependencies=[Depends(user_api_key_auth)], + response_model=GenerateKeyResponse, +) +@management_endpoint_wrapper +async def generate_key_fn( # noqa: PLR0915 + data: GenerateKeyRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Generate an API key based on the provided data. + + Docs: https://docs.litellm.ai/docs/proxy/virtual_keys + + Parameters: + - duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). + - key_alias: Optional[str] - User defined key alias + - key: Optional[str] - User defined key value. If not set, a 16-digit unique sk-key is created for you. + - team_id: Optional[str] - The team id of the key + - user_id: Optional[str] - The user id of the key + - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. + - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) + - aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models + - config: Optional[dict] - any key-specific configs, overrides config in config.yaml + - spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend + - send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key + - max_budget: Optional[float] - Specify max budget for a given key. + - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"). + - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. + - metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } + - guardrails: Optional[List[str]] - List of active guardrails for the key + - permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false} + - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget. + - model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit. + - model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit. + - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request + - blocked: Optional[bool] - Whether the key is blocked. + - rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute) + - tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute) + - soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached. + - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). + - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) + + Examples: + + 1. Allow users to turn on/off pii masking + + ```bash + curl --location 'http://0.0.0.0:4000/key/generate' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "permissions": {"allow_pii_controls": true} + }' + ``` + + Returns: + - key: (str) The generated api key + - expires: (datetime) Datetime object for when key expires. + - user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id. + """ + try: + from litellm.proxy.proxy_server import ( + litellm_proxy_admin_name, + llm_router, + premium_user, + prisma_client, + user_api_key_cache, + user_custom_key_generate, + ) + + verbose_proxy_logger.debug("entered /key/generate") + + if user_custom_key_generate is not None: + if asyncio.iscoroutinefunction(user_custom_key_generate): + result = await user_custom_key_generate(data) # type: ignore + else: + raise ValueError("user_custom_key_generate must be a coroutine") + decision = result.get("decision", True) + message = result.get("message", "Authentication Failed - Custom Auth Rule") + if not decision: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, detail=message + ) + team_table: Optional[LiteLLM_TeamTableCachedObj] = None + if data.team_id is not None: + try: + team_table = await get_team_object( + team_id=data.team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=user_api_key_dict.parent_otel_span, + check_db_only=True, + ) + except Exception as e: + verbose_proxy_logger.debug( + f"Error getting team object in `/key/generate`: {e}" + ) + team_table = None + + key_generation_check( + team_table=team_table, + user_api_key_dict=user_api_key_dict, + data=data, + ) + + common_key_access_checks( + user_api_key_dict=user_api_key_dict, + data=data, + llm_router=llm_router, + premium_user=premium_user, + ) + + # check if user set default key/generate params on config.yaml + if litellm.default_key_generate_params is not None: + for elem in data: + key, value = elem + if value is None and key in [ + "max_budget", + "user_id", + "team_id", + "max_parallel_requests", + "tpm_limit", + "rpm_limit", + "budget_duration", + ]: + setattr( + data, key, litellm.default_key_generate_params.get(key, None) + ) + elif key == "models" and value == []: + setattr(data, key, litellm.default_key_generate_params.get(key, [])) + elif key == "metadata" and value == {}: + setattr(data, key, litellm.default_key_generate_params.get(key, {})) + + # check if user set default key/generate params on config.yaml + if litellm.upperbound_key_generate_params is not None: + for elem in data: + key, value = elem + upperbound_value = getattr( + litellm.upperbound_key_generate_params, key, None + ) + if upperbound_value is not None: + if value is None: + # Use the upperbound value if user didn't provide a value + setattr(data, key, upperbound_value) + else: + # Compare with upperbound for numeric fields + if key in [ + "max_budget", + "max_parallel_requests", + "tpm_limit", + "rpm_limit", + ]: + if value > upperbound_value: + raise HTTPException( + status_code=400, + detail={ + "error": f"{key} is over max limit set in config - user_value={value}; max_value={upperbound_value}" + }, + ) + # Compare durations + elif key in ["budget_duration", "duration"]: + upperbound_duration = duration_in_seconds( + duration=upperbound_value + ) + user_duration = duration_in_seconds(duration=value) + if user_duration > upperbound_duration: + raise HTTPException( + status_code=400, + detail={ + "error": f"{key} is over max limit set in config - user_value={value}; max_value={upperbound_value}" + }, + ) + + # TODO: @ishaan-jaff: Migrate all budget tracking to use LiteLLM_BudgetTable + _budget_id = data.budget_id + if prisma_client is not None and data.soft_budget is not None: + # create the Budget Row for the LiteLLM Verification Token + budget_row = LiteLLM_BudgetTable( + soft_budget=data.soft_budget, + model_max_budget=data.model_max_budget or {}, + ) + new_budget = prisma_client.jsonify_object( + budget_row.json(exclude_none=True) + ) + + _budget = await prisma_client.db.litellm_budgettable.create( + data={ + **new_budget, # type: ignore + "created_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + "updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + } + ) + _budget_id = getattr(_budget, "budget_id", None) + + # ADD METADATA FIELDS + # Set Management Endpoint Metadata Fields + for field in LiteLLM_ManagementEndpoint_MetadataFields_Premium: + if getattr(data, field) is not None: + _set_object_metadata_field( + object_data=data, + field_name=field, + value=getattr(data, field), + ) + + data_json = data.model_dump(exclude_unset=True, exclude_none=True) # type: ignore + + # if we get max_budget passed to /key/generate, then use it as key_max_budget. Since generate_key_helper_fn is used to make new users + if "max_budget" in data_json: + data_json["key_max_budget"] = data_json.pop("max_budget", None) + if _budget_id is not None: + data_json["budget_id"] = _budget_id + + if "budget_duration" in data_json: + data_json["key_budget_duration"] = data_json.pop("budget_duration", None) + + if user_api_key_dict.user_id is not None: + data_json["created_by"] = user_api_key_dict.user_id + data_json["updated_by"] = user_api_key_dict.user_id + + # Set tags on the new key + if "tags" in data_json: + from litellm.proxy.proxy_server import premium_user + + if premium_user is not True and data_json["tags"] is not None: + raise ValueError( + f"Only premium users can add tags to keys. {CommonProxyErrors.not_premium_user.value}" + ) + + _metadata = data_json.get("metadata") + if not _metadata: + data_json["metadata"] = {"tags": data_json["tags"]} + else: + data_json["metadata"]["tags"] = data_json["tags"] + + data_json.pop("tags") + + await _enforce_unique_key_alias( + key_alias=data_json.get("key_alias", None), + prisma_client=prisma_client, + ) + + response = await generate_key_helper_fn( + request_type="key", **data_json, table_name="key" + ) + + response["soft_budget"] = ( + data.soft_budget + ) # include the user-input soft budget in the response + + response = GenerateKeyResponse(**response) + + asyncio.create_task( + KeyManagementEventHooks.async_key_generated_hook( + data=data, + response=response, + user_api_key_dict=user_api_key_dict, + litellm_changed_by=litellm_changed_by, + ) + ) + + return response + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.generate_key_fn(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +def prepare_metadata_fields( + data: BaseModel, non_default_values: dict, existing_metadata: dict +) -> dict: + """ + Check LiteLLM_ManagementEndpoint_MetadataFields (proxy/_types.py) for fields that are allowed to be updated + """ + if "metadata" not in non_default_values: # allow user to set metadata to none + non_default_values["metadata"] = existing_metadata.copy() + + casted_metadata = cast(dict, non_default_values["metadata"]) + + data_json = data.model_dump(exclude_unset=True, exclude_none=True) + + try: + for k, v in data_json.items(): + if k in LiteLLM_ManagementEndpoint_MetadataFields: + if isinstance(v, datetime): + casted_metadata[k] = v.isoformat() + else: + casted_metadata[k] = v + + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.prepare_metadata_fields(): Exception occured - {}".format( + str(e) + ) + ) + + non_default_values["metadata"] = casted_metadata + return non_default_values + + +def prepare_key_update_data( + data: Union[UpdateKeyRequest, RegenerateKeyRequest], existing_key_row +): + data_json: dict = data.model_dump(exclude_unset=True) + data_json.pop("key", None) + non_default_values = {} + for k, v in data_json.items(): + if k in LiteLLM_ManagementEndpoint_MetadataFields: + continue + non_default_values[k] = v + + if "duration" in non_default_values: + duration = non_default_values.pop("duration") + if duration and (isinstance(duration, str)) and len(duration) > 0: + duration_s = duration_in_seconds(duration=duration) + expires = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + non_default_values["expires"] = expires + + if "budget_duration" in non_default_values: + budget_duration = non_default_values.pop("budget_duration") + if ( + budget_duration + and (isinstance(budget_duration, str)) + and len(budget_duration) > 0 + ): + duration_s = duration_in_seconds(duration=budget_duration) + key_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + non_default_values["budget_reset_at"] = key_reset_at + non_default_values["budget_duration"] = budget_duration + + _metadata = existing_key_row.metadata or {} + + # validate model_max_budget + if "model_max_budget" in non_default_values: + validate_model_max_budget(non_default_values["model_max_budget"]) + + non_default_values = prepare_metadata_fields( + data=data, non_default_values=non_default_values, existing_metadata=_metadata + ) + + return non_default_values + + +@router.post( + "/key/update", tags=["key management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def update_key_fn( + request: Request, + data: UpdateKeyRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Update an existing API key's parameters. + + Parameters: + - key: str - The key to update + - key_alias: Optional[str] - User-friendly key alias + - user_id: Optional[str] - User ID associated with key + - team_id: Optional[str] - Team ID associated with key + - budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`. + - models: Optional[list] - Model_name's a user is allowed to call + - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) + - enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests) + - spend: Optional[float] - Amount spent by key + - max_budget: Optional[float] - Max budget for key + - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} + - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) + - soft_budget: Optional[float] - [TODO] Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached. + - max_parallel_requests: Optional[int] - Rate limit for parallel requests + - metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"} + - tpm_limit: Optional[int] - Tokens per minute limit + - rpm_limit: Optional[int] - Requests per minute limit + - model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200} + - model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000} + - allowed_cache_controls: Optional[list] - List of allowed cache control values + - duration: Optional[str] - Key validity duration ("30d", "1h", etc.) + - permissions: Optional[dict] - Key-specific permissions + - send_invite_email: Optional[bool] - Send invite email to user_id + - guardrails: Optional[List[str]] - List of active guardrails for the key + - blocked: Optional[bool] - Whether the key is blocked + - aliases: Optional[dict] - Model aliases for the key - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases) + - config: Optional[dict] - [DEPRECATED PARAM] Key-specific config. + - temp_budget_increase: Optional[float] - Temporary budget increase for the key (Enterprise only). + - temp_budget_expiry: Optional[str] - Expiry time for the temporary budget increase (Enterprise only). + + Example: + ```bash + curl --location 'http://0.0.0.0:4000/key/update' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "key": "sk-1234", + "key_alias": "my-key", + "user_id": "user-1234", + "team_id": "team-1234", + "max_budget": 100, + "metadata": {"any_key": "any-val"}, + }' + ``` + """ + from litellm.proxy.proxy_server import ( + llm_router, + premium_user, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + ) + + try: + data_json: dict = data.model_dump(exclude_unset=True, exclude_none=True) + key = data_json.pop("key") + + # get the row from db + if prisma_client is None: + raise Exception("Not connected to DB!") + + common_key_access_checks( + user_api_key_dict=user_api_key_dict, + data=data, + llm_router=llm_router, + premium_user=premium_user, + ) + + existing_key_row = await prisma_client.get_data( + token=data.key, table_name="key", query_type="find_unique" + ) + + if existing_key_row is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={data.team_id}"}, + ) + + non_default_values = prepare_key_update_data( + data=data, existing_key_row=existing_key_row + ) + + await _enforce_unique_key_alias( + key_alias=non_default_values.get("key_alias", None), + prisma_client=prisma_client, + existing_key_token=existing_key_row.token, + ) + + _data = {**non_default_values, "token": key} + response = await prisma_client.update_data(token=key, data=_data) + + # Delete - key from cache, since it's been updated! + # key updated - a new model could have been added to this key. it should not block requests after this is done + await _delete_cache_key_object( + hashed_token=hash_token(key), + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + asyncio.create_task( + KeyManagementEventHooks.async_key_updated_hook( + data=data, + existing_key_row=existing_key_row, + response=response, + user_api_key_dict=user_api_key_dict, + litellm_changed_by=litellm_changed_by, + ) + ) + + if response is None: + raise ValueError("Failed to update key got response = None") + + return {"key": key, **response["data"]} + # update based on remaining passed in values + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.update_key_fn(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +@router.post( + "/key/delete", tags=["key management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def delete_key_fn( + data: KeyRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Delete a key from the key management system. + + Parameters:: + - keys (List[str]): A list of keys or hashed keys to delete. Example {"keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]} + - key_aliases (List[str]): A list of key aliases to delete. Can be passed instead of `keys`.Example {"key_aliases": ["alias1", "alias2"]} + + Returns: + - deleted_keys (List[str]): A list of deleted keys. Example {"deleted_keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]} + + Example: + ```bash + curl --location 'http://0.0.0.0:4000/key/delete' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "keys": ["sk-QWrxEynunsNpV1zT48HIrw"] + }' + ``` + + Raises: + HTTPException: If an error occurs during key deletion. + """ + try: + from litellm.proxy.proxy_server import prisma_client, user_api_key_cache + + if prisma_client is None: + raise Exception("Not connected to DB!") + + ## only allow user to delete keys they own + verbose_proxy_logger.debug( + f"user_api_key_dict.user_role: {user_api_key_dict.user_role}" + ) + + num_keys_to_be_deleted = 0 + deleted_keys = [] + if data.keys: + number_deleted_keys, _keys_being_deleted = await delete_verification_tokens( + tokens=data.keys, + user_api_key_cache=user_api_key_cache, + user_api_key_dict=user_api_key_dict, + ) + num_keys_to_be_deleted = len(data.keys) + deleted_keys = data.keys + elif data.key_aliases: + number_deleted_keys, _keys_being_deleted = await delete_key_aliases( + key_aliases=data.key_aliases, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + user_api_key_dict=user_api_key_dict, + ) + num_keys_to_be_deleted = len(data.key_aliases) + deleted_keys = data.key_aliases + else: + raise ValueError("Invalid request type") + + if number_deleted_keys is None: + raise ProxyException( + message="Failed to delete keys got None response from delete_verification_token", + type=ProxyErrorTypes.internal_server_error, + param="keys", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + verbose_proxy_logger.debug(f"/key/delete - deleted_keys={number_deleted_keys}") + + try: + assert num_keys_to_be_deleted == len(deleted_keys) + except Exception: + raise HTTPException( + status_code=400, + detail={ + "error": f"Not all keys passed in were deleted. This probably means you don't have access to delete all the keys passed in. Keys passed in={num_keys_to_be_deleted}, Deleted keys ={number_deleted_keys}" + }, + ) + + verbose_proxy_logger.debug( + f"/keys/delete - cache after delete: {user_api_key_cache.in_memory_cache.cache_dict}" + ) + + asyncio.create_task( + KeyManagementEventHooks.async_key_deleted_hook( + data=data, + keys_being_deleted=_keys_being_deleted, + user_api_key_dict=user_api_key_dict, + litellm_changed_by=litellm_changed_by, + response=number_deleted_keys, + ) + ) + + return {"deleted_keys": deleted_keys} + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.delete_key_fn(): Exception occured - {}".format( + str(e) + ) + ) + raise handle_exception_on_proxy(e) + + +@router.post( + "/v2/key/info", + tags=["key management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def info_key_fn_v2( + data: Optional[KeyRequest] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Retrieve information about a list of keys. + + **New endpoint**. Currently admin only. + Parameters: + keys: Optional[list] = body parameter representing the key(s) in the request + user_api_key_dict: UserAPIKeyAuth = Dependency representing the user's API key + Returns: + Dict containing the key and its associated information + + Example Curl: + ``` + curl -X GET "http://0.0.0.0:4000/key/info" \ + -H "Authorization: Bearer sk-1234" \ + -d {"keys": ["sk-1", "sk-2", "sk-3"]} + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + if data is None: + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, + detail={"message": "Malformed request. No keys passed in."}, + ) + + key_info = await prisma_client.get_data( + token=data.keys, table_name="key", query_type="find_all" + ) + if key_info is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail={"message": "No keys found"}, + ) + filtered_key_info = [] + for k in key_info: + try: + k = k.model_dump() # noqa + except Exception: + # if using pydantic v1 + k = k.dict() + filtered_key_info.append(k) + return {"key": data.keys, "info": filtered_key_info} + + except Exception as e: + raise handle_exception_on_proxy(e) + + +@router.get( + "/key/info", tags=["key management"], dependencies=[Depends(user_api_key_auth)] +) +async def info_key_fn( + key: Optional[str] = fastapi.Query( + default=None, description="Key in the request parameters" + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Retrieve information about a key. + Parameters: + key: Optional[str] = Query parameter representing the key in the request + user_api_key_dict: UserAPIKeyAuth = Dependency representing the user's API key + Returns: + Dict containing the key and its associated information + + Example Curl: + ``` + curl -X GET "http://0.0.0.0:4000/key/info?key=sk-02Wr4IAlN3NvPXvL5JVvDA" \ +-H "Authorization: Bearer sk-1234" + ``` + + Example Curl - if no key is passed, it will use the Key Passed in Authorization Header + ``` + curl -X GET "http://0.0.0.0:4000/key/info" \ +-H "Authorization: Bearer sk-02Wr4IAlN3NvPXvL5JVvDA" + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + # default to using Auth token if no key is passed in + key = key or user_api_key_dict.api_key + hashed_key: Optional[str] = key + if key is not None: + hashed_key = _hash_token_if_needed(token=key) + key_info = await prisma_client.db.litellm_verificationtoken.find_unique( + where={"token": hashed_key}, # type: ignore + include={"litellm_budget_table": True}, + ) + if key_info is None: + raise ProxyException( + message="Key not found in database", + type=ProxyErrorTypes.not_found_error, + param="key", + code=status.HTTP_404_NOT_FOUND, + ) + + if ( + _can_user_query_key_info( + user_api_key_dict=user_api_key_dict, + key=key, + key_info=key_info, + ) + is not True + ): + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail="You are not allowed to access this key's info. Your role={}".format( + user_api_key_dict.user_role + ), + ) + ## REMOVE HASHED TOKEN INFO BEFORE RETURNING ## + try: + key_info = key_info.model_dump() # noqa + except Exception: + # if using pydantic v1 + key_info = key_info.dict() + key_info.pop("token") + return {"key": key, "info": key_info} + except Exception as e: + raise handle_exception_on_proxy(e) + + +def _check_model_access_group( + models: Optional[List[str]], llm_router: Optional[Router], premium_user: bool +) -> Literal[True]: + """ + if is_model_access_group is True + is_wildcard_route is True, check if user is a premium user + + Return True if user is a premium user, False otherwise + """ + if models is None or llm_router is None: + return True + + for model in models: + if llm_router._is_model_access_group_for_wildcard_route( + model_access_group=model + ): + if not premium_user: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail={ + "error": "Setting a model access group on a wildcard model is only available for LiteLLM Enterprise users.{}".format( + CommonProxyErrors.not_premium_user.value + ) + }, + ) + + return True + + +async def generate_key_helper_fn( # noqa: PLR0915 + request_type: Literal[ + "user", "key" + ], # identifies if this request is from /user/new or /key/generate + duration: Optional[str] = None, + models: list = [], + aliases: dict = {}, + config: dict = {}, + spend: float = 0.0, + key_max_budget: Optional[float] = None, # key_max_budget is used to Budget Per key + key_budget_duration: Optional[str] = None, + budget_id: Optional[float] = None, # budget id <-> LiteLLM_BudgetTable + soft_budget: Optional[ + float + ] = None, # soft_budget is used to set soft Budgets Per user + max_budget: Optional[float] = None, # max_budget is used to Budget Per user + blocked: Optional[bool] = None, + budget_duration: Optional[str] = None, # max_budget is used to Budget Per user + token: Optional[str] = None, + key: Optional[ + str + ] = None, # dev-friendly alt param for 'token'. Exposed on `/key/generate` for setting key value yourself. + user_id: Optional[str] = None, + user_alias: Optional[str] = None, + team_id: Optional[str] = None, + user_email: Optional[str] = None, + user_role: Optional[str] = None, + max_parallel_requests: Optional[int] = None, + metadata: Optional[dict] = {}, + tpm_limit: Optional[int] = None, + rpm_limit: Optional[int] = None, + query_type: Literal["insert_data", "update_data"] = "insert_data", + update_key_values: Optional[dict] = None, + key_alias: Optional[str] = None, + allowed_cache_controls: Optional[list] = [], + permissions: Optional[dict] = {}, + model_max_budget: Optional[dict] = {}, + model_rpm_limit: Optional[dict] = None, + model_tpm_limit: Optional[dict] = None, + guardrails: Optional[list] = None, + teams: Optional[list] = None, + organization_id: Optional[str] = None, + table_name: Optional[Literal["key", "user"]] = None, + send_invite_email: Optional[bool] = None, + created_by: Optional[str] = None, + updated_by: Optional[str] = None, +): + from litellm.proxy.proxy_server import ( + litellm_proxy_budget_name, + premium_user, + prisma_client, + ) + + if prisma_client is None: + raise Exception( + "Connect Proxy to database to generate keys - https://docs.litellm.ai/docs/proxy/virtual_keys " + ) + + if token is None: + if key is not None: + token = key + else: + token = f"sk-{secrets.token_urlsafe(16)}" + + if duration is None: # allow tokens that never expire + expires = None + else: + duration_s = duration_in_seconds(duration=duration) + expires = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + + if key_budget_duration is None: # one-time budget + key_reset_at = None + else: + duration_s = duration_in_seconds(duration=key_budget_duration) + key_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + + if budget_duration is None: # one-time budget + reset_at = None + else: + duration_s = duration_in_seconds(duration=budget_duration) + reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + + aliases_json = json.dumps(aliases) + config_json = json.dumps(config) + permissions_json = json.dumps(permissions) + + # Add model_rpm_limit and model_tpm_limit to metadata + if model_rpm_limit is not None: + metadata = metadata or {} + metadata["model_rpm_limit"] = model_rpm_limit + if model_tpm_limit is not None: + metadata = metadata or {} + metadata["model_tpm_limit"] = model_tpm_limit + if guardrails is not None: + metadata = metadata or {} + metadata["guardrails"] = guardrails + + metadata_json = json.dumps(metadata) + validate_model_max_budget(model_max_budget) + model_max_budget_json = json.dumps(model_max_budget) + user_role = user_role + tpm_limit = tpm_limit + rpm_limit = rpm_limit + allowed_cache_controls = allowed_cache_controls + + try: + # Create a new verification token (you may want to enhance this logic based on your needs) + user_data = { + "max_budget": max_budget, + "user_email": user_email, + "user_id": user_id, + "user_alias": user_alias, + "team_id": team_id, + "organization_id": organization_id, + "user_role": user_role, + "spend": spend, + "models": models, + "metadata": metadata_json, + "max_parallel_requests": max_parallel_requests, + "tpm_limit": tpm_limit, + "rpm_limit": rpm_limit, + "budget_duration": budget_duration, + "budget_reset_at": reset_at, + "allowed_cache_controls": allowed_cache_controls, + } + if teams is not None: + user_data["teams"] = teams + key_data = { + "token": token, + "key_alias": key_alias, + "expires": expires, + "models": models, + "aliases": aliases_json, + "config": config_json, + "spend": spend, + "max_budget": key_max_budget, + "user_id": user_id, + "team_id": team_id, + "max_parallel_requests": max_parallel_requests, + "metadata": metadata_json, + "tpm_limit": tpm_limit, + "rpm_limit": rpm_limit, + "budget_duration": key_budget_duration, + "budget_reset_at": key_reset_at, + "allowed_cache_controls": allowed_cache_controls, + "permissions": permissions_json, + "model_max_budget": model_max_budget_json, + "budget_id": budget_id, + "blocked": blocked, + "created_by": created_by, + "updated_by": updated_by, + } + + if ( + get_secret("DISABLE_KEY_NAME", False) is True + ): # allow user to disable storing abbreviated key name (shown in UI, to help figure out which key spent how much) + pass + else: + key_data["key_name"] = f"sk-...{token[-4:]}" + saved_token = copy.deepcopy(key_data) + if isinstance(saved_token["aliases"], str): + saved_token["aliases"] = json.loads(saved_token["aliases"]) + if isinstance(saved_token["config"], str): + saved_token["config"] = json.loads(saved_token["config"]) + if isinstance(saved_token["metadata"], str): + saved_token["metadata"] = json.loads(saved_token["metadata"]) + if isinstance(saved_token["permissions"], str): + if ( + "get_spend_routes" in saved_token["permissions"] + and premium_user is not True + ): + raise ValueError( + "get_spend_routes permission is only available for LiteLLM Enterprise users" + ) + + saved_token["permissions"] = json.loads(saved_token["permissions"]) + if isinstance(saved_token["model_max_budget"], str): + saved_token["model_max_budget"] = json.loads( + saved_token["model_max_budget"] + ) + + if saved_token.get("expires", None) is not None and isinstance( + saved_token["expires"], datetime + ): + saved_token["expires"] = saved_token["expires"].isoformat() + if prisma_client is not None: + if ( + table_name is None or table_name == "user" + ): # do not auto-create users for `/key/generate` + ## CREATE USER (If necessary) + if query_type == "insert_data": + user_row = await prisma_client.insert_data( + data=user_data, table_name="user" + ) + + if user_row is None: + raise Exception("Failed to create user") + ## use default user model list if no key-specific model list provided + if len(user_row.models) > 0 and len(key_data["models"]) == 0: # type: ignore + key_data["models"] = user_row.models # type: ignore + elif query_type == "update_data": + user_row = await prisma_client.update_data( + data=user_data, + table_name="user", + update_key_values=update_key_values, + ) + if user_id == litellm_proxy_budget_name or ( + table_name is not None and table_name == "user" + ): + # do not create a key for litellm_proxy_budget_name or if table name is set to just 'user' + # we only need to ensure this exists in the user table + # the LiteLLM_VerificationToken table will increase in size if we don't do this check + return user_data + + ## CREATE KEY + verbose_proxy_logger.debug("prisma_client: Creating Key= %s", key_data) + create_key_response = await prisma_client.insert_data( + data=key_data, table_name="key" + ) + key_data["token_id"] = getattr(create_key_response, "token", None) + key_data["litellm_budget_table"] = getattr( + create_key_response, "litellm_budget_table", None + ) + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.generate_key_helper_fn(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise e + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": "Internal Server Error."}, + ) + + # Add budget related info in key_data - this ensures it's returned + key_data["budget_id"] = budget_id + + if request_type == "user": + # if this is a /user/new request update the key_date with user_data fields + key_data.update(user_data) + return key_data + + +async def _team_key_deletion_check( + user_api_key_dict: UserAPIKeyAuth, + key_info: LiteLLM_VerificationToken, + prisma_client: PrismaClient, + user_api_key_cache: DualCache, +): + is_team_key = _is_team_key(data=key_info) + + if is_team_key and key_info.team_id is not None: + team_table = await get_team_object( + team_id=key_info.team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + check_db_only=True, + ) + if ( + litellm.key_generation_settings is not None + and "team_key_generation" in litellm.key_generation_settings + ): + _team_key_generation = litellm.key_generation_settings[ + "team_key_generation" + ] + else: + _team_key_generation = TeamUIKeyGenerationConfig( + allowed_team_member_roles=["admin", "user"], + ) + # check if user is team admin + if team_table is not None: + return _team_key_generation_team_member_check( + assigned_user_id=user_api_key_dict.user_id, + team_table=team_table, + user_api_key_dict=user_api_key_dict, + team_key_generation=_team_key_generation, + ) + else: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail={ + "error": f"Team not found in db, and user not proxy admin. Team id = {key_info.team_id}" + }, + ) + return False + + +async def can_delete_verification_token( + key_info: LiteLLM_VerificationToken, + user_api_key_cache: DualCache, + user_api_key_dict: UserAPIKeyAuth, + prisma_client: PrismaClient, +) -> bool: + """ + - check if user is proxy admin + - check if user is team admin and key is a team key + - check if key is personal key + """ + is_team_key = _is_team_key(data=key_info) + if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value: + return True + elif is_team_key and key_info.team_id is not None: + return await _team_key_deletion_check( + user_api_key_dict=user_api_key_dict, + key_info=key_info, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + ) + elif key_info.user_id is not None and key_info.user_id == user_api_key_dict.user_id: + return True + else: + return False + + +async def delete_verification_tokens( + tokens: List, + user_api_key_cache: DualCache, + user_api_key_dict: UserAPIKeyAuth, +) -> Tuple[Optional[Dict], List[LiteLLM_VerificationToken]]: + """ + Helper that deletes the list of tokens from the database + + - check if user is proxy admin + - check if user is team admin and key is a team key + + Args: + tokens: List of tokens to delete + user_id: Optional user_id to filter by + + Returns: + Tuple[Optional[Dict], List[LiteLLM_VerificationToken]]: + Optional[Dict]: + - Number of deleted tokens + List[LiteLLM_VerificationToken]: + - List of keys being deleted, this contains information about the key_alias, token, and user_id being deleted, + this is passed down to the KeyManagementEventHooks to delete the keys from the secret manager and handle audit logs + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client: + tokens = [_hash_token_if_needed(token=key) for key in tokens] + _keys_being_deleted: List[LiteLLM_VerificationToken] = ( + await prisma_client.db.litellm_verificationtoken.find_many( + where={"token": {"in": tokens}} + ) + ) + + # Assuming 'db' is your Prisma Client instance + # check if admin making request - don't filter by user-id + if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value: + deleted_tokens = await prisma_client.delete_data(tokens=tokens) + # else + else: + tasks = [] + deleted_tokens = [] + for key in _keys_being_deleted: + + async def _delete_key(key: LiteLLM_VerificationToken): + if await can_delete_verification_token( + key_info=key, + user_api_key_cache=user_api_key_cache, + user_api_key_dict=user_api_key_dict, + prisma_client=prisma_client, + ): + await prisma_client.delete_data(tokens=[key.token]) + deleted_tokens.append(key.token) + else: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail={ + "error": "You are not authorized to delete this key" + }, + ) + + tasks.append(_delete_key(key)) + await asyncio.gather(*tasks) + + _num_deleted_tokens = len(deleted_tokens) + if _num_deleted_tokens != len(tokens): + failed_tokens = [ + token for token in tokens if token not in deleted_tokens + ] + raise Exception( + "Failed to delete all tokens. Failed to delete tokens: " + + str(failed_tokens) + ) + else: + raise Exception("DB not connected. prisma_client is None") + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.delete_verification_tokens(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise e + + for key in tokens: + user_api_key_cache.delete_cache(key) + # remove hash token from cache + hashed_token = hash_token(cast(str, key)) + user_api_key_cache.delete_cache(hashed_token) + + return {"deleted_keys": deleted_tokens}, _keys_being_deleted + + +async def delete_key_aliases( + key_aliases: List[str], + user_api_key_cache: DualCache, + prisma_client: PrismaClient, + user_api_key_dict: UserAPIKeyAuth, +) -> Tuple[Optional[Dict], List[LiteLLM_VerificationToken]]: + _keys_being_deleted = await prisma_client.db.litellm_verificationtoken.find_many( + where={"key_alias": {"in": key_aliases}} + ) + + tokens = [key.token for key in _keys_being_deleted] + return await delete_verification_tokens( + tokens=tokens, + user_api_key_cache=user_api_key_cache, + user_api_key_dict=user_api_key_dict, + ) + + +async def _rotate_master_key( + prisma_client: PrismaClient, + user_api_key_dict: UserAPIKeyAuth, + current_master_key: str, + new_master_key: str, +) -> None: + """ + Rotate the master key + + 1. Get the values from the DB + - Get models from DB + - Get config from DB + 2. Decrypt the values + - ModelTable + - [{"model_name": "str", "litellm_params": {}}] + - ConfigTable + 3. Encrypt the values with the new master key + 4. Update the values in the DB + """ + from litellm.proxy.proxy_server import proxy_config + + try: + models: Optional[List] = ( + await prisma_client.db.litellm_proxymodeltable.find_many() + ) + except Exception: + models = None + # 2. process model table + if models: + decrypted_models = proxy_config.decrypt_model_list_from_db(new_models=models) + verbose_proxy_logger.info( + "ABLE TO DECRYPT MODELS - len(decrypted_models): %s", len(decrypted_models) + ) + new_models = [] + for model in decrypted_models: + new_model = await _add_model_to_db( + model_params=Deployment(**model), + user_api_key_dict=user_api_key_dict, + prisma_client=prisma_client, + new_encryption_key=new_master_key, + should_create_model_in_db=False, + ) + if new_model: + new_models.append(jsonify_object(new_model.model_dump())) + verbose_proxy_logger.info("Resetting proxy model table") + await prisma_client.db.litellm_proxymodeltable.delete_many() + verbose_proxy_logger.info("Creating %s models", len(new_models)) + await prisma_client.db.litellm_proxymodeltable.create_many( + data=new_models, + ) + # 3. process config table + try: + config = await prisma_client.db.litellm_config.find_many() + except Exception: + config = None + + if config: + """If environment_variables is found, decrypt it and encrypt it with the new master key""" + environment_variables_dict = {} + for c in config: + if c.param_name == "environment_variables": + environment_variables_dict = c.param_value + + if environment_variables_dict: + decrypted_env_vars = proxy_config._decrypt_and_set_db_env_variables( + environment_variables=environment_variables_dict + ) + encrypted_env_vars = proxy_config._encrypt_env_variables( + environment_variables=decrypted_env_vars, + new_encryption_key=new_master_key, + ) + + if encrypted_env_vars: + await prisma_client.db.litellm_config.update( + where={"param_name": "environment_variables"}, + data={"param_value": jsonify_object(encrypted_env_vars)}, + ) + + +@router.post( + "/key/{key:path}/regenerate", + tags=["key management"], + dependencies=[Depends(user_api_key_auth)], +) +@router.post( + "/key/regenerate", + tags=["key management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def regenerate_key_fn( + key: Optional[str] = None, + data: Optional[RegenerateKeyRequest] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +) -> Optional[GenerateKeyResponse]: + """ + Regenerate an existing API key while optionally updating its parameters. + + Parameters: + - key: str (path parameter) - The key to regenerate + - data: Optional[RegenerateKeyRequest] - Request body containing optional parameters to update + - key_alias: Optional[str] - User-friendly key alias + - user_id: Optional[str] - User ID associated with key + - team_id: Optional[str] - Team ID associated with key + - models: Optional[list] - Model_name's a user is allowed to call + - tags: Optional[List[str]] - Tags for organizing keys (Enterprise only) + - spend: Optional[float] - Amount spent by key + - max_budget: Optional[float] - Max budget for key + - model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}} + - budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.) + - soft_budget: Optional[float] - Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached. + - max_parallel_requests: Optional[int] - Rate limit for parallel requests + - metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"} + - tpm_limit: Optional[int] - Tokens per minute limit + - rpm_limit: Optional[int] - Requests per minute limit + - model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200} + - model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000} + - allowed_cache_controls: Optional[list] - List of allowed cache control values + - duration: Optional[str] - Key validity duration ("30d", "1h", etc.) + - permissions: Optional[dict] - Key-specific permissions + - guardrails: Optional[List[str]] - List of active guardrails for the key + - blocked: Optional[bool] - Whether the key is blocked + + + Returns: + - GenerateKeyResponse containing the new key and its updated parameters + + Example: + ```bash + curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "max_budget": 100, + "metadata": {"team": "core-infra"}, + "models": ["gpt-4", "gpt-3.5-turbo"] + }' + ``` + + Note: This is an Enterprise feature. It requires a premium license to use. + """ + try: + + from litellm.proxy.proxy_server import ( + hash_token, + master_key, + premium_user, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + ) + + if premium_user is not True: + raise ValueError( + f"Regenerating Virtual Keys is an Enterprise feature, {CommonProxyErrors.not_premium_user.value}" + ) + + # Check if key exists, raise exception if key is not in the DB + key = data.key if data and data.key else key + if not key: + raise HTTPException(status_code=400, detail={"error": "No key passed in."}) + ### 1. Create New copy that is duplicate of existing key + ###################################################################### + + # create duplicate of existing key + # set token = new token generated + # insert new token in DB + + # create hash of token + if prisma_client is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": "DB not connected. prisma_client is None"}, + ) + + _is_master_key_valid = _is_master_key(api_key=key, _master_key=master_key) + + if master_key is not None and data and _is_master_key_valid: + if data.new_master_key is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "New master key is required."}, + ) + await _rotate_master_key( + prisma_client=prisma_client, + user_api_key_dict=user_api_key_dict, + current_master_key=master_key, + new_master_key=data.new_master_key, + ) + return GenerateKeyResponse( + key=data.new_master_key, + token=data.new_master_key, + key_name=data.new_master_key, + expires=None, + ) + + if "sk" not in key: + hashed_api_key = key + else: + hashed_api_key = hash_token(key) + + _key_in_db = await prisma_client.db.litellm_verificationtoken.find_unique( + where={"token": hashed_api_key}, + ) + if _key_in_db is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail={"error": f"Key {key} not found."}, + ) + + verbose_proxy_logger.debug("key_in_db: %s", _key_in_db) + + new_token = f"sk-{secrets.token_urlsafe(16)}" + new_token_hash = hash_token(new_token) + new_token_key_name = f"sk-...{new_token[-4:]}" + + # Prepare the update data + update_data = { + "token": new_token_hash, + "key_name": new_token_key_name, + } + + non_default_values = {} + if data is not None: + # Update with any provided parameters from GenerateKeyRequest + non_default_values = prepare_key_update_data( + data=data, existing_key_row=_key_in_db + ) + verbose_proxy_logger.debug("non_default_values: %s", non_default_values) + + update_data.update(non_default_values) + update_data = prisma_client.jsonify_object(data=update_data) + # Update the token in the database + updated_token = await prisma_client.db.litellm_verificationtoken.update( + where={"token": hashed_api_key}, + data=update_data, # type: ignore + ) + + updated_token_dict = {} + if updated_token is not None: + updated_token_dict = dict(updated_token) + + updated_token_dict["key"] = new_token + updated_token_dict["token_id"] = updated_token_dict.pop("token") + + ### 3. remove existing key entry from cache + ###################################################################### + if key: + await _delete_cache_key_object( + hashed_token=hash_token(key), + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + if hashed_api_key: + await _delete_cache_key_object( + hashed_token=hash_token(key), + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + response = GenerateKeyResponse( + **updated_token_dict, + ) + + asyncio.create_task( + KeyManagementEventHooks.async_key_rotated_hook( + data=data, + existing_key_row=_key_in_db, + response=response, + user_api_key_dict=user_api_key_dict, + litellm_changed_by=litellm_changed_by, + ) + ) + + return response + except Exception as e: + verbose_proxy_logger.exception("Error regenerating key: %s", e) + raise handle_exception_on_proxy(e) + + +async def validate_key_list_check( + user_api_key_dict: UserAPIKeyAuth, + user_id: Optional[str], + team_id: Optional[str], + organization_id: Optional[str], + key_alias: Optional[str], + prisma_client: PrismaClient, +) -> Optional[LiteLLM_UserTable]: + + if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value: + return None + + if user_api_key_dict.user_id is None: + raise ProxyException( + message="You are not authorized to access this endpoint. No 'user_id' is associated with your API key.", + type=ProxyErrorTypes.bad_request_error, + param="user_id", + code=status.HTTP_403_FORBIDDEN, + ) + complete_user_info_db_obj: Optional[BaseModel] = ( + await prisma_client.db.litellm_usertable.find_unique( + where={"user_id": user_api_key_dict.user_id}, + include={"organization_memberships": True}, + ) + ) + + if complete_user_info_db_obj is None: + raise ProxyException( + message="You are not authorized to access this endpoint. No 'user_id' is associated with your API key.", + type=ProxyErrorTypes.bad_request_error, + param="user_id", + code=status.HTTP_403_FORBIDDEN, + ) + + complete_user_info = LiteLLM_UserTable(**complete_user_info_db_obj.model_dump()) + + # internal user can only see their own keys + if user_id: + if complete_user_info.user_id != user_id: + raise ProxyException( + message="You are not authorized to check another user's keys", + type=ProxyErrorTypes.bad_request_error, + param="user_id", + code=status.HTTP_403_FORBIDDEN, + ) + + if team_id: + if team_id not in complete_user_info.teams: + raise ProxyException( + message="You are not authorized to check this team's keys", + type=ProxyErrorTypes.bad_request_error, + param="team_id", + code=status.HTTP_403_FORBIDDEN, + ) + + if organization_id: + if ( + complete_user_info.organization_memberships is None + or organization_id + not in [ + membership.organization_id + for membership in complete_user_info.organization_memberships + ] + ): + raise ProxyException( + message="You are not authorized to check this organization's keys", + type=ProxyErrorTypes.bad_request_error, + param="organization_id", + code=status.HTTP_403_FORBIDDEN, + ) + return complete_user_info + + +async def get_admin_team_ids( + complete_user_info: Optional[LiteLLM_UserTable], + user_api_key_dict: UserAPIKeyAuth, + prisma_client: PrismaClient, +) -> List[str]: + """ + Get all team IDs where the user is an admin. + """ + if complete_user_info is None: + return [] + # Get all teams that user is an admin of + teams: Optional[List[BaseModel]] = ( + await prisma_client.db.litellm_teamtable.find_many( + where={"team_id": {"in": complete_user_info.teams}} + ) + ) + if teams is None: + return [] + + teams_pydantic_obj = [LiteLLM_TeamTable(**team.model_dump()) for team in teams] + + admin_team_ids = [ + team.team_id + for team in teams_pydantic_obj + if _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team) + ] + return admin_team_ids + + +@router.get( + "/key/list", + tags=["key management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def list_keys( + request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + page: int = Query(1, description="Page number", ge=1), + size: int = Query(10, description="Page size", ge=1, le=100), + user_id: Optional[str] = Query(None, description="Filter keys by user ID"), + team_id: Optional[str] = Query(None, description="Filter keys by team ID"), + organization_id: Optional[str] = Query( + None, description="Filter keys by organization ID" + ), + key_alias: Optional[str] = Query(None, description="Filter keys by key alias"), + return_full_object: bool = Query(False, description="Return full key object"), + include_team_keys: bool = Query( + False, description="Include all keys for teams that user is an admin of." + ), +) -> KeyListResponseObject: + """ + List all keys for a given user / team / organization. + + Returns: + { + "keys": List[str] or List[UserAPIKeyAuth], + "total_count": int, + "current_page": int, + "total_pages": int, + } + """ + try: + from litellm.proxy.proxy_server import prisma_client + + verbose_proxy_logger.debug("Entering list_keys function") + + if prisma_client is None: + verbose_proxy_logger.error("Database not connected") + raise Exception("Database not connected") + + complete_user_info = await validate_key_list_check( + user_api_key_dict=user_api_key_dict, + user_id=user_id, + team_id=team_id, + organization_id=organization_id, + key_alias=key_alias, + prisma_client=prisma_client, + ) + + if include_team_keys: + admin_team_ids = await get_admin_team_ids( + complete_user_info=complete_user_info, + user_api_key_dict=user_api_key_dict, + prisma_client=prisma_client, + ) + else: + admin_team_ids = None + + if user_id is None and user_api_key_dict.user_role not in [ + LitellmUserRoles.PROXY_ADMIN.value, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value, + ]: + user_id = user_api_key_dict.user_id + + response = await _list_key_helper( + prisma_client=prisma_client, + page=page, + size=size, + user_id=user_id, + team_id=team_id, + key_alias=key_alias, + return_full_object=return_full_object, + organization_id=organization_id, + admin_team_ids=admin_team_ids, + ) + + verbose_proxy_logger.debug("Successfully prepared response") + + return response + + except Exception as e: + verbose_proxy_logger.exception(f"Error in list_keys: {e}") + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"error({str(e)})"), + type=ProxyErrorTypes.internal_server_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.internal_server_error, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +async def _list_key_helper( + prisma_client: PrismaClient, + page: int, + size: int, + user_id: Optional[str], + team_id: Optional[str], + organization_id: Optional[str], + key_alias: Optional[str], + exclude_team_id: Optional[str] = None, + return_full_object: bool = False, + admin_team_ids: Optional[ + List[str] + ] = None, # New parameter for teams where user is admin +) -> KeyListResponseObject: + """ + Helper function to list keys + Args: + page: int + size: int + user_id: Optional[str] + team_id: Optional[str] + key_alias: Optional[str] + exclude_team_id: Optional[str] # exclude a specific team_id + return_full_object: bool # when true, will return UserAPIKeyAuth objects instead of just the token + admin_team_ids: Optional[List[str]] # list of team IDs where the user is an admin + + Returns: + KeyListResponseObject + { + "keys": List[str] or List[UserAPIKeyAuth], # Updated to reflect possible return types + "total_count": int, + "current_page": int, + "total_pages": int, + } + """ + + # Prepare filter conditions + where: Dict[str, Union[str, Dict[str, Any], List[Dict[str, Any]]]] = {} + where.update(_get_condition_to_filter_out_ui_session_tokens()) + + # Build the OR conditions for user's keys and admin team keys + or_conditions: List[Dict[str, Any]] = [] + + # Base conditions for user's own keys + user_condition: Dict[str, Any] = {} + if user_id and isinstance(user_id, str): + user_condition["user_id"] = user_id + if team_id and isinstance(team_id, str): + user_condition["team_id"] = team_id + if key_alias and isinstance(key_alias, str): + user_condition["key_alias"] = key_alias + if exclude_team_id and isinstance(exclude_team_id, str): + user_condition["team_id"] = {"not": exclude_team_id} + if organization_id and isinstance(organization_id, str): + user_condition["organization_id"] = organization_id + + if user_condition: + or_conditions.append(user_condition) + + # Add condition for admin team keys if provided + if admin_team_ids: + or_conditions.append({"team_id": {"in": admin_team_ids}}) + + # Combine conditions with OR if we have multiple conditions + if len(or_conditions) > 1: + where["OR"] = or_conditions + elif len(or_conditions) == 1: + where.update(or_conditions[0]) + + verbose_proxy_logger.debug(f"Filter conditions: {where}") + + # Calculate skip for pagination + skip = (page - 1) * size + + verbose_proxy_logger.debug(f"Pagination: skip={skip}, take={size}") + + # Fetch keys with pagination + keys = await prisma_client.db.litellm_verificationtoken.find_many( + where=where, # type: ignore + skip=skip, # type: ignore + take=size, # type: ignore + order=[ + {"created_at": "desc"}, + {"token": "desc"}, # fallback sort + ], + ) + + verbose_proxy_logger.debug(f"Fetched {len(keys)} keys") + + # Get total count of keys + total_count = await prisma_client.db.litellm_verificationtoken.count( + where=where # type: ignore + ) + + verbose_proxy_logger.debug(f"Total count of keys: {total_count}") + + # Calculate total pages + total_pages = -(-total_count // size) # Ceiling division + + # Prepare response + key_list: List[Union[str, UserAPIKeyAuth]] = [] + for key in keys: + if return_full_object is True: + key_list.append(UserAPIKeyAuth(**key.dict())) # Return full key object + else: + _token = key.dict().get("token") + key_list.append(_token) # Return only the token + + return KeyListResponseObject( + keys=key_list, + total_count=total_count, + current_page=page, + total_pages=total_pages, + ) + + +def _get_condition_to_filter_out_ui_session_tokens() -> Dict[str, Any]: + """ + Condition to filter out UI session tokens + """ + return { + "OR": [ + {"team_id": None}, # Include records where team_id is null + { + "team_id": {"not": UI_SESSION_TOKEN_TEAM_ID} + }, # Include records where team_id != UI_SESSION_TOKEN_TEAM_ID + ] + } + + +@router.post( + "/key/block", tags=["key management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def block_key( + data: BlockKeyRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +) -> Optional[LiteLLM_VerificationToken]: + """ + Block an Virtual key from making any requests. + + Parameters: + - key: str - The key to block. Can be either the unhashed key (sk-...) or the hashed key value + + Example: + ```bash + curl --location 'http://0.0.0.0:4000/key/block' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" + }' + ``` + + Note: This is an admin-only endpoint. Only proxy admins can block keys. + """ + from litellm.proxy.proxy_server import ( + create_audit_log_for_update, + hash_token, + litellm_proxy_admin_name, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + ) + + if prisma_client is None: + raise Exception("{}".format(CommonProxyErrors.db_not_connected_error.value)) + + if data.key.startswith("sk-"): + hashed_token = hash_token(token=data.key) + else: + hashed_token = data.key + + if litellm.store_audit_logs is True: + # make an audit log for key update + record = await prisma_client.db.litellm_verificationtoken.find_unique( + where={"token": hashed_token} + ) + if record is None: + raise ProxyException( + message=f"Key {data.key} not found", + type=ProxyErrorTypes.bad_request_error, + param="key", + code=status.HTTP_404_NOT_FOUND, + ) + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.KEY_TABLE_NAME, + object_id=hashed_token, + action="blocked", + updated_values="{}", + before_value=record.model_dump_json(), + ) + ) + ) + + record = await prisma_client.db.litellm_verificationtoken.update( + where={"token": hashed_token}, data={"blocked": True} # type: ignore + ) + + ## UPDATE KEY CACHE + + ### get cached object ### + key_object = await get_key_object( + hashed_token=hashed_token, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=None, + proxy_logging_obj=proxy_logging_obj, + ) + + ### update cached object ### + key_object.blocked = True + + ### store cached object ### + await _cache_key_object( + hashed_token=hashed_token, + user_api_key_obj=key_object, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + return record + + +@router.post( + "/key/unblock", tags=["key management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def unblock_key( + data: BlockKeyRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Unblock a Virtual key to allow it to make requests again. + + Parameters: + - key: str - The key to unblock. Can be either the unhashed key (sk-...) or the hashed key value + + Example: + ```bash + curl --location 'http://0.0.0.0:4000/key/unblock' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "key": "sk-Fn8Ej39NxjAXrvpUGKghGw" + }' + ``` + + Note: This is an admin-only endpoint. Only proxy admins can unblock keys. + """ + from litellm.proxy.proxy_server import ( + create_audit_log_for_update, + hash_token, + litellm_proxy_admin_name, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + ) + + if prisma_client is None: + raise Exception("{}".format(CommonProxyErrors.db_not_connected_error.value)) + + if data.key.startswith("sk-"): + hashed_token = hash_token(token=data.key) + else: + hashed_token = data.key + + if litellm.store_audit_logs is True: + # make an audit log for key update + record = await prisma_client.db.litellm_verificationtoken.find_unique( + where={"token": hashed_token} + ) + if record is None: + raise ProxyException( + message=f"Key {data.key} not found", + type=ProxyErrorTypes.bad_request_error, + param="key", + code=status.HTTP_404_NOT_FOUND, + ) + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.KEY_TABLE_NAME, + object_id=hashed_token, + action="blocked", + updated_values="{}", + before_value=record.model_dump_json(), + ) + ) + ) + + record = await prisma_client.db.litellm_verificationtoken.update( + where={"token": hashed_token}, data={"blocked": False} # type: ignore + ) + + ## UPDATE KEY CACHE + + ### get cached object ### + key_object = await get_key_object( + hashed_token=hashed_token, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=None, + proxy_logging_obj=proxy_logging_obj, + ) + + ### update cached object ### + key_object.blocked = False + + ### store cached object ### + await _cache_key_object( + hashed_token=hashed_token, + user_api_key_obj=key_object, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + return record + + +@router.post( + "/key/health", + tags=["key management"], + dependencies=[Depends(user_api_key_auth)], + response_model=KeyHealthResponse, +) +@management_endpoint_wrapper +async def key_health( + request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Check the health of the key + + Checks: + - If key based logging is configured correctly - sends a test log + + Usage + + Pass the key in the request header + + ```bash + curl -X POST "http://localhost:4000/key/health" \ + -H "Authorization: Bearer sk-1234" \ + -H "Content-Type: application/json" + ``` + + Response when logging callbacks are setup correctly: + + ```json + { + "key": "healthy", + "logging_callbacks": { + "callbacks": [ + "gcs_bucket" + ], + "status": "healthy", + "details": "No logger exceptions triggered, system is healthy. Manually check if logs were sent to ['gcs_bucket']" + } + } + ``` + + + Response when logging callbacks are not setup correctly: + ```json + { + "key": "unhealthy", + "logging_callbacks": { + "callbacks": [ + "gcs_bucket" + ], + "status": "unhealthy", + "details": "Logger exceptions triggered, system is unhealthy: Failed to load vertex credentials. Check to see if credentials containing partial/invalid information." + } + } + ``` + """ + try: + # Get the key's metadata + key_metadata = user_api_key_dict.metadata + + health_status: KeyHealthResponse = KeyHealthResponse( + key="healthy", + logging_callbacks=None, + ) + + # Check if logging is configured in metadata + if key_metadata and "logging" in key_metadata: + logging_statuses = await test_key_logging( + user_api_key_dict=user_api_key_dict, + request=request, + key_logging=key_metadata["logging"], + ) + health_status["logging_callbacks"] = logging_statuses + + # Check if any logging callback is unhealthy + if logging_statuses.get("status") == "unhealthy": + health_status["key"] = "unhealthy" + + return KeyHealthResponse(**health_status) + + except Exception as e: + raise ProxyException( + message=f"Key health check failed: {str(e)}", + type=ProxyErrorTypes.internal_server_error, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +def _can_user_query_key_info( + user_api_key_dict: UserAPIKeyAuth, + key: Optional[str], + key_info: LiteLLM_VerificationToken, +) -> bool: + """ + Helper to check if the user has access to the key's info + """ + if ( + user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value + or user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value + ): + return True + elif user_api_key_dict.api_key == key: + return True + # user can query their own key info + elif key_info.user_id == user_api_key_dict.user_id: + return True + return False + + +async def test_key_logging( + user_api_key_dict: UserAPIKeyAuth, + request: Request, + key_logging: List[Dict[str, Any]], +) -> LoggingCallbackStatus: + """ + Test the key-based logging + + - Test that key logging is correctly formatted and all args are passed correctly + - Make a mock completion call -> user can check if it's correctly logged + - Check if any logger.exceptions were triggered -> if they were then returns it to the user client side + """ + import logging + from io import StringIO + + from litellm.proxy.litellm_pre_call_utils import add_litellm_data_to_request + from litellm.proxy.proxy_server import general_settings, proxy_config + + logging_callbacks: List[str] = [] + for callback in key_logging: + if callback.get("callback_name") is not None: + logging_callbacks.append(callback["callback_name"]) + else: + raise ValueError("callback_name is required in key_logging") + + log_capture_string = StringIO() + ch = logging.StreamHandler(log_capture_string) + ch.setLevel(logging.ERROR) + logger = logging.getLogger() + logger.addHandler(ch) + + try: + data = { + "model": "openai/litellm-key-health-test", + "messages": [ + { + "role": "user", + "content": "Hello, this is a test from litellm /key/health. No LLM API call was made for this", + } + ], + "mock_response": "test response", + } + data = await add_litellm_data_to_request( + data=data, + user_api_key_dict=user_api_key_dict, + proxy_config=proxy_config, + general_settings=general_settings, + request=request, + ) + await litellm.acompletion( + **data + ) # make mock completion call to trigger key based callbacks + except Exception as e: + return LoggingCallbackStatus( + callbacks=logging_callbacks, + status="unhealthy", + details=f"Logging test failed: {str(e)}", + ) + + await asyncio.sleep( + 2 + ) # wait for callbacks to run, callbacks use batching so wait for the flush event + + # Check if any logger exceptions were triggered + log_contents = log_capture_string.getvalue() + logger.removeHandler(ch) + if log_contents: + return LoggingCallbackStatus( + callbacks=logging_callbacks, + status="unhealthy", + details=f"Logger exceptions triggered, system is unhealthy: {log_contents}", + ) + else: + return LoggingCallbackStatus( + callbacks=logging_callbacks, + status="healthy", + details=f"No logger exceptions triggered, system is healthy. Manually check if logs were sent to {logging_callbacks} ", + ) + + +async def _enforce_unique_key_alias( + key_alias: Optional[str], + prisma_client: Any, + existing_key_token: Optional[str] = None, +) -> None: + """ + Helper to enforce unique key aliases across all keys. + + Args: + key_alias (Optional[str]): The key alias to check + prisma_client (Any): Prisma client instance + existing_key_token (Optional[str]): ID of existing key being updated, to exclude from uniqueness check + (The Admin UI passes key_alias, in all Edit key requests. So we need to be sure that if we find a key with the same alias, it's not the same key we're updating) + + Raises: + ProxyException: If key alias already exists on a different key + """ + if key_alias is not None and prisma_client is not None: + where_clause: dict[str, Any] = {"key_alias": key_alias} + if existing_key_token: + # Exclude the current key from the uniqueness check + where_clause["NOT"] = {"token": existing_key_token} + + existing_key = await prisma_client.db.litellm_verificationtoken.find_first( + where=where_clause + ) + if existing_key is not None: + raise ProxyException( + message=f"Key with alias '{key_alias}' already exists. Unique key aliases across all keys are required.", + type=ProxyErrorTypes.bad_request_error, + param="key_alias", + code=status.HTTP_400_BAD_REQUEST, + ) + + +def validate_model_max_budget(model_max_budget: Optional[Dict]) -> None: + """ + Validate the model_max_budget is GenericBudgetConfigType + enforce user has an enterprise license + + Raises: + Exception: If model_max_budget is not a valid GenericBudgetConfigType + """ + try: + if model_max_budget is None: + return + if len(model_max_budget) == 0: + return + if model_max_budget is not None: + from litellm.proxy.proxy_server import CommonProxyErrors, premium_user + + if premium_user is not True: + raise ValueError( + f"You must have an enterprise license to set model_max_budget. {CommonProxyErrors.not_premium_user.value}" + ) + for _model, _budget_info in model_max_budget.items(): + assert isinstance(_model, str) + + # /CRUD endpoints can pass budget_limit as a string, so we need to convert it to a float + if "budget_limit" in _budget_info: + _budget_info["budget_limit"] = float(_budget_info["budget_limit"]) + BudgetConfig(**_budget_info) + except Exception as e: + raise ValueError( + f"Invalid model_max_budget: {str(e)}. Example of valid model_max_budget: https://docs.litellm.ai/docs/proxy/users" + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/model_management_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/model_management_endpoints.py new file mode 100644 index 00000000..2a2b7eae --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/model_management_endpoints.py @@ -0,0 +1,719 @@ +""" +Allow proxy admin to add/update/delete models in the db + +Currently most endpoints are in `proxy_server.py`, but those should be moved here over time. + +Endpoints here: + +model/{model_id}/update - PATCH endpoint for model update. +""" + +#### MODEL MANAGEMENT #### + +import asyncio +import json +import uuid +from typing import Optional, cast + +from fastapi import APIRouter, Depends, HTTPException, Request, status +from pydantic import BaseModel + +from litellm._logging import verbose_proxy_logger +from litellm.constants import LITELLM_PROXY_ADMIN_NAME +from litellm.proxy._types import ( + CommonProxyErrors, + LiteLLM_ProxyModelTable, + LitellmTableNames, + LitellmUserRoles, + ModelInfoDelete, + PrismaCompatibleUpdateDBModel, + ProxyErrorTypes, + ProxyException, + TeamModelAddRequest, + UpdateTeamRequest, + UserAPIKeyAuth, +) +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_utils.encrypt_decrypt_utils import encrypt_value_helper +from litellm.proxy.management_endpoints.team_endpoints import ( + team_model_add, + update_team, +) +from litellm.proxy.management_helpers.audit_logs import create_object_audit_log +from litellm.proxy.utils import PrismaClient +from litellm.types.router import ( + Deployment, + DeploymentTypedDict, + LiteLLMParamsTypedDict, + updateDeployment, +) +from litellm.utils import get_utc_datetime + +router = APIRouter() + + +async def get_db_model( + model_id: str, prisma_client: PrismaClient +) -> Optional[Deployment]: + db_model = cast( + Optional[BaseModel], + await prisma_client.db.litellm_proxymodeltable.find_unique( + where={"model_id": model_id} + ), + ) + + if not db_model: + return None + + deployment_pydantic_obj = Deployment(**db_model.model_dump(exclude_none=True)) + return deployment_pydantic_obj + + +def update_db_model( + db_model: Deployment, updated_patch: updateDeployment +) -> PrismaCompatibleUpdateDBModel: + merged_deployment_dict = DeploymentTypedDict( + model_name=db_model.model_name, + litellm_params=LiteLLMParamsTypedDict( + **db_model.litellm_params.model_dump(exclude_none=True) # type: ignore + ), + ) + # update model name + if updated_patch.model_name: + merged_deployment_dict["model_name"] = updated_patch.model_name + + # update litellm params + if updated_patch.litellm_params: + # Encrypt any sensitive values + encrypted_params = { + k: encrypt_value_helper(v) + for k, v in updated_patch.litellm_params.model_dump( + exclude_none=True + ).items() + } + + merged_deployment_dict["litellm_params"].update(encrypted_params) # type: ignore + + # update model info + if updated_patch.model_info: + if "model_info" not in merged_deployment_dict: + merged_deployment_dict["model_info"] = {} + merged_deployment_dict["model_info"].update( + updated_patch.model_info.model_dump(exclude_none=True) + ) + + # convert to prisma compatible format + + prisma_compatible_model_dict = PrismaCompatibleUpdateDBModel() + if "model_name" in merged_deployment_dict: + prisma_compatible_model_dict["model_name"] = merged_deployment_dict[ + "model_name" + ] + + if "litellm_params" in merged_deployment_dict: + prisma_compatible_model_dict["litellm_params"] = json.dumps( + merged_deployment_dict["litellm_params"] + ) + + if "model_info" in merged_deployment_dict: + prisma_compatible_model_dict["model_info"] = json.dumps( + merged_deployment_dict["model_info"] + ) + return prisma_compatible_model_dict + + +@router.patch( + "/model/{model_id}/update", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +async def patch_model( + model_id: str, # Get model_id from path parameter + patch_data: updateDeployment, # Create a specific schema for PATCH operations + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + PATCH Endpoint for partial model updates. + + Only updates the fields specified in the request while preserving other existing values. + Follows proper PATCH semantics by only modifying provided fields. + + Args: + model_id: The ID of the model to update + patch_data: The fields to update and their new values + user_api_key_dict: User authentication information + + Returns: + Updated model information + + Raises: + ProxyException: For various error conditions including authentication and database errors + """ + from litellm.proxy.proxy_server import ( + litellm_proxy_admin_name, + llm_router, + prisma_client, + store_model_in_db, + ) + + try: + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + # Verify model exists and is stored in DB + if not store_model_in_db: + raise ProxyException( + message="Model updates only supported for DB-stored models", + type=ProxyErrorTypes.validation_error.value, + code=status.HTTP_400_BAD_REQUEST, + param=None, + ) + + # Fetch existing model + db_model = await get_db_model(model_id=model_id, prisma_client=prisma_client) + + if db_model is None: + # Check if model exists in config but not DB + if llm_router and llm_router.get_deployment(model_id=model_id) is not None: + raise ProxyException( + message="Cannot edit config-based model. Store model in DB via /model/new first.", + type=ProxyErrorTypes.validation_error.value, + code=status.HTTP_400_BAD_REQUEST, + param=None, + ) + raise ProxyException( + message=f"Model {model_id} not found on proxy.", + type=ProxyErrorTypes.not_found_error, + code=status.HTTP_404_NOT_FOUND, + param=None, + ) + + # Create update dictionary only for provided fields + update_data = update_db_model(db_model=db_model, updated_patch=patch_data) + + # Add metadata about update + update_data["updated_by"] = ( + user_api_key_dict.user_id or litellm_proxy_admin_name + ) + update_data["updated_at"] = cast(str, get_utc_datetime()) + + # Perform partial update + updated_model = await prisma_client.db.litellm_proxymodeltable.update( + where={"model_id": model_id}, + data=update_data, + ) + + return updated_model + + except Exception as e: + verbose_proxy_logger.exception(f"Error in patch_model: {str(e)}") + + if isinstance(e, (HTTPException, ProxyException)): + raise e + + raise ProxyException( + message=f"Error updating model: {str(e)}", + type=ProxyErrorTypes.internal_server_error, + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + param=None, + ) + + +################################# Helper Functions ################################# +#################################################################################### +#################################################################################### +#################################################################################### + + +async def _add_model_to_db( + model_params: Deployment, + user_api_key_dict: UserAPIKeyAuth, + prisma_client: PrismaClient, + new_encryption_key: Optional[str] = None, + should_create_model_in_db: bool = True, +) -> Optional[LiteLLM_ProxyModelTable]: + # encrypt litellm params # + _litellm_params_dict = model_params.litellm_params.dict(exclude_none=True) + _orignal_litellm_model_name = model_params.litellm_params.model + for k, v in _litellm_params_dict.items(): + encrypted_value = encrypt_value_helper( + value=v, new_encryption_key=new_encryption_key + ) + model_params.litellm_params[k] = encrypted_value + _data: dict = { + "model_id": model_params.model_info.id, + "model_name": model_params.model_name, + "litellm_params": model_params.litellm_params.model_dump_json(exclude_none=True), # type: ignore + "model_info": model_params.model_info.model_dump_json( # type: ignore + exclude_none=True + ), + "created_by": user_api_key_dict.user_id or LITELLM_PROXY_ADMIN_NAME, + "updated_by": user_api_key_dict.user_id or LITELLM_PROXY_ADMIN_NAME, + } + if model_params.model_info.id is not None: + _data["model_id"] = model_params.model_info.id + if should_create_model_in_db: + model_response = await prisma_client.db.litellm_proxymodeltable.create( + data=_data # type: ignore + ) + else: + model_response = LiteLLM_ProxyModelTable(**_data) + return model_response + + +async def _add_team_model_to_db( + model_params: Deployment, + user_api_key_dict: UserAPIKeyAuth, + prisma_client: PrismaClient, +) -> Optional[LiteLLM_ProxyModelTable]: + """ + If 'team_id' is provided, + + - generate a unique 'model_name' for the model (e.g. 'model_name_{team_id}_{uuid}) + - store the model in the db with the unique 'model_name' + - store a team model alias mapping {"model_name": "model_name_{team_id}_{uuid}"} + """ + _team_id = model_params.model_info.team_id + if _team_id is None: + return None + original_model_name = model_params.model_name + if original_model_name: + model_params.model_info.team_public_model_name = original_model_name + + unique_model_name = f"model_name_{_team_id}_{uuid.uuid4()}" + + model_params.model_name = unique_model_name + + ## CREATE MODEL IN DB ## + model_response = await _add_model_to_db( + model_params=model_params, + user_api_key_dict=user_api_key_dict, + prisma_client=prisma_client, + ) + + ## CREATE MODEL ALIAS IN DB ## + await update_team( + data=UpdateTeamRequest( + team_id=_team_id, + model_aliases={original_model_name: unique_model_name}, + ), + user_api_key_dict=user_api_key_dict, + http_request=Request(scope={"type": "http"}), + ) + + # add model to team object + await team_model_add( + data=TeamModelAddRequest( + team_id=_team_id, + models=[original_model_name], + ), + http_request=Request(scope={"type": "http"}), + user_api_key_dict=user_api_key_dict, + ) + + return model_response + + +def check_if_team_id_matches_key( + team_id: Optional[str], user_api_key_dict: UserAPIKeyAuth +) -> bool: + can_make_call = True + if ( + user_api_key_dict.user_role + and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN + ): + return True + if team_id is None: + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + can_make_call = False + else: + if user_api_key_dict.team_id != team_id: + can_make_call = False + return can_make_call + + +#### [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/964 +@router.post( + "/model/delete", + description="Allows deleting models in the model list in the config.yaml", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +async def delete_model( + model_info: ModelInfoDelete, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + from litellm.proxy.proxy_server import llm_router + + try: + """ + [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/964 + + - Check if id in db + - Delete + """ + + from litellm.proxy.proxy_server import ( + llm_router, + prisma_client, + store_model_in_db, + ) + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={ + "error": "No DB Connected. Here's how to do it - https://docs.litellm.ai/docs/proxy/virtual_keys" + }, + ) + + # update DB + if store_model_in_db is True: + """ + - store model_list in db + - store keys separately + """ + # encrypt litellm params # + result = await prisma_client.db.litellm_proxymodeltable.delete( + where={"model_id": model_info.id} + ) + + if result is None: + raise HTTPException( + status_code=400, + detail={"error": f"Model with id={model_info.id} not found in db"}, + ) + + ## DELETE FROM ROUTER ## + if llm_router is not None: + llm_router.delete_deployment(id=model_info.id) + + ## CREATE AUDIT LOG ## + asyncio.create_task( + create_object_audit_log( + object_id=model_info.id, + action="deleted", + user_api_key_dict=user_api_key_dict, + table_name=LitellmTableNames.PROXY_MODEL_TABLE_NAME, + before_value=result.model_dump_json(exclude_none=True), + after_value=None, + litellm_changed_by=user_api_key_dict.user_id, + litellm_proxy_admin_name=LITELLM_PROXY_ADMIN_NAME, + ) + ) + return {"message": f"Model: {result.model_id} deleted successfully"} + else: + raise HTTPException( + status_code=500, + detail={ + "error": "Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature." + }, + ) + + except Exception as e: + verbose_proxy_logger.exception( + f"Failed to delete model. Due to error - {str(e)}" + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +#### [BETA] - This is a beta endpoint, format might change based on user feedback. - https://github.com/BerriAI/litellm/issues/964 +@router.post( + "/model/new", + description="Allows adding new models to the model list in the config.yaml", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +async def add_new_model( + model_params: Deployment, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + from litellm.proxy.proxy_server import ( + general_settings, + premium_user, + prisma_client, + proxy_config, + proxy_logging_obj, + store_model_in_db, + ) + + try: + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={ + "error": "No DB Connected. Here's how to do it - https://docs.litellm.ai/docs/proxy/virtual_keys" + }, + ) + + if model_params.model_info.team_id is not None and premium_user is not True: + raise HTTPException( + status_code=403, + detail={"error": CommonProxyErrors.not_premium_user.value}, + ) + + if not check_if_team_id_matches_key( + team_id=model_params.model_info.team_id, user_api_key_dict=user_api_key_dict + ): + raise HTTPException( + status_code=403, + detail={"error": "Team ID does not match the API key's team ID"}, + ) + + model_response: Optional[LiteLLM_ProxyModelTable] = None + # update DB + if store_model_in_db is True: + """ + - store model_list in db + - store keys separately + """ + + try: + _original_litellm_model_name = model_params.model_name + if model_params.model_info.team_id is None: + model_response = await _add_model_to_db( + model_params=model_params, + user_api_key_dict=user_api_key_dict, + prisma_client=prisma_client, + ) + else: + model_response = await _add_team_model_to_db( + model_params=model_params, + user_api_key_dict=user_api_key_dict, + prisma_client=prisma_client, + ) + await proxy_config.add_deployment( + prisma_client=prisma_client, proxy_logging_obj=proxy_logging_obj + ) + # don't let failed slack alert block the /model/new response + _alerting = general_settings.get("alerting", []) or [] + if "slack" in _alerting: + # send notification - new model added + await proxy_logging_obj.slack_alerting_instance.model_added_alert( + model_name=model_params.model_name, + litellm_model_name=_original_litellm_model_name, + passed_model_info=model_params.model_info, + ) + except Exception as e: + verbose_proxy_logger.exception(f"Exception in add_new_model: {e}") + + else: + raise HTTPException( + status_code=500, + detail={ + "error": "Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature." + }, + ) + + if model_response is None: + raise HTTPException( + status_code=500, + detail={ + "error": "Failed to add model to db. Check your server logs for more details." + }, + ) + + ## CREATE AUDIT LOG ## + asyncio.create_task( + create_object_audit_log( + object_id=model_response.model_id, + action="created", + user_api_key_dict=user_api_key_dict, + table_name=LitellmTableNames.PROXY_MODEL_TABLE_NAME, + before_value=None, + after_value=( + model_response.model_dump_json(exclude_none=True) + if isinstance(model_response, BaseModel) + else None + ), + litellm_changed_by=user_api_key_dict.user_id, + litellm_proxy_admin_name=LITELLM_PROXY_ADMIN_NAME, + ) + ) + + return model_response + + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.add_new_model(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +#### MODEL MANAGEMENT #### +@router.post( + "/model/update", + description="Edit existing model params", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +async def update_model( + model_params: updateDeployment, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Old endpoint for model update. Makes a PUT request. + + Use `/model/{model_id}/update` to PATCH the stored model in db. + """ + from litellm.proxy.proxy_server import ( + LITELLM_PROXY_ADMIN_NAME, + llm_router, + prisma_client, + store_model_in_db, + ) + + try: + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={ + "error": "No DB Connected. Here's how to do it - https://docs.litellm.ai/docs/proxy/virtual_keys" + }, + ) + # update DB + if store_model_in_db is True: + _model_id = None + _model_info = getattr(model_params, "model_info", None) + if _model_info is None: + raise Exception("model_info not provided") + + _model_id = _model_info.id + if _model_id is None: + raise Exception("model_info.id not provided") + _existing_litellm_params = ( + await prisma_client.db.litellm_proxymodeltable.find_unique( + where={"model_id": _model_id} + ) + ) + if _existing_litellm_params is None: + if ( + llm_router is not None + and llm_router.get_deployment(model_id=_model_id) is not None + ): + raise HTTPException( + status_code=400, + detail={ + "error": "Can't edit model. Model in config. Store model in db via `/model/new`. to edit." + }, + ) + raise Exception("model not found") + _existing_litellm_params_dict = dict( + _existing_litellm_params.litellm_params + ) + + if model_params.litellm_params is None: + raise Exception("litellm_params not provided") + + _new_litellm_params_dict = model_params.litellm_params.dict( + exclude_none=True + ) + + ### ENCRYPT PARAMS ### + for k, v in _new_litellm_params_dict.items(): + encrypted_value = encrypt_value_helper(value=v) + model_params.litellm_params[k] = encrypted_value + + ### MERGE WITH EXISTING DATA ### + merged_dictionary = {} + _mp = model_params.litellm_params.dict() + + for key, value in _mp.items(): + if value is not None: + merged_dictionary[key] = value + elif ( + key in _existing_litellm_params_dict + and _existing_litellm_params_dict[key] is not None + ): + merged_dictionary[key] = _existing_litellm_params_dict[key] + else: + pass + + _data: dict = { + "litellm_params": json.dumps(merged_dictionary), # type: ignore + "updated_by": user_api_key_dict.user_id or LITELLM_PROXY_ADMIN_NAME, + } + model_response = await prisma_client.db.litellm_proxymodeltable.update( + where={"model_id": _model_id}, + data=_data, # type: ignore + ) + + ## CREATE AUDIT LOG ## + asyncio.create_task( + create_object_audit_log( + object_id=_model_id, + action="updated", + user_api_key_dict=user_api_key_dict, + table_name=LitellmTableNames.PROXY_MODEL_TABLE_NAME, + before_value=( + _existing_litellm_params.model_dump_json(exclude_none=True) + if isinstance(_existing_litellm_params, BaseModel) + else None + ), + after_value=( + model_response.model_dump_json(exclude_none=True) + if isinstance(model_response, BaseModel) + else None + ), + litellm_changed_by=user_api_key_dict.user_id, + litellm_proxy_admin_name=LITELLM_PROXY_ADMIN_NAME, + ) + ) + + return model_response + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.update_model(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/organization_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/organization_endpoints.py new file mode 100644 index 00000000..c202043f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/organization_endpoints.py @@ -0,0 +1,823 @@ +""" +Endpoints for /organization operations + +/organization/new +/organization/update +/organization/delete +/organization/member_add +/organization/info +/organization/list +""" + +#### ORGANIZATION MANAGEMENT #### + +import uuid +from typing import List, Optional, Tuple + +from fastapi import APIRouter, Depends, HTTPException, Request, status + +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.management_endpoints.budget_management_endpoints import ( + new_budget, + update_budget, +) +from litellm.proxy.management_helpers.utils import ( + get_new_internal_user_defaults, + management_endpoint_wrapper, +) +from litellm.proxy.utils import PrismaClient + +router = APIRouter() + + +@router.post( + "/organization/new", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=NewOrganizationResponse, +) +async def new_organization( + data: NewOrganizationRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Allow orgs to own teams + + Set org level budgets + model access. + + Only admins can create orgs. + + # Parameters + + - organization_alias: *str* - The name of the organization. + - models: *List* - The models the organization has access to. + - budget_id: *Optional[str]* - The id for a budget (tpm/rpm/max budget) for the organization. + ### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ### + - max_budget: *Optional[float]* - Max budget for org + - tpm_limit: *Optional[int]* - Max tpm limit for org + - rpm_limit: *Optional[int]* - Max rpm limit for org + - max_parallel_requests: *Optional[int]* - [Not Implemented Yet] Max parallel requests for org + - soft_budget: *Optional[float]* - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don't block requests. + - model_max_budget: *Optional[dict]* - Max budget for a specific model + - budget_duration: *Optional[str]* - Frequency of reseting org budget + - metadata: *Optional[dict]* - Metadata for organization, store information for organization. Example metadata - {"extra_info": "some info"} + - blocked: *bool* - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id. + - tags: *Optional[List[str]]* - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). + - organization_id: *Optional[str]* - The organization id of the team. Default is None. Create via `/organization/new`. + - model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias) + + Case 1: Create new org **without** a budget_id + + ```bash + curl --location 'http://0.0.0.0:4000/organization/new' \ + + --header 'Authorization: Bearer sk-1234' \ + + --header 'Content-Type: application/json' \ + + --data '{ + "organization_alias": "my-secret-org", + "models": ["model1", "model2"], + "max_budget": 100 + }' + + + ``` + + Case 2: Create new org **with** a budget_id + + ```bash + curl --location 'http://0.0.0.0:4000/organization/new' \ + + --header 'Authorization: Bearer sk-1234' \ + + --header 'Content-Type: application/json' \ + + --data '{ + "organization_alias": "my-secret-org", + "models": ["model1", "model2"], + "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689" + }' + ``` + """ + + from litellm.proxy.proxy_server import litellm_proxy_admin_name, prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if ( + user_api_key_dict.user_role is None + or user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN + ): + raise HTTPException( + status_code=401, + detail={ + "error": f"Only admins can create orgs. Your role is = {user_api_key_dict.user_role}" + }, + ) + + if data.budget_id is None: + """ + Every organization needs a budget attached. + + If none provided, create one based on provided values + """ + budget_params = LiteLLM_BudgetTable.model_fields.keys() + + # Only include Budget Params when creating an entry in litellm_budgettable + _json_data = data.json(exclude_none=True) + _budget_data = {k: v for k, v in _json_data.items() if k in budget_params} + budget_row = LiteLLM_BudgetTable(**_budget_data) + + new_budget = prisma_client.jsonify_object(budget_row.json(exclude_none=True)) + + _budget = await prisma_client.db.litellm_budgettable.create( + data={ + **new_budget, # type: ignore + "created_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + "updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + } + ) # type: ignore + + data.budget_id = _budget.budget_id + + """ + Ensure only models that user has access to, are given to org + """ + if len(user_api_key_dict.models) == 0: # user has access to all models + pass + else: + if len(data.models) == 0: + raise HTTPException( + status_code=400, + detail={ + "error": "User not allowed to give access to all models. Select models you want org to have access to." + }, + ) + for m in data.models: + if m not in user_api_key_dict.models: + raise HTTPException( + status_code=400, + detail={ + "error": f"User not allowed to give access to model={m}. Models you have access to = {user_api_key_dict.models}" + }, + ) + + organization_row = LiteLLM_OrganizationTable( + **data.json(exclude_none=True), + created_by=user_api_key_dict.user_id or litellm_proxy_admin_name, + updated_by=user_api_key_dict.user_id or litellm_proxy_admin_name, + ) + new_organization_row = prisma_client.jsonify_object( + organization_row.json(exclude_none=True) + ) + verbose_proxy_logger.info( + f"new_organization_row: {json.dumps(new_organization_row, indent=2)}" + ) + response = await prisma_client.db.litellm_organizationtable.create( + data={ + **new_organization_row, # type: ignore + } + ) + + return response + + +@router.patch( + "/organization/update", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=LiteLLM_OrganizationTableWithMembers, +) +async def update_organization( + data: LiteLLM_OrganizationTableUpdate, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Update an organization + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_id is None: + raise HTTPException( + status_code=400, + detail={ + "error": "Cannot associate a user_id to this action. Check `/key/info` to validate if 'user_id' is set." + }, + ) + + if data.updated_by is None: + data.updated_by = user_api_key_dict.user_id + + updated_organization_row = prisma_client.jsonify_object( + data.model_dump(exclude_none=True) + ) + + response = await prisma_client.db.litellm_organizationtable.update( + where={"organization_id": data.organization_id}, + data=updated_organization_row, + include={"members": True, "teams": True, "litellm_budget_table": True}, + ) + + return response + + +@router.delete( + "/organization/delete", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=List[LiteLLM_OrganizationTableWithMembers], +) +async def delete_organization( + data: DeleteOrganizationRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete an organization + + # Parameters: + + - organization_ids: List[str] - The organization ids to delete. + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=401, + detail={"error": "Only proxy admins can delete organizations"}, + ) + + deleted_orgs = [] + for organization_id in data.organization_ids: + # delete all teams in the organization + await prisma_client.db.litellm_teamtable.delete_many( + where={"organization_id": organization_id} + ) + # delete all members in the organization + await prisma_client.db.litellm_organizationmembership.delete_many( + where={"organization_id": organization_id} + ) + # delete all keys in the organization + await prisma_client.db.litellm_verificationtoken.delete_many( + where={"organization_id": organization_id} + ) + # delete the organization + deleted_org = await prisma_client.db.litellm_organizationtable.delete( + where={"organization_id": organization_id}, + include={"members": True, "teams": True, "litellm_budget_table": True}, + ) + if deleted_org is None: + raise HTTPException( + status_code=404, + detail={"error": f"Organization={organization_id} not found"}, + ) + deleted_orgs.append(deleted_org) + + return deleted_orgs + + +@router.get( + "/organization/list", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=List[LiteLLM_OrganizationTableWithMembers], +) +async def list_organization( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + ``` + curl --location --request GET 'http://0.0.0.0:4000/organization/list' \ + --header 'Authorization: Bearer sk-1234' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + # if proxy admin - get all orgs + if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN: + response = await prisma_client.db.litellm_organizationtable.find_many( + include={"members": True, "teams": True} + ) + # if internal user - get orgs they are a member of + else: + org_memberships = ( + await prisma_client.db.litellm_organizationmembership.find_many( + where={"user_id": user_api_key_dict.user_id} + ) + ) + org_objects = await prisma_client.db.litellm_organizationtable.find_many( + where={ + "organization_id": { + "in": [membership.organization_id for membership in org_memberships] + } + }, + include={"members": True, "teams": True}, + ) + + response = org_objects + + return response + + +@router.get( + "/organization/info", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=LiteLLM_OrganizationTableWithMembers, +) +async def info_organization(organization_id: str): + """ + Get the org specific information + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + response: Optional[LiteLLM_OrganizationTableWithMembers] = ( + await prisma_client.db.litellm_organizationtable.find_unique( + where={"organization_id": organization_id}, + include={"litellm_budget_table": True, "members": True, "teams": True}, + ) + ) + + if response is None: + raise HTTPException(status_code=404, detail={"error": "Organization not found"}) + + response_pydantic_obj = LiteLLM_OrganizationTableWithMembers( + **response.model_dump() + ) + + return response_pydantic_obj + + +@router.post( + "/organization/info", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], +) +async def deprecated_info_organization(data: OrganizationRequest): + """ + DEPRECATED: Use GET /organization/info instead + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if len(data.organizations) == 0: + raise HTTPException( + status_code=400, + detail={ + "error": f"Specify list of organization id's to query. Passed in={data.organizations}" + }, + ) + response = await prisma_client.db.litellm_organizationtable.find_many( + where={"organization_id": {"in": data.organizations}}, + include={"litellm_budget_table": True}, + ) + + return response + + +@router.post( + "/organization/member_add", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=OrganizationAddMemberResponse, +) +@management_endpoint_wrapper +async def organization_member_add( + data: OrganizationMemberAddRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +) -> OrganizationAddMemberResponse: + """ + [BETA] + + Add new members (either via user_email or user_id) to an organization + + If user doesn't exist, new user row will also be added to User Table + + Only proxy_admin or org_admin of organization, allowed to access this endpoint. + + # Parameters: + + - organization_id: str (required) + - member: Union[List[Member], Member] (required) + - role: Literal[LitellmUserRoles] (required) + - user_id: Optional[str] + - user_email: Optional[str] + + Note: Either user_id or user_email must be provided for each member. + + Example: + ``` + curl -X POST 'http://0.0.0.0:4000/organization/member_add' \ + -H 'Authorization: Bearer sk-1234' \ + -H 'Content-Type: application/json' \ + -d '{ + "organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", + "member": { + "role": "internal_user", + "user_id": "krrish247652@berri.ai" + }, + "max_budget_in_organization": 100.0 + }' + ``` + + The following is executed in this function: + + 1. Check if organization exists + 2. Creates a new Internal User if the user_id or user_email is not found in LiteLLM_UserTable + 3. Add Internal User to the `LiteLLM_OrganizationMembership` table + """ + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + # Check if organization exists + existing_organization_row = ( + await prisma_client.db.litellm_organizationtable.find_unique( + where={"organization_id": data.organization_id} + ) + ) + if existing_organization_row is None: + raise HTTPException( + status_code=404, + detail={ + "error": f"Organization not found for organization_id={getattr(data, 'organization_id', None)}" + }, + ) + + members: List[OrgMember] + if isinstance(data.member, List): + members = data.member + else: + members = [data.member] + + updated_users: List[LiteLLM_UserTable] = [] + updated_organization_memberships: List[LiteLLM_OrganizationMembershipTable] = [] + + for member in members: + updated_user, updated_organization_membership = ( + await add_member_to_organization( + member=member, + organization_id=data.organization_id, + prisma_client=prisma_client, + ) + ) + + updated_users.append(updated_user) + updated_organization_memberships.append(updated_organization_membership) + + return OrganizationAddMemberResponse( + organization_id=data.organization_id, + updated_users=updated_users, + updated_organization_memberships=updated_organization_memberships, + ) + except Exception as e: + verbose_proxy_logger.exception(f"Error adding member to organization: {e}") + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +async def find_member_if_email( + user_email: str, prisma_client: PrismaClient +) -> LiteLLM_UserTable: + """ + Find a member if the user_email is in LiteLLM_UserTable + """ + + try: + existing_user_email_row: BaseModel = ( + await prisma_client.db.litellm_usertable.find_unique( + where={"user_email": user_email} + ) + ) + except Exception: + raise HTTPException( + status_code=400, + detail={ + "error": f"Unique user not found for user_email={user_email}. Potential duplicate OR non-existent user_email in LiteLLM_UserTable. Use 'user_id' instead." + }, + ) + existing_user_email_row_pydantic = LiteLLM_UserTable( + **existing_user_email_row.model_dump() + ) + return existing_user_email_row_pydantic + + +@router.patch( + "/organization/member_update", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], + response_model=LiteLLM_OrganizationMembershipTable, +) +@management_endpoint_wrapper +async def organization_member_update( + data: OrganizationMemberUpdateRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Update a member's role in an organization + """ + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + # Check if organization exists + existing_organization_row = ( + await prisma_client.db.litellm_organizationtable.find_unique( + where={"organization_id": data.organization_id} + ) + ) + if existing_organization_row is None: + raise HTTPException( + status_code=400, + detail={ + "error": f"Organization not found for organization_id={getattr(data, 'organization_id', None)}" + }, + ) + + # Check if member exists in organization + if data.user_email is not None and data.user_id is None: + existing_user_email_row = await find_member_if_email( + data.user_email, prisma_client + ) + data.user_id = existing_user_email_row.user_id + + try: + existing_organization_membership = ( + await prisma_client.db.litellm_organizationmembership.find_unique( + where={ + "user_id_organization_id": { + "user_id": data.user_id, + "organization_id": data.organization_id, + } + } + ) + ) + except Exception as e: + raise HTTPException( + status_code=400, + detail={ + "error": f"Error finding organization membership for user_id={data.user_id} in organization={data.organization_id}: {e}" + }, + ) + if existing_organization_membership is None: + raise HTTPException( + status_code=404, + detail={ + "error": f"Member not found in organization for user_id={data.user_id}" + }, + ) + + # Update member role + if data.role is not None: + await prisma_client.db.litellm_organizationmembership.update( + where={ + "user_id_organization_id": { + "user_id": data.user_id, + "organization_id": data.organization_id, + } + }, + data={"user_role": data.role}, + ) + if data.max_budget_in_organization is not None: + # if budget_id is None, create a new budget + budget_id = existing_organization_membership.budget_id or str(uuid.uuid4()) + if existing_organization_membership.budget_id is None: + new_budget_obj = BudgetNewRequest( + budget_id=budget_id, max_budget=data.max_budget_in_organization + ) + await new_budget( + budget_obj=new_budget_obj, user_api_key_dict=user_api_key_dict + ) + else: + # update budget table with new max_budget + await update_budget( + budget_obj=BudgetNewRequest( + budget_id=budget_id, max_budget=data.max_budget_in_organization + ), + user_api_key_dict=user_api_key_dict, + ) + + # update organization membership with new budget_id + await prisma_client.db.litellm_organizationmembership.update( + where={ + "user_id_organization_id": { + "user_id": data.user_id, + "organization_id": data.organization_id, + } + }, + data={"budget_id": budget_id}, + ) + final_organization_membership: Optional[BaseModel] = ( + await prisma_client.db.litellm_organizationmembership.find_unique( + where={ + "user_id_organization_id": { + "user_id": data.user_id, + "organization_id": data.organization_id, + } + }, + include={"litellm_budget_table": True}, + ) + ) + + if final_organization_membership is None: + raise HTTPException( + status_code=400, + detail={ + "error": f"Member not found in organization={data.organization_id} for user_id={data.user_id}" + }, + ) + + final_organization_membership_pydantic = LiteLLM_OrganizationMembershipTable( + **final_organization_membership.model_dump(exclude_none=True) + ) + return final_organization_membership_pydantic + except Exception as e: + verbose_proxy_logger.exception(f"Error updating member in organization: {e}") + raise e + + +@router.delete( + "/organization/member_delete", + tags=["organization management"], + dependencies=[Depends(user_api_key_auth)], +) +async def organization_member_delete( + data: OrganizationMemberDeleteRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete a member from an organization + """ + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if data.user_email is not None and data.user_id is None: + existing_user_email_row = await find_member_if_email( + data.user_email, prisma_client + ) + data.user_id = existing_user_email_row.user_id + + member_to_delete = await prisma_client.db.litellm_organizationmembership.delete( + where={ + "user_id_organization_id": { + "user_id": data.user_id, + "organization_id": data.organization_id, + } + } + ) + return member_to_delete + + except Exception as e: + verbose_proxy_logger.exception(f"Error deleting member from organization: {e}") + raise e + + +async def add_member_to_organization( + member: OrgMember, + organization_id: str, + prisma_client: PrismaClient, +) -> Tuple[LiteLLM_UserTable, LiteLLM_OrganizationMembershipTable]: + """ + Add a member to an organization + + - Checks if member.user_id or member.user_email is in LiteLLM_UserTable + - If not found, create a new user in LiteLLM_UserTable + - Add user to organization in LiteLLM_OrganizationMembership + """ + + try: + user_object: Optional[LiteLLM_UserTable] = None + existing_user_id_row = None + existing_user_email_row = None + ## Check if user exists in LiteLLM_UserTable - user exists - either the user_id or user_email is in LiteLLM_UserTable + if member.user_id is not None: + existing_user_id_row = await prisma_client.db.litellm_usertable.find_unique( + where={"user_id": member.user_id} + ) + + if existing_user_id_row is None and member.user_email is not None: + try: + existing_user_email_row = ( + await prisma_client.db.litellm_usertable.find_unique( + where={"user_email": member.user_email} + ) + ) + except Exception as e: + raise ValueError( + f"Potential NON-Existent or Duplicate user email in DB: Error finding a unique instance of user_email={member.user_email} in LiteLLM_UserTable.: {e}" + ) + + ## If user does not exist, create a new user + if existing_user_id_row is None and existing_user_email_row is None: + # Create a new user - since user does not exist + user_id: str = member.user_id or str(uuid.uuid4()) + new_user_defaults = get_new_internal_user_defaults( + user_id=user_id, + user_email=member.user_email, + ) + + _returned_user = await prisma_client.insert_data(data=new_user_defaults, table_name="user") # type: ignore + if _returned_user is not None: + user_object = LiteLLM_UserTable(**_returned_user.model_dump()) + elif existing_user_email_row is not None and len(existing_user_email_row) > 1: + raise HTTPException( + status_code=400, + detail={ + "error": "Multiple users with this email found in db. Please use 'user_id' instead." + }, + ) + elif existing_user_email_row is not None: + user_object = LiteLLM_UserTable(**existing_user_email_row.model_dump()) + elif existing_user_id_row is not None: + user_object = LiteLLM_UserTable(**existing_user_id_row.model_dump()) + else: + raise HTTPException( + status_code=404, + detail={ + "error": f"User not found for user_id={member.user_id} and user_email={member.user_email}" + }, + ) + + if user_object is None: + raise ValueError( + f"User does not exist in LiteLLM_UserTable. user_id={member.user_id} and user_email={member.user_email}" + ) + + # Add user to organization + _organization_membership = ( + await prisma_client.db.litellm_organizationmembership.create( + data={ + "organization_id": organization_id, + "user_id": user_object.user_id, + "user_role": member.role, + } + ) + ) + organization_membership = LiteLLM_OrganizationMembershipTable( + **_organization_membership.model_dump() + ) + return user_object, organization_membership + + except Exception as e: + import traceback + + traceback.print_exc() + raise ValueError( + f"Error adding member={member} to organization={organization_id}: {e}" + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/sso_helper_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/sso_helper_utils.py new file mode 100644 index 00000000..45906b2f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/sso_helper_utils.py @@ -0,0 +1,22 @@ +from litellm.proxy._types import LitellmUserRoles + + +def check_is_admin_only_access(ui_access_mode: str) -> bool: + """Checks ui access mode is admin_only""" + return ui_access_mode == "admin_only" + + +def has_admin_ui_access(user_role: str) -> bool: + """ + Check if the user has admin access to the UI. + + Returns: + bool: True if user is 'proxy_admin' or 'proxy_admin_view_only', False otherwise. + """ + + if ( + user_role != LitellmUserRoles.PROXY_ADMIN.value + and user_role != LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value + ): + return False + return True diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/team_callback_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/team_callback_endpoints.py new file mode 100644 index 00000000..93d338a4 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/team_callback_endpoints.py @@ -0,0 +1,383 @@ +""" +Endpoints to control callbacks per team + +Use this when each team should control its own callbacks +""" + +import json +import traceback +from typing import Optional + +from fastapi import APIRouter, Depends, Header, HTTPException, Request, status + +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import ( + AddTeamCallback, + ProxyErrorTypes, + ProxyException, + TeamCallbackMetadata, + UserAPIKeyAuth, +) +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.management_helpers.utils import management_endpoint_wrapper + +router = APIRouter() + + +@router.post( + "/team/{team_id:path}/callback", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def add_team_callbacks( + data: AddTeamCallback, + http_request: Request, + team_id: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Add a success/failure callback to a team + + Use this if if you want different teams to have different success/failure callbacks + + Parameters: + - callback_name (Literal["langfuse", "langsmith", "gcs"], required): The name of the callback to add + - callback_type (Literal["success", "failure", "success_and_failure"], required): The type of callback to add. One of: + - "success": Callback for successful LLM calls + - "failure": Callback for failed LLM calls + - "success_and_failure": Callback for both successful and failed LLM calls + - callback_vars (StandardCallbackDynamicParams, required): A dictionary of variables to pass to the callback + - langfuse_public_key: The public key for the Langfuse callback + - langfuse_secret_key: The secret key for the Langfuse callback + - langfuse_secret: The secret for the Langfuse callback + - langfuse_host: The host for the Langfuse callback + - gcs_bucket_name: The name of the GCS bucket + - gcs_path_service_account: The path to the GCS service account + - langsmith_api_key: The API key for the Langsmith callback + - langsmith_project: The project for the Langsmith callback + - langsmith_base_url: The base URL for the Langsmith callback + + Example curl: + ``` + curl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' \ + -H 'Content-Type: application/json' \ + -H 'Authorization: Bearer sk-1234' \ + -d '{ + "callback_name": "langfuse", + "callback_type": "success", + "callback_vars": {"langfuse_public_key": "pk-lf-xxxx1", "langfuse_secret_key": "sk-xxxxx"} + + }' + ``` + + This means for the team where team_id = dbe2f686-a686-4896-864a-4c3924458709, all LLM calls will be logged to langfuse using the public key pk-lf-xxxx1 and the secret key sk-xxxxx + + """ + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + # Check if team_id exists already + _existing_team = await prisma_client.get_data( + team_id=team_id, table_name="team", query_type="find_unique" + ) + if _existing_team is None: + raise HTTPException( + status_code=400, + detail={ + "error": f"Team id = {team_id} does not exist. Please use a different team id." + }, + ) + + # store team callback settings in metadata + team_metadata = _existing_team.metadata + team_callback_settings = team_metadata.get("callback_settings", {}) + # expect callback settings to be + team_callback_settings_obj = TeamCallbackMetadata(**team_callback_settings) + if data.callback_type == "success": + if team_callback_settings_obj.success_callback is None: + team_callback_settings_obj.success_callback = [] + + if data.callback_name in team_callback_settings_obj.success_callback: + raise ProxyException( + message=f"callback_name = {data.callback_name} already exists in failure_callback, for team_id = {team_id}. \n Existing failure_callback = {team_callback_settings_obj.success_callback}", + code=status.HTTP_400_BAD_REQUEST, + type=ProxyErrorTypes.bad_request_error, + param="callback_name", + ) + + team_callback_settings_obj.success_callback.append(data.callback_name) + elif data.callback_type == "failure": + if team_callback_settings_obj.failure_callback is None: + team_callback_settings_obj.failure_callback = [] + + if data.callback_name in team_callback_settings_obj.failure_callback: + raise ProxyException( + message=f"callback_name = {data.callback_name} already exists in failure_callback, for team_id = {team_id}. \n Existing failure_callback = {team_callback_settings_obj.failure_callback}", + code=status.HTTP_400_BAD_REQUEST, + type=ProxyErrorTypes.bad_request_error, + param="callback_name", + ) + team_callback_settings_obj.failure_callback.append(data.callback_name) + elif data.callback_type == "success_and_failure": + if team_callback_settings_obj.success_callback is None: + team_callback_settings_obj.success_callback = [] + if team_callback_settings_obj.failure_callback is None: + team_callback_settings_obj.failure_callback = [] + if data.callback_name in team_callback_settings_obj.success_callback: + raise ProxyException( + message=f"callback_name = {data.callback_name} already exists in success_callback, for team_id = {team_id}. \n Existing success_callback = {team_callback_settings_obj.success_callback}", + code=status.HTTP_400_BAD_REQUEST, + type=ProxyErrorTypes.bad_request_error, + param="callback_name", + ) + + if data.callback_name in team_callback_settings_obj.failure_callback: + raise ProxyException( + message=f"callback_name = {data.callback_name} already exists in failure_callback, for team_id = {team_id}. \n Existing failure_callback = {team_callback_settings_obj.failure_callback}", + code=status.HTTP_400_BAD_REQUEST, + type=ProxyErrorTypes.bad_request_error, + param="callback_name", + ) + + team_callback_settings_obj.success_callback.append(data.callback_name) + team_callback_settings_obj.failure_callback.append(data.callback_name) + for var, value in data.callback_vars.items(): + if team_callback_settings_obj.callback_vars is None: + team_callback_settings_obj.callback_vars = {} + team_callback_settings_obj.callback_vars[var] = value + + team_callback_settings_obj_dict = team_callback_settings_obj.model_dump() + + team_metadata["callback_settings"] = team_callback_settings_obj_dict + team_metadata_json = json.dumps(team_metadata) # update team_metadata + + new_team_row = await prisma_client.db.litellm_teamtable.update( + where={"team_id": team_id}, data={"metadata": team_metadata_json} # type: ignore + ) + + return { + "status": "success", + "data": new_team_row, + } + + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.add_team_callbacks(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Internal Server Error({str(e)})"), + type=ProxyErrorTypes.internal_server_error.value, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Internal Server Error, " + str(e), + type=ProxyErrorTypes.internal_server_error.value, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.post( + "/team/{team_id}/disable_logging", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def disable_team_logging( + http_request: Request, + team_id: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Disable all logging callbacks for a team + + Parameters: + - team_id (str, required): The unique identifier for the team + + Example curl: + ``` + curl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' \ + -H 'Authorization: Bearer sk-1234' + ``` + + + """ + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + # Check if team exists + _existing_team = await prisma_client.get_data( + team_id=team_id, table_name="team", query_type="find_unique" + ) + if _existing_team is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team id = {team_id} does not exist."}, + ) + + # Update team metadata to disable logging + team_metadata = _existing_team.metadata + team_callback_settings = team_metadata.get("callback_settings", {}) + team_callback_settings_obj = TeamCallbackMetadata(**team_callback_settings) + + # Reset callbacks + team_callback_settings_obj.success_callback = [] + team_callback_settings_obj.failure_callback = [] + + # Update metadata + team_metadata["callback_settings"] = team_callback_settings_obj.model_dump() + team_metadata_json = json.dumps(team_metadata) + + # Update team in database + updated_team = await prisma_client.db.litellm_teamtable.update( + where={"team_id": team_id}, data={"metadata": team_metadata_json} # type: ignore + ) + + if updated_team is None: + raise HTTPException( + status_code=404, + detail={ + "error": f"Team id = {team_id} does not exist. Error updating team logging" + }, + ) + + return { + "status": "success", + "message": f"Logging disabled for team {team_id}", + "data": { + "team_id": updated_team.team_id, + "success_callbacks": [], + "failure_callbacks": [], + }, + } + + except Exception as e: + verbose_proxy_logger.error( + f"litellm.proxy.proxy_server.disable_team_logging(): Exception occurred - {str(e)}" + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Internal Server Error({str(e)})"), + type=ProxyErrorTypes.internal_server_error.value, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Internal Server Error, " + str(e), + type=ProxyErrorTypes.internal_server_error.value, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.get( + "/team/{team_id:path}/callback", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def get_team_callbacks( + http_request: Request, + team_id: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get the success/failure callbacks and variables for a team + + Parameters: + - team_id (str, required): The unique identifier for the team + + Example curl: + ``` + curl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' \ + -H 'Authorization: Bearer sk-1234' + ``` + + This will return the callback settings for the team with id dbe2f686-a686-4896-864a-4c3924458709 + + Returns { + "status": "success", + "data": { + "team_id": team_id, + "success_callbacks": team_callback_settings_obj.success_callback, + "failure_callbacks": team_callback_settings_obj.failure_callback, + "callback_vars": team_callback_settings_obj.callback_vars, + }, + } + """ + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + # Check if team_id exists + _existing_team = await prisma_client.get_data( + team_id=team_id, table_name="team", query_type="find_unique" + ) + if _existing_team is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team id = {team_id} does not exist."}, + ) + + # Retrieve team callback settings from metadata + team_metadata = _existing_team.metadata + team_callback_settings = team_metadata.get("callback_settings", {}) + + # Convert to TeamCallbackMetadata object for consistent structure + team_callback_settings_obj = TeamCallbackMetadata(**team_callback_settings) + + return { + "status": "success", + "data": { + "team_id": team_id, + "success_callbacks": team_callback_settings_obj.success_callback, + "failure_callbacks": team_callback_settings_obj.failure_callback, + "callback_vars": team_callback_settings_obj.callback_vars, + }, + } + + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.get_team_callbacks(): Exception occurred - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Internal Server Error({str(e)})"), + type=ProxyErrorTypes.internal_server_error.value, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Internal Server Error, " + str(e), + type=ProxyErrorTypes.internal_server_error.value, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/team_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/team_endpoints.py new file mode 100644 index 00000000..f5bcc6ba --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/team_endpoints.py @@ -0,0 +1,1928 @@ +""" +TEAM MANAGEMENT + +All /team management endpoints + +/team/new +/team/info +/team/update +/team/delete +""" + +import asyncio +import json +import traceback +import uuid +from datetime import datetime, timedelta, timezone +from typing import List, Optional, Tuple, Union, cast + +import fastapi +from fastapi import APIRouter, Depends, Header, HTTPException, Request, status +from pydantic import BaseModel + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import ( + BlockTeamRequest, + CommonProxyErrors, + DeleteTeamRequest, + LiteLLM_AuditLogs, + LiteLLM_ManagementEndpoint_MetadataFields_Premium, + LiteLLM_ModelTable, + LiteLLM_TeamMembership, + LiteLLM_TeamTable, + LiteLLM_TeamTableCachedObj, + LiteLLM_UserTable, + LitellmTableNames, + LitellmUserRoles, + Member, + NewTeamRequest, + ProxyErrorTypes, + ProxyException, + SpecialManagementEndpointEnums, + SpecialModelNames, + TeamAddMemberResponse, + TeamInfoResponseObject, + TeamListResponseObject, + TeamMemberAddRequest, + TeamMemberDeleteRequest, + TeamMemberUpdateRequest, + TeamMemberUpdateResponse, + TeamModelAddRequest, + TeamModelDeleteRequest, + UpdateTeamRequest, + UserAPIKeyAuth, +) +from litellm.proxy.auth.auth_checks import ( + allowed_route_check_inside_route, + get_team_object, +) +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.management_endpoints.common_utils import ( + _is_user_team_admin, + _set_object_metadata_field, +) +from litellm.proxy.management_helpers.utils import ( + add_new_member, + management_endpoint_wrapper, +) +from litellm.proxy.utils import ( + PrismaClient, + _premium_user_check, + handle_exception_on_proxy, +) +from litellm.router import Router + +router = APIRouter() + + +def _is_available_team(team_id: str, user_api_key_dict: UserAPIKeyAuth) -> bool: + if litellm.default_internal_user_params is None: + return False + if "available_teams" in litellm.default_internal_user_params: + return team_id in litellm.default_internal_user_params["available_teams"] + return False + + +async def get_all_team_memberships( + prisma_client: PrismaClient, team_id: List[str], user_id: Optional[str] = None +) -> List[LiteLLM_TeamMembership]: + """Get all team memberships for a given user""" + ## GET ALL MEMBERSHIPS ## + if not isinstance(user_id, str): + user_id = str(user_id) + + team_memberships = await prisma_client.db.litellm_teammembership.find_many( + where=( + {"user_id": user_id, "team_id": {"in": team_id}} + if user_id is not None + else {"team_id": {"in": team_id}} + ), + include={"litellm_budget_table": True}, + ) + + returned_tm: List[LiteLLM_TeamMembership] = [] + for tm in team_memberships: + returned_tm.append(LiteLLM_TeamMembership(**tm.model_dump())) + + return returned_tm + + +#### TEAM MANAGEMENT #### +@router.post( + "/team/new", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], + response_model=LiteLLM_TeamTable, +) +@management_endpoint_wrapper +async def new_team( # noqa: PLR0915 + data: NewTeamRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Allow users to create a new team. Apply user permissions to their team. + + 👉 [Detailed Doc on setting team budgets](https://docs.litellm.ai/docs/proxy/team_budgets) + + + Parameters: + - team_alias: Optional[str] - User defined team alias + - team_id: Optional[str] - The team id of the user. If none passed, we'll generate it. + - members_with_roles: List[{"role": "admin" or "user", "user_id": "<user-id>"}] - A list of users and their roles in the team. Get user_id when making a new user via `/user/new`. + - metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {"extra_info": "some info"} + - tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit + - rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit + - max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget + - budget_duration: Optional[str] - The duration of the budget for the team. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets) + - models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed. + - blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id. + - members: Optional[List] - Control team members via `/team/member/add` and `/team/member/delete`. + - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). + - organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`. + - model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias) + - guardrails: Optional[List[str]] - Guardrails for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails) + Returns: + - team_id: (str) Unique team id - used for tracking spend across multiple keys for same team id. + + _deprecated_params: + - admins: list - A list of user_id's for the admin role + - users: list - A list of user_id's for the user role + + Example Request: + ``` + curl --location 'http://0.0.0.0:4000/team/new' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "team_alias": "my-new-team_2", + "members_with_roles": [{"role": "admin", "user_id": "user-1234"}, + {"role": "user", "user_id": "user-2434"}] + }' + + ``` + + ``` + curl --location 'http://0.0.0.0:4000/team/new' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "team_alias": "QA Prod Bot", + "max_budget": 0.000000001, + "budget_duration": "1d" + }' + ``` + """ + try: + from litellm.proxy.proxy_server import ( + create_audit_log_for_update, + duration_in_seconds, + litellm_proxy_admin_name, + prisma_client, + ) + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.team_id is None: + data.team_id = str(uuid.uuid4()) + else: + # Check if team_id exists already + _existing_team_id = await prisma_client.get_data( + team_id=data.team_id, table_name="team", query_type="find_unique" + ) + if _existing_team_id is not None: + raise HTTPException( + status_code=400, + detail={ + "error": f"Team id = {data.team_id} already exists. Please use a different team id." + }, + ) + + if ( + user_api_key_dict.user_role is None + or user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN + ): # don't restrict proxy admin + if ( + data.tpm_limit is not None + and user_api_key_dict.tpm_limit is not None + and data.tpm_limit > user_api_key_dict.tpm_limit + ): + raise HTTPException( + status_code=400, + detail={ + "error": f"tpm limit higher than user max. User tpm limit={user_api_key_dict.tpm_limit}. User role={user_api_key_dict.user_role}" + }, + ) + + if ( + data.rpm_limit is not None + and user_api_key_dict.rpm_limit is not None + and data.rpm_limit > user_api_key_dict.rpm_limit + ): + raise HTTPException( + status_code=400, + detail={ + "error": f"rpm limit higher than user max. User rpm limit={user_api_key_dict.rpm_limit}. User role={user_api_key_dict.user_role}" + }, + ) + + if ( + data.max_budget is not None + and user_api_key_dict.max_budget is not None + and data.max_budget > user_api_key_dict.max_budget + ): + raise HTTPException( + status_code=400, + detail={ + "error": f"max budget higher than user max. User max budget={user_api_key_dict.max_budget}. User role={user_api_key_dict.user_role}" + }, + ) + + if data.models is not None and len(user_api_key_dict.models) > 0: + for m in data.models: + if m not in user_api_key_dict.models: + raise HTTPException( + status_code=400, + detail={ + "error": f"Model not in allowed user models. User allowed models={user_api_key_dict.models}. User id={user_api_key_dict.user_id}" + }, + ) + + if user_api_key_dict.user_id is not None: + creating_user_in_list = False + for member in data.members_with_roles: + if member.user_id == user_api_key_dict.user_id: + creating_user_in_list = True + + if creating_user_in_list is False: + data.members_with_roles.append( + Member(role="admin", user_id=user_api_key_dict.user_id) + ) + + ## ADD TO MODEL TABLE + _model_id = None + if data.model_aliases is not None and isinstance(data.model_aliases, dict): + litellm_modeltable = LiteLLM_ModelTable( + model_aliases=json.dumps(data.model_aliases), + created_by=user_api_key_dict.user_id or litellm_proxy_admin_name, + updated_by=user_api_key_dict.user_id or litellm_proxy_admin_name, + ) + model_dict = await prisma_client.db.litellm_modeltable.create( + {**litellm_modeltable.json(exclude_none=True)} # type: ignore + ) # type: ignore + + _model_id = model_dict.id + + ## ADD TO TEAM TABLE + complete_team_data = LiteLLM_TeamTable( + **data.json(), + model_id=_model_id, + ) + + # Set Management Endpoint Metadata Fields + for field in LiteLLM_ManagementEndpoint_MetadataFields_Premium: + if getattr(data, field) is not None: + _set_object_metadata_field( + object_data=complete_team_data, + field_name=field, + value=getattr(data, field), + ) + + # If budget_duration is set, set `budget_reset_at` + if complete_team_data.budget_duration is not None: + duration_s = duration_in_seconds( + duration=complete_team_data.budget_duration + ) + reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + complete_team_data.budget_reset_at = reset_at + + complete_team_data_dict = complete_team_data.model_dump(exclude_none=True) + complete_team_data_dict = prisma_client.jsonify_team_object( + db_data=complete_team_data_dict + ) + team_row: LiteLLM_TeamTable = await prisma_client.db.litellm_teamtable.create( + data=complete_team_data_dict, + include={"litellm_model_table": True}, # type: ignore + ) + + ## ADD TEAM ID TO USER TABLE ## + for user in complete_team_data.members_with_roles: + ## add team id to user row ## + await prisma_client.update_data( + user_id=user.user_id, + data={"user_id": user.user_id, "teams": [team_row.team_id]}, + update_key_values_custom_query={ + "teams": { + "push ": [team_row.team_id], + } + }, + ) + + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + if litellm.store_audit_logs is True: + _updated_values = complete_team_data.json(exclude_none=True) + + _updated_values = json.dumps(_updated_values, default=str) + + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.TEAM_TABLE_NAME, + object_id=data.team_id, + action="created", + updated_values=_updated_values, + before_value=None, + ) + ) + ) + + try: + return team_row.model_dump() + except Exception: + return team_row.dict() + except Exception as e: + raise handle_exception_on_proxy(e) + + +async def _update_model_table( + data: UpdateTeamRequest, + model_id: Optional[str], + prisma_client: PrismaClient, + user_api_key_dict: UserAPIKeyAuth, + litellm_proxy_admin_name: str, +) -> Optional[str]: + """ + Upsert model table and return the model id + """ + ## UPSERT MODEL TABLE + _model_id = model_id + if data.model_aliases is not None and isinstance(data.model_aliases, dict): + litellm_modeltable = LiteLLM_ModelTable( + model_aliases=json.dumps(data.model_aliases), + created_by=user_api_key_dict.user_id or litellm_proxy_admin_name, + updated_by=user_api_key_dict.user_id or litellm_proxy_admin_name, + ) + if model_id is None: + model_dict = await prisma_client.db.litellm_modeltable.create( + data={**litellm_modeltable.json(exclude_none=True)} # type: ignore + ) + else: + model_dict = await prisma_client.db.litellm_modeltable.upsert( + where={"id": model_id}, + data={ + "update": {**litellm_modeltable.json(exclude_none=True)}, # type: ignore + "create": {**litellm_modeltable.json(exclude_none=True)}, # type: ignore + }, + ) # type: ignore + + _model_id = model_dict.id + + return _model_id + + +@router.post( + "/team/update", tags=["team management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def update_team( + data: UpdateTeamRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + Use `/team/member_add` AND `/team/member/delete` to add/remove new team members + + You can now update team budget / rate limits via /team/update + + Parameters: + - team_id: str - The team id of the user. Required param. + - team_alias: Optional[str] - User defined team alias + - metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } + - tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit + - rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit + - max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget + - budget_duration: Optional[str] - The duration of the budget for the team. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets) + - models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed. + - blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id. + - tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing). + - organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`. + - model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias) + - guardrails: Optional[List[str]] - Guardrails for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails) + Example - update team TPM Limit + + ``` + curl --location 'http://0.0.0.0:4000/team/update' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5", + "tpm_limit": 100 + }' + ``` + + Example - Update Team `max_budget` budget + ``` + curl --location 'http://0.0.0.0:4000/team/update' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "team_id": "8d916b1c-510d-4894-a334-1c16a93344f5", + "max_budget": 10 + }' + ``` + """ + from litellm.proxy.auth.auth_checks import _cache_team_object + from litellm.proxy.proxy_server import ( + create_audit_log_for_update, + duration_in_seconds, + litellm_proxy_admin_name, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + ) + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.team_id is None: + raise HTTPException(status_code=400, detail={"error": "No team id passed in"}) + verbose_proxy_logger.debug("/team/update - %s", data) + + existing_team_row = await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": data.team_id} + ) + + if existing_team_row is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={data.team_id}"}, + ) + + updated_kv = data.json(exclude_unset=True) + + # Check budget_duration and budget_reset_at + if data.budget_duration is not None: + duration_s = duration_in_seconds(duration=data.budget_duration) + reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s) + + # set the budget_reset_at in DB + updated_kv["budget_reset_at"] = reset_at + + # update team metadata fields + _team_metadata_fields = LiteLLM_ManagementEndpoint_MetadataFields_Premium + for field in _team_metadata_fields: + if field in updated_kv and updated_kv[field] is not None: + _update_team_metadata_field( + updated_kv=updated_kv, + field_name=field, + ) + + if "model_aliases" in updated_kv: + updated_kv.pop("model_aliases") + _model_id = await _update_model_table( + data=data, + model_id=existing_team_row.model_id, + prisma_client=prisma_client, + user_api_key_dict=user_api_key_dict, + litellm_proxy_admin_name=litellm_proxy_admin_name, + ) + if _model_id is not None: + updated_kv["model_id"] = _model_id + + updated_kv = prisma_client.jsonify_team_object(db_data=updated_kv) + team_row: Optional[LiteLLM_TeamTable] = ( + await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, + data=updated_kv, + include={"litellm_model_table": True}, # type: ignore + ) + ) + + if team_row is None or team_row.team_id is None: + raise HTTPException( + status_code=400, + detail={"error": "Team doesn't exist. Got={}".format(team_row)}, + ) + + await _cache_team_object( + team_id=team_row.team_id, + team_table=LiteLLM_TeamTableCachedObj(**team_row.model_dump()), + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + if litellm.store_audit_logs is True: + _before_value = existing_team_row.json(exclude_none=True) + _before_value = json.dumps(_before_value, default=str) + _after_value: str = json.dumps(updated_kv, default=str) + + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.TEAM_TABLE_NAME, + object_id=data.team_id, + action="updated", + updated_values=_after_value, + before_value=_before_value, + ) + ) + ) + + return {"team_id": team_row.team_id, "data": team_row} + + +def _check_team_member_admin_add( + member: Union[Member, List[Member]], + premium_user: bool, +): + if isinstance(member, Member) and member.role == "admin": + if premium_user is not True: + raise ValueError( + f"Assigning team admins is a premium feature. {CommonProxyErrors.not_premium_user.value}" + ) + elif isinstance(member, List): + for m in member: + if m.role == "admin": + if premium_user is not True: + raise ValueError( + f"Assigning team admins is a premium feature. Got={m}. {CommonProxyErrors.not_premium_user.value}. " + ) + + +def team_call_validation_checks( + prisma_client: Optional[PrismaClient], + data: TeamMemberAddRequest, + premium_user: bool, +): + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.team_id is None: + raise HTTPException(status_code=400, detail={"error": "No team id passed in"}) + + if data.member is None: + raise HTTPException( + status_code=400, detail={"error": "No member/members passed in"} + ) + + try: + _check_team_member_admin_add( + member=data.member, + premium_user=premium_user, + ) + except Exception as e: + raise HTTPException(status_code=400, detail={"error": str(e)}) + + +def team_member_add_duplication_check( + data: TeamMemberAddRequest, + existing_team_row: LiteLLM_TeamTable, +): + def _check_member_duplication(member: Member): + if member.user_id in [m.user_id for m in existing_team_row.members_with_roles]: + raise HTTPException( + status_code=400, + detail={ + "error": f"User={member.user_id} already in team. Existing members={existing_team_row.members_with_roles}" + }, + ) + + if isinstance(data.member, Member): + _check_member_duplication(data.member) + elif isinstance(data.member, List): + for m in data.member: + _check_member_duplication(m) + + +@router.post( + "/team/member_add", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], + response_model=TeamAddMemberResponse, +) +@management_endpoint_wrapper +async def team_member_add( + data: TeamMemberAddRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] + + Add new members (either via user_email or user_id) to a team + + If user doesn't exist, new user row will also be added to User Table + + Only proxy_admin or admin of team, allowed to access this endpoint. + ``` + + curl -X POST 'http://0.0.0.0:4000/team/member_add' \ + -H 'Authorization: Bearer sk-1234' \ + -H 'Content-Type: application/json' \ + -d '{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}' + + ``` + """ + from litellm.proxy.proxy_server import ( + litellm_proxy_admin_name, + premium_user, + prisma_client, + proxy_logging_obj, + user_api_key_cache, + ) + + try: + team_call_validation_checks( + prisma_client=prisma_client, + data=data, + premium_user=premium_user, + ) + except HTTPException as e: + raise e + + prisma_client = cast(PrismaClient, prisma_client) + + existing_team_row = await get_team_object( + team_id=data.team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + parent_otel_span=None, + proxy_logging_obj=proxy_logging_obj, + check_cache_only=False, + check_db_only=True, + ) + if existing_team_row is None: + raise HTTPException( + status_code=404, + detail={ + "error": f"Team not found for team_id={getattr(data, 'team_id', None)}" + }, + ) + + complete_team_data = LiteLLM_TeamTable(**existing_team_row.model_dump()) + + team_member_add_duplication_check( + data=data, + existing_team_row=complete_team_data, + ) + + ## CHECK IF USER IS PROXY ADMIN OR TEAM ADMIN + + if ( + hasattr(user_api_key_dict, "user_role") + and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value + and not _is_user_team_admin( + user_api_key_dict=user_api_key_dict, team_obj=complete_team_data + ) + and not _is_available_team( + team_id=complete_team_data.team_id, + user_api_key_dict=user_api_key_dict, + ) + ): + raise HTTPException( + status_code=403, + detail={ + "error": "Call not allowed. User not proxy admin OR team admin. route={}, team_id={}".format( + "/team/member_add", + complete_team_data.team_id, + ) + }, + ) + + updated_users: List[LiteLLM_UserTable] = [] + updated_team_memberships: List[LiteLLM_TeamMembership] = [] + + ## VALIDATE IF NEW MEMBER ## + if isinstance(data.member, Member): + try: + updated_user, updated_tm = await add_new_member( + new_member=data.member, + max_budget_in_team=data.max_budget_in_team, + prisma_client=prisma_client, + user_api_key_dict=user_api_key_dict, + litellm_proxy_admin_name=litellm_proxy_admin_name, + team_id=data.team_id, + ) + except Exception as e: + raise HTTPException( + status_code=500, + detail={ + "error": "Unable to add user - {}, to team - {}, for reason - {}".format( + data.member, data.team_id, str(e) + ) + }, + ) + + updated_users.append(updated_user) + if updated_tm is not None: + updated_team_memberships.append(updated_tm) + elif isinstance(data.member, List): + tasks: List = [] + for m in data.member: + try: + updated_user, updated_tm = await add_new_member( + new_member=m, + max_budget_in_team=data.max_budget_in_team, + prisma_client=prisma_client, + user_api_key_dict=user_api_key_dict, + litellm_proxy_admin_name=litellm_proxy_admin_name, + team_id=data.team_id, + ) + except Exception as e: + raise HTTPException( + status_code=500, + detail={ + "error": "Unable to add user - {}, to team - {}, for reason - {}".format( + data.member, data.team_id, str(e) + ) + }, + ) + updated_users.append(updated_user) + if updated_tm is not None: + updated_team_memberships.append(updated_tm) + + await asyncio.gather(*tasks) + + ## ADD TO TEAM ## + if isinstance(data.member, Member): + # add to team db + new_member = data.member + + # get user id + if new_member.user_id is None and new_member.user_email is not None: + for user in updated_users: + if ( + user.user_email is not None + and user.user_email == new_member.user_email + ): + new_member.user_id = user.user_id + + complete_team_data.members_with_roles.append(new_member) + + elif isinstance(data.member, List): + # add to team db + new_members = data.member + + for nm in new_members: + if nm.user_id is None and nm.user_email is not None: + for user in updated_users: + if user.user_email is not None and user.user_email == nm.user_email: + nm.user_id = user.user_id + + complete_team_data.members_with_roles.extend(new_members) + + # ADD MEMBER TO TEAM + _db_team_members = [m.model_dump() for m in complete_team_data.members_with_roles] + updated_team = await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, + data={"members_with_roles": json.dumps(_db_team_members)}, # type: ignore + ) + + # Check if updated_team is None + if updated_team is None: + raise HTTPException( + status_code=404, detail={"error": f"Team with id {data.team_id} not found"} + ) + return TeamAddMemberResponse( + **updated_team.model_dump(), + updated_users=updated_users, + updated_team_memberships=updated_team_memberships, + ) + + +@router.post( + "/team/member_delete", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def team_member_delete( + data: TeamMemberDeleteRequest, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] + + delete members (either via user_email or user_id) from a team + + If user doesn't exist, an exception will be raised + ``` + curl -X POST 'http://0.0.0.0:8000/team/member_delete' \ + + -H 'Authorization: Bearer sk-1234' \ + + -H 'Content-Type: application/json' \ + + -d '{ + "team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", + "user_id": "krrish247652@berri.ai" + }' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.team_id is None: + raise HTTPException(status_code=400, detail={"error": "No team id passed in"}) + + if data.user_id is None and data.user_email is None: + raise HTTPException( + status_code=400, + detail={"error": "Either user_id or user_email needs to be passed in"}, + ) + + _existing_team_row = await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": data.team_id} + ) + + if _existing_team_row is None: + raise HTTPException( + status_code=400, + detail={"error": "Team id={} does not exist in db".format(data.team_id)}, + ) + existing_team_row = LiteLLM_TeamTable(**_existing_team_row.model_dump()) + + ## CHECK IF USER IS PROXY ADMIN OR TEAM ADMIN + + if ( + user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value + and not _is_user_team_admin( + user_api_key_dict=user_api_key_dict, team_obj=existing_team_row + ) + ): + raise HTTPException( + status_code=403, + detail={ + "error": "Call not allowed. User not proxy admin OR team admin. route={}, team_id={}".format( + "/team/member_delete", existing_team_row.team_id + ) + }, + ) + + ## DELETE MEMBER FROM TEAM + is_member_in_team = False + new_team_members: List[Member] = [] + for m in existing_team_row.members_with_roles: + if ( + data.user_id is not None + and m.user_id is not None + and data.user_id == m.user_id + ): + is_member_in_team = True + continue + elif ( + data.user_email is not None + and m.user_email is not None + and data.user_email == m.user_email + ): + is_member_in_team = True + continue + new_team_members.append(m) + + if not is_member_in_team: + raise HTTPException(status_code=400, detail={"error": "User not found in team"}) + + existing_team_row.members_with_roles = new_team_members + + _db_new_team_members: List[dict] = [m.model_dump() for m in new_team_members] + + _ = await prisma_client.db.litellm_teamtable.update( + where={ + "team_id": data.team_id, + }, + data={"members_with_roles": json.dumps(_db_new_team_members)}, # type: ignore + ) + + ## DELETE TEAM ID from USER ROW, IF EXISTS ## + # get user row + key_val = {} + if data.user_id is not None: + key_val["user_id"] = data.user_id + elif data.user_email is not None: + key_val["user_email"] = data.user_email + existing_user_rows = await prisma_client.db.litellm_usertable.find_many( + where=key_val # type: ignore + ) + + if existing_user_rows is not None and ( + isinstance(existing_user_rows, list) and len(existing_user_rows) > 0 + ): + for existing_user in existing_user_rows: + team_list = [] + if data.team_id in existing_user.teams: + team_list = existing_user.teams + team_list.remove(data.team_id) + await prisma_client.db.litellm_usertable.update( + where={ + "user_id": existing_user.user_id, + }, + data={"teams": {"set": team_list}}, + ) + + return existing_team_row + + +@router.post( + "/team/member_update", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], + response_model=TeamMemberUpdateResponse, +) +@management_endpoint_wrapper +async def team_member_update( + data: TeamMemberUpdateRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] + + Update team member budgets and team member role + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.team_id is None: + raise HTTPException(status_code=400, detail={"error": "No team id passed in"}) + + if data.user_id is None and data.user_email is None: + raise HTTPException( + status_code=400, + detail={"error": "Either user_id or user_email needs to be passed in"}, + ) + + _existing_team_row = await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": data.team_id} + ) + + if _existing_team_row is None: + raise HTTPException( + status_code=400, + detail={"error": "Team id={} does not exist in db".format(data.team_id)}, + ) + existing_team_row = LiteLLM_TeamTable(**_existing_team_row.model_dump()) + + ## CHECK IF USER IS PROXY ADMIN OR TEAM ADMIN + + if ( + user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value + and not _is_user_team_admin( + user_api_key_dict=user_api_key_dict, team_obj=existing_team_row + ) + ): + raise HTTPException( + status_code=403, + detail={ + "error": "Call not allowed. User not proxy admin OR team admin. route={}, team_id={}".format( + "/team/member_delete", existing_team_row.team_id + ) + }, + ) + + returned_team_info: TeamInfoResponseObject = await team_info( + http_request=http_request, + team_id=data.team_id, + user_api_key_dict=user_api_key_dict, + ) + + team_table = returned_team_info["team_info"] + + ## get user id + received_user_id: Optional[str] = None + if data.user_id is not None: + received_user_id = data.user_id + elif data.user_email is not None: + for member in returned_team_info["team_info"].members_with_roles: + if member.user_email is not None and member.user_email == data.user_email: + received_user_id = member.user_id + break + + if received_user_id is None: + raise HTTPException( + status_code=400, + detail={ + "error": "User id doesn't exist in team table. Data={}".format(data) + }, + ) + ## find the relevant team membership + identified_budget_id: Optional[str] = None + for tm in returned_team_info["team_memberships"]: + if tm.user_id == received_user_id: + identified_budget_id = tm.budget_id + break + + ### upsert new budget + if data.max_budget_in_team is not None: + if identified_budget_id is None: + new_budget = await prisma_client.db.litellm_budgettable.create( + data={ + "max_budget": data.max_budget_in_team, + "created_by": user_api_key_dict.user_id or "", + "updated_by": user_api_key_dict.user_id or "", + } + ) + + await prisma_client.db.litellm_teammembership.create( + data={ + "team_id": data.team_id, + "user_id": received_user_id, + "budget_id": new_budget.budget_id, + }, + ) + elif identified_budget_id is not None: + await prisma_client.db.litellm_budgettable.update( + where={"budget_id": identified_budget_id}, + data={"max_budget": data.max_budget_in_team}, + ) + + ### update team member role + if data.role is not None: + team_members: List[Member] = [] + for member in team_table.members_with_roles: + if member.user_id == received_user_id: + team_members.append( + Member( + user_id=member.user_id, + role=data.role, + user_email=data.user_email or member.user_email, + ) + ) + else: + team_members.append(member) + + team_table.members_with_roles = team_members + + _db_team_members: List[dict] = [m.model_dump() for m in team_members] + await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, + data={"members_with_roles": json.dumps(_db_team_members)}, # type: ignore + ) + + return TeamMemberUpdateResponse( + team_id=data.team_id, + user_id=received_user_id, + user_email=data.user_email, + max_budget_in_team=data.max_budget_in_team, + ) + + +@router.post( + "/team/delete", tags=["team management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def delete_team( + data: DeleteTeamRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_changed_by: Optional[str] = Header( + None, + description="The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability", + ), +): + """ + delete team and associated team keys + + Parameters: + - team_ids: List[str] - Required. List of team IDs to delete. Example: ["team-1234", "team-5678"] + + ``` + curl --location 'http://0.0.0.0:4000/team/delete' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "team_ids": ["8d916b1c-510d-4894-a334-1c16a93344f5"] + }' + ``` + """ + from litellm.proxy.proxy_server import ( + create_audit_log_for_update, + litellm_proxy_admin_name, + prisma_client, + ) + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + if data.team_ids is None: + raise HTTPException(status_code=400, detail={"error": "No team id passed in"}) + + # check that all teams passed exist + team_rows: List[LiteLLM_TeamTable] = [] + for team_id in data.team_ids: + try: + team_row_base: Optional[BaseModel] = ( + await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": team_id} + ) + ) + if team_row_base is None: + raise Exception + except Exception: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={team_id}"}, + ) + team_row_pydantic = LiteLLM_TeamTable(**team_row_base.model_dump()) + team_rows.append(team_row_pydantic) + + # Enterprise Feature - Audit Logging. Enable with litellm.store_audit_logs = True + # we do this after the first for loop, since first for loop is for validation. we only want this inserted after validation passes + if litellm.store_audit_logs is True: + # make an audit log for each team deleted + for team_id in data.team_ids: + team_row: Optional[LiteLLM_TeamTable] = await prisma_client.get_data( # type: ignore + team_id=team_id, table_name="team", query_type="find_unique" + ) + + if team_row is None: + continue + + _team_row = team_row.json(exclude_none=True) + + asyncio.create_task( + create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=LitellmTableNames.TEAM_TABLE_NAME, + object_id=team_id, + action="deleted", + updated_values="{}", + before_value=_team_row, + ) + ) + ) + + # End of Audit logging + + ## DELETE ASSOCIATED KEYS + await prisma_client.delete_data(team_id_list=data.team_ids, table_name="key") + + # ## DELETE TEAM MEMBERSHIPS + for team_row in team_rows: + ### get all team members + team_members = team_row.members_with_roles + ### call team_member_delete for each team member + tasks = [] + for team_member in team_members: + tasks.append( + team_member_delete( + data=TeamMemberDeleteRequest( + team_id=team_row.team_id, + user_id=team_member.user_id, + user_email=team_member.user_email, + ), + user_api_key_dict=user_api_key_dict, + ) + ) + await asyncio.gather(*tasks) + + ## DELETE TEAMS + deleted_teams = await prisma_client.delete_data( + team_id_list=data.team_ids, table_name="team" + ) + return deleted_teams + + +def validate_membership( + user_api_key_dict: UserAPIKeyAuth, team_table: LiteLLM_TeamTable +): + if ( + user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN.value + or user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY.value + ): + return + + if ( + user_api_key_dict.team_id == team_table.team_id + ): # allow team keys to check their info + return + + if user_api_key_dict.user_id not in [ + m.user_id for m in team_table.members_with_roles + ]: + raise HTTPException( + status_code=403, + detail={ + "error": "User={} not authorized to access this team={}".format( + user_api_key_dict.user_id, team_table.team_id + ) + }, + ) + + +def _unfurl_all_proxy_models( + team_info: LiteLLM_TeamTable, llm_router: Router +) -> LiteLLM_TeamTable: + if ( + SpecialModelNames.all_proxy_models.value in team_info.models + and llm_router is not None + ): + team_models: set[str] = set() # make set to avoid duplicates + for model in team_info.models: + if model != SpecialModelNames.all_proxy_models.value: + team_models.add(model) + for model in llm_router.get_model_names(): + team_models.add(model) + team_info.models = list(team_models) + return team_info + + +@router.get( + "/team/info", tags=["team management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def team_info( + http_request: Request, + team_id: str = fastapi.Query( + default=None, description="Team ID in the request parameters" + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + get info on team + related keys + + Parameters: + - team_id: str - Required. The unique identifier of the team to get info on. + + ``` + curl --location 'http://localhost:4000/team/info?team_id=your_team_id_here' \ + --header 'Authorization: Bearer your_api_key_here' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={ + "error": "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + }, + ) + if team_id is None: + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, + detail={"message": "Malformed request. No team id passed in."}, + ) + + try: + team_info: Optional[BaseModel] = ( + await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": team_id} + ) + ) + if team_info is None: + raise Exception + except Exception: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail={"message": f"Team not found, passed team id: {team_id}."}, + ) + validate_membership( + user_api_key_dict=user_api_key_dict, + team_table=LiteLLM_TeamTable(**team_info.model_dump()), + ) + + ## GET ALL KEYS ## + keys = await prisma_client.get_data( + team_id=team_id, + table_name="key", + query_type="find_all", + expires=datetime.now(), + ) + + if keys is None: + keys = [] + + if team_info is None: + ## make sure we still return a total spend ## + spend = 0 + for k in keys: + spend += getattr(k, "spend", 0) + team_info = {"spend": spend} + + ## REMOVE HASHED TOKEN INFO before returning ## + for key in keys: + try: + key = key.model_dump() # noqa + except Exception: + # if using pydantic v1 + key = key.dict() + key.pop("token", None) + + ## GET ALL MEMBERSHIPS ## + returned_tm = await get_all_team_memberships( + prisma_client, [team_id], user_id=None + ) + + if isinstance(team_info, dict): + _team_info = LiteLLM_TeamTable(**team_info) + elif isinstance(team_info, BaseModel): + _team_info = LiteLLM_TeamTable(**team_info.model_dump()) + else: + _team_info = LiteLLM_TeamTable() + + # ## UNFURL 'all-proxy-models' into the team_info.models list ## + # if llm_router is not None: + # _team_info = _unfurl_all_proxy_models(_team_info, llm_router) + response_object = TeamInfoResponseObject( + team_id=team_id, + team_info=_team_info, + keys=keys, + team_memberships=returned_tm, + ) + return response_object + + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.management_endpoints.team_endpoints.py::team_info - Exception occurred - {}\n{}".format( + e, traceback.format_exc() + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +@router.post( + "/team/block", tags=["team management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def block_team( + data: BlockTeamRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Blocks all calls from keys with this team id. + + Parameters: + - team_id: str - Required. The unique identifier of the team to block. + + Example: + ``` + curl --location 'http://0.0.0.0:4000/team/block' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "team_id": "team-1234" + }' + ``` + + Returns: + - The updated team record with blocked=True + + + + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise Exception("No DB Connected.") + + record = await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, data={"blocked": True} # type: ignore + ) + + if record is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={data.team_id}"}, + ) + + return record + + +@router.post( + "/team/unblock", tags=["team management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def unblock_team( + data: BlockTeamRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Blocks all calls from keys with this team id. + + Parameters: + - team_id: str - Required. The unique identifier of the team to unblock. + + Example: + ``` + curl --location 'http://0.0.0.0:4000/team/unblock' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "team_id": "team-1234" + }' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise Exception("No DB Connected.") + + record = await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, data={"blocked": False} # type: ignore + ) + + if record is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={data.team_id}"}, + ) + + return record + + +@router.get("/team/available") +async def list_available_teams( + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + response_model=List[LiteLLM_TeamTable], +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + available_teams = cast( + Optional[List[str]], + ( + litellm.default_internal_user_params.get("available_teams") + if litellm.default_internal_user_params is not None + else None + ), + ) + if available_teams is None: + raise HTTPException( + status_code=400, + detail={ + "error": "No available teams for user to join. See how to set available teams here: https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow" + }, + ) + + # filter out teams that the user is already a member of + user_info = await prisma_client.db.litellm_usertable.find_unique( + where={"user_id": user_api_key_dict.user_id} + ) + if user_info is None: + raise HTTPException( + status_code=404, + detail={"error": "User not found"}, + ) + user_info_correct_type = LiteLLM_UserTable(**user_info.model_dump()) + + available_teams = [ + team for team in available_teams if team not in user_info_correct_type.teams + ] + + available_teams_db = await prisma_client.db.litellm_teamtable.find_many( + where={"team_id": {"in": available_teams}} + ) + + available_teams_correct_type = [ + LiteLLM_TeamTable(**team.model_dump()) for team in available_teams_db + ] + + return available_teams_correct_type + + +@router.get( + "/team/list", tags=["team management"], dependencies=[Depends(user_api_key_auth)] +) +@management_endpoint_wrapper +async def list_team( + http_request: Request, + user_id: Optional[str] = fastapi.Query( + default=None, description="Only return teams which this 'user_id' belongs to" + ), + organization_id: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + ``` + curl --location --request GET 'http://0.0.0.0:4000/team/list' \ + --header 'Authorization: Bearer sk-1234' + ``` + + Parameters: + - user_id: str - Optional. If passed will only return teams that the user_id is a member of. + - organization_id: str - Optional. If passed will only return teams that belong to the organization_id. Pass 'default_organization' to get all teams without organization_id. + """ + from litellm.proxy.proxy_server import prisma_client + + if not allowed_route_check_inside_route( + user_api_key_dict=user_api_key_dict, requested_user_id=user_id + ): + raise HTTPException( + status_code=401, + detail={ + "error": "Only admin users can query all teams/other teams. Your user role={}".format( + user_api_key_dict.user_role + ) + }, + ) + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + response = await prisma_client.db.litellm_teamtable.find_many( + include={ + "litellm_model_table": True, + } + ) + + filtered_response = [] + if user_id: + for team in response: + if team.members_with_roles: + for member in team.members_with_roles: + if ( + "user_id" in member + and member["user_id"] is not None + and member["user_id"] == user_id + ): + filtered_response.append(team) + + else: + filtered_response = response + + _team_ids = [team.team_id for team in filtered_response] + returned_tm = await get_all_team_memberships( + prisma_client, _team_ids, user_id=user_id + ) + + returned_responses: List[TeamListResponseObject] = [] + for team in filtered_response: + _team_memberships: List[LiteLLM_TeamMembership] = [] + for tm in returned_tm: + if tm.team_id == team.team_id: + _team_memberships.append(tm) + + # add all keys that belong to the team + keys = await prisma_client.db.litellm_verificationtoken.find_many( + where={"team_id": team.team_id} + ) + + try: + returned_responses.append( + TeamListResponseObject( + **team.model_dump(), + team_memberships=_team_memberships, + keys=keys, + ) + ) + except Exception as e: + team_exception = """Invalid team object for team_id: {}. team_object={}. + Error: {} + """.format( + team.team_id, team.model_dump(), str(e) + ) + verbose_proxy_logger.exception(team_exception) + continue + # Sort the responses by team_alias + returned_responses.sort(key=lambda x: (getattr(x, "team_alias", "") or "")) + + if organization_id is not None: + if organization_id == SpecialManagementEndpointEnums.DEFAULT_ORGANIZATION.value: + returned_responses = [ + team for team in returned_responses if team.organization_id is None + ] + else: + returned_responses = [ + team + for team in returned_responses + if team.organization_id == organization_id + ] + + return returned_responses + + +async def get_paginated_teams( + prisma_client: PrismaClient, + page_size: int = 10, + page: int = 1, +) -> Tuple[List[LiteLLM_TeamTable], int]: + """ + Get paginated list of teams from team table + + Parameters: + prisma_client: PrismaClient - The database client + page_size: int - Number of teams per page + page: int - Page number (1-based) + + Returns: + Tuple[List[LiteLLM_TeamTable], int] - (list of teams, total count) + """ + try: + # Calculate skip for pagination + skip = (page - 1) * page_size + # Get total count + total_count = await prisma_client.db.litellm_teamtable.count() + + # Get paginated teams + teams = await prisma_client.db.litellm_teamtable.find_many( + skip=skip, take=page_size, order={"team_alias": "asc"} # Sort by team_alias + ) + return teams, total_count + except Exception as e: + verbose_proxy_logger.exception( + f"[Non-Blocking] Error getting paginated teams: {e}" + ) + return [], 0 + + +def _update_team_metadata_field(updated_kv: dict, field_name: str) -> None: + """ + Helper function to update metadata fields that require premium user checks in the update endpoint + + Args: + updated_kv: The key-value dict being used for the update + field_name: Name of the metadata field being updated + """ + if field_name in LiteLLM_ManagementEndpoint_MetadataFields_Premium: + _premium_user_check() + + if field_name in updated_kv and updated_kv[field_name] is not None: + # remove field from updated_kv + _value = updated_kv.pop(field_name) + if "metadata" in updated_kv and updated_kv["metadata"] is not None: + updated_kv["metadata"][field_name] = _value + else: + updated_kv["metadata"] = {field_name: _value} + + +@router.get( + "/team/filter/ui", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, + responses={ + 200: {"model": List[LiteLLM_TeamTable]}, + }, +) +async def ui_view_teams( + team_id: Optional[str] = fastapi.Query( + default=None, description="Team ID in the request parameters" + ), + team_alias: Optional[str] = fastapi.Query( + default=None, description="Team alias in the request parameters" + ), + page: int = fastapi.Query( + default=1, description="Page number for pagination", ge=1 + ), + page_size: int = fastapi.Query( + default=50, description="Number of items per page", ge=1, le=100 + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [PROXY-ADMIN ONLY] Filter teams based on partial match of team_id or team_alias with pagination. + + Args: + user_id (Optional[str]): Partial user ID to search for + user_email (Optional[str]): Partial email to search for + page (int): Page number for pagination (starts at 1) + page_size (int): Number of items per page (max 100) + user_api_key_dict (UserAPIKeyAuth): User authentication information + + Returns: + List[LiteLLM_SpendLogs]: Paginated list of matching user records + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + try: + # Calculate offset for pagination + skip = (page - 1) * page_size + + # Build where conditions based on provided parameters + where_conditions = {} + + if team_id: + where_conditions["team_id"] = { + "contains": team_id, + "mode": "insensitive", # Case-insensitive search + } + + if team_alias: + where_conditions["team_alias"] = { + "contains": team_alias, + "mode": "insensitive", # Case-insensitive search + } + + # Query users with pagination and filters + teams = await prisma_client.db.litellm_teamtable.find_many( + where=where_conditions, + skip=skip, + take=page_size, + order={"created_at": "desc"}, + ) + + if not teams: + return [] + + return teams + + except Exception as e: + raise HTTPException(status_code=500, detail=f"Error searching teams: {str(e)}") + + +@router.post( + "/team/model/add", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def team_model_add( + data: TeamModelAddRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Add models to a team's allowed model list. Only proxy admin or team admin can add models. + + Parameters: + - team_id: str - Required. The team to add models to + - models: List[str] - Required. List of models to add to the team + + Example Request: + ``` + curl --location 'http://0.0.0.0:4000/team/model/add' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "team_id": "team-1234", + "models": ["gpt-4", "claude-2"] + }' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + # Get existing team + team_row = await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": data.team_id} + ) + + if team_row is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={data.team_id}"}, + ) + + team_obj = LiteLLM_TeamTable(**team_row.model_dump()) + + # Authorization check - only proxy admin or team admin can add models + if ( + user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value + and not _is_user_team_admin( + user_api_key_dict=user_api_key_dict, team_obj=team_obj + ) + ): + raise HTTPException( + status_code=403, + detail={"error": "Only proxy admin or team admin can modify team models"}, + ) + + # Get current models list + current_models = team_obj.models or [] + + # Add new models (avoid duplicates) + updated_models = list(set(current_models + data.models)) + + # Update team + updated_team = await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, data={"models": updated_models} + ) + + return updated_team + + +@router.post( + "/team/model/delete", + tags=["team management"], + dependencies=[Depends(user_api_key_auth)], +) +@management_endpoint_wrapper +async def team_model_delete( + data: TeamModelDeleteRequest, + http_request: Request, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Remove models from a team's allowed model list. Only proxy admin or team admin can remove models. + + Parameters: + - team_id: str - Required. The team to remove models from + - models: List[str] - Required. List of models to remove from the team + + Example Request: + ``` + curl --location 'http://0.0.0.0:4000/team/model/delete' \ + --header 'Authorization: Bearer sk-1234' \ + --header 'Content-Type: application/json' \ + --data '{ + "team_id": "team-1234", + "models": ["gpt-4"] + }' + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + # Get existing team + team_row = await prisma_client.db.litellm_teamtable.find_unique( + where={"team_id": data.team_id} + ) + + if team_row is None: + raise HTTPException( + status_code=404, + detail={"error": f"Team not found, passed team_id={data.team_id}"}, + ) + + team_obj = LiteLLM_TeamTable(**team_row.model_dump()) + + # Authorization check - only proxy admin or team admin can remove models + if ( + user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value + and not _is_user_team_admin( + user_api_key_dict=user_api_key_dict, team_obj=team_obj + ) + ): + raise HTTPException( + status_code=403, + detail={"error": "Only proxy admin or team admin can modify team models"}, + ) + + # Get current models list + current_models = team_obj.models or [] + + # Remove specified models + updated_models = [m for m in current_models if m not in data.models] + + # Update team + updated_team = await prisma_client.db.litellm_teamtable.update( + where={"team_id": data.team_id}, data={"models": updated_models} + ) + + return updated_team diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/types.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/types.py new file mode 100644 index 00000000..0e811669 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/types.py @@ -0,0 +1,13 @@ +""" +Types for the management endpoints + +Might include fastapi/proxy requirements.txt related imports +""" + +from typing import List + +from fastapi_sso.sso.base import OpenID + + +class CustomOpenID(OpenID): + team_ids: List[str] diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/ui_sso.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/ui_sso.py new file mode 100644 index 00000000..86dec9fc --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_endpoints/ui_sso.py @@ -0,0 +1,781 @@ +""" +Has all /sso/* routes + +/sso/key/generate - handles user signing in with SSO and redirects to /sso/callback +/sso/callback - returns JWT Redirect Response that redirects to LiteLLM UI +""" + +import asyncio +import os +import uuid +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, cast + +from fastapi import APIRouter, Depends, HTTPException, Request, status +from fastapi.responses import RedirectResponse + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.constants import MAX_SPENDLOG_ROWS_TO_QUERY +from litellm.proxy._types import ( + LiteLLM_UserTable, + LitellmUserRoles, + Member, + NewUserRequest, + NewUserResponse, + ProxyErrorTypes, + ProxyException, + SSOUserDefinedValues, + TeamMemberAddRequest, + UserAPIKeyAuth, +) +from litellm.proxy.auth.auth_checks import get_user_object +from litellm.proxy.auth.auth_utils import _has_user_setup_sso +from litellm.proxy.auth.handle_jwt import JWTHandler +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_utils.admin_ui_utils import ( + admin_ui_disabled, + html_form, + show_missing_vars_in_env, +) +from litellm.proxy.management_endpoints.internal_user_endpoints import new_user +from litellm.proxy.management_endpoints.sso_helper_utils import ( + check_is_admin_only_access, + has_admin_ui_access, +) +from litellm.proxy.management_endpoints.team_endpoints import team_member_add +from litellm.proxy.management_endpoints.types import CustomOpenID +from litellm.secret_managers.main import str_to_bool + +if TYPE_CHECKING: + from fastapi_sso.sso.base import OpenID +else: + from typing import Any as OpenID + +router = APIRouter() + + +@router.get("/sso/key/generate", tags=["experimental"], include_in_schema=False) +async def google_login(request: Request): # noqa: PLR0915 + """ + Create Proxy API Keys using Google Workspace SSO. Requires setting PROXY_BASE_URL in .env + PROXY_BASE_URL should be the your deployed proxy endpoint, e.g. PROXY_BASE_URL="https://litellm-production-7002.up.railway.app/" + Example: + """ + from litellm.proxy.proxy_server import premium_user + + microsoft_client_id = os.getenv("MICROSOFT_CLIENT_ID", None) + google_client_id = os.getenv("GOOGLE_CLIENT_ID", None) + generic_client_id = os.getenv("GENERIC_CLIENT_ID", None) + + ####### Check if UI is disabled ####### + _disable_ui_flag = os.getenv("DISABLE_ADMIN_UI") + if _disable_ui_flag is not None: + is_disabled = str_to_bool(value=_disable_ui_flag) + if is_disabled: + return admin_ui_disabled() + + ####### Check if user is a Enterprise / Premium User ####### + if ( + microsoft_client_id is not None + or google_client_id is not None + or generic_client_id is not None + ): + if premium_user is not True: + raise ProxyException( + message="You must be a LiteLLM Enterprise user to use SSO. If you have a license please set `LITELLM_LICENSE` in your env. If you want to obtain a license meet with us here: https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat You are seeing this error message because You set one of `MICROSOFT_CLIENT_ID`, `GOOGLE_CLIENT_ID`, or `GENERIC_CLIENT_ID` in your env. Please unset this", + type=ProxyErrorTypes.auth_error, + param="premium_user", + code=status.HTTP_403_FORBIDDEN, + ) + + ####### Detect DB + MASTER KEY in .env ####### + missing_env_vars = show_missing_vars_in_env() + if missing_env_vars is not None: + return missing_env_vars + + # get url from request + redirect_url = os.getenv("PROXY_BASE_URL", str(request.base_url)) + ui_username = os.getenv("UI_USERNAME") + if redirect_url.endswith("/"): + redirect_url += "sso/callback" + else: + redirect_url += "/sso/callback" + # Google SSO Auth + if google_client_id is not None: + from fastapi_sso.sso.google import GoogleSSO + + google_client_secret = os.getenv("GOOGLE_CLIENT_SECRET", None) + if google_client_secret is None: + raise ProxyException( + message="GOOGLE_CLIENT_SECRET not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GOOGLE_CLIENT_SECRET", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + google_sso = GoogleSSO( + client_id=google_client_id, + client_secret=google_client_secret, + redirect_uri=redirect_url, + ) + verbose_proxy_logger.info( + f"In /google-login/key/generate, \nGOOGLE_REDIRECT_URI: {redirect_url}\nGOOGLE_CLIENT_ID: {google_client_id}" + ) + with google_sso: + return await google_sso.get_login_redirect() + # Microsoft SSO Auth + elif microsoft_client_id is not None: + from fastapi_sso.sso.microsoft import MicrosoftSSO + + microsoft_client_secret = os.getenv("MICROSOFT_CLIENT_SECRET", None) + microsoft_tenant = os.getenv("MICROSOFT_TENANT", None) + if microsoft_client_secret is None: + raise ProxyException( + message="MICROSOFT_CLIENT_SECRET not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="MICROSOFT_CLIENT_SECRET", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + microsoft_sso = MicrosoftSSO( + client_id=microsoft_client_id, + client_secret=microsoft_client_secret, + tenant=microsoft_tenant, + redirect_uri=redirect_url, + allow_insecure_http=True, + ) + with microsoft_sso: + return await microsoft_sso.get_login_redirect() + elif generic_client_id is not None: + from fastapi_sso.sso.base import DiscoveryDocument + from fastapi_sso.sso.generic import create_provider + + generic_client_secret = os.getenv("GENERIC_CLIENT_SECRET", None) + generic_scope = os.getenv("GENERIC_SCOPE", "openid email profile").split(" ") + generic_authorization_endpoint = os.getenv( + "GENERIC_AUTHORIZATION_ENDPOINT", None + ) + generic_token_endpoint = os.getenv("GENERIC_TOKEN_ENDPOINT", None) + generic_userinfo_endpoint = os.getenv("GENERIC_USERINFO_ENDPOINT", None) + if generic_client_secret is None: + raise ProxyException( + message="GENERIC_CLIENT_SECRET not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_CLIENT_SECRET", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if generic_authorization_endpoint is None: + raise ProxyException( + message="GENERIC_AUTHORIZATION_ENDPOINT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_AUTHORIZATION_ENDPOINT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if generic_token_endpoint is None: + raise ProxyException( + message="GENERIC_TOKEN_ENDPOINT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_TOKEN_ENDPOINT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if generic_userinfo_endpoint is None: + raise ProxyException( + message="GENERIC_USERINFO_ENDPOINT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_USERINFO_ENDPOINT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + verbose_proxy_logger.debug( + f"authorization_endpoint: {generic_authorization_endpoint}\ntoken_endpoint: {generic_token_endpoint}\nuserinfo_endpoint: {generic_userinfo_endpoint}" + ) + verbose_proxy_logger.debug( + f"GENERIC_REDIRECT_URI: {redirect_url}\nGENERIC_CLIENT_ID: {generic_client_id}\n" + ) + discovery = DiscoveryDocument( + authorization_endpoint=generic_authorization_endpoint, + token_endpoint=generic_token_endpoint, + userinfo_endpoint=generic_userinfo_endpoint, + ) + SSOProvider = create_provider(name="oidc", discovery_document=discovery) + generic_sso = SSOProvider( + client_id=generic_client_id, + client_secret=generic_client_secret, + redirect_uri=redirect_url, + allow_insecure_http=True, + scope=generic_scope, + ) + with generic_sso: + # TODO: state should be a random string and added to the user session with cookie + # or a cryptographicly signed state that we can verify stateless + # For simplification we are using a static state, this is not perfect but some + # SSO providers do not allow stateless verification + redirect_params = {} + state = os.getenv("GENERIC_CLIENT_STATE", None) + + if state: + redirect_params["state"] = state + elif "okta" in generic_authorization_endpoint: + redirect_params["state"] = ( + uuid.uuid4().hex + ) # set state param for okta - required + return await generic_sso.get_login_redirect(**redirect_params) # type: ignore + elif ui_username is not None: + # No Google, Microsoft SSO + # Use UI Credentials set in .env + from fastapi.responses import HTMLResponse + + return HTMLResponse(content=html_form, status_code=200) + else: + from fastapi.responses import HTMLResponse + + return HTMLResponse(content=html_form, status_code=200) + + +def generic_response_convertor(response, jwt_handler: JWTHandler): + generic_user_id_attribute_name = os.getenv( + "GENERIC_USER_ID_ATTRIBUTE", "preferred_username" + ) + generic_user_display_name_attribute_name = os.getenv( + "GENERIC_USER_DISPLAY_NAME_ATTRIBUTE", "sub" + ) + generic_user_email_attribute_name = os.getenv( + "GENERIC_USER_EMAIL_ATTRIBUTE", "email" + ) + + generic_user_first_name_attribute_name = os.getenv( + "GENERIC_USER_FIRST_NAME_ATTRIBUTE", "first_name" + ) + generic_user_last_name_attribute_name = os.getenv( + "GENERIC_USER_LAST_NAME_ATTRIBUTE", "last_name" + ) + + generic_provider_attribute_name = os.getenv( + "GENERIC_USER_PROVIDER_ATTRIBUTE", "provider" + ) + + verbose_proxy_logger.debug( + f" generic_user_id_attribute_name: {generic_user_id_attribute_name}\n generic_user_email_attribute_name: {generic_user_email_attribute_name}" + ) + + return CustomOpenID( + id=response.get(generic_user_id_attribute_name), + display_name=response.get(generic_user_display_name_attribute_name), + email=response.get(generic_user_email_attribute_name), + first_name=response.get(generic_user_first_name_attribute_name), + last_name=response.get(generic_user_last_name_attribute_name), + provider=response.get(generic_provider_attribute_name), + team_ids=jwt_handler.get_team_ids_from_jwt(cast(dict, response)), + ) + + +async def get_generic_sso_response( + request: Request, + jwt_handler: JWTHandler, + generic_client_id: str, + redirect_url: str, +) -> Optional[OpenID]: + # make generic sso provider + from fastapi_sso.sso.base import DiscoveryDocument + from fastapi_sso.sso.generic import create_provider + + generic_client_secret = os.getenv("GENERIC_CLIENT_SECRET", None) + generic_scope = os.getenv("GENERIC_SCOPE", "openid email profile").split(" ") + generic_authorization_endpoint = os.getenv("GENERIC_AUTHORIZATION_ENDPOINT", None) + generic_token_endpoint = os.getenv("GENERIC_TOKEN_ENDPOINT", None) + generic_userinfo_endpoint = os.getenv("GENERIC_USERINFO_ENDPOINT", None) + generic_include_client_id = ( + os.getenv("GENERIC_INCLUDE_CLIENT_ID", "false").lower() == "true" + ) + if generic_client_secret is None: + raise ProxyException( + message="GENERIC_CLIENT_SECRET not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_CLIENT_SECRET", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if generic_authorization_endpoint is None: + raise ProxyException( + message="GENERIC_AUTHORIZATION_ENDPOINT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_AUTHORIZATION_ENDPOINT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if generic_token_endpoint is None: + raise ProxyException( + message="GENERIC_TOKEN_ENDPOINT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_TOKEN_ENDPOINT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if generic_userinfo_endpoint is None: + raise ProxyException( + message="GENERIC_USERINFO_ENDPOINT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GENERIC_USERINFO_ENDPOINT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + verbose_proxy_logger.debug( + f"authorization_endpoint: {generic_authorization_endpoint}\ntoken_endpoint: {generic_token_endpoint}\nuserinfo_endpoint: {generic_userinfo_endpoint}" + ) + verbose_proxy_logger.debug( + f"GENERIC_REDIRECT_URI: {redirect_url}\nGENERIC_CLIENT_ID: {generic_client_id}\n" + ) + + discovery = DiscoveryDocument( + authorization_endpoint=generic_authorization_endpoint, + token_endpoint=generic_token_endpoint, + userinfo_endpoint=generic_userinfo_endpoint, + ) + + def response_convertor(response, client): + return generic_response_convertor( + response=response, + jwt_handler=jwt_handler, + ) + + SSOProvider = create_provider( + name="oidc", + discovery_document=discovery, + response_convertor=response_convertor, + ) + generic_sso = SSOProvider( + client_id=generic_client_id, + client_secret=generic_client_secret, + redirect_uri=redirect_url, + allow_insecure_http=True, + scope=generic_scope, + ) + verbose_proxy_logger.debug("calling generic_sso.verify_and_process") + result = await generic_sso.verify_and_process( + request, params={"include_client_id": generic_include_client_id} + ) + verbose_proxy_logger.debug("generic result: %s", result) + return result + + +async def create_team_member_add_task(team_id, user_info): + """Create a task for adding a member to a team.""" + try: + member = Member(user_id=user_info.user_id, role="user") + team_member_add_request = TeamMemberAddRequest( + member=member, + team_id=team_id, + ) + return await team_member_add( + data=team_member_add_request, + user_api_key_dict=UserAPIKeyAuth(user_role=LitellmUserRoles.PROXY_ADMIN), + http_request=Request(scope={"type": "http", "path": "/sso/callback"}), + ) + except Exception as e: + verbose_proxy_logger.debug( + f"[Non-Blocking] Error trying to add sso user to db: {e}" + ) + + +async def add_missing_team_member( + user_info: Union[NewUserResponse, LiteLLM_UserTable], sso_teams: List[str] +): + """ + - Get missing teams (diff b/w user_info.team_ids and sso_teams) + - Add missing user to missing teams + """ + if user_info.teams is None: + return + missing_teams = set(sso_teams) - set(user_info.teams) + missing_teams_list = list(missing_teams) + tasks = [] + tasks = [ + create_team_member_add_task(team_id, user_info) + for team_id in missing_teams_list + ] + + try: + await asyncio.gather(*tasks) + except Exception as e: + verbose_proxy_logger.debug( + f"[Non-Blocking] Error trying to add sso user to db: {e}" + ) + + +def get_disabled_non_admin_personal_key_creation(): + key_generation_settings = litellm.key_generation_settings + if key_generation_settings is None: + return False + personal_key_generation = ( + key_generation_settings.get("personal_key_generation") or {} + ) + allowed_user_roles = personal_key_generation.get("allowed_user_roles") or [] + return bool("proxy_admin" in allowed_user_roles) + + +@router.get("/sso/callback", tags=["experimental"], include_in_schema=False) +async def auth_callback(request: Request): # noqa: PLR0915 + """Verify login""" + from litellm.proxy.management_endpoints.key_management_endpoints import ( + generate_key_helper_fn, + ) + from litellm.proxy.proxy_server import ( + general_settings, + jwt_handler, + master_key, + premium_user, + prisma_client, + proxy_logging_obj, + ui_access_mode, + user_api_key_cache, + user_custom_sso, + ) + + microsoft_client_id = os.getenv("MICROSOFT_CLIENT_ID", None) + google_client_id = os.getenv("GOOGLE_CLIENT_ID", None) + generic_client_id = os.getenv("GENERIC_CLIENT_ID", None) + # get url from request + if master_key is None: + raise ProxyException( + message="Master Key not set for Proxy. Please set Master Key to use Admin UI. Set `LITELLM_MASTER_KEY` in .env or set general_settings:master_key in config.yaml. https://docs.litellm.ai/docs/proxy/virtual_keys. If set, use `--detailed_debug` to debug issue.", + type=ProxyErrorTypes.auth_error, + param="master_key", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + redirect_url = os.getenv("PROXY_BASE_URL", str(request.base_url)) + if redirect_url.endswith("/"): + redirect_url += "sso/callback" + else: + redirect_url += "/sso/callback" + + result = None + if google_client_id is not None: + from fastapi_sso.sso.google import GoogleSSO + + google_client_secret = os.getenv("GOOGLE_CLIENT_SECRET", None) + if google_client_secret is None: + raise ProxyException( + message="GOOGLE_CLIENT_SECRET not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="GOOGLE_CLIENT_SECRET", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + google_sso = GoogleSSO( + client_id=google_client_id, + redirect_uri=redirect_url, + client_secret=google_client_secret, + ) + result = await google_sso.verify_and_process(request) + elif microsoft_client_id is not None: + from fastapi_sso.sso.microsoft import MicrosoftSSO + + microsoft_client_secret = os.getenv("MICROSOFT_CLIENT_SECRET", None) + microsoft_tenant = os.getenv("MICROSOFT_TENANT", None) + if microsoft_client_secret is None: + raise ProxyException( + message="MICROSOFT_CLIENT_SECRET not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="MICROSOFT_CLIENT_SECRET", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if microsoft_tenant is None: + raise ProxyException( + message="MICROSOFT_TENANT not set. Set it in .env file", + type=ProxyErrorTypes.auth_error, + param="MICROSOFT_TENANT", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + microsoft_sso = MicrosoftSSO( + client_id=microsoft_client_id, + client_secret=microsoft_client_secret, + tenant=microsoft_tenant, + redirect_uri=redirect_url, + allow_insecure_http=True, + ) + result = await microsoft_sso.verify_and_process(request) + elif generic_client_id is not None: + result = await get_generic_sso_response( + request=request, + jwt_handler=jwt_handler, + generic_client_id=generic_client_id, + redirect_url=redirect_url, + ) + # User is Authe'd in - generate key for the UI to access Proxy + user_email: Optional[str] = getattr(result, "email", None) + user_id: Optional[str] = getattr(result, "id", None) if result is not None else None + + if user_email is not None and os.getenv("ALLOWED_EMAIL_DOMAINS") is not None: + email_domain = user_email.split("@")[1] + allowed_domains = os.getenv("ALLOWED_EMAIL_DOMAINS").split(",") # type: ignore + if email_domain not in allowed_domains: + raise HTTPException( + status_code=401, + detail={ + "message": "The email domain={}, is not an allowed email domain={}. Contact your admin to change this.".format( + email_domain, allowed_domains + ) + }, + ) + + # generic client id + if generic_client_id is not None and result is not None: + generic_user_role_attribute_name = os.getenv( + "GENERIC_USER_ROLE_ATTRIBUTE", "role" + ) + user_id = getattr(result, "id", None) + user_email = getattr(result, "email", None) + user_role = getattr(result, generic_user_role_attribute_name, None) # type: ignore + + if user_id is None and result is not None: + _first_name = getattr(result, "first_name", "") or "" + _last_name = getattr(result, "last_name", "") or "" + user_id = _first_name + _last_name + + if user_email is not None and (user_id is None or len(user_id) == 0): + user_id = user_email + + user_info = None + user_id_models: List = [] + max_internal_user_budget = litellm.max_internal_user_budget + internal_user_budget_duration = litellm.internal_user_budget_duration + + # User might not be already created on first generation of key + # But if it is, we want their models preferences + default_ui_key_values: Dict[str, Any] = { + "duration": "24hr", + "key_max_budget": litellm.max_ui_session_budget, + "aliases": {}, + "config": {}, + "spend": 0, + "team_id": "litellm-dashboard", + } + user_defined_values: Optional[SSOUserDefinedValues] = None + + if user_custom_sso is not None: + if asyncio.iscoroutinefunction(user_custom_sso): + user_defined_values = await user_custom_sso(result) # type: ignore + else: + raise ValueError("user_custom_sso must be a coroutine function") + elif user_id is not None: + user_defined_values = SSOUserDefinedValues( + models=user_id_models, + user_id=user_id, + user_email=user_email, + max_budget=max_internal_user_budget, + user_role=None, + budget_duration=internal_user_budget_duration, + ) + + _user_id_from_sso = user_id + user_role = None + try: + if prisma_client is not None: + try: + user_info = await get_user_object( + user_id=user_id, + user_email=user_email, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + user_id_upsert=False, + parent_otel_span=None, + proxy_logging_obj=proxy_logging_obj, + sso_user_id=user_id, + ) + except Exception as e: + verbose_proxy_logger.debug(f"Error getting user object: {e}") + user_info = None + + verbose_proxy_logger.debug( + f"user_info: {user_info}; litellm.default_internal_user_params: {litellm.default_internal_user_params}" + ) + + if user_info is not None: + user_id = user_info.user_id + user_defined_values = SSOUserDefinedValues( + models=getattr(user_info, "models", user_id_models), + user_id=user_info.user_id, + user_email=getattr(user_info, "user_email", user_email), + user_role=getattr(user_info, "user_role", None), + max_budget=getattr( + user_info, "max_budget", max_internal_user_budget + ), + budget_duration=getattr( + user_info, "budget_duration", internal_user_budget_duration + ), + ) + + user_role = getattr(user_info, "user_role", None) + + # update id + await prisma_client.db.litellm_usertable.update_many( + where={"user_email": user_email}, data={"user_id": user_id} # type: ignore + ) + else: + verbose_proxy_logger.info( + "user not in DB, inserting user into LiteLLM DB" + ) + # user not in DB, insert User into LiteLLM DB + user_info = await insert_sso_user( + result_openid=result, + user_defined_values=user_defined_values, + ) + + user_role = ( + user_info.user_role or LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ) + sso_teams = getattr(result, "team_ids", []) + await add_missing_team_member(user_info=user_info, sso_teams=sso_teams) + + except Exception as e: + verbose_proxy_logger.debug( + f"[Non-Blocking] Error trying to add sso user to db: {e}" + ) + + if user_defined_values is None: + raise Exception( + "Unable to map user identity to known values. 'user_defined_values' is None. File an issue - https://github.com/BerriAI/litellm/issues" + ) + + verbose_proxy_logger.info( + f"user_defined_values for creating ui key: {user_defined_values}" + ) + + default_ui_key_values.update(user_defined_values) + default_ui_key_values["request_type"] = "key" + response = await generate_key_helper_fn( + **default_ui_key_values, # type: ignore + table_name="key", + ) + + key = response["token"] # type: ignore + user_id = response["user_id"] # type: ignore + + litellm_dashboard_ui = "/ui/" + user_role = user_role or LitellmUserRoles.INTERNAL_USER_VIEW_ONLY.value + if ( + os.getenv("PROXY_ADMIN_ID", None) is not None + and os.environ["PROXY_ADMIN_ID"] == user_id + ): + # checks if user is admin + user_role = LitellmUserRoles.PROXY_ADMIN.value + + verbose_proxy_logger.debug( + f"user_role: {user_role}; ui_access_mode: {ui_access_mode}" + ) + ## CHECK IF ROLE ALLOWED TO USE PROXY ## + is_admin_only_access = check_is_admin_only_access(ui_access_mode) + if is_admin_only_access: + has_access = has_admin_ui_access(user_role) + if not has_access: + raise HTTPException( + status_code=401, + detail={ + "error": f"User not allowed to access proxy. User role={user_role}, proxy mode={ui_access_mode}" + }, + ) + + disabled_non_admin_personal_key_creation = ( + get_disabled_non_admin_personal_key_creation() + ) + + import jwt + + jwt_token = jwt.encode( # type: ignore + { + "user_id": user_id, + "key": key, + "user_email": user_email, + "user_role": user_role, + "login_method": "sso", + "premium_user": premium_user, + "auth_header_name": general_settings.get( + "litellm_key_header_name", "Authorization" + ), + "disabled_non_admin_personal_key_creation": disabled_non_admin_personal_key_creation, + }, + master_key, + algorithm="HS256", + ) + if user_id is not None and isinstance(user_id, str): + litellm_dashboard_ui += "?userID=" + user_id + redirect_response = RedirectResponse(url=litellm_dashboard_ui, status_code=303) + redirect_response.set_cookie(key="token", value=jwt_token, secure=True) + return redirect_response + + +async def insert_sso_user( + result_openid: Optional[OpenID], + user_defined_values: Optional[SSOUserDefinedValues] = None, +) -> NewUserResponse: + """ + Helper function to create a New User in LiteLLM DB after a successful SSO login + + Args: + result_openid (OpenID): User information in OpenID format if the login was successful. + user_defined_values (Optional[SSOUserDefinedValues], optional): LiteLLM SSOValues / fields that were read + + Returns: + Tuple[str, str]: User ID and User Role + """ + verbose_proxy_logger.debug( + f"Inserting SSO user into DB. User values: {user_defined_values}" + ) + + if user_defined_values is None: + raise ValueError("user_defined_values is None") + + if litellm.default_internal_user_params: + user_defined_values.update(litellm.default_internal_user_params) # type: ignore + + # Set budget for internal users + if user_defined_values.get("user_role") == LitellmUserRoles.INTERNAL_USER.value: + if user_defined_values.get("max_budget") is None: + user_defined_values["max_budget"] = litellm.max_internal_user_budget + if user_defined_values.get("budget_duration") is None: + user_defined_values["budget_duration"] = ( + litellm.internal_user_budget_duration + ) + + if user_defined_values["user_role"] is None: + user_defined_values["user_role"] = LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + + new_user_request = NewUserRequest( + user_id=user_defined_values["user_id"], + user_email=user_defined_values["user_email"], + user_role=user_defined_values["user_role"], # type: ignore + max_budget=user_defined_values["max_budget"], + budget_duration=user_defined_values["budget_duration"], + ) + + if result_openid: + new_user_request.metadata = {"auth_provider": result_openid.provider} + + response = await new_user(data=new_user_request, user_api_key_dict=UserAPIKeyAuth()) + + return response + + +@router.get( + "/sso/get/ui_settings", + tags=["experimental"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def get_ui_settings(request: Request): + from litellm.proxy.proxy_server import general_settings, proxy_state + + _proxy_base_url = os.getenv("PROXY_BASE_URL", None) + _logout_url = os.getenv("PROXY_LOGOUT_URL", None) + _is_sso_enabled = _has_user_setup_sso() + disable_expensive_db_queries = ( + proxy_state.get_proxy_state_variable("spend_logs_row_count") + > MAX_SPENDLOG_ROWS_TO_QUERY + ) + default_team_disabled = general_settings.get("default_team_disabled", False) + if "PROXY_DEFAULT_TEAM_DISABLED" in os.environ: + if os.environ["PROXY_DEFAULT_TEAM_DISABLED"].lower() == "true": + default_team_disabled = True + + return { + "PROXY_BASE_URL": _proxy_base_url, + "PROXY_LOGOUT_URL": _logout_url, + "DEFAULT_TEAM_DISABLED": default_team_disabled, + "SSO_ENABLED": _is_sso_enabled, + "NUM_SPEND_LOGS_ROWS": proxy_state.get_proxy_state_variable( + "spend_logs_row_count" + ), + "DISABLE_EXPENSIVE_DB_QUERIES": disable_expensive_db_queries, + } diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/audit_logs.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/audit_logs.py new file mode 100644 index 00000000..d6c83c38 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/audit_logs.py @@ -0,0 +1,98 @@ +""" +Functions to create audit logs for LiteLLM Proxy +""" + +import json +import uuid +from datetime import datetime, timezone + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import ( + AUDIT_ACTIONS, + LiteLLM_AuditLogs, + LitellmTableNames, + Optional, + UserAPIKeyAuth, +) + + +async def create_object_audit_log( + object_id: str, + action: AUDIT_ACTIONS, + litellm_changed_by: Optional[str], + user_api_key_dict: UserAPIKeyAuth, + litellm_proxy_admin_name: Optional[str], + table_name: LitellmTableNames, + before_value: Optional[str] = None, + after_value: Optional[str] = None, +): + """ + Create an audit log for an internal user. + + Parameters: + - user_id: str - The id of the user to create the audit log for. + - action: AUDIT_ACTIONS - The action to create the audit log for. + - user_row: LiteLLM_UserTable - The user row to create the audit log for. + - litellm_changed_by: Optional[str] - The user id of the user who is changing the user. + - user_api_key_dict: UserAPIKeyAuth - The user api key dictionary. + - litellm_proxy_admin_name: Optional[str] - The name of the proxy admin. + """ + if not litellm.store_audit_logs: + return + + await create_audit_log_for_update( + request_data=LiteLLM_AuditLogs( + id=str(uuid.uuid4()), + updated_at=datetime.now(timezone.utc), + changed_by=litellm_changed_by + or user_api_key_dict.user_id + or litellm_proxy_admin_name, + changed_by_api_key=user_api_key_dict.api_key, + table_name=table_name, + object_id=object_id, + action=action, + updated_values=after_value, + before_value=before_value, + ) + ) + + +async def create_audit_log_for_update(request_data: LiteLLM_AuditLogs): + """ + Create an audit log for an object. + """ + if not litellm.store_audit_logs: + return + + from litellm.proxy.proxy_server import premium_user, prisma_client + + if premium_user is not True: + return + + if litellm.store_audit_logs is not True: + return + if prisma_client is None: + raise Exception("prisma_client is None, no DB connected") + + verbose_proxy_logger.debug("creating audit log for %s", request_data) + + if isinstance(request_data.updated_values, dict): + request_data.updated_values = json.dumps(request_data.updated_values) + + if isinstance(request_data.before_value, dict): + request_data.before_value = json.dumps(request_data.before_value) + + _request_data = request_data.model_dump(exclude_none=True) + + try: + await prisma_client.db.litellm_auditlog.create( + data={ + **_request_data, # type: ignore + } + ) + except Exception as e: + # [Non-Blocking Exception. Do not allow blocking LLM API call] + verbose_proxy_logger.error(f"Failed Creating audit log {e}") + + return diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/utils.py new file mode 100644 index 00000000..69a5cf91 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/utils.py @@ -0,0 +1,374 @@ +# What is this? +## Helper utils for the management endpoints (keys/users/teams) +import uuid +from datetime import datetime +from functools import wraps +from typing import Optional, Tuple + +from fastapi import HTTPException, Request + +import litellm +from litellm._logging import verbose_logger +from litellm.proxy._types import ( # key request types; user request types; team request types; customer request types + DeleteCustomerRequest, + DeleteTeamRequest, + DeleteUserRequest, + KeyRequest, + LiteLLM_TeamMembership, + LiteLLM_UserTable, + ManagementEndpointLoggingPayload, + Member, + SSOUserDefinedValues, + UpdateCustomerRequest, + UpdateKeyRequest, + UpdateTeamRequest, + UpdateUserRequest, + UserAPIKeyAuth, + VirtualKeyEvent, +) +from litellm.proxy.common_utils.http_parsing_utils import _read_request_body +from litellm.proxy.utils import PrismaClient + + +def get_new_internal_user_defaults( + user_id: str, user_email: Optional[str] = None +) -> dict: + user_info = litellm.default_internal_user_params or {} + + returned_dict: SSOUserDefinedValues = { + "models": user_info.get("models", None), + "max_budget": user_info.get("max_budget", litellm.max_internal_user_budget), + "budget_duration": user_info.get( + "budget_duration", litellm.internal_user_budget_duration + ), + "user_email": user_email or user_info.get("user_email", None), + "user_id": user_id, + "user_role": "internal_user", + } + + non_null_dict = {} + for k, v in returned_dict.items(): + if v is not None: + non_null_dict[k] = v + return non_null_dict + + +async def add_new_member( + new_member: Member, + max_budget_in_team: Optional[float], + prisma_client: PrismaClient, + team_id: str, + user_api_key_dict: UserAPIKeyAuth, + litellm_proxy_admin_name: str, +) -> Tuple[LiteLLM_UserTable, Optional[LiteLLM_TeamMembership]]: + """ + Add a new member to a team + + - add team id to user table + - add team member w/ budget to team member table + + Returns created/existing user + team membership w/ budget id + """ + returned_user: Optional[LiteLLM_UserTable] = None + returned_team_membership: Optional[LiteLLM_TeamMembership] = None + ## ADD TEAM ID, to USER TABLE IF NEW ## + if new_member.user_id is not None: + new_user_defaults = get_new_internal_user_defaults(user_id=new_member.user_id) + _returned_user = await prisma_client.db.litellm_usertable.upsert( + where={"user_id": new_member.user_id}, + data={ + "update": {"teams": {"push": [team_id]}}, + "create": {"teams": [team_id], **new_user_defaults}, # type: ignore + }, + ) + if _returned_user is not None: + returned_user = LiteLLM_UserTable(**_returned_user.model_dump()) + elif new_member.user_email is not None: + new_user_defaults = get_new_internal_user_defaults( + user_id=str(uuid.uuid4()), user_email=new_member.user_email + ) + ## user email is not unique acc. to prisma schema -> future improvement + ### for now: check if it exists in db, if not - insert it + existing_user_row: Optional[list] = await prisma_client.get_data( + key_val={"user_email": new_member.user_email}, + table_name="user", + query_type="find_all", + ) + if existing_user_row is None or ( + isinstance(existing_user_row, list) and len(existing_user_row) == 0 + ): + new_user_defaults["teams"] = [team_id] + _returned_user = await prisma_client.insert_data(data=new_user_defaults, table_name="user") # type: ignore + + if _returned_user is not None: + returned_user = LiteLLM_UserTable(**_returned_user.model_dump()) + elif len(existing_user_row) == 1: + user_info = existing_user_row[0] + _returned_user = await prisma_client.db.litellm_usertable.update( + where={"user_id": user_info.user_id}, # type: ignore + data={"teams": {"push": [team_id]}}, + ) + if _returned_user is not None: + returned_user = LiteLLM_UserTable(**_returned_user.model_dump()) + elif len(existing_user_row) > 1: + raise HTTPException( + status_code=400, + detail={ + "error": "Multiple users with this email found in db. Please use 'user_id' instead." + }, + ) + + # Check if trying to set a budget for team member + if ( + max_budget_in_team is not None + and returned_user is not None + and returned_user.user_id is not None + ): + # create a new budget item for this member + response = await prisma_client.db.litellm_budgettable.create( + data={ + "max_budget": max_budget_in_team, + "created_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + "updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + } + ) + + _budget_id = response.budget_id + _returned_team_membership = ( + await prisma_client.db.litellm_teammembership.create( + data={ + "team_id": team_id, + "user_id": returned_user.user_id, + "budget_id": _budget_id, + }, + include={"litellm_budget_table": True}, + ) + ) + + returned_team_membership = LiteLLM_TeamMembership( + **_returned_team_membership.model_dump() + ) + + if returned_user is None: + raise Exception("Unable to update user table with membership information!") + + return returned_user, returned_team_membership + + +def _delete_user_id_from_cache(kwargs): + from litellm.proxy.proxy_server import user_api_key_cache + + if kwargs.get("data") is not None: + update_user_request = kwargs.get("data") + if isinstance(update_user_request, UpdateUserRequest): + user_api_key_cache.delete_cache(key=update_user_request.user_id) + + # delete user request + if isinstance(update_user_request, DeleteUserRequest): + for user_id in update_user_request.user_ids: + user_api_key_cache.delete_cache(key=user_id) + pass + + +def _delete_api_key_from_cache(kwargs): + from litellm.proxy.proxy_server import user_api_key_cache + + if kwargs.get("data") is not None: + update_request = kwargs.get("data") + if isinstance(update_request, UpdateKeyRequest): + user_api_key_cache.delete_cache(key=update_request.key) + + # delete key request + if isinstance(update_request, KeyRequest): + for key in update_request.keys: + user_api_key_cache.delete_cache(key=key) + pass + + +def _delete_team_id_from_cache(kwargs): + from litellm.proxy.proxy_server import user_api_key_cache + + if kwargs.get("data") is not None: + update_request = kwargs.get("data") + if isinstance(update_request, UpdateTeamRequest): + user_api_key_cache.delete_cache(key=update_request.team_id) + + # delete team request + if isinstance(update_request, DeleteTeamRequest): + for team_id in update_request.team_ids: + user_api_key_cache.delete_cache(key=team_id) + pass + + +def _delete_customer_id_from_cache(kwargs): + from litellm.proxy.proxy_server import user_api_key_cache + + if kwargs.get("data") is not None: + update_request = kwargs.get("data") + if isinstance(update_request, UpdateCustomerRequest): + user_api_key_cache.delete_cache(key=update_request.user_id) + + # delete customer request + if isinstance(update_request, DeleteCustomerRequest): + for user_id in update_request.user_ids: + user_api_key_cache.delete_cache(key=user_id) + pass + + +async def send_management_endpoint_alert( + request_kwargs: dict, + user_api_key_dict: UserAPIKeyAuth, + function_name: str, +): + """ + Sends a slack alert when: + - A virtual key is created, updated, or deleted + - An internal user is created, updated, or deleted + - A team is created, updated, or deleted + """ + from litellm.proxy.proxy_server import premium_user, proxy_logging_obj + from litellm.types.integrations.slack_alerting import AlertType + + if premium_user is not True: + return + + management_function_to_event_name = { + "generate_key_fn": AlertType.new_virtual_key_created, + "update_key_fn": AlertType.virtual_key_updated, + "delete_key_fn": AlertType.virtual_key_deleted, + # Team events + "new_team": AlertType.new_team_created, + "update_team": AlertType.team_updated, + "delete_team": AlertType.team_deleted, + # Internal User events + "new_user": AlertType.new_internal_user_created, + "user_update": AlertType.internal_user_updated, + "delete_user": AlertType.internal_user_deleted, + } + + # Check if alerting is enabled + if ( + proxy_logging_obj is not None + and proxy_logging_obj.slack_alerting_instance is not None + ): + + # Virtual Key Events + if function_name in management_function_to_event_name: + _event_name: AlertType = management_function_to_event_name[function_name] + + key_event = VirtualKeyEvent( + created_by_user_id=user_api_key_dict.user_id or "Unknown", + created_by_user_role=user_api_key_dict.user_role or "Unknown", + created_by_key_alias=user_api_key_dict.key_alias, + request_kwargs=request_kwargs, + ) + + # replace all "_" with " " and capitalize + event_name = _event_name.replace("_", " ").title() + await proxy_logging_obj.slack_alerting_instance.send_virtual_key_event_slack( + key_event=key_event, + event_name=event_name, + alert_type=_event_name, + ) + + +def management_endpoint_wrapper(func): + """ + This wrapper does the following: + + 1. Log I/O, Exceptions to OTEL + 2. Create an Audit log for success calls + """ + + @wraps(func) + async def wrapper(*args, **kwargs): + start_time = datetime.now() + _http_request: Optional[Request] = None + try: + result = await func(*args, **kwargs) + end_time = datetime.now() + try: + if kwargs is None: + kwargs = {} + user_api_key_dict: UserAPIKeyAuth = ( + kwargs.get("user_api_key_dict") or UserAPIKeyAuth() + ) + + await send_management_endpoint_alert( + request_kwargs=kwargs, + user_api_key_dict=user_api_key_dict, + function_name=func.__name__, + ) + _http_request = kwargs.get("http_request", None) + parent_otel_span = getattr(user_api_key_dict, "parent_otel_span", None) + if parent_otel_span is not None: + from litellm.proxy.proxy_server import open_telemetry_logger + + if open_telemetry_logger is not None: + if _http_request: + _route = _http_request.url.path + _request_body: dict = await _read_request_body( + request=_http_request + ) + _response = dict(result) if result is not None else None + + logging_payload = ManagementEndpointLoggingPayload( + route=_route, + request_data=_request_body, + response=_response, + start_time=start_time, + end_time=end_time, + ) + + await open_telemetry_logger.async_management_endpoint_success_hook( # type: ignore + logging_payload=logging_payload, + parent_otel_span=parent_otel_span, + ) + + # Delete updated/deleted info from cache + _delete_api_key_from_cache(kwargs=kwargs) + _delete_user_id_from_cache(kwargs=kwargs) + _delete_team_id_from_cache(kwargs=kwargs) + _delete_customer_id_from_cache(kwargs=kwargs) + except Exception as e: + # Non-Blocking Exception + verbose_logger.debug("Error in management endpoint wrapper: %s", str(e)) + pass + + return result + except Exception as e: + end_time = datetime.now() + + if kwargs is None: + kwargs = {} + user_api_key_dict: UserAPIKeyAuth = ( + kwargs.get("user_api_key_dict") or UserAPIKeyAuth() + ) + parent_otel_span = getattr(user_api_key_dict, "parent_otel_span", None) + if parent_otel_span is not None: + from litellm.proxy.proxy_server import open_telemetry_logger + + if open_telemetry_logger is not None: + _http_request = kwargs.get("http_request") + if _http_request: + _route = _http_request.url.path + _request_body: dict = await _read_request_body( + request=_http_request + ) + logging_payload = ManagementEndpointLoggingPayload( + route=_route, + request_data=_request_body, + response=None, + start_time=start_time, + end_time=end_time, + exception=e, + ) + + await open_telemetry_logger.async_management_endpoint_failure_hook( # type: ignore + logging_payload=logging_payload, + parent_otel_span=parent_otel_span, + ) + + raise e + + return wrapper diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/model_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/model_config.yaml new file mode 100644 index 00000000..a0399c09 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/model_config.yaml @@ -0,0 +1,10 @@ +model_list: + - model_name: gpt-4o + litellm_params: + model: openai/gpt-4o + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + - model_name: fake-anthropic-endpoint + litellm_params: + model: anthropic/fake + api_base: https://exampleanthropicendpoint-production.up.railway.app/ + diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/openai_files_endpoints/files_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/openai_files_endpoints/files_endpoints.py new file mode 100644 index 00000000..ffbca91c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/openai_files_endpoints/files_endpoints.py @@ -0,0 +1,746 @@ +###################################################################### + +# /v1/files Endpoints + +# Equivalent of https://platform.openai.com/docs/api-reference/files +###################################################################### + +import asyncio +import traceback +from typing import Optional + +import httpx +from fastapi import ( + APIRouter, + Depends, + File, + Form, + HTTPException, + Request, + Response, + UploadFile, + status, +) + +import litellm +from litellm import CreateFileRequest, get_secret_str +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing +from litellm.proxy.common_utils.openai_endpoint_utils import ( + get_custom_llm_provider_from_request_body, +) +from litellm.router import Router + +router = APIRouter() + +files_config = None + + +def set_files_config(config): + global files_config + if config is None: + return + + if not isinstance(config, list): + raise ValueError("invalid files config, expected a list is not a list") + + for element in config: + if isinstance(element, dict): + for key, value in element.items(): + if isinstance(value, str) and value.startswith("os.environ/"): + element[key] = get_secret_str(value) + + files_config = config + + +def get_files_provider_config( + custom_llm_provider: str, +): + global files_config + if custom_llm_provider == "vertex_ai": + return None + if files_config is None: + raise ValueError("files_config is not set, set it on your config.yaml file.") + for setting in files_config: + if setting.get("custom_llm_provider") == custom_llm_provider: + return setting + return None + + +def get_first_json_object(file_content_bytes: bytes) -> Optional[dict]: + try: + # Decode the bytes to a string and split into lines + file_content = file_content_bytes.decode("utf-8") + first_line = file_content.splitlines()[0].strip() + + # Parse the JSON object from the first line + json_object = json.loads(first_line) + return json_object + except (json.JSONDecodeError, UnicodeDecodeError): + return None + + +def get_model_from_json_obj(json_object: dict) -> Optional[str]: + body = json_object.get("body", {}) or {} + model = body.get("model") + + return model + + +def is_known_model(model: Optional[str], llm_router: Optional[Router]) -> bool: + """ + Returns True if the model is in the llm_router model names + """ + if model is None or llm_router is None: + return False + model_names = llm_router.get_model_names() + + is_in_list = False + if model in model_names: + is_in_list = True + + return is_in_list + + +@router.post( + "/{provider}/v1/files", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.post( + "/v1/files", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.post( + "/files", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +async def create_file( + request: Request, + fastapi_response: Response, + purpose: str = Form(...), + provider: Optional[str] = None, + custom_llm_provider: str = Form(default="openai"), + file: UploadFile = File(...), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Upload a file that can be used across - Assistants API, Batch API + This is the equivalent of POST https://api.openai.com/v1/files + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/create + + Example Curl + ``` + curl http://localhost:4000/v1/files \ + -H "Authorization: Bearer sk-1234" \ + -F purpose="batch" \ + -F file="@mydata.jsonl" + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + # Read the file content + file_content = await file.read() + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + # Prepare the data for forwarding + + data = {"purpose": purpose} + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # Prepare the file data according to FileTypes + file_data = (file.filename, file_content, file.content_type) + + ## check if model is a loadbalanced model + router_model: Optional[str] = None + is_router_model = False + if litellm.enable_loadbalancing_on_batch_endpoints is True: + json_obj = get_first_json_object(file_content_bytes=file_content) + if json_obj: + router_model = get_model_from_json_obj(json_object=json_obj) + is_router_model = is_known_model( + model=router_model, llm_router=llm_router + ) + + _create_file_request = CreateFileRequest(file=file_data, **data) + + if ( + litellm.enable_loadbalancing_on_batch_endpoints is True + and is_router_model + and router_model is not None + ): + if llm_router is None: + raise HTTPException( + status_code=500, + detail={ + "error": "LLM Router not initialized. Ensure models added to proxy." + }, + ) + + response = await llm_router.acreate_file( + model=router_model, **_create_file_request + ) + else: + # get configs for custom_llm_provider + llm_provider_config = get_files_provider_config( + custom_llm_provider=custom_llm_provider + ) + if llm_provider_config is not None: + # add llm_provider_config to data + _create_file_request.update(llm_provider_config) + _create_file_request.pop("custom_llm_provider", None) # type: ignore + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + response = await litellm.acreate_file(**_create_file_request, custom_llm_provider=custom_llm_provider) # type: ignore + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.create_file(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +@router.get( + "/{provider}/v1/files/{file_id:path}/content", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.get( + "/v1/files/{file_id:path}/content", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.get( + "/files/{file_id:path}/content", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +async def get_file_content( + request: Request, + fastapi_response: Response, + file_id: str, + provider: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Returns information about a specific file. that can be used across - Assistants API, Batch API + This is the equivalent of GET https://api.openai.com/v1/files/{file_id}/content + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/retrieve-contents + + Example Curl + ``` + curl http://localhost:4000/v1/files/file-abc123/content \ + -H "Authorization: Bearer sk-1234" + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + response = await litellm.afile_content( + custom_llm_provider=custom_llm_provider, file_id=file_id, **data # type: ignore + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + httpx_response: Optional[httpx.Response] = getattr(response, "response", None) + if httpx_response is None: + raise ValueError( + f"Invalid response - response.response is None - got {response}" + ) + + return Response( + content=httpx_response.content, + status_code=httpx_response.status_code, + headers=httpx_response.headers, + ) + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.retrieve_file_content(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +@router.get( + "/{provider}/v1/files/{file_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.get( + "/v1/files/{file_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.get( + "/files/{file_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +async def get_file( + request: Request, + fastapi_response: Response, + file_id: str, + provider: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Returns information about a specific file. that can be used across - Assistants API, Batch API + This is the equivalent of GET https://api.openai.com/v1/files/{file_id} + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/retrieve + + Example Curl + ``` + curl http://localhost:4000/v1/files/file-abc123 \ + -H "Authorization: Bearer sk-1234" + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + response = await litellm.afile_retrieve( + custom_llm_provider=custom_llm_provider, file_id=file_id, **data # type: ignore + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + return response + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.retrieve_file(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +@router.delete( + "/{provider}/v1/files/{file_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.delete( + "/v1/files/{file_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.delete( + "/files/{file_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +async def delete_file( + request: Request, + fastapi_response: Response, + file_id: str, + provider: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Deletes a specified file. that can be used across - Assistants API, Batch API + This is the equivalent of DELETE https://api.openai.com/v1/files/{file_id} + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/delete + + Example Curl + ``` + curl http://localhost:4000/v1/files/file-abc123 \ + -X DELETE \ + -H "Authorization: Bearer $OPENAI_API_KEY" + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + response = await litellm.afile_delete( + custom_llm_provider=custom_llm_provider, file_id=file_id, **data # type: ignore + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + return response + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.retrieve_file(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +@router.get( + "/{provider}/v1/files", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.get( + "/v1/files", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +@router.get( + "/files", + dependencies=[Depends(user_api_key_auth)], + tags=["files"], +) +async def list_files( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + provider: Optional[str] = None, + purpose: Optional[str] = None, +): + """ + Returns information about a specific file. that can be used across - Assistants API, Batch API + This is the equivalent of GET https://api.openai.com/v1/files/ + + Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/list + + Example Curl + ``` + curl http://localhost:4000/v1/files\ + -H "Authorization: Bearer sk-1234" + + ``` + """ + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + proxy_config, + proxy_logging_obj, + version, + ) + + data: Dict = {} + try: + custom_llm_provider = ( + provider + or await get_custom_llm_provider_from_request_body(request=request) + or "openai" + ) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + response = await litellm.afile_list( + custom_llm_provider=custom_llm_provider, purpose=purpose, **data # type: ignore + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + ) + ) + return response + + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.list_files(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/openapi.json b/.venv/lib/python3.12/site-packages/litellm/proxy/openapi.json new file mode 100644 index 00000000..95517182 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/openapi.json @@ -0,0 +1,237 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "LiteLLM API", + "description": "API for LiteLLM" + }, + "paths": { + "/chat/completions": { + "post": { + "summary": "Create chat completion for 100+ LLM APIs", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "ID of the model to use" + }, + "messages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the message's author" + }, + "content": { + "type": "string", + "description": "The contents of the message" + }, + "name": { + "type": "string", + "description": "The name of the author of the message" + }, + "function_call": { + "type": "object", + "description": "The name and arguments of a function that should be called" + } + } + } + }, + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to be called" + }, + "description": { + "type": "string", + "description": "A description explaining what the function does" + }, + "parameters": { + "type": "object", + "description": "The parameters that the function accepts" + }, + "function_call": { + "type": "string", + "description": "Controls how the model responds to function calls" + } + } + } + }, + "temperature": { + "type": "number", + "description": "The sampling temperature to be used" + }, + "top_p": { + "type": "number", + "description": "An alternative to sampling with temperature" + }, + "n": { + "type": "integer", + "description": "The number of chat completion choices to generate for each input message" + }, + "stream": { + "type": "boolean", + "description": "If set to true, it sends partial message deltas" + }, + "stop": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Up to 4 sequences where the API will stop generating further tokens" + }, + "max_tokens": { + "type": "integer", + "description": "The maximum number of tokens to generate in the chat completion" + }, + "presence_penalty": { + "type": "number", + "description": "It is used to penalize new tokens based on their existence in the text so far" + }, + "frequency_penalty": { + "type": "number", + "description": "It is used to penalize new tokens based on their frequency in the text so far" + }, + "logit_bias": { + "type": "object", + "description": "Used to modify the probability of specific tokens appearing in the completion" + }, + "user": { + "type": "string", + "description": "A unique identifier representing your end-user" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "choices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "finish_reason": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "message": { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "content": { + "type": "string" + } + } + } + } + } + }, + "created": { + "type": "string" + }, + "model": { + "type": "string" + }, + "usage": { + "type": "object", + "properties": { + "prompt_tokens": { + "type": "integer" + }, + "completion_tokens": { + "type": "integer" + }, + "total_tokens": { + "type": "integer" + } + } + } + } + } + } + } + }, + "500": { + "description": "Server error" + } + } + } +}, + + "/completions": { + "post": { + "summary": "Create completion", + "responses": { + "200": { + "description": "Successful operation" + }, + "500": { + "description": "Server error" + } + } + } + }, + "/models": { + "get": { + "summary": "Get models", + "responses": { + "200": { + "description": "Successful operation" + } + } + } + }, + + "/ollama_logs": { + "get": { + "summary": "Retrieve server logs for ollama models", + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Home", + "responses": { + "200": { + "description": "Successful operation" + } + } + } + } + } +} diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py new file mode 100644 index 00000000..4724c7f9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -0,0 +1,556 @@ +""" +What is this? + +Provider-specific Pass-Through Endpoints + +Use litellm with Anthropic SDK, Vertex AI SDK, Cohere SDK, etc. +""" + +from typing import Optional + +import httpx +from fastapi import APIRouter, Depends, HTTPException, Request, Response + +import litellm +from litellm.constants import BEDROCK_AGENT_RUNTIME_PASS_THROUGH_ROUTES +from litellm.proxy._types import * +from litellm.proxy.auth.route_checks import RouteChecks +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( + create_pass_through_route, +) +from litellm.secret_managers.main import get_secret_str + +from .passthrough_endpoint_router import PassthroughEndpointRouter + +router = APIRouter() +default_vertex_config = None + +passthrough_endpoint_router = PassthroughEndpointRouter() + + +def create_request_copy(request: Request): + return { + "method": request.method, + "url": str(request.url), + "headers": dict(request.headers), + "cookies": request.cookies, + "query_params": dict(request.query_params), + } + + +@router.api_route( + "/gemini/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Google AI Studio Pass-through", "pass-through"], +) +async def gemini_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, +): + """ + [Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio) + """ + ## CHECK FOR LITELLM API KEY IN THE QUERY PARAMS - ?..key=LITELLM_API_KEY + google_ai_studio_api_key = request.query_params.get("key") or request.headers.get( + "x-goog-api-key" + ) + + user_api_key_dict = await user_api_key_auth( + request=request, api_key=f"Bearer {google_ai_studio_api_key}" + ) + + base_target_url = "https://generativelanguage.googleapis.com" + encoded_endpoint = httpx.URL(endpoint).path + + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + base_url = httpx.URL(base_target_url) + updated_url = base_url.copy_with(path=encoded_endpoint) + + # Add or update query parameters + gemini_api_key: Optional[str] = passthrough_endpoint_router.get_credentials( + custom_llm_provider="gemini", + region_name=None, + ) + if gemini_api_key is None: + raise Exception( + "Required 'GEMINI_API_KEY' in environment to make pass-through calls to Google AI Studio." + ) + # Merge query parameters, giving precedence to those in updated_url + merged_params = dict(request.query_params) + merged_params.update({"key": gemini_api_key}) + + ## check for streaming + is_streaming_request = False + if "stream" in str(updated_url): + is_streaming_request = True + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(updated_url), + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + query_params=merged_params, # type: ignore + stream=is_streaming_request, # type: ignore + ) + + return received_value + + +@router.api_route( + "/cohere/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Cohere Pass-through", "pass-through"], +) +async def cohere_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [Docs](https://docs.litellm.ai/docs/pass_through/cohere) + """ + base_target_url = "https://api.cohere.com" + encoded_endpoint = httpx.URL(endpoint).path + + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + base_url = httpx.URL(base_target_url) + updated_url = base_url.copy_with(path=encoded_endpoint) + + # Add or update query parameters + cohere_api_key = passthrough_endpoint_router.get_credentials( + custom_llm_provider="cohere", + region_name=None, + ) + + ## check for streaming + is_streaming_request = False + if "stream" in str(updated_url): + is_streaming_request = True + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(updated_url), + custom_headers={"Authorization": "Bearer {}".format(cohere_api_key)}, + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + stream=is_streaming_request, # type: ignore + ) + + return received_value + + +@router.api_route( + "/anthropic/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Anthropic Pass-through", "pass-through"], +) +async def anthropic_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [Docs](https://docs.litellm.ai/docs/anthropic_completion) + """ + base_target_url = "https://api.anthropic.com" + encoded_endpoint = httpx.URL(endpoint).path + + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + base_url = httpx.URL(base_target_url) + updated_url = base_url.copy_with(path=encoded_endpoint) + + # Add or update query parameters + anthropic_api_key = passthrough_endpoint_router.get_credentials( + custom_llm_provider="anthropic", + region_name=None, + ) + + ## check for streaming + is_streaming_request = False + # anthropic is streaming when 'stream' = True is in the body + if request.method == "POST": + _request_body = await request.json() + if _request_body.get("stream"): + is_streaming_request = True + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(updated_url), + custom_headers={"x-api-key": "{}".format(anthropic_api_key)}, + _forward_headers=True, + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + stream=is_streaming_request, # type: ignore + ) + + return received_value + + +@router.api_route( + "/bedrock/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Bedrock Pass-through", "pass-through"], +) +async def bedrock_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [Docs](https://docs.litellm.ai/docs/pass_through/bedrock) + """ + create_request_copy(request) + + try: + from botocore.auth import SigV4Auth + from botocore.awsrequest import AWSRequest + from botocore.credentials import Credentials + except ImportError: + raise ImportError("Missing boto3 to call bedrock. Run 'pip install boto3'.") + + aws_region_name = litellm.utils.get_secret(secret_name="AWS_REGION_NAME") + if _is_bedrock_agent_runtime_route(endpoint=endpoint): # handle bedrock agents + base_target_url = ( + f"https://bedrock-agent-runtime.{aws_region_name}.amazonaws.com" + ) + else: + base_target_url = f"https://bedrock-runtime.{aws_region_name}.amazonaws.com" + encoded_endpoint = httpx.URL(endpoint).path + + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + base_url = httpx.URL(base_target_url) + updated_url = base_url.copy_with(path=encoded_endpoint) + + # Add or update query parameters + from litellm.llms.bedrock.chat import BedrockConverseLLM + + credentials: Credentials = BedrockConverseLLM().get_credentials() + sigv4 = SigV4Auth(credentials, "bedrock", aws_region_name) + headers = {"Content-Type": "application/json"} + # Assuming the body contains JSON data, parse it + try: + data = await request.json() + except Exception as e: + raise HTTPException(status_code=400, detail={"error": e}) + _request = AWSRequest( + method="POST", url=str(updated_url), data=json.dumps(data), headers=headers + ) + sigv4.add_auth(_request) + prepped = _request.prepare() + + ## check for streaming + is_streaming_request = False + if "stream" in str(updated_url): + is_streaming_request = True + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(prepped.url), + custom_headers=prepped.headers, # type: ignore + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + stream=is_streaming_request, # type: ignore + custom_body=data, # type: ignore + query_params={}, # type: ignore + ) + + return received_value + + +def _is_bedrock_agent_runtime_route(endpoint: str) -> bool: + """ + Return True, if the endpoint should be routed to the `bedrock-agent-runtime` endpoint. + """ + for _route in BEDROCK_AGENT_RUNTIME_PASS_THROUGH_ROUTES: + if _route in endpoint: + return True + return False + + +@router.api_route( + "/assemblyai/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["AssemblyAI Pass-through", "pass-through"], +) +@router.api_route( + "/eu.assemblyai/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["AssemblyAI EU Pass-through", "pass-through"], +) +async def assemblyai_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + from litellm.proxy.pass_through_endpoints.llm_provider_handlers.assembly_passthrough_logging_handler import ( + AssemblyAIPassthroughLoggingHandler, + ) + + """ + [Docs](https://api.assemblyai.com) + """ + # Set base URL based on the route + assembly_region = AssemblyAIPassthroughLoggingHandler._get_assembly_region_from_url( + url=str(request.url) + ) + base_target_url = ( + AssemblyAIPassthroughLoggingHandler._get_assembly_base_url_from_region( + region=assembly_region + ) + ) + encoded_endpoint = httpx.URL(endpoint).path + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + base_url = httpx.URL(base_target_url) + updated_url = base_url.copy_with(path=encoded_endpoint) + + # Add or update query parameters + assemblyai_api_key = passthrough_endpoint_router.get_credentials( + custom_llm_provider="assemblyai", + region_name=assembly_region, + ) + + ## check for streaming + is_streaming_request = False + # assemblyai is streaming when 'stream' = True is in the body + if request.method == "POST": + _request_body = await request.json() + if _request_body.get("stream"): + is_streaming_request = True + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(updated_url), + custom_headers={"Authorization": "{}".format(assemblyai_api_key)}, + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request=request, + fastapi_response=fastapi_response, + user_api_key_dict=user_api_key_dict, + stream=is_streaming_request, # type: ignore + ) + + return received_value + + +@router.api_route( + "/azure/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Azure Pass-through", "pass-through"], +) +async def azure_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Call any azure endpoint using the proxy. + + Just use `{PROXY_BASE_URL}/azure/{endpoint:path}` + """ + base_target_url = get_secret_str(secret_name="AZURE_API_BASE") + if base_target_url is None: + raise Exception( + "Required 'AZURE_API_BASE' in environment to make pass-through calls to Azure." + ) + # Add or update query parameters + azure_api_key = passthrough_endpoint_router.get_credentials( + custom_llm_provider=litellm.LlmProviders.AZURE.value, + region_name=None, + ) + if azure_api_key is None: + raise Exception( + "Required 'AZURE_API_KEY' in environment to make pass-through calls to Azure." + ) + + return await BaseOpenAIPassThroughHandler._base_openai_pass_through_handler( + endpoint=endpoint, + request=request, + fastapi_response=fastapi_response, + user_api_key_dict=user_api_key_dict, + base_target_url=base_target_url, + api_key=azure_api_key, + custom_llm_provider=litellm.LlmProviders.AZURE, + ) + + +@router.api_route( + "/openai/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["OpenAI Pass-through", "pass-through"], +) +async def openai_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Simple pass-through for OpenAI. Use this if you want to directly send a request to OpenAI. + + + """ + base_target_url = "https://api.openai.com/" + # Add or update query parameters + openai_api_key = passthrough_endpoint_router.get_credentials( + custom_llm_provider=litellm.LlmProviders.OPENAI.value, + region_name=None, + ) + if openai_api_key is None: + raise Exception( + "Required 'OPENAI_API_KEY' in environment to make pass-through calls to OpenAI." + ) + + return await BaseOpenAIPassThroughHandler._base_openai_pass_through_handler( + endpoint=endpoint, + request=request, + fastapi_response=fastapi_response, + user_api_key_dict=user_api_key_dict, + base_target_url=base_target_url, + api_key=openai_api_key, + custom_llm_provider=litellm.LlmProviders.OPENAI, + ) + + +class BaseOpenAIPassThroughHandler: + @staticmethod + async def _base_openai_pass_through_handler( + endpoint: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth, + base_target_url: str, + api_key: str, + custom_llm_provider: litellm.LlmProviders, + ): + encoded_endpoint = httpx.URL(endpoint).path + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL by properly joining the base URL and endpoint path + base_url = httpx.URL(base_target_url) + updated_url = BaseOpenAIPassThroughHandler._join_url_paths( + base_url=base_url, + path=encoded_endpoint, + custom_llm_provider=custom_llm_provider, + ) + + ## check for streaming + is_streaming_request = False + if "stream" in str(updated_url): + is_streaming_request = True + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(updated_url), + custom_headers=BaseOpenAIPassThroughHandler._assemble_headers( + api_key=api_key, request=request + ), + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + stream=is_streaming_request, # type: ignore + query_params=dict(request.query_params), # type: ignore + ) + + return received_value + + @staticmethod + def _append_openai_beta_header(headers: dict, request: Request) -> dict: + """ + Appends the OpenAI-Beta header to the headers if the request is an OpenAI Assistants API request + """ + if ( + RouteChecks._is_assistants_api_request(request) is True + and "OpenAI-Beta" not in headers + ): + headers["OpenAI-Beta"] = "assistants=v2" + return headers + + @staticmethod + def _assemble_headers(api_key: str, request: Request) -> dict: + base_headers = { + "authorization": "Bearer {}".format(api_key), + "api-key": "{}".format(api_key), + } + return BaseOpenAIPassThroughHandler._append_openai_beta_header( + headers=base_headers, + request=request, + ) + + @staticmethod + def _join_url_paths( + base_url: httpx.URL, path: str, custom_llm_provider: litellm.LlmProviders + ) -> str: + """ + Properly joins a base URL with a path, preserving any existing path in the base URL. + """ + # Join paths correctly by removing trailing/leading slashes as needed + if not base_url.path or base_url.path == "/": + # If base URL has no path, just use the new path + joined_path_str = str(base_url.copy_with(path=path)) + else: + # Otherwise, combine the paths + base_path = base_url.path.rstrip("/") + clean_path = path.lstrip("/") + full_path = f"{base_path}/{clean_path}" + joined_path_str = str(base_url.copy_with(path=full_path)) + + # Apply OpenAI-specific path handling for both branches + if ( + custom_llm_provider == litellm.LlmProviders.OPENAI + and "/v1/" not in joined_path_str + ): + # Insert v1 after api.openai.com for OpenAI requests + joined_path_str = joined_path_str.replace( + "api.openai.com/", "api.openai.com/v1/" + ) + + return joined_path_str diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py new file mode 100644 index 00000000..51845956 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/anthropic_passthrough_logging_handler.py @@ -0,0 +1,220 @@ +import json +from datetime import datetime +from typing import TYPE_CHECKING, Any, List, Optional, Union + +import httpx + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.llms.anthropic.chat.handler import ( + ModelResponseIterator as AnthropicModelResponseIterator, +) +from litellm.llms.anthropic.chat.transformation import AnthropicConfig +from litellm.proxy._types import PassThroughEndpointLoggingTypedDict +from litellm.proxy.auth.auth_utils import get_end_user_id_from_request_body +from litellm.proxy.pass_through_endpoints.types import PassthroughStandardLoggingPayload +from litellm.types.utils import ModelResponse, TextCompletionResponse + +if TYPE_CHECKING: + from ..success_handler import PassThroughEndpointLogging + from ..types import EndpointType +else: + PassThroughEndpointLogging = Any + EndpointType = Any + + +class AnthropicPassthroughLoggingHandler: + + @staticmethod + def anthropic_passthrough_handler( + httpx_response: httpx.Response, + response_body: dict, + logging_obj: LiteLLMLoggingObj, + url_route: str, + result: str, + start_time: datetime, + end_time: datetime, + cache_hit: bool, + **kwargs, + ) -> PassThroughEndpointLoggingTypedDict: + """ + Transforms Anthropic response to OpenAI response, generates a standard logging object so downstream logging can be handled + """ + model = response_body.get("model", "") + litellm_model_response: ModelResponse = AnthropicConfig().transform_response( + raw_response=httpx_response, + model_response=litellm.ModelResponse(), + model=model, + messages=[], + logging_obj=logging_obj, + optional_params={}, + api_key="", + request_data={}, + encoding=litellm.encoding, + json_mode=False, + litellm_params={}, + ) + + kwargs = AnthropicPassthroughLoggingHandler._create_anthropic_response_logging_payload( + litellm_model_response=litellm_model_response, + model=model, + kwargs=kwargs, + start_time=start_time, + end_time=end_time, + logging_obj=logging_obj, + ) + + return { + "result": litellm_model_response, + "kwargs": kwargs, + } + + @staticmethod + def _get_user_from_metadata( + passthrough_logging_payload: PassthroughStandardLoggingPayload, + ) -> Optional[str]: + request_body = passthrough_logging_payload.get("request_body") + if request_body: + return get_end_user_id_from_request_body(request_body) + return None + + @staticmethod + def _create_anthropic_response_logging_payload( + litellm_model_response: Union[ModelResponse, TextCompletionResponse], + model: str, + kwargs: dict, + start_time: datetime, + end_time: datetime, + logging_obj: LiteLLMLoggingObj, + ): + """ + Create the standard logging object for Anthropic passthrough + + handles streaming and non-streaming responses + """ + try: + response_cost = litellm.completion_cost( + completion_response=litellm_model_response, + model=model, + ) + kwargs["response_cost"] = response_cost + kwargs["model"] = model + passthrough_logging_payload: Optional[PassthroughStandardLoggingPayload] = ( # type: ignore + kwargs.get("passthrough_logging_payload") + ) + if passthrough_logging_payload: + user = AnthropicPassthroughLoggingHandler._get_user_from_metadata( + passthrough_logging_payload=passthrough_logging_payload, + ) + if user: + kwargs.setdefault("litellm_params", {}) + kwargs["litellm_params"].update( + {"proxy_server_request": {"body": {"user": user}}} + ) + + # pretty print standard logging object + verbose_proxy_logger.debug( + "kwargs= %s", + json.dumps(kwargs, indent=4, default=str), + ) + + # set litellm_call_id to logging response object + litellm_model_response.id = logging_obj.litellm_call_id + litellm_model_response.model = model + logging_obj.model_call_details["model"] = model + logging_obj.model_call_details["custom_llm_provider"] = ( + litellm.LlmProviders.ANTHROPIC.value + ) + return kwargs + except Exception as e: + verbose_proxy_logger.exception( + "Error creating Anthropic response logging payload: %s", e + ) + return kwargs + + @staticmethod + def _handle_logging_anthropic_collected_chunks( + litellm_logging_obj: LiteLLMLoggingObj, + passthrough_success_handler_obj: PassThroughEndpointLogging, + url_route: str, + request_body: dict, + endpoint_type: EndpointType, + start_time: datetime, + all_chunks: List[str], + end_time: datetime, + ) -> PassThroughEndpointLoggingTypedDict: + """ + Takes raw chunks from Anthropic passthrough endpoint and logs them in litellm callbacks + + - Builds complete response from chunks + - Creates standard logging object + - Logs in litellm callbacks + """ + + model = request_body.get("model", "") + complete_streaming_response = ( + AnthropicPassthroughLoggingHandler._build_complete_streaming_response( + all_chunks=all_chunks, + litellm_logging_obj=litellm_logging_obj, + model=model, + ) + ) + if complete_streaming_response is None: + verbose_proxy_logger.error( + "Unable to build complete streaming response for Anthropic passthrough endpoint, not logging..." + ) + return { + "result": None, + "kwargs": {}, + } + kwargs = AnthropicPassthroughLoggingHandler._create_anthropic_response_logging_payload( + litellm_model_response=complete_streaming_response, + model=model, + kwargs={}, + start_time=start_time, + end_time=end_time, + logging_obj=litellm_logging_obj, + ) + + return { + "result": complete_streaming_response, + "kwargs": kwargs, + } + + @staticmethod + def _build_complete_streaming_response( + all_chunks: List[str], + litellm_logging_obj: LiteLLMLoggingObj, + model: str, + ) -> Optional[Union[ModelResponse, TextCompletionResponse]]: + """ + Builds complete response from raw Anthropic chunks + + - Converts str chunks to generic chunks + - Converts generic chunks to litellm chunks (OpenAI format) + - Builds complete response from litellm chunks + """ + anthropic_model_response_iterator = AnthropicModelResponseIterator( + streaming_response=None, + sync_stream=False, + ) + all_openai_chunks = [] + for _chunk_str in all_chunks: + try: + transformed_openai_chunk = anthropic_model_response_iterator.convert_str_chunk_to_generic_chunk( + chunk=_chunk_str + ) + if transformed_openai_chunk is not None: + all_openai_chunks.append(transformed_openai_chunk) + + verbose_proxy_logger.debug( + "all openai chunks= %s", + json.dumps(all_openai_chunks, indent=4, default=str), + ) + except (StopIteration, StopAsyncIteration): + break + complete_streaming_response = litellm.stream_chunk_builder( + chunks=all_openai_chunks + ) + return complete_streaming_response diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py new file mode 100644 index 00000000..7cf3013d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py @@ -0,0 +1,326 @@ +import asyncio +import json +import time +from datetime import datetime +from typing import Literal, Optional, TypedDict +from urllib.parse import urlparse + +import httpx + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.litellm_core_utils.litellm_logging import ( + get_standard_logging_object_payload, +) +from litellm.litellm_core_utils.thread_pool_executor import executor +from litellm.proxy.pass_through_endpoints.types import PassthroughStandardLoggingPayload + + +class AssemblyAITranscriptResponse(TypedDict, total=False): + id: str + speech_model: str + acoustic_model: str + language_code: str + status: str + audio_duration: float + + +class AssemblyAIPassthroughLoggingHandler: + def __init__(self): + self.assembly_ai_base_url = "https://api.assemblyai.com" + self.assembly_ai_eu_base_url = "https://eu.assemblyai.com" + """ + The base URL for the AssemblyAI API + """ + + self.polling_interval: float = 10 + """ + The polling interval for the AssemblyAI API. + litellm needs to poll the GET /transcript/{transcript_id} endpoint to get the status of the transcript. + """ + + self.max_polling_attempts = 180 + """ + The maximum number of polling attempts for the AssemblyAI API. + """ + + def assemblyai_passthrough_logging_handler( + self, + httpx_response: httpx.Response, + response_body: dict, + logging_obj: LiteLLMLoggingObj, + url_route: str, + result: str, + start_time: datetime, + end_time: datetime, + cache_hit: bool, + **kwargs, + ): + """ + Since cost tracking requires polling the AssemblyAI API, we need to handle this in a separate thread. Hence the executor.submit. + """ + executor.submit( + self._handle_assemblyai_passthrough_logging, + httpx_response, + response_body, + logging_obj, + url_route, + result, + start_time, + end_time, + cache_hit, + **kwargs, + ) + + def _handle_assemblyai_passthrough_logging( + self, + httpx_response: httpx.Response, + response_body: dict, + logging_obj: LiteLLMLoggingObj, + url_route: str, + result: str, + start_time: datetime, + end_time: datetime, + cache_hit: bool, + **kwargs, + ): + """ + Handles logging for AssemblyAI successful passthrough requests + """ + from ..pass_through_endpoints import pass_through_endpoint_logging + + model = response_body.get("speech_model", "") + verbose_proxy_logger.debug( + "response body %s", json.dumps(response_body, indent=4) + ) + kwargs["model"] = model + kwargs["custom_llm_provider"] = "assemblyai" + response_cost: Optional[float] = None + + transcript_id = response_body.get("id") + if transcript_id is None: + raise ValueError( + "Transcript ID is required to log the cost of the transcription" + ) + transcript_response = self._poll_assembly_for_transcript_response( + transcript_id=transcript_id, url_route=url_route + ) + verbose_proxy_logger.debug( + "finished polling assembly for transcript response- got transcript response %s", + json.dumps(transcript_response, indent=4), + ) + if transcript_response: + cost = self.get_cost_for_assembly_transcript( + speech_model=model, + transcript_response=transcript_response, + ) + response_cost = cost + + # Make standard logging object for Vertex AI + standard_logging_object = get_standard_logging_object_payload( + kwargs=kwargs, + init_response_obj=transcript_response, + start_time=start_time, + end_time=end_time, + logging_obj=logging_obj, + status="success", + ) + + passthrough_logging_payload: Optional[PassthroughStandardLoggingPayload] = ( # type: ignore + kwargs.get("passthrough_logging_payload") + ) + + verbose_proxy_logger.debug( + "standard_passthrough_logging_object %s", + json.dumps(passthrough_logging_payload, indent=4), + ) + + # pretty print standard logging object + verbose_proxy_logger.debug( + "standard_logging_object= %s", json.dumps(standard_logging_object, indent=4) + ) + logging_obj.model_call_details["model"] = model + logging_obj.model_call_details["custom_llm_provider"] = "assemblyai" + logging_obj.model_call_details["response_cost"] = response_cost + + asyncio.run( + pass_through_endpoint_logging._handle_logging( + logging_obj=logging_obj, + standard_logging_response_object=self._get_response_to_log( + transcript_response + ), + result=result, + start_time=start_time, + end_time=end_time, + cache_hit=cache_hit, + **kwargs, + ) + ) + + pass + + def _get_response_to_log( + self, transcript_response: Optional[AssemblyAITranscriptResponse] + ) -> dict: + if transcript_response is None: + return {} + return dict(transcript_response) + + def _get_assembly_transcript( + self, + transcript_id: str, + request_region: Optional[Literal["eu"]] = None, + ) -> Optional[dict]: + """ + Get the transcript details from AssemblyAI API + + Args: + response_body (dict): Response containing the transcript ID + + Returns: + Optional[dict]: Transcript details if successful, None otherwise + """ + from litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints import ( + passthrough_endpoint_router, + ) + + _base_url = ( + self.assembly_ai_eu_base_url + if request_region == "eu" + else self.assembly_ai_base_url + ) + _api_key = passthrough_endpoint_router.get_credentials( + custom_llm_provider="assemblyai", + region_name=request_region, + ) + if _api_key is None: + raise ValueError("AssemblyAI API key not found") + try: + url = f"{_base_url}/v2/transcript/{transcript_id}" + headers = { + "Authorization": f"Bearer {_api_key}", + "Content-Type": "application/json", + } + + response = httpx.get(url, headers=headers) + response.raise_for_status() + + return response.json() + except Exception as e: + verbose_proxy_logger.exception( + f"[Non blocking logging error] Error getting AssemblyAI transcript: {str(e)}" + ) + return None + + def _poll_assembly_for_transcript_response( + self, + transcript_id: str, + url_route: Optional[str] = None, + ) -> Optional[AssemblyAITranscriptResponse]: + """ + Poll the status of the transcript until it is completed or timeout (30 minutes) + """ + for _ in range( + self.max_polling_attempts + ): # 180 attempts * 10s = 30 minutes max + transcript = self._get_assembly_transcript( + request_region=AssemblyAIPassthroughLoggingHandler._get_assembly_region_from_url( + url=url_route + ), + transcript_id=transcript_id, + ) + if transcript is None: + return None + if ( + transcript.get("status") == "completed" + or transcript.get("status") == "error" + ): + return AssemblyAITranscriptResponse(**transcript) + time.sleep(self.polling_interval) + return None + + @staticmethod + def get_cost_for_assembly_transcript( + transcript_response: AssemblyAITranscriptResponse, + speech_model: str, + ) -> Optional[float]: + """ + Get the cost for the assembly transcript + """ + _audio_duration = transcript_response.get("audio_duration") + if _audio_duration is None: + return None + _cost_per_second = ( + AssemblyAIPassthroughLoggingHandler.get_cost_per_second_for_assembly_model( + speech_model=speech_model + ) + ) + if _cost_per_second is None: + return None + return _audio_duration * _cost_per_second + + @staticmethod + def get_cost_per_second_for_assembly_model(speech_model: str) -> Optional[float]: + """ + Get the cost per second for the assembly model. + Falls back to assemblyai/nano if the specific speech model info cannot be found. + """ + try: + # First try with the provided speech model + try: + model_info = litellm.get_model_info( + model=speech_model, + custom_llm_provider="assemblyai", + ) + if model_info and model_info.get("input_cost_per_second") is not None: + return model_info.get("input_cost_per_second") + except Exception: + pass # Continue to fallback if model not found + + # Fallback to assemblyai/nano if speech model info not found + try: + model_info = litellm.get_model_info( + model="assemblyai/nano", + custom_llm_provider="assemblyai", + ) + if model_info and model_info.get("input_cost_per_second") is not None: + return model_info.get("input_cost_per_second") + except Exception: + pass + + return None + except Exception as e: + verbose_proxy_logger.exception( + f"[Non blocking logging error] Error getting AssemblyAI model info: {str(e)}" + ) + return None + + @staticmethod + def _should_log_request(request_method: str) -> bool: + """ + only POST transcription jobs are logged. litellm will POLL assembly to wait for the transcription to complete to log the complete response / cost + """ + return request_method == "POST" + + @staticmethod + def _get_assembly_region_from_url(url: Optional[str]) -> Optional[Literal["eu"]]: + """ + Get the region from the URL + """ + if url is None: + return None + if urlparse(url).hostname == "eu.assemblyai.com": + return "eu" + return None + + @staticmethod + def _get_assembly_base_url_from_region(region: Optional[Literal["eu"]]) -> str: + """ + Get the base URL for the AssemblyAI API + if region == "eu", return "https://api.eu.assemblyai.com" + else return "https://api.assemblyai.com" + """ + if region == "eu": + return "https://api.eu.assemblyai.com" + return "https://api.assemblyai.com" diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py new file mode 100644 index 00000000..94435637 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py @@ -0,0 +1,258 @@ +import json +import re +from datetime import datetime +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union +from urllib.parse import urlparse +import httpx + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import ( + ModelResponseIterator as VertexModelResponseIterator, +) +from litellm.proxy._types import PassThroughEndpointLoggingTypedDict +from litellm.types.utils import ( + EmbeddingResponse, + ImageResponse, + ModelResponse, + TextCompletionResponse, +) + +if TYPE_CHECKING: + from ..success_handler import PassThroughEndpointLogging + from ..types import EndpointType +else: + PassThroughEndpointLogging = Any + EndpointType = Any + + +class VertexPassthroughLoggingHandler: + @staticmethod + def vertex_passthrough_handler( + httpx_response: httpx.Response, + logging_obj: LiteLLMLoggingObj, + url_route: str, + result: str, + start_time: datetime, + end_time: datetime, + cache_hit: bool, + **kwargs, + ) -> PassThroughEndpointLoggingTypedDict: + if "generateContent" in url_route: + model = VertexPassthroughLoggingHandler.extract_model_from_url(url_route) + + instance_of_vertex_llm = litellm.VertexGeminiConfig() + litellm_model_response: ModelResponse = ( + instance_of_vertex_llm.transform_response( + model=model, + messages=[ + {"role": "user", "content": "no-message-pass-through-endpoint"} + ], + raw_response=httpx_response, + model_response=litellm.ModelResponse(), + logging_obj=logging_obj, + optional_params={}, + litellm_params={}, + api_key="", + request_data={}, + encoding=litellm.encoding, + ) + ) + kwargs = VertexPassthroughLoggingHandler._create_vertex_response_logging_payload_for_generate_content( + litellm_model_response=litellm_model_response, + model=model, + kwargs=kwargs, + start_time=start_time, + end_time=end_time, + logging_obj=logging_obj, + custom_llm_provider=VertexPassthroughLoggingHandler._get_custom_llm_provider_from_url( + url_route + ), + ) + + return { + "result": litellm_model_response, + "kwargs": kwargs, + } + + elif "predict" in url_route: + from litellm.llms.vertex_ai.image_generation.image_generation_handler import ( + VertexImageGeneration, + ) + from litellm.types.utils import PassthroughCallTypes + + vertex_image_generation_class = VertexImageGeneration() + + model = VertexPassthroughLoggingHandler.extract_model_from_url(url_route) + _json_response = httpx_response.json() + + litellm_prediction_response: Union[ + ModelResponse, EmbeddingResponse, ImageResponse + ] = ModelResponse() + if vertex_image_generation_class.is_image_generation_response( + _json_response + ): + litellm_prediction_response = ( + vertex_image_generation_class.process_image_generation_response( + _json_response, + model_response=litellm.ImageResponse(), + model=model, + ) + ) + + logging_obj.call_type = ( + PassthroughCallTypes.passthrough_image_generation.value + ) + else: + litellm_prediction_response = litellm.vertexAITextEmbeddingConfig.transform_vertex_response_to_openai( + response=_json_response, + model=model, + model_response=litellm.EmbeddingResponse(), + ) + if isinstance(litellm_prediction_response, litellm.EmbeddingResponse): + litellm_prediction_response.model = model + + logging_obj.model = model + logging_obj.model_call_details["model"] = logging_obj.model + + return { + "result": litellm_prediction_response, + "kwargs": kwargs, + } + else: + return { + "result": None, + "kwargs": kwargs, + } + + @staticmethod + def _handle_logging_vertex_collected_chunks( + litellm_logging_obj: LiteLLMLoggingObj, + passthrough_success_handler_obj: PassThroughEndpointLogging, + url_route: str, + request_body: dict, + endpoint_type: EndpointType, + start_time: datetime, + all_chunks: List[str], + end_time: datetime, + ) -> PassThroughEndpointLoggingTypedDict: + """ + Takes raw chunks from Vertex passthrough endpoint and logs them in litellm callbacks + + - Builds complete response from chunks + - Creates standard logging object + - Logs in litellm callbacks + """ + kwargs: Dict[str, Any] = {} + model = VertexPassthroughLoggingHandler.extract_model_from_url(url_route) + complete_streaming_response = ( + VertexPassthroughLoggingHandler._build_complete_streaming_response( + all_chunks=all_chunks, + litellm_logging_obj=litellm_logging_obj, + model=model, + ) + ) + + if complete_streaming_response is None: + verbose_proxy_logger.error( + "Unable to build complete streaming response for Vertex passthrough endpoint, not logging..." + ) + return { + "result": None, + "kwargs": kwargs, + } + + kwargs = VertexPassthroughLoggingHandler._create_vertex_response_logging_payload_for_generate_content( + litellm_model_response=complete_streaming_response, + model=model, + kwargs=kwargs, + start_time=start_time, + end_time=end_time, + logging_obj=litellm_logging_obj, + custom_llm_provider=VertexPassthroughLoggingHandler._get_custom_llm_provider_from_url( + url_route + ), + ) + + return { + "result": complete_streaming_response, + "kwargs": kwargs, + } + + @staticmethod + def _build_complete_streaming_response( + all_chunks: List[str], + litellm_logging_obj: LiteLLMLoggingObj, + model: str, + ) -> Optional[Union[ModelResponse, TextCompletionResponse]]: + vertex_iterator = VertexModelResponseIterator( + streaming_response=None, + sync_stream=False, + ) + litellm_custom_stream_wrapper = litellm.CustomStreamWrapper( + completion_stream=vertex_iterator, + model=model, + logging_obj=litellm_logging_obj, + custom_llm_provider="vertex_ai", + ) + all_openai_chunks = [] + for chunk in all_chunks: + generic_chunk = vertex_iterator._common_chunk_parsing_logic(chunk) + litellm_chunk = litellm_custom_stream_wrapper.chunk_creator( + chunk=generic_chunk + ) + if litellm_chunk is not None: + all_openai_chunks.append(litellm_chunk) + + complete_streaming_response = litellm.stream_chunk_builder( + chunks=all_openai_chunks + ) + + return complete_streaming_response + + @staticmethod + def extract_model_from_url(url: str) -> str: + pattern = r"/models/([^:]+)" + match = re.search(pattern, url) + if match: + return match.group(1) + return "unknown" + + @staticmethod + def _get_custom_llm_provider_from_url(url: str) -> str: + parsed_url = urlparse(url) + if parsed_url.hostname and parsed_url.hostname.endswith("generativelanguage.googleapis.com"): + return litellm.LlmProviders.GEMINI.value + return litellm.LlmProviders.VERTEX_AI.value + + @staticmethod + def _create_vertex_response_logging_payload_for_generate_content( + litellm_model_response: Union[ModelResponse, TextCompletionResponse], + model: str, + kwargs: dict, + start_time: datetime, + end_time: datetime, + logging_obj: LiteLLMLoggingObj, + custom_llm_provider: str, + ): + """ + Create the standard logging object for Vertex passthrough generateContent (streaming and non-streaming) + + """ + response_cost = litellm.completion_cost( + completion_response=litellm_model_response, + model=model, + ) + kwargs["response_cost"] = response_cost + kwargs["model"] = model + + # pretty print standard logging object + verbose_proxy_logger.debug("kwargs= %s", json.dumps(kwargs, indent=4)) + + # set litellm_call_id to logging response object + litellm_model_response.id = logging_obj.litellm_call_id + logging_obj.model = litellm_model_response.model or model + logging_obj.model_call_details["model"] = logging_obj.model + logging_obj.model_call_details["custom_llm_provider"] = custom_llm_provider + return kwargs diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py new file mode 100644 index 00000000..a13b0dc2 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py @@ -0,0 +1,1001 @@ +import ast +import asyncio +import json +import uuid +from base64 import b64encode +from datetime import datetime +from typing import Dict, List, Optional, Union +from urllib.parse import parse_qs, urlencode, urlparse + +import httpx +from fastapi import APIRouter, Depends, HTTPException, Request, Response, status +from fastapi.responses import StreamingResponse + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.integrations.custom_logger import CustomLogger +from litellm.llms.custom_httpx.http_handler import get_async_httpx_client +from litellm.proxy._types import ( + ConfigFieldInfo, + ConfigFieldUpdate, + PassThroughEndpointResponse, + PassThroughGenericEndpoint, + ProxyException, + UserAPIKeyAuth, +) +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing +from litellm.proxy.common_utils.http_parsing_utils import _read_request_body +from litellm.secret_managers.main import get_secret_str +from litellm.types.llms.custom_http import httpxSpecialProvider +from litellm.types.utils import StandardLoggingUserAPIKeyMetadata + +from .streaming_handler import PassThroughStreamingHandler +from .success_handler import PassThroughEndpointLogging +from .types import EndpointType, PassthroughStandardLoggingPayload + +router = APIRouter() + +pass_through_endpoint_logging = PassThroughEndpointLogging() + + +def get_response_body(response: httpx.Response) -> Optional[dict]: + try: + return response.json() + except Exception: + return None + + +async def set_env_variables_in_header(custom_headers: Optional[dict]) -> Optional[dict]: + """ + checks if any headers on config.yaml are defined as os.environ/COHERE_API_KEY etc + + only runs for headers defined on config.yaml + + example header can be + + {"Authorization": "bearer os.environ/COHERE_API_KEY"} + """ + if custom_headers is None: + return None + headers = {} + for key, value in custom_headers.items(): + # langfuse Api requires base64 encoded headers - it's simpleer to just ask litellm users to set their langfuse public and secret keys + # we can then get the b64 encoded keys here + if key == "LANGFUSE_PUBLIC_KEY" or key == "LANGFUSE_SECRET_KEY": + # langfuse requires b64 encoded headers - we construct that here + _langfuse_public_key = custom_headers["LANGFUSE_PUBLIC_KEY"] + _langfuse_secret_key = custom_headers["LANGFUSE_SECRET_KEY"] + if isinstance( + _langfuse_public_key, str + ) and _langfuse_public_key.startswith("os.environ/"): + _langfuse_public_key = get_secret_str(_langfuse_public_key) + if isinstance( + _langfuse_secret_key, str + ) and _langfuse_secret_key.startswith("os.environ/"): + _langfuse_secret_key = get_secret_str(_langfuse_secret_key) + headers["Authorization"] = "Basic " + b64encode( + f"{_langfuse_public_key}:{_langfuse_secret_key}".encode("utf-8") + ).decode("ascii") + else: + # for all other headers + headers[key] = value + if isinstance(value, str) and "os.environ/" in value: + verbose_proxy_logger.debug( + "pass through endpoint - looking up 'os.environ/' variable" + ) + # get string section that is os.environ/ + start_index = value.find("os.environ/") + _variable_name = value[start_index:] + + verbose_proxy_logger.debug( + "pass through endpoint - getting secret for variable name: %s", + _variable_name, + ) + _secret_value = get_secret_str(_variable_name) + if _secret_value is not None: + new_value = value.replace(_variable_name, _secret_value) + headers[key] = new_value + return headers + + +async def chat_completion_pass_through_endpoint( # noqa: PLR0915 + fastapi_response: Response, + request: Request, + adapter_id: str, + user_api_key_dict: UserAPIKeyAuth, +): + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + user_api_base, + user_max_tokens, + user_model, + user_request_timeout, + user_temperature, + version, + ) + + data = {} + try: + body = await request.body() + body_str = body.decode() + try: + data = ast.literal_eval(body_str) + except Exception: + data = json.loads(body_str) + + data["adapter_id"] = adapter_id + + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n{}".format(json.dumps(data, indent=4)), + ) + data["model"] = ( + general_settings.get("completion_model", None) # server default + or user_model # model name passed via cli args + or data.get("model", None) # default passed in http request + ) + if user_model: + data["model"] = user_model + + data = await add_litellm_data_to_request( + data=data, # type: ignore + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # override with user settings, these are params passed via cli + if user_temperature: + data["temperature"] = user_temperature + if user_request_timeout: + data["request_timeout"] = user_request_timeout + if user_max_tokens: + data["max_tokens"] = user_max_tokens + if user_api_base: + data["api_base"] = user_api_base + + ### MODEL ALIAS MAPPING ### + # check if model name in model alias map + # get the actual model name + if data["model"] in litellm.model_alias_map: + data["model"] = litellm.model_alias_map[data["model"]] + + ### CALL HOOKS ### - modify incoming data before calling the model + data = await proxy_logging_obj.pre_call_hook( # type: ignore + user_api_key_dict=user_api_key_dict, data=data, call_type="text_completion" + ) + + ### ROUTE THE REQUESTs ### + router_model_names = llm_router.model_names if llm_router is not None else [] + # skip router if user passed their key + if "api_key" in data: + llm_response = asyncio.create_task(litellm.aadapter_completion(**data)) + elif ( + llm_router is not None and data["model"] in router_model_names + ): # model in router model list + llm_response = asyncio.create_task(llm_router.aadapter_completion(**data)) + elif ( + llm_router is not None + and llm_router.model_group_alias is not None + and data["model"] in llm_router.model_group_alias + ): # model set in model_group_alias + llm_response = asyncio.create_task(llm_router.aadapter_completion(**data)) + elif ( + llm_router is not None and data["model"] in llm_router.deployment_names + ): # model in router deployments, calling a specific deployment on the router + llm_response = asyncio.create_task( + llm_router.aadapter_completion(**data, specific_deployment=True) + ) + elif ( + llm_router is not None and data["model"] in llm_router.get_model_ids() + ): # model in router model list + llm_response = asyncio.create_task(llm_router.aadapter_completion(**data)) + elif ( + llm_router is not None + and data["model"] not in router_model_names + and llm_router.default_deployment is not None + ): # model in router deployments, calling a specific deployment on the router + llm_response = asyncio.create_task(llm_router.aadapter_completion(**data)) + elif user_model is not None: # `litellm --model <your-model-name>` + llm_response = asyncio.create_task(litellm.aadapter_completion(**data)) + else: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={ + "error": "completion: Invalid model name passed in model=" + + data.get("model", "") + }, + ) + + # Await the llm_response task + response = await llm_response + + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + verbose_proxy_logger.debug("final response: %s", response) + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + ) + ) + + verbose_proxy_logger.info("\nResponse from Litellm:\n{}".format(response)) + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.completion(): Exception occured - {}".format( + str(e) + ) + ) + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +class HttpPassThroughEndpointHelpers: + @staticmethod + def forward_headers_from_request( + request: Request, + headers: dict, + forward_headers: Optional[bool] = False, + ): + """ + Helper to forward headers from original request + """ + if forward_headers is True: + request_headers = dict(request.headers) + + # Header We Should NOT forward + request_headers.pop("content-length", None) + request_headers.pop("host", None) + + # Combine request headers with custom headers + headers = {**request_headers, **headers} + return headers + + @staticmethod + def get_response_headers( + headers: httpx.Headers, + litellm_call_id: Optional[str] = None, + custom_headers: Optional[dict] = None, + ) -> dict: + excluded_headers = {"transfer-encoding", "content-encoding"} + + return_headers = { + key: value + for key, value in headers.items() + if key.lower() not in excluded_headers + } + if litellm_call_id: + return_headers["x-litellm-call-id"] = litellm_call_id + if custom_headers: + return_headers.update(custom_headers) + + return return_headers + + @staticmethod + def get_endpoint_type(url: str) -> EndpointType: + parsed_url = urlparse(url) + if ("generateContent") in url or ("streamGenerateContent") in url: + return EndpointType.VERTEX_AI + elif parsed_url.hostname == "api.anthropic.com": + return EndpointType.ANTHROPIC + return EndpointType.GENERIC + + @staticmethod + def get_merged_query_parameters( + existing_url: httpx.URL, request_query_params: Dict[str, Union[str, list]] + ) -> Dict[str, Union[str, List[str]]]: + # Get the existing query params from the target URL + existing_query_string = existing_url.query.decode("utf-8") + existing_query_params = parse_qs(existing_query_string) + + # parse_qs returns a dict where each value is a list, so let's flatten it + updated_existing_query_params = { + k: v[0] if len(v) == 1 else v for k, v in existing_query_params.items() + } + # Merge the query params, giving priority to the existing ones + return {**request_query_params, **updated_existing_query_params} + + @staticmethod + async def _make_non_streaming_http_request( + request: Request, + async_client: httpx.AsyncClient, + url: str, + headers: dict, + requested_query_params: Optional[dict] = None, + custom_body: Optional[dict] = None, + ) -> httpx.Response: + """ + Make a non-streaming HTTP request + + If request is GET, don't include a JSON body + """ + if request.method == "GET": + response = await async_client.request( + method=request.method, + url=url, + headers=headers, + params=requested_query_params, + ) + else: + response = await async_client.request( + method=request.method, + url=url, + headers=headers, + params=requested_query_params, + json=custom_body, + ) + return response + + +async def pass_through_request( # noqa: PLR0915 + request: Request, + target: str, + custom_headers: dict, + user_api_key_dict: UserAPIKeyAuth, + custom_body: Optional[dict] = None, + forward_headers: Optional[bool] = False, + merge_query_params: Optional[bool] = False, + query_params: Optional[dict] = None, + stream: Optional[bool] = None, +): + litellm_call_id = str(uuid.uuid4()) + url: Optional[httpx.URL] = None + try: + + from litellm.litellm_core_utils.litellm_logging import Logging + from litellm.proxy.proxy_server import proxy_logging_obj + + url = httpx.URL(target) + headers = custom_headers + headers = HttpPassThroughEndpointHelpers.forward_headers_from_request( + request=request, headers=headers, forward_headers=forward_headers + ) + + if merge_query_params: + + # Create a new URL with the merged query params + url = url.copy_with( + query=urlencode( + HttpPassThroughEndpointHelpers.get_merged_query_parameters( + existing_url=url, + request_query_params=dict(request.query_params), + ) + ).encode("ascii") + ) + + endpoint_type: EndpointType = HttpPassThroughEndpointHelpers.get_endpoint_type( + str(url) + ) + + _parsed_body = None + if custom_body: + _parsed_body = custom_body + else: + _parsed_body = await _read_request_body(request) + verbose_proxy_logger.debug( + "Pass through endpoint sending request to \nURL {}\nheaders: {}\nbody: {}\n".format( + url, headers, _parsed_body + ) + ) + + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + _parsed_body = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, + data=_parsed_body, + call_type="pass_through_endpoint", + ) + async_client_obj = get_async_httpx_client( + llm_provider=httpxSpecialProvider.PassThroughEndpoint, + params={"timeout": 600}, + ) + async_client = async_client_obj.client + + # create logging object + start_time = datetime.now() + logging_obj = Logging( + model="unknown", + messages=[{"role": "user", "content": json.dumps(_parsed_body)}], + stream=False, + call_type="pass_through_endpoint", + start_time=start_time, + litellm_call_id=litellm_call_id, + function_id="1245", + ) + passthrough_logging_payload = PassthroughStandardLoggingPayload( + url=str(url), + request_body=_parsed_body, + ) + kwargs = _init_kwargs_for_pass_through_endpoint( + user_api_key_dict=user_api_key_dict, + _parsed_body=_parsed_body, + passthrough_logging_payload=passthrough_logging_payload, + litellm_call_id=litellm_call_id, + request=request, + ) + # done for supporting 'parallel_request_limiter.py' with pass-through endpoints + logging_obj.update_environment_variables( + model="unknown", + user="unknown", + optional_params={}, + litellm_params=kwargs["litellm_params"], + call_type="pass_through_endpoint", + ) + logging_obj.model_call_details["litellm_call_id"] = litellm_call_id + + # combine url with query params for logging + + requested_query_params: Optional[dict] = ( + query_params or request.query_params.__dict__ + ) + if requested_query_params == request.query_params.__dict__: + requested_query_params = None + + requested_query_params_str = None + if requested_query_params: + requested_query_params_str = "&".join( + f"{k}={v}" for k, v in requested_query_params.items() + ) + + logging_url = str(url) + if requested_query_params_str: + if "?" in str(url): + logging_url = str(url) + "&" + requested_query_params_str + else: + logging_url = str(url) + "?" + requested_query_params_str + + logging_obj.pre_call( + input=[{"role": "user", "content": json.dumps(_parsed_body)}], + api_key="", + additional_args={ + "complete_input_dict": _parsed_body, + "api_base": str(logging_url), + "headers": headers, + }, + ) + if stream: + req = async_client.build_request( + "POST", + url, + json=_parsed_body, + params=requested_query_params, + headers=headers, + ) + + response = await async_client.send(req, stream=stream) + + try: + response.raise_for_status() + except httpx.HTTPStatusError as e: + raise HTTPException( + status_code=e.response.status_code, detail=await e.response.aread() + ) + + return StreamingResponse( + PassThroughStreamingHandler.chunk_processor( + response=response, + request_body=_parsed_body, + litellm_logging_obj=logging_obj, + endpoint_type=endpoint_type, + start_time=start_time, + passthrough_success_handler_obj=pass_through_endpoint_logging, + url_route=str(url), + ), + headers=HttpPassThroughEndpointHelpers.get_response_headers( + headers=response.headers, + litellm_call_id=litellm_call_id, + ), + status_code=response.status_code, + ) + + verbose_proxy_logger.debug("request method: {}".format(request.method)) + verbose_proxy_logger.debug("request url: {}".format(url)) + verbose_proxy_logger.debug("request headers: {}".format(headers)) + verbose_proxy_logger.debug( + "requested_query_params={}".format(requested_query_params) + ) + verbose_proxy_logger.debug("request body: {}".format(_parsed_body)) + + if request.method == "GET": + response = await async_client.request( + method=request.method, + url=url, + headers=headers, + params=requested_query_params, + ) + else: + response = await async_client.request( + method=request.method, + url=url, + headers=headers, + params=requested_query_params, + json=_parsed_body, + ) + + verbose_proxy_logger.debug("response.headers= %s", response.headers) + + if _is_streaming_response(response) is True: + try: + response.raise_for_status() + except httpx.HTTPStatusError as e: + raise HTTPException( + status_code=e.response.status_code, detail=await e.response.aread() + ) + + return StreamingResponse( + PassThroughStreamingHandler.chunk_processor( + response=response, + request_body=_parsed_body, + litellm_logging_obj=logging_obj, + endpoint_type=endpoint_type, + start_time=start_time, + passthrough_success_handler_obj=pass_through_endpoint_logging, + url_route=str(url), + ), + headers=HttpPassThroughEndpointHelpers.get_response_headers( + headers=response.headers, + litellm_call_id=litellm_call_id, + ), + status_code=response.status_code, + ) + + try: + response.raise_for_status() + except httpx.HTTPStatusError as e: + raise HTTPException( + status_code=e.response.status_code, detail=e.response.text + ) + + if response.status_code >= 300: + raise HTTPException(status_code=response.status_code, detail=response.text) + + content = await response.aread() + + ## LOG SUCCESS + response_body: Optional[dict] = get_response_body(response) + passthrough_logging_payload["response_body"] = response_body + end_time = datetime.now() + asyncio.create_task( + pass_through_endpoint_logging.pass_through_async_success_handler( + httpx_response=response, + response_body=response_body, + url_route=str(url), + result="", + start_time=start_time, + end_time=end_time, + logging_obj=logging_obj, + cache_hit=False, + **kwargs, + ) + ) + + ## CUSTOM HEADERS - `x-litellm-*` + custom_headers = ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=litellm_call_id, + model_id=None, + cache_key=None, + api_base=str(url._uri_reference), + ) + + return Response( + content=content, + status_code=response.status_code, + headers=HttpPassThroughEndpointHelpers.get_response_headers( + headers=response.headers, + custom_headers=custom_headers, + ), + ) + except Exception as e: + custom_headers = ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=litellm_call_id, + model_id=None, + cache_key=None, + api_base=str(url._uri_reference) if url else None, + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.pass_through_endpoint(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + headers=custom_headers, + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + headers=custom_headers, + ) + + +def _init_kwargs_for_pass_through_endpoint( + request: Request, + user_api_key_dict: UserAPIKeyAuth, + passthrough_logging_payload: PassthroughStandardLoggingPayload, + _parsed_body: Optional[dict] = None, + litellm_call_id: Optional[str] = None, +) -> dict: + _parsed_body = _parsed_body or {} + _litellm_metadata: Optional[dict] = _parsed_body.pop("litellm_metadata", None) + _metadata = dict( + StandardLoggingUserAPIKeyMetadata( + user_api_key_hash=user_api_key_dict.api_key, + user_api_key_alias=user_api_key_dict.key_alias, + user_api_key_user_email=user_api_key_dict.user_email, + user_api_key_user_id=user_api_key_dict.user_id, + user_api_key_team_id=user_api_key_dict.team_id, + user_api_key_org_id=user_api_key_dict.org_id, + user_api_key_team_alias=user_api_key_dict.team_alias, + user_api_key_end_user_id=user_api_key_dict.end_user_id, + ) + ) + _metadata["user_api_key"] = user_api_key_dict.api_key + if _litellm_metadata: + _metadata.update(_litellm_metadata) + + _metadata = _update_metadata_with_tags_in_header( + request=request, + metadata=_metadata, + ) + + kwargs = { + "litellm_params": { + "metadata": _metadata, + }, + "call_type": "pass_through_endpoint", + "litellm_call_id": litellm_call_id, + "passthrough_logging_payload": passthrough_logging_payload, + } + return kwargs + + +def _update_metadata_with_tags_in_header(request: Request, metadata: dict) -> dict: + """ + If tags are in the request headers, add them to the metadata + + Used for google and vertex JS SDKs + """ + _tags = request.headers.get("tags") + if _tags: + metadata["tags"] = _tags.split(",") + return metadata + + +def create_pass_through_route( + endpoint, + target: str, + custom_headers: Optional[dict] = None, + _forward_headers: Optional[bool] = False, + _merge_query_params: Optional[bool] = False, + dependencies: Optional[List] = None, +): + # check if target is an adapter.py or a url + import uuid + + from litellm.proxy.types_utils.utils import get_instance_fn + + try: + if isinstance(target, CustomLogger): + adapter = target + else: + adapter = get_instance_fn(value=target) + adapter_id = str(uuid.uuid4()) + litellm.adapters = [{"id": adapter_id, "adapter": adapter}] + + async def endpoint_func( # type: ignore + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + ): + return await chat_completion_pass_through_endpoint( + fastapi_response=fastapi_response, + request=request, + adapter_id=adapter_id, + user_api_key_dict=user_api_key_dict, + ) + + except Exception: + verbose_proxy_logger.debug("Defaulting to target being a url.") + + async def endpoint_func( # type: ignore + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + query_params: Optional[dict] = None, + custom_body: Optional[dict] = None, + stream: Optional[ + bool + ] = None, # if pass-through endpoint is a streaming request + ): + return await pass_through_request( # type: ignore + request=request, + target=target, + custom_headers=custom_headers or {}, + user_api_key_dict=user_api_key_dict, + forward_headers=_forward_headers, + merge_query_params=_merge_query_params, + query_params=query_params, + stream=stream, + custom_body=custom_body, + ) + + return endpoint_func + + +def _is_streaming_response(response: httpx.Response) -> bool: + _content_type = response.headers.get("content-type") + if _content_type is not None and "text/event-stream" in _content_type: + return True + return False + + +async def initialize_pass_through_endpoints(pass_through_endpoints: list): + + verbose_proxy_logger.debug("initializing pass through endpoints") + from litellm.proxy._types import CommonProxyErrors, LiteLLMRoutes + from litellm.proxy.proxy_server import app, premium_user + + for endpoint in pass_through_endpoints: + _target = endpoint.get("target", None) + _path = endpoint.get("path", None) + _custom_headers = endpoint.get("headers", None) + _custom_headers = await set_env_variables_in_header( + custom_headers=_custom_headers + ) + _forward_headers = endpoint.get("forward_headers", None) + _merge_query_params = endpoint.get("merge_query_params", None) + _auth = endpoint.get("auth", None) + _dependencies = None + if _auth is not None and str(_auth).lower() == "true": + if premium_user is not True: + raise ValueError( + "Error Setting Authentication on Pass Through Endpoint: {}".format( + CommonProxyErrors.not_premium_user.value + ) + ) + _dependencies = [Depends(user_api_key_auth)] + LiteLLMRoutes.openai_routes.value.append(_path) + + if _target is None: + continue + + verbose_proxy_logger.debug( + "adding pass through endpoint: %s, dependencies: %s", _path, _dependencies + ) + app.add_api_route( # type: ignore + path=_path, + endpoint=create_pass_through_route( # type: ignore + _path, + _target, + _custom_headers, + _forward_headers, + _merge_query_params, + _dependencies, + ), + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + dependencies=_dependencies, + ) + + verbose_proxy_logger.debug("Added new pass through endpoint: %s", _path) + + +@router.get( + "/config/pass_through_endpoint", + dependencies=[Depends(user_api_key_auth)], + response_model=PassThroughEndpointResponse, +) +async def get_pass_through_endpoints( + endpoint_id: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + GET configured pass through endpoint. + + If no endpoint_id given, return all configured endpoints. + """ + from litellm.proxy.proxy_server import get_config_general_settings + + ## Get existing pass-through endpoint field value + try: + response: ConfigFieldInfo = await get_config_general_settings( + field_name="pass_through_endpoints", user_api_key_dict=user_api_key_dict + ) + except Exception: + return PassThroughEndpointResponse(endpoints=[]) + + pass_through_endpoint_data: Optional[List] = response.field_value + if pass_through_endpoint_data is None: + return PassThroughEndpointResponse(endpoints=[]) + + returned_endpoints = [] + if endpoint_id is None: + for endpoint in pass_through_endpoint_data: + if isinstance(endpoint, dict): + returned_endpoints.append(PassThroughGenericEndpoint(**endpoint)) + elif isinstance(endpoint, PassThroughGenericEndpoint): + returned_endpoints.append(endpoint) + elif endpoint_id is not None: + for endpoint in pass_through_endpoint_data: + _endpoint: Optional[PassThroughGenericEndpoint] = None + if isinstance(endpoint, dict): + _endpoint = PassThroughGenericEndpoint(**endpoint) + elif isinstance(endpoint, PassThroughGenericEndpoint): + _endpoint = endpoint + + if _endpoint is not None and _endpoint.path == endpoint_id: + returned_endpoints.append(_endpoint) + + return PassThroughEndpointResponse(endpoints=returned_endpoints) + + +@router.post( + "/config/pass_through_endpoint/{endpoint_id}", + dependencies=[Depends(user_api_key_auth)], +) +async def update_pass_through_endpoints(request: Request, endpoint_id: str): + """ + Update a pass-through endpoint + """ + pass + + +@router.post( + "/config/pass_through_endpoint", + dependencies=[Depends(user_api_key_auth)], +) +async def create_pass_through_endpoints( + data: PassThroughGenericEndpoint, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create new pass-through endpoint + """ + from litellm.proxy.proxy_server import ( + get_config_general_settings, + update_config_general_settings, + ) + + ## Get existing pass-through endpoint field value + + try: + response: ConfigFieldInfo = await get_config_general_settings( + field_name="pass_through_endpoints", user_api_key_dict=user_api_key_dict + ) + except Exception: + response = ConfigFieldInfo( + field_name="pass_through_endpoints", field_value=None + ) + + ## Update field with new endpoint + data_dict = data.model_dump() + if response.field_value is None: + response.field_value = [data_dict] + elif isinstance(response.field_value, List): + response.field_value.append(data_dict) + + ## Update db + updated_data = ConfigFieldUpdate( + field_name="pass_through_endpoints", + field_value=response.field_value, + config_type="general_settings", + ) + await update_config_general_settings( + data=updated_data, user_api_key_dict=user_api_key_dict + ) + + +@router.delete( + "/config/pass_through_endpoint", + dependencies=[Depends(user_api_key_auth)], + response_model=PassThroughEndpointResponse, +) +async def delete_pass_through_endpoints( + endpoint_id: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete a pass-through endpoint + + Returns - the deleted endpoint + """ + from litellm.proxy.proxy_server import ( + get_config_general_settings, + update_config_general_settings, + ) + + ## Get existing pass-through endpoint field value + + try: + response: ConfigFieldInfo = await get_config_general_settings( + field_name="pass_through_endpoints", user_api_key_dict=user_api_key_dict + ) + except Exception: + response = ConfigFieldInfo( + field_name="pass_through_endpoints", field_value=None + ) + + ## Update field by removing endpoint + pass_through_endpoint_data: Optional[List] = response.field_value + response_obj: Optional[PassThroughGenericEndpoint] = None + if response.field_value is None or pass_through_endpoint_data is None: + raise HTTPException( + status_code=400, + detail={"error": "There are no pass-through endpoints setup."}, + ) + elif isinstance(response.field_value, List): + invalid_idx: Optional[int] = None + for idx, endpoint in enumerate(pass_through_endpoint_data): + _endpoint: Optional[PassThroughGenericEndpoint] = None + if isinstance(endpoint, dict): + _endpoint = PassThroughGenericEndpoint(**endpoint) + elif isinstance(endpoint, PassThroughGenericEndpoint): + _endpoint = endpoint + + if _endpoint is not None and _endpoint.path == endpoint_id: + invalid_idx = idx + response_obj = _endpoint + + if invalid_idx is not None: + pass_through_endpoint_data.pop(invalid_idx) + + ## Update db + updated_data = ConfigFieldUpdate( + field_name="pass_through_endpoints", + field_value=pass_through_endpoint_data, + config_type="general_settings", + ) + await update_config_general_settings( + data=updated_data, user_api_key_dict=user_api_key_dict + ) + + if response_obj is None: + raise HTTPException( + status_code=400, + detail={ + "error": "Endpoint={} was not found in pass-through endpoint list.".format( + endpoint_id + ) + }, + ) + return PassThroughEndpointResponse(endpoints=[response_obj]) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py new file mode 100644 index 00000000..adf7d0f3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py @@ -0,0 +1,93 @@ +from typing import Dict, Optional + +from litellm._logging import verbose_logger +from litellm.secret_managers.main import get_secret_str + + +class PassthroughEndpointRouter: + """ + Use this class to Set/Get credentials for pass-through endpoints + """ + + def __init__(self): + self.credentials: Dict[str, str] = {} + + def set_pass_through_credentials( + self, + custom_llm_provider: str, + api_base: Optional[str], + api_key: Optional[str], + ): + """ + Set credentials for a pass-through endpoint. Used when a user adds a pass-through LLM endpoint on the UI. + + Args: + custom_llm_provider: The provider of the pass-through endpoint + api_base: The base URL of the pass-through endpoint + api_key: The API key for the pass-through endpoint + """ + credential_name = self._get_credential_name_for_provider( + custom_llm_provider=custom_llm_provider, + region_name=self._get_region_name_from_api_base( + api_base=api_base, custom_llm_provider=custom_llm_provider + ), + ) + if api_key is None: + raise ValueError("api_key is required for setting pass-through credentials") + self.credentials[credential_name] = api_key + + def get_credentials( + self, + custom_llm_provider: str, + region_name: Optional[str], + ) -> Optional[str]: + credential_name = self._get_credential_name_for_provider( + custom_llm_provider=custom_llm_provider, + region_name=region_name, + ) + verbose_logger.debug( + f"Pass-through llm endpoints router, looking for credentials for {credential_name}" + ) + if credential_name in self.credentials: + verbose_logger.debug(f"Found credentials for {credential_name}") + return self.credentials[credential_name] + else: + verbose_logger.debug( + f"No credentials found for {credential_name}, looking for env variable" + ) + _env_variable_name = ( + self._get_default_env_variable_name_passthrough_endpoint( + custom_llm_provider=custom_llm_provider, + ) + ) + return get_secret_str(_env_variable_name) + + def _get_credential_name_for_provider( + self, + custom_llm_provider: str, + region_name: Optional[str], + ) -> str: + if region_name is None: + return f"{custom_llm_provider.upper()}_API_KEY" + return f"{custom_llm_provider.upper()}_{region_name.upper()}_API_KEY" + + def _get_region_name_from_api_base( + self, + custom_llm_provider: str, + api_base: Optional[str], + ) -> Optional[str]: + """ + Get the region name from the API base. + + Each provider might have a different way of specifying the region in the API base - this is where you can use conditional logic to handle that. + """ + if custom_llm_provider == "assemblyai": + if api_base and "eu" in api_base: + return "eu" + return None + + @staticmethod + def _get_default_env_variable_name_passthrough_endpoint( + custom_llm_provider: str, + ) -> str: + return f"{custom_llm_provider.upper()}_API_KEY" diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/streaming_handler.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/streaming_handler.py new file mode 100644 index 00000000..b022bf1d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/streaming_handler.py @@ -0,0 +1,160 @@ +import asyncio +import threading +from datetime import datetime +from typing import List, Optional + +import httpx + +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.proxy._types import PassThroughEndpointLoggingResultValues +from litellm.types.utils import StandardPassThroughResponseObject + +from .llm_provider_handlers.anthropic_passthrough_logging_handler import ( + AnthropicPassthroughLoggingHandler, +) +from .llm_provider_handlers.vertex_passthrough_logging_handler import ( + VertexPassthroughLoggingHandler, +) +from .success_handler import PassThroughEndpointLogging +from .types import EndpointType + + +class PassThroughStreamingHandler: + + @staticmethod + async def chunk_processor( + response: httpx.Response, + request_body: Optional[dict], + litellm_logging_obj: LiteLLMLoggingObj, + endpoint_type: EndpointType, + start_time: datetime, + passthrough_success_handler_obj: PassThroughEndpointLogging, + url_route: str, + ): + """ + - Yields chunks from the response + - Collect non-empty chunks for post-processing (logging) + """ + try: + raw_bytes: List[bytes] = [] + async for chunk in response.aiter_bytes(): + raw_bytes.append(chunk) + yield chunk + + # After all chunks are processed, handle post-processing + end_time = datetime.now() + + asyncio.create_task( + PassThroughStreamingHandler._route_streaming_logging_to_handler( + litellm_logging_obj=litellm_logging_obj, + passthrough_success_handler_obj=passthrough_success_handler_obj, + url_route=url_route, + request_body=request_body or {}, + endpoint_type=endpoint_type, + start_time=start_time, + raw_bytes=raw_bytes, + end_time=end_time, + ) + ) + except Exception as e: + verbose_proxy_logger.error(f"Error in chunk_processor: {str(e)}") + raise + + @staticmethod + async def _route_streaming_logging_to_handler( + litellm_logging_obj: LiteLLMLoggingObj, + passthrough_success_handler_obj: PassThroughEndpointLogging, + url_route: str, + request_body: dict, + endpoint_type: EndpointType, + start_time: datetime, + raw_bytes: List[bytes], + end_time: datetime, + ): + """ + Route the logging for the collected chunks to the appropriate handler + + Supported endpoint types: + - Anthropic + - Vertex AI + """ + all_chunks = PassThroughStreamingHandler._convert_raw_bytes_to_str_lines( + raw_bytes + ) + standard_logging_response_object: Optional[ + PassThroughEndpointLoggingResultValues + ] = None + kwargs: dict = {} + if endpoint_type == EndpointType.ANTHROPIC: + anthropic_passthrough_logging_handler_result = AnthropicPassthroughLoggingHandler._handle_logging_anthropic_collected_chunks( + litellm_logging_obj=litellm_logging_obj, + passthrough_success_handler_obj=passthrough_success_handler_obj, + url_route=url_route, + request_body=request_body, + endpoint_type=endpoint_type, + start_time=start_time, + all_chunks=all_chunks, + end_time=end_time, + ) + standard_logging_response_object = ( + anthropic_passthrough_logging_handler_result["result"] + ) + kwargs = anthropic_passthrough_logging_handler_result["kwargs"] + elif endpoint_type == EndpointType.VERTEX_AI: + vertex_passthrough_logging_handler_result = ( + VertexPassthroughLoggingHandler._handle_logging_vertex_collected_chunks( + litellm_logging_obj=litellm_logging_obj, + passthrough_success_handler_obj=passthrough_success_handler_obj, + url_route=url_route, + request_body=request_body, + endpoint_type=endpoint_type, + start_time=start_time, + all_chunks=all_chunks, + end_time=end_time, + ) + ) + standard_logging_response_object = ( + vertex_passthrough_logging_handler_result["result"] + ) + kwargs = vertex_passthrough_logging_handler_result["kwargs"] + + if standard_logging_response_object is None: + standard_logging_response_object = StandardPassThroughResponseObject( + response=f"cannot parse chunks to standard response object. Chunks={all_chunks}" + ) + threading.Thread( + target=litellm_logging_obj.success_handler, + args=( + standard_logging_response_object, + start_time, + end_time, + False, + ), + ).start() + await litellm_logging_obj.async_success_handler( + result=standard_logging_response_object, + start_time=start_time, + end_time=end_time, + cache_hit=False, + **kwargs, + ) + + @staticmethod + def _convert_raw_bytes_to_str_lines(raw_bytes: List[bytes]) -> List[str]: + """ + Converts a list of raw bytes into a list of string lines, similar to aiter_lines() + + Args: + raw_bytes: List of bytes chunks from aiter.bytes() + + Returns: + List of string lines, with each line being a complete data: {} chunk + """ + # Combine all bytes and decode to string + combined_str = b"".join(raw_bytes).decode("utf-8") + + # Split by newlines and filter out empty lines + lines = [line.strip() for line in combined_str.split("\n") if line.strip()] + + return lines diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/success_handler.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/success_handler.py new file mode 100644 index 00000000..02e81566 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/success_handler.py @@ -0,0 +1,182 @@ +import json +from datetime import datetime +from typing import Optional, Union +from urllib.parse import urlparse + +import httpx + +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.proxy._types import PassThroughEndpointLoggingResultValues +from litellm.types.utils import StandardPassThroughResponseObject +from litellm.utils import executor as thread_pool_executor + +from .llm_provider_handlers.anthropic_passthrough_logging_handler import ( + AnthropicPassthroughLoggingHandler, +) +from .llm_provider_handlers.assembly_passthrough_logging_handler import ( + AssemblyAIPassthroughLoggingHandler, +) +from .llm_provider_handlers.vertex_passthrough_logging_handler import ( + VertexPassthroughLoggingHandler, +) + + +class PassThroughEndpointLogging: + def __init__(self): + self.TRACKED_VERTEX_ROUTES = [ + "generateContent", + "streamGenerateContent", + "predict", + ] + + # Anthropic + self.TRACKED_ANTHROPIC_ROUTES = ["/messages"] + + self.assemblyai_passthrough_logging_handler = ( + AssemblyAIPassthroughLoggingHandler() + ) + + async def _handle_logging( + self, + logging_obj: LiteLLMLoggingObj, + standard_logging_response_object: Union[ + StandardPassThroughResponseObject, + PassThroughEndpointLoggingResultValues, + dict, + ], + result: str, + start_time: datetime, + end_time: datetime, + cache_hit: bool, + **kwargs, + ): + """Helper function to handle both sync and async logging operations""" + # Submit to thread pool for sync logging + thread_pool_executor.submit( + logging_obj.success_handler, + standard_logging_response_object, + start_time, + end_time, + cache_hit, + **kwargs, + ) + + # Handle async logging + await logging_obj.async_success_handler( + result=( + json.dumps(result) + if isinstance(result, dict) + else standard_logging_response_object + ), + start_time=start_time, + end_time=end_time, + cache_hit=False, + **kwargs, + ) + + async def pass_through_async_success_handler( + self, + httpx_response: httpx.Response, + response_body: Optional[dict], + logging_obj: LiteLLMLoggingObj, + url_route: str, + result: str, + start_time: datetime, + end_time: datetime, + cache_hit: bool, + **kwargs, + ): + standard_logging_response_object: Optional[ + PassThroughEndpointLoggingResultValues + ] = None + if self.is_vertex_route(url_route): + vertex_passthrough_logging_handler_result = ( + VertexPassthroughLoggingHandler.vertex_passthrough_handler( + httpx_response=httpx_response, + logging_obj=logging_obj, + url_route=url_route, + result=result, + start_time=start_time, + end_time=end_time, + cache_hit=cache_hit, + **kwargs, + ) + ) + standard_logging_response_object = ( + vertex_passthrough_logging_handler_result["result"] + ) + kwargs = vertex_passthrough_logging_handler_result["kwargs"] + elif self.is_anthropic_route(url_route): + anthropic_passthrough_logging_handler_result = ( + AnthropicPassthroughLoggingHandler.anthropic_passthrough_handler( + httpx_response=httpx_response, + response_body=response_body or {}, + logging_obj=logging_obj, + url_route=url_route, + result=result, + start_time=start_time, + end_time=end_time, + cache_hit=cache_hit, + **kwargs, + ) + ) + + standard_logging_response_object = ( + anthropic_passthrough_logging_handler_result["result"] + ) + kwargs = anthropic_passthrough_logging_handler_result["kwargs"] + elif self.is_assemblyai_route(url_route): + if ( + AssemblyAIPassthroughLoggingHandler._should_log_request( + httpx_response.request.method + ) + is not True + ): + return + self.assemblyai_passthrough_logging_handler.assemblyai_passthrough_logging_handler( + httpx_response=httpx_response, + response_body=response_body or {}, + logging_obj=logging_obj, + url_route=url_route, + result=result, + start_time=start_time, + end_time=end_time, + cache_hit=cache_hit, + **kwargs, + ) + return + + if standard_logging_response_object is None: + standard_logging_response_object = StandardPassThroughResponseObject( + response=httpx_response.text + ) + + await self._handle_logging( + logging_obj=logging_obj, + standard_logging_response_object=standard_logging_response_object, + result=result, + start_time=start_time, + end_time=end_time, + cache_hit=cache_hit, + **kwargs, + ) + + def is_vertex_route(self, url_route: str): + for route in self.TRACKED_VERTEX_ROUTES: + if route in url_route: + return True + return False + + def is_anthropic_route(self, url_route: str): + for route in self.TRACKED_ANTHROPIC_ROUTES: + if route in url_route: + return True + return False + + def is_assemblyai_route(self, url_route: str): + parsed_url = urlparse(url_route) + if parsed_url.hostname == "api.assemblyai.com": + return True + elif "/transcript" in parsed_url.path: + return True + return False diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/types.py b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/types.py new file mode 100644 index 00000000..59047a63 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/pass_through_endpoints/types.py @@ -0,0 +1,18 @@ +from enum import Enum +from typing import Optional, TypedDict + + +class EndpointType(str, Enum): + VERTEX_AI = "vertex-ai" + ANTHROPIC = "anthropic" + GENERIC = "generic" + + +class PassthroughStandardLoggingPayload(TypedDict, total=False): + """ + Standard logging payload for all pass through endpoints + """ + + url: str + request_body: Optional[dict] + response_body: Optional[dict] # only tracked for non-streaming responses diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/post_call_rules.py b/.venv/lib/python3.12/site-packages/litellm/proxy/post_call_rules.py new file mode 100644 index 00000000..23ec93f5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/post_call_rules.py @@ -0,0 +1,8 @@ +def post_response_rule(input): # receives the model response + print(f"post_response_rule:input={input}") # noqa + if len(input) < 200: + return { + "decision": False, + "message": "This violates LiteLLM Proxy Rules. Response too short", + } + return {"decision": True} # message not required since, request will pass diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/prisma_migration.py b/.venv/lib/python3.12/site-packages/litellm/proxy/prisma_migration.py new file mode 100644 index 00000000..22fa4da9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/prisma_migration.py @@ -0,0 +1,92 @@ +# What is this? +## Script to apply initial prisma migration on Docker setup + +import os +import subprocess +import sys +import time + +sys.path.insert( + 0, os.path.abspath("./") +) # Adds the parent directory to the system path +from litellm.secret_managers.aws_secret_manager import decrypt_env_var +from litellm._logging import verbose_proxy_logger + +if os.getenv("USE_AWS_KMS", None) is not None and os.getenv("USE_AWS_KMS") == "True": + ## V2 IMPLEMENTATION OF AWS KMS - USER WANTS TO DECRYPT MULTIPLE KEYS IN THEIR ENV + new_env_var = decrypt_env_var() + + for k, v in new_env_var.items(): + os.environ[k] = v + +# Check if DATABASE_URL is not set +database_url = os.getenv("DATABASE_URL") +if not database_url: + verbose_proxy_logger.info("Constructing DATABASE_URL from environment variables") + # Check if all required variables are provided + database_host = os.getenv("DATABASE_HOST") + database_username = os.getenv("DATABASE_USERNAME") + database_password = os.getenv("DATABASE_PASSWORD") + database_name = os.getenv("DATABASE_NAME") + + if database_host and database_username and database_password and database_name: + # Construct DATABASE_URL from the provided variables + database_url = f"postgresql://{database_username}:{database_password}@{database_host}/{database_name}" + os.environ["DATABASE_URL"] = database_url # Log the constructed URL + else: + verbose_proxy_logger.error( + "Error: Required database environment variables are not set. Provide a postgres url for DATABASE_URL." # noqa + ) + exit(1) +else: + verbose_proxy_logger.info("Using existing DATABASE_URL environment variable") # Log existing DATABASE_URL + +# Set DIRECT_URL to the value of DATABASE_URL if it is not set, required for migrations +direct_url = os.getenv("DIRECT_URL") +if not direct_url: + os.environ["DIRECT_URL"] = database_url + +# Apply migrations +retry_count = 0 +max_retries = 3 +exit_code = 1 + +disable_schema_update = os.getenv("DISABLE_SCHEMA_UPDATE") +if disable_schema_update is not None and disable_schema_update == "True": + verbose_proxy_logger.info("Skipping schema update...") + exit(0) + +while retry_count < max_retries and exit_code != 0: + retry_count += 1 + verbose_proxy_logger.info(f"Attempt {retry_count}...") + + # run prisma generate + verbose_proxy_logger.info("Running 'prisma generate'...") + result = subprocess.run(["prisma", "generate"], capture_output=True, text=True) + verbose_proxy_logger.info(f"'prisma generate' stdout: {result.stdout}") # Log stdout + exit_code = result.returncode + + if exit_code != 0: + verbose_proxy_logger.info(f"'prisma generate' failed with exit code {exit_code}.") + verbose_proxy_logger.error(f"'prisma generate' stderr: {result.stderr}") # Log stderr + + # Run the Prisma db push command + verbose_proxy_logger.info("Running 'prisma db push --accept-data-loss'...") + result = subprocess.run( + ["prisma", "db", "push", "--accept-data-loss"], capture_output=True, text=True + ) + verbose_proxy_logger.info(f"'prisma db push' stdout: {result.stdout}") # Log stdout + exit_code = result.returncode + + if exit_code != 0: + verbose_proxy_logger.info(f"'prisma db push' stderr: {result.stderr}") # Log stderr + verbose_proxy_logger.error(f"'prisma db push' failed with exit code {exit_code}.") + if retry_count < max_retries: + verbose_proxy_logger.info("Retrying in 10 seconds...") + time.sleep(10) + +if retry_count == max_retries and exit_code != 0: + verbose_proxy_logger.error(f"Unable to push database changes after {max_retries} retries.") + exit(1) + +verbose_proxy_logger.info("Database push successful!") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_cli.py b/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_cli.py new file mode 100644 index 00000000..8196eb59 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_cli.py @@ -0,0 +1,795 @@ +import importlib +import json +import os +import random +import subprocess +import sys +import urllib.parse as urlparse +from typing import TYPE_CHECKING, Any, Optional, Union + +import click +import httpx +from dotenv import load_dotenv + +if TYPE_CHECKING: + from fastapi import FastAPI +else: + FastAPI = Any + +sys.path.append(os.getcwd()) + +config_filename = "litellm.secrets" + +litellm_mode = os.getenv("LITELLM_MODE", "DEV") # "PRODUCTION", "DEV" +if litellm_mode == "DEV": + load_dotenv() +from enum import Enum + +telemetry = None + + +class LiteLLMDatabaseConnectionPool(Enum): + database_connection_pool_limit = 10 + database_connection_pool_timeout = 60 + + +def append_query_params(url, params) -> str: + from litellm._logging import verbose_proxy_logger + + verbose_proxy_logger.debug(f"url: {url}") + verbose_proxy_logger.debug(f"params: {params}") + parsed_url = urlparse.urlparse(url) + parsed_query = urlparse.parse_qs(parsed_url.query) + parsed_query.update(params) + encoded_query = urlparse.urlencode(parsed_query, doseq=True) + modified_url = urlparse.urlunparse(parsed_url._replace(query=encoded_query)) + return modified_url # type: ignore + + +class ProxyInitializationHelpers: + @staticmethod + def _echo_litellm_version(): + pkg_version = importlib.metadata.version("litellm") # type: ignore + click.echo(f"\nLiteLLM: Current Version = {pkg_version}\n") + + @staticmethod + def _run_health_check(host, port): + print("\nLiteLLM: Health Testing models in config") # noqa + response = httpx.get(url=f"http://{host}:{port}/health") + print(json.dumps(response.json(), indent=4)) # noqa + + @staticmethod + def _run_test_chat_completion( + host: str, + port: int, + model: str, + test: Union[bool, str], + ): + request_model = model or "gpt-3.5-turbo" + click.echo( + f"\nLiteLLM: Making a test ChatCompletions request to your proxy. Model={request_model}" + ) + import openai + + api_base = f"http://{host}:{port}" + if isinstance(test, str): + api_base = test + else: + raise ValueError("Invalid test value") + client = openai.OpenAI(api_key="My API Key", base_url=api_base) + + response = client.chat.completions.create( + model=request_model, + messages=[ + { + "role": "user", + "content": "this is a test request, write a short poem", + } + ], + max_tokens=256, + ) + click.echo(f"\nLiteLLM: response from proxy {response}") + + print( # noqa + f"\n LiteLLM: Making a test ChatCompletions + streaming r equest to proxy. Model={request_model}" + ) + + stream_response = client.chat.completions.create( + model=request_model, + messages=[ + { + "role": "user", + "content": "this is a test request, write a short poem", + } + ], + stream=True, + ) + for chunk in stream_response: + click.echo(f"LiteLLM: streaming response from proxy {chunk}") + print("\n making completion request to proxy") # noqa + completion_response = client.completions.create( + model=request_model, prompt="this is a test request, write a short poem" + ) + print(completion_response) # noqa + + @staticmethod + def _get_default_unvicorn_init_args( + host: str, + port: int, + log_config: Optional[str] = None, + ) -> dict: + """ + Get the arguments for `uvicorn` worker + """ + import litellm + + uvicorn_args = { + "app": "litellm.proxy.proxy_server:app", + "host": host, + "port": port, + } + if log_config is not None: + print(f"Using log_config: {log_config}") # noqa + uvicorn_args["log_config"] = log_config + elif litellm.json_logs: + print("Using json logs. Setting log_config to None.") # noqa + uvicorn_args["log_config"] = None + return uvicorn_args + + @staticmethod + def _init_hypercorn_server( + app: FastAPI, + host: str, + port: int, + ssl_certfile_path: str, + ssl_keyfile_path: str, + ): + """ + Initialize litellm with `hypercorn` + """ + import asyncio + + from hypercorn.asyncio import serve + from hypercorn.config import Config + + print( # noqa + f"\033[1;32mLiteLLM Proxy: Starting server on {host}:{port} using Hypercorn\033[0m\n" # noqa + ) # noqa + config = Config() + config.bind = [f"{host}:{port}"] + + if ssl_certfile_path is not None and ssl_keyfile_path is not None: + print( # noqa + f"\033[1;32mLiteLLM Proxy: Using SSL with certfile: {ssl_certfile_path} and keyfile: {ssl_keyfile_path}\033[0m\n" # noqa + ) + config.certfile = ssl_certfile_path + config.keyfile = ssl_keyfile_path + + # hypercorn serve raises a type warning when passing a fast api app - even though fast API is a valid type + asyncio.run(serve(app, config)) # type: ignore + + @staticmethod + def _run_gunicorn_server( + host: str, + port: int, + app: FastAPI, + num_workers: int, + ssl_certfile_path: str, + ssl_keyfile_path: str, + ): + """ + Run litellm with `gunicorn` + """ + if os.name == "nt": + pass + else: + import gunicorn.app.base + + # Gunicorn Application Class + class StandaloneApplication(gunicorn.app.base.BaseApplication): + def __init__(self, app, options=None): + self.options = options or {} # gunicorn options + self.application = app # FastAPI app + super().__init__() + + _endpoint_str = ( + f"curl --location 'http://0.0.0.0:{port}/chat/completions' \\" + ) + curl_command = ( + _endpoint_str + + """ + --header 'Content-Type: application/json' \\ + --data ' { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ] + }' + \n + """ + ) + print() # noqa + print( # noqa + '\033[1;34mLiteLLM: Test your local proxy with: "litellm --test" This runs an openai.ChatCompletion request to your proxy [In a new terminal tab]\033[0m\n' + ) + print( # noqa + f"\033[1;34mLiteLLM: Curl Command Test for your local proxy\n {curl_command} \033[0m\n" + ) + print( # noqa + "\033[1;34mDocs: https://docs.litellm.ai/docs/simple_proxy\033[0m\n" + ) # noqa + print( # noqa + f"\033[1;34mSee all Router/Swagger docs on http://0.0.0.0:{port} \033[0m\n" + ) # noqa + + def load_config(self): + # note: This Loads the gunicorn config - has nothing to do with LiteLLM Proxy config + if self.cfg is not None: + config = { + key: value + for key, value in self.options.items() + if key in self.cfg.settings and value is not None + } + else: + config = {} + for key, value in config.items(): + if self.cfg is not None: + self.cfg.set(key.lower(), value) + + def load(self): + # gunicorn app function + return self.application + + print( # noqa + f"\033[1;32mLiteLLM Proxy: Starting server on {host}:{port} with {num_workers} workers\033[0m\n" # noqa + ) + gunicorn_options = { + "bind": f"{host}:{port}", + "workers": num_workers, # default is 1 + "worker_class": "uvicorn.workers.UvicornWorker", + "preload": True, # Add the preload flag, + "accesslog": "-", # Log to stdout + "timeout": 600, # default to very high number, bedrock/anthropic.claude-v2:1 can take 30+ seconds for the 1st chunk to come in + "access_log_format": '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s', + } + + if ssl_certfile_path is not None and ssl_keyfile_path is not None: + print( # noqa + f"\033[1;32mLiteLLM Proxy: Using SSL with certfile: {ssl_certfile_path} and keyfile: {ssl_keyfile_path}\033[0m\n" # noqa + ) + gunicorn_options["certfile"] = ssl_certfile_path + gunicorn_options["keyfile"] = ssl_keyfile_path + + StandaloneApplication(app=app, options=gunicorn_options).run() # Run gunicorn + + @staticmethod + def _run_ollama_serve(): + try: + command = ["ollama", "serve"] + + with open(os.devnull, "w") as devnull: + subprocess.Popen(command, stdout=devnull, stderr=devnull) + except Exception as e: + print( # noqa + f""" + LiteLLM Warning: proxy started with `ollama` model\n`ollama serve` failed with Exception{e}. \nEnsure you run `ollama serve` + """ + ) # noqa + + @staticmethod + def _is_port_in_use(port): + import socket + + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + return s.connect_ex(("localhost", port)) == 0 + + @staticmethod + def _get_loop_type(): + """Helper function to determine the event loop type based on platform""" + if sys.platform in ("win32", "cygwin", "cli"): + return None # Let uvicorn choose the default loop on Windows + return "uvloop" + + +@click.command() +@click.option( + "--host", default="0.0.0.0", help="Host for the server to listen on.", envvar="HOST" +) +@click.option("--port", default=4000, help="Port to bind the server to.", envvar="PORT") +@click.option( + "--num_workers", + default=1, + help="Number of uvicorn / gunicorn workers to spin up. By default, 1 uvicorn is used.", + envvar="NUM_WORKERS", +) +@click.option("--api_base", default=None, help="API base URL.") +@click.option( + "--api_version", + default="2024-07-01-preview", + help="For azure - pass in the api version.", +) +@click.option( + "--model", "-m", default=None, help="The model name to pass to litellm expects" +) +@click.option( + "--alias", + default=None, + help='The alias for the model - use this to give a litellm model name (e.g. "huggingface/codellama/CodeLlama-7b-Instruct-hf") a more user-friendly name ("codellama")', +) +@click.option( + "--add_key", default=None, help="The model name to pass to litellm expects" +) +@click.option("--headers", default=None, help="headers for the API call") +@click.option("--save", is_flag=True, type=bool, help="Save the model-specific config") +@click.option( + "--debug", + default=False, + is_flag=True, + type=bool, + help="To debug the input", + envvar="DEBUG", +) +@click.option( + "--detailed_debug", + default=False, + is_flag=True, + type=bool, + help="To view detailed debug logs", + envvar="DETAILED_DEBUG", +) +@click.option( + "--use_queue", + default=False, + is_flag=True, + type=bool, + help="To use celery workers for async endpoints", +) +@click.option( + "--temperature", default=None, type=float, help="Set temperature for the model" +) +@click.option( + "--max_tokens", default=None, type=int, help="Set max tokens for the model" +) +@click.option( + "--request_timeout", + default=None, + type=int, + help="Set timeout in seconds for completion calls", +) +@click.option("--drop_params", is_flag=True, help="Drop any unmapped params") +@click.option( + "--add_function_to_prompt", + is_flag=True, + help="If function passed but unsupported, pass it as prompt", +) +@click.option( + "--config", + "-c", + default=None, + help="Path to the proxy configuration file (e.g. config.yaml). Usage `litellm --config config.yaml`", +) +@click.option( + "--max_budget", + default=None, + type=float, + help="Set max budget for API calls - works for hosted models like OpenAI, TogetherAI, Anthropic, etc.`", +) +@click.option( + "--telemetry", + default=True, + type=bool, + help="Helps us know if people are using this feature. Turn this off by doing `--telemetry False`", +) +@click.option( + "--log_config", + default=None, + type=str, + help="Path to the logging configuration file", +) +@click.option( + "--version", + "-v", + default=False, + is_flag=True, + type=bool, + help="Print LiteLLM version", +) +@click.option( + "--health", + flag_value=True, + help="Make a chat/completions request to all llms in config.yaml", +) +@click.option( + "--test", + flag_value=True, + help="proxy chat completions url to make a test request to", +) +@click.option( + "--test_async", + default=False, + is_flag=True, + help="Calls async endpoints /queue/requests and /queue/response", +) +@click.option( + "--iam_token_db_auth", + default=False, + is_flag=True, + help="Connects to RDS DB with IAM token", +) +@click.option( + "--num_requests", + default=10, + type=int, + help="Number of requests to hit async endpoint with", +) +@click.option( + "--run_gunicorn", + default=False, + is_flag=True, + help="Starts proxy via gunicorn, instead of uvicorn (better for managing multiple workers)", +) +@click.option( + "--run_hypercorn", + default=False, + is_flag=True, + help="Starts proxy via hypercorn, instead of uvicorn (supports HTTP/2)", +) +@click.option( + "--ssl_keyfile_path", + default=None, + type=str, + help="Path to the SSL keyfile. Use this when you want to provide SSL certificate when starting proxy", + envvar="SSL_KEYFILE_PATH", +) +@click.option( + "--ssl_certfile_path", + default=None, + type=str, + help="Path to the SSL certfile. Use this when you want to provide SSL certificate when starting proxy", + envvar="SSL_CERTFILE_PATH", +) +@click.option( + "--use_prisma_migrate", + is_flag=True, + default=False, + help="Use prisma migrate instead of prisma db push for database schema updates", +) +@click.option("--local", is_flag=True, default=False, help="for local debugging") +def run_server( # noqa: PLR0915 + host, + port, + api_base, + api_version, + model, + alias, + add_key, + headers, + save, + debug, + detailed_debug, + temperature, + max_tokens, + request_timeout, + drop_params, + add_function_to_prompt, + config, + max_budget, + telemetry, + test, + local, + num_workers, + test_async, + iam_token_db_auth, + num_requests, + use_queue, + health, + version, + run_gunicorn, + run_hypercorn, + ssl_keyfile_path, + ssl_certfile_path, + log_config, + use_prisma_migrate, +): + args = locals() + if local: + from proxy_server import ( + KeyManagementSettings, + ProxyConfig, + app, + save_worker_config, + ) + else: + try: + from .proxy_server import ( + KeyManagementSettings, + ProxyConfig, + app, + save_worker_config, + ) + except ImportError as e: + if "litellm[proxy]" in str(e): + # user is missing a proxy dependency, ask them to pip install litellm[proxy] + raise e + else: + # this is just a local/relative import error, user git cloned litellm + from proxy_server import ( + KeyManagementSettings, + ProxyConfig, + app, + save_worker_config, + ) + if version is True: + ProxyInitializationHelpers._echo_litellm_version() + return + if model and "ollama" in model and api_base is None: + ProxyInitializationHelpers._run_ollama_serve() + if health is True: + ProxyInitializationHelpers._run_health_check(host, port) + return + if test is True: + ProxyInitializationHelpers._run_test_chat_completion(host, port, model, test) + return + else: + if headers: + headers = json.loads(headers) + save_worker_config( + model=model, + alias=alias, + api_base=api_base, + api_version=api_version, + debug=debug, + detailed_debug=detailed_debug, + temperature=temperature, + max_tokens=max_tokens, + request_timeout=request_timeout, + max_budget=max_budget, + telemetry=telemetry, + drop_params=drop_params, + add_function_to_prompt=add_function_to_prompt, + headers=headers, + save=save, + config=config, + use_queue=use_queue, + ) + try: + import uvicorn + except Exception: + raise ImportError( + "uvicorn, gunicorn needs to be imported. Run - `pip install 'litellm[proxy]'`" + ) + + db_connection_pool_limit = 100 + db_connection_timeout = 60 + general_settings = {} + ### GET DB TOKEN FOR IAM AUTH ### + + if iam_token_db_auth: + from litellm.proxy.auth.rds_iam_token import generate_iam_auth_token + + db_host = os.getenv("DATABASE_HOST") + db_port = os.getenv("DATABASE_PORT") + db_user = os.getenv("DATABASE_USER") + db_name = os.getenv("DATABASE_NAME") + db_schema = os.getenv("DATABASE_SCHEMA") + + token = generate_iam_auth_token( + db_host=db_host, db_port=db_port, db_user=db_user + ) + + # print(f"token: {token}") + _db_url = f"postgresql://{db_user}:{token}@{db_host}:{db_port}/{db_name}" + if db_schema: + _db_url += f"?schema={db_schema}" + + os.environ["DATABASE_URL"] = _db_url + os.environ["IAM_TOKEN_DB_AUTH"] = "True" + + ### DECRYPT ENV VAR ### + + from litellm.secret_managers.aws_secret_manager import decrypt_env_var + + if ( + os.getenv("USE_AWS_KMS", None) is not None + and os.getenv("USE_AWS_KMS") == "True" + ): + ## V2 IMPLEMENTATION OF AWS KMS - USER WANTS TO DECRYPT MULTIPLE KEYS IN THEIR ENV + new_env_var = decrypt_env_var() + + for k, v in new_env_var.items(): + os.environ[k] = v + + if config is not None: + """ + Allow user to pass in db url via config + + read from there and save it to os.env['DATABASE_URL'] + """ + try: + import asyncio + + except Exception: + raise ImportError( + "yaml needs to be imported. Run - `pip install 'litellm[proxy]'`" + ) + + proxy_config = ProxyConfig() + _config = asyncio.run(proxy_config.get_config(config_file_path=config)) + + ### LITELLM SETTINGS ### + litellm_settings = _config.get("litellm_settings", None) + if ( + litellm_settings is not None + and "json_logs" in litellm_settings + and litellm_settings["json_logs"] is True + ): + import litellm + + litellm.json_logs = True + + litellm._turn_on_json() + ### GENERAL SETTINGS ### + general_settings = _config.get("general_settings", {}) + if general_settings is None: + general_settings = {} + if general_settings: + ### LOAD SECRET MANAGER ### + key_management_system = general_settings.get( + "key_management_system", None + ) + proxy_config.initialize_secret_manager(key_management_system) + key_management_settings = general_settings.get( + "key_management_settings", None + ) + if key_management_settings is not None: + import litellm + + litellm._key_management_settings = KeyManagementSettings( + **key_management_settings + ) + database_url = general_settings.get("database_url", None) + if database_url is None: + # Check if all required variables are provided + database_host = os.getenv("DATABASE_HOST") + database_username = os.getenv("DATABASE_USERNAME") + database_password = os.getenv("DATABASE_PASSWORD") + database_name = os.getenv("DATABASE_NAME") + + if ( + database_host + and database_username + and database_password + and database_name + ): + # Construct DATABASE_URL from the provided variables + database_url = f"postgresql://{database_username}:{database_password}@{database_host}/{database_name}" + os.environ["DATABASE_URL"] = database_url + db_connection_pool_limit = general_settings.get( + "database_connection_pool_limit", + LiteLLMDatabaseConnectionPool.database_connection_pool_limit.value, + ) + db_connection_timeout = general_settings.get( + "database_connection_timeout", + LiteLLMDatabaseConnectionPool.database_connection_pool_timeout.value, + ) + if database_url and database_url.startswith("os.environ/"): + original_dir = os.getcwd() + # set the working directory to where this script is + sys.path.insert( + 0, os.path.abspath("../..") + ) # Adds the parent directory to the system path - for litellm local dev + import litellm + from litellm import get_secret_str + + database_url = get_secret_str(database_url, default_value=None) + os.chdir(original_dir) + if database_url is not None and isinstance(database_url, str): + os.environ["DATABASE_URL"] = database_url + + if ( + os.getenv("DATABASE_URL", None) is not None + or os.getenv("DIRECT_URL", None) is not None + ): + try: + from litellm.secret_managers.main import get_secret + + if os.getenv("DATABASE_URL", None) is not None: + ### add connection pool + pool timeout args + params = { + "connection_limit": db_connection_pool_limit, + "pool_timeout": db_connection_timeout, + } + database_url = get_secret("DATABASE_URL", default_value=None) + modified_url = append_query_params(database_url, params) + os.environ["DATABASE_URL"] = modified_url + if os.getenv("DIRECT_URL", None) is not None: + ### add connection pool + pool timeout args + params = { + "connection_limit": db_connection_pool_limit, + "pool_timeout": db_connection_timeout, + } + database_url = os.getenv("DIRECT_URL") + modified_url = append_query_params(database_url, params) + os.environ["DIRECT_URL"] = modified_url + ### + subprocess.run(["prisma"], capture_output=True) + is_prisma_runnable = True + except FileNotFoundError: + is_prisma_runnable = False + + if is_prisma_runnable: + from litellm.proxy.db.check_migration import check_prisma_schema_diff + from litellm.proxy.db.prisma_client import ( + PrismaManager, + should_update_prisma_schema, + ) + + if ( + should_update_prisma_schema( + general_settings.get("disable_prisma_schema_update") + ) + is False + ): + check_prisma_schema_diff(db_url=None) + else: + PrismaManager.setup_database(use_migrate=use_prisma_migrate) + else: + print( # noqa + f"Unable to connect to DB. DATABASE_URL found in environment, but prisma package not found." # noqa + ) + if port == 4000 and ProxyInitializationHelpers._is_port_in_use(port): + port = random.randint(1024, 49152) + + import litellm + + if detailed_debug is True: + litellm._turn_on_debug() + + # DO NOT DELETE - enables global variables to work across files + from litellm.proxy.proxy_server import app # noqa + + uvicorn_args = ProxyInitializationHelpers._get_default_unvicorn_init_args( + host=host, + port=port, + log_config=log_config, + ) + if run_gunicorn is False and run_hypercorn is False: + if ssl_certfile_path is not None and ssl_keyfile_path is not None: + print( # noqa + f"\033[1;32mLiteLLM Proxy: Using SSL with certfile: {ssl_certfile_path} and keyfile: {ssl_keyfile_path}\033[0m\n" # noqa + ) + uvicorn_args["ssl_keyfile"] = ssl_keyfile_path + uvicorn_args["ssl_certfile"] = ssl_certfile_path + + loop_type = ProxyInitializationHelpers._get_loop_type() + if loop_type: + uvicorn_args["loop"] = loop_type + + uvicorn.run( + **uvicorn_args, + workers=num_workers, + ) + elif run_gunicorn is True: + ProxyInitializationHelpers._run_gunicorn_server( + host=host, + port=port, + app=app, + num_workers=num_workers, + ssl_certfile_path=ssl_certfile_path, + ssl_keyfile_path=ssl_keyfile_path, + ) + elif run_hypercorn is True: + ProxyInitializationHelpers._init_hypercorn_server( + app=app, + host=host, + port=port, + ssl_certfile_path=ssl_certfile_path, + ssl_keyfile_path=ssl_keyfile_path, + ) + + +if __name__ == "__main__": + run_server() diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_config.yaml b/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_config.yaml new file mode 100644 index 00000000..0877a02a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_config.yaml @@ -0,0 +1,11 @@ +model_list: + - model_name: gpt-3.5-turbo-end-user-test + litellm_params: + model: azure/chatgpt-v-2 + api_base: https://openai-gpt-4-test-v-1.openai.azure.com/ + api_version: "2023-05-15" + api_key: os.environ/AZURE_API_KEY + + +litellm_settings: + callbacks: ["custom_prompt_management.x42_prompt_management"] diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_server.py b/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_server.py new file mode 100644 index 00000000..ae1c8d18 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/proxy_server.py @@ -0,0 +1,8185 @@ +import asyncio +import copy +import inspect +import io +import os +import random +import secrets +import subprocess +import sys +import time +import traceback +import uuid +import warnings +from datetime import datetime, timedelta +from typing import ( + TYPE_CHECKING, + Any, + List, + Optional, + Tuple, + cast, + get_args, + get_origin, + get_type_hints, +) + +from litellm.types.utils import ( + ModelResponse, + ModelResponseStream, + TextCompletionResponse, +) + +if TYPE_CHECKING: + from opentelemetry.trace import Span as _Span + + from litellm.integrations.opentelemetry import OpenTelemetry + + Span = _Span +else: + Span = Any + OpenTelemetry = Any + + +def showwarning(message, category, filename, lineno, file=None, line=None): + traceback_info = f"{filename}:{lineno}: {category.__name__}: {message}\n" + if file is not None: + file.write(traceback_info) + + +warnings.showwarning = showwarning +warnings.filterwarnings("default", category=UserWarning) + +# Your client code here + + +messages: list = [] +sys.path.insert( + 0, os.path.abspath("../..") +) # Adds the parent directory to the system path - for litellm local dev + +try: + import logging + + import backoff + import fastapi + import orjson + import yaml # type: ignore + from apscheduler.schedulers.asyncio import AsyncIOScheduler +except ImportError as e: + raise ImportError(f"Missing dependency {e}. Run `pip install 'litellm[proxy]'`") + +list_of_messages = [ + "'The thing I wish you improved is...'", + "'A feature I really want is...'", + "'The worst thing about this product is...'", + "'This product would be better if...'", + "'I don't like how this works...'", + "'It would help me if you could add...'", + "'This feature doesn't meet my needs because...'", + "'I get frustrated when the product...'", +] + + +def generate_feedback_box(): + box_width = 60 + + # Select a random message + message = random.choice(list_of_messages) + + print() # noqa + print("\033[1;37m" + "#" + "-" * box_width + "#\033[0m") # noqa + print("\033[1;37m" + "#" + " " * box_width + "#\033[0m") # noqa + print("\033[1;37m" + "# {:^59} #\033[0m".format(message)) # noqa + print( # noqa + "\033[1;37m" + + "# {:^59} #\033[0m".format("https://github.com/BerriAI/litellm/issues/new") + ) # noqa + print("\033[1;37m" + "#" + " " * box_width + "#\033[0m") # noqa + print("\033[1;37m" + "#" + "-" * box_width + "#\033[0m") # noqa + print() # noqa + print(" Thank you for using LiteLLM! - Krrish & Ishaan") # noqa + print() # noqa + print() # noqa + print() # noqa + print( # noqa + "\033[1;31mGive Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new\033[0m" + ) # noqa + print() # noqa + print() # noqa + + +from collections import defaultdict +from contextlib import asynccontextmanager + +import litellm +from litellm import Router +from litellm._logging import verbose_proxy_logger, verbose_router_logger +from litellm.caching.caching import DualCache, RedisCache +from litellm.constants import LITELLM_PROXY_ADMIN_NAME +from litellm.exceptions import RejectedRequestError +from litellm.integrations.SlackAlerting.slack_alerting import SlackAlerting +from litellm.litellm_core_utils.core_helpers import ( + _get_parent_otel_span_from_kwargs, + get_litellm_metadata_from_kwargs, +) +from litellm.litellm_core_utils.credential_accessor import CredentialAccessor +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj +from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler +from litellm.proxy._types import * +from litellm.proxy.analytics_endpoints.analytics_endpoints import ( + router as analytics_router, +) +from litellm.proxy.anthropic_endpoints.endpoints import router as anthropic_router +from litellm.proxy.auth.auth_checks import get_team_object, log_db_metrics +from litellm.proxy.auth.auth_utils import check_response_size_is_safe +from litellm.proxy.auth.handle_jwt import JWTHandler +from litellm.proxy.auth.litellm_license import LicenseCheck +from litellm.proxy.auth.model_checks import ( + get_complete_model_list, + get_key_models, + get_team_models, +) +from litellm.proxy.auth.user_api_key_auth import ( + user_api_key_auth, + user_api_key_auth_websocket, +) +from litellm.proxy.batches_endpoints.endpoints import router as batches_router + +## Import All Misc routes here ## +from litellm.proxy.caching_routes import router as caching_router +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing +from litellm.proxy.common_utils.admin_ui_utils import html_form +from litellm.proxy.common_utils.callback_utils import initialize_callbacks_on_proxy +from litellm.proxy.common_utils.debug_utils import init_verbose_loggers +from litellm.proxy.common_utils.debug_utils import router as debugging_endpoints_router +from litellm.proxy.common_utils.encrypt_decrypt_utils import ( + decrypt_value_helper, + encrypt_value_helper, +) +from litellm.proxy.common_utils.http_parsing_utils import ( + _read_request_body, + check_file_size_under_limit, +) +from litellm.proxy.common_utils.load_config_utils import ( + get_config_file_contents_from_gcs, + get_file_contents_from_s3, +) +from litellm.proxy.common_utils.openai_endpoint_utils import ( + remove_sensitive_info_from_deployment, +) +from litellm.proxy.common_utils.proxy_state import ProxyState +from litellm.proxy.common_utils.reset_budget_job import ResetBudgetJob +from litellm.proxy.common_utils.swagger_utils import ERROR_RESPONSES +from litellm.proxy.credential_endpoints.endpoints import router as credential_router +from litellm.proxy.fine_tuning_endpoints.endpoints import router as fine_tuning_router +from litellm.proxy.fine_tuning_endpoints.endpoints import set_fine_tuning_config +from litellm.proxy.guardrails.guardrail_endpoints import router as guardrails_router +from litellm.proxy.guardrails.init_guardrails import ( + init_guardrails_v2, + initialize_guardrails, +) +from litellm.proxy.health_check import perform_health_check +from litellm.proxy.health_endpoints._health_endpoints import router as health_router +from litellm.proxy.hooks.model_max_budget_limiter import ( + _PROXY_VirtualKeyModelMaxBudgetLimiter, +) +from litellm.proxy.hooks.prompt_injection_detection import ( + _OPTIONAL_PromptInjectionDetection, +) +from litellm.proxy.hooks.proxy_track_cost_callback import _ProxyDBLogger +from litellm.proxy.litellm_pre_call_utils import add_litellm_data_to_request +from litellm.proxy.management_endpoints.budget_management_endpoints import ( + router as budget_management_router, +) +from litellm.proxy.management_endpoints.customer_endpoints import ( + router as customer_router, +) +from litellm.proxy.management_endpoints.internal_user_endpoints import ( + router as internal_user_router, +) +from litellm.proxy.management_endpoints.internal_user_endpoints import user_update +from litellm.proxy.management_endpoints.key_management_endpoints import ( + delete_verification_tokens, + duration_in_seconds, + generate_key_helper_fn, +) +from litellm.proxy.management_endpoints.key_management_endpoints import ( + router as key_management_router, +) +from litellm.proxy.management_endpoints.model_management_endpoints import ( + _add_model_to_db, + _add_team_model_to_db, + check_if_team_id_matches_key, +) +from litellm.proxy.management_endpoints.model_management_endpoints import ( + router as model_management_router, +) +from litellm.proxy.management_endpoints.organization_endpoints import ( + router as organization_router, +) +from litellm.proxy.management_endpoints.team_callback_endpoints import ( + router as team_callback_router, +) +from litellm.proxy.management_endpoints.team_endpoints import router as team_router +from litellm.proxy.management_endpoints.team_endpoints import ( + update_team, + validate_membership, +) +from litellm.proxy.management_endpoints.ui_sso import ( + get_disabled_non_admin_personal_key_creation, +) +from litellm.proxy.management_endpoints.ui_sso import router as ui_sso_router +from litellm.proxy.management_helpers.audit_logs import create_audit_log_for_update +from litellm.proxy.openai_files_endpoints.files_endpoints import ( + router as openai_files_router, +) +from litellm.proxy.openai_files_endpoints.files_endpoints import set_files_config +from litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints import ( + router as llm_passthrough_router, +) +from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( + initialize_pass_through_endpoints, +) +from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( + router as pass_through_router, +) +from litellm.proxy.rerank_endpoints.endpoints import router as rerank_router +from litellm.proxy.response_api_endpoints.endpoints import router as response_router +from litellm.proxy.route_llm_request import route_request +from litellm.proxy.spend_tracking.spend_management_endpoints import ( + router as spend_management_router, +) +from litellm.proxy.spend_tracking.spend_tracking_utils import get_logging_payload +from litellm.proxy.types_utils.utils import get_instance_fn +from litellm.proxy.ui_crud_endpoints.proxy_setting_endpoints import ( + router as ui_crud_endpoints_router, +) +from litellm.proxy.utils import ( + PrismaClient, + ProxyLogging, + ProxyUpdateSpend, + _cache_user_row, + _get_docs_url, + _get_projected_spend_over_limit, + _get_redoc_url, + _is_projected_spend_over_limit, + _is_valid_team_configs, + get_error_message_str, + hash_token, + update_spend, +) +from litellm.proxy.vertex_ai_endpoints.langfuse_endpoints import ( + router as langfuse_router, +) +from litellm.proxy.vertex_ai_endpoints.vertex_endpoints import router as vertex_router +from litellm.proxy.vertex_ai_endpoints.vertex_endpoints import set_default_vertex_config +from litellm.router import ( + AssistantsTypedDict, + Deployment, + LiteLLM_Params, + ModelGroupInfo, +) +from litellm.scheduler import DefaultPriorities, FlowItem, Scheduler +from litellm.secret_managers.aws_secret_manager import load_aws_kms +from litellm.secret_managers.google_kms import load_google_kms +from litellm.secret_managers.main import ( + get_secret, + get_secret_bool, + get_secret_str, + str_to_bool, +) +from litellm.types.integrations.slack_alerting import SlackAlertingArgs +from litellm.types.llms.anthropic import ( + AnthropicMessagesRequest, + AnthropicResponse, + AnthropicResponseContentBlockText, + AnthropicResponseUsageBlock, +) +from litellm.types.llms.openai import HttpxBinaryResponseContent +from litellm.types.router import DeploymentTypedDict +from litellm.types.router import ModelInfo as RouterModelInfo +from litellm.types.router import RouterGeneralSettings, updateDeployment +from litellm.types.utils import CredentialItem, CustomHuggingfaceTokenizer +from litellm.types.utils import ModelInfo as ModelMapInfo +from litellm.types.utils import RawRequestTypedDict, StandardLoggingPayload +from litellm.utils import _add_custom_logger_callback_to_specific_event + +try: + from litellm._version import version +except Exception: + version = "0.0.0" +litellm.suppress_debug_info = True +import json +from typing import Union + +from fastapi import ( + Depends, + FastAPI, + File, + Form, + Header, + HTTPException, + Path, + Query, + Request, + Response, + UploadFile, + status, +) +from fastapi.encoders import jsonable_encoder +from fastapi.middleware.cors import CORSMiddleware +from fastapi.openapi.utils import get_openapi +from fastapi.responses import ( + FileResponse, + JSONResponse, + ORJSONResponse, + RedirectResponse, + StreamingResponse, +) +from fastapi.routing import APIRouter +from fastapi.security import OAuth2PasswordBearer +from fastapi.security.api_key import APIKeyHeader +from fastapi.staticfiles import StaticFiles + +# import enterprise folder +try: + # when using litellm cli + import litellm.proxy.enterprise as enterprise +except Exception: + # when using litellm docker image + try: + import enterprise # type: ignore + except Exception: + pass + +server_root_path = os.getenv("SERVER_ROOT_PATH", "") +_license_check = LicenseCheck() +premium_user: bool = _license_check.is_premium() +global_max_parallel_request_retries_env: Optional[str] = os.getenv( + "LITELLM_GLOBAL_MAX_PARALLEL_REQUEST_RETRIES" +) +proxy_state = ProxyState() +if global_max_parallel_request_retries_env is None: + global_max_parallel_request_retries: int = 3 +else: + global_max_parallel_request_retries = int(global_max_parallel_request_retries_env) + +global_max_parallel_request_retry_timeout_env: Optional[str] = os.getenv( + "LITELLM_GLOBAL_MAX_PARALLEL_REQUEST_RETRY_TIMEOUT" +) +if global_max_parallel_request_retry_timeout_env is None: + global_max_parallel_request_retry_timeout: float = 60.0 +else: + global_max_parallel_request_retry_timeout = float( + global_max_parallel_request_retry_timeout_env + ) + +ui_link = f"{server_root_path}/ui/" +ui_message = ( + f"👉 [```LiteLLM Admin Panel on /ui```]({ui_link}). Create, Edit Keys with SSO" +) +ui_message += "\n\n💸 [```LiteLLM Model Cost Map```](https://models.litellm.ai/)." + +custom_swagger_message = "[**Customize Swagger Docs**](https://docs.litellm.ai/docs/proxy/enterprise#swagger-docs---custom-routes--branding)" + +### CUSTOM BRANDING [ENTERPRISE FEATURE] ### +_title = os.getenv("DOCS_TITLE", "LiteLLM API") if premium_user else "LiteLLM API" +_description = ( + os.getenv( + "DOCS_DESCRIPTION", + f"Enterprise Edition \n\nProxy Server to call 100+ LLMs in the OpenAI format. {custom_swagger_message}\n\n{ui_message}", + ) + if premium_user + else f"Proxy Server to call 100+ LLMs in the OpenAI format. {custom_swagger_message}\n\n{ui_message}" +) + + +def cleanup_router_config_variables(): + global master_key, user_config_file_path, otel_logging, user_custom_auth, user_custom_auth_path, user_custom_key_generate, user_custom_sso, use_background_health_checks, health_check_interval, prisma_client + + # Set all variables to None + master_key = None + user_config_file_path = None + otel_logging = None + user_custom_auth = None + user_custom_auth_path = None + user_custom_key_generate = None + user_custom_sso = None + use_background_health_checks = None + health_check_interval = None + prisma_client = None + + +async def proxy_shutdown_event(): + global prisma_client, master_key, user_custom_auth, user_custom_key_generate + verbose_proxy_logger.info("Shutting down LiteLLM Proxy Server") + if prisma_client: + verbose_proxy_logger.debug("Disconnecting from Prisma") + await prisma_client.disconnect() + + if litellm.cache is not None: + await litellm.cache.disconnect() + + await jwt_handler.close() + + if db_writer_client is not None: + await db_writer_client.close() + + # flush remaining langfuse logs + if "langfuse" in litellm.success_callback: + try: + # flush langfuse logs on shutdow + from litellm.utils import langFuseLogger + + if langFuseLogger is not None: + langFuseLogger.Langfuse.flush() + except Exception: + # [DO NOT BLOCK shutdown events for this] + pass + + ## RESET CUSTOM VARIABLES ## + cleanup_router_config_variables() + + +@asynccontextmanager +async def proxy_startup_event(app: FastAPI): + global prisma_client, master_key, use_background_health_checks, llm_router, llm_model_list, general_settings, proxy_budget_rescheduler_min_time, proxy_budget_rescheduler_max_time, litellm_proxy_admin_name, db_writer_client, store_model_in_db, premium_user, _license_check + import json + + init_verbose_loggers() + ### LOAD MASTER KEY ### + # check if master key set in environment - load from there + master_key = get_secret("LITELLM_MASTER_KEY", None) # type: ignore + # check if DATABASE_URL in environment - load from there + if prisma_client is None: + _db_url: Optional[str] = get_secret("DATABASE_URL", None) # type: ignore + prisma_client = await ProxyStartupEvent._setup_prisma_client( + database_url=_db_url, + proxy_logging_obj=proxy_logging_obj, + user_api_key_cache=user_api_key_cache, + ) + + ## CHECK PREMIUM USER + verbose_proxy_logger.debug( + "litellm.proxy.proxy_server.py::startup() - CHECKING PREMIUM USER - {}".format( + premium_user + ) + ) + if premium_user is False: + premium_user = _license_check.is_premium() + + ### LOAD CONFIG ### + worker_config: Optional[Union[str, dict]] = get_secret("WORKER_CONFIG") # type: ignore + env_config_yaml: Optional[str] = get_secret_str("CONFIG_FILE_PATH") + verbose_proxy_logger.debug("worker_config: %s", worker_config) + # check if it's a valid file path + if env_config_yaml is not None: + if os.path.isfile(env_config_yaml) and proxy_config.is_yaml( + config_file_path=env_config_yaml + ): + ( + llm_router, + llm_model_list, + general_settings, + ) = await proxy_config.load_config( + router=llm_router, config_file_path=env_config_yaml + ) + elif worker_config is not None: + if ( + isinstance(worker_config, str) + and os.path.isfile(worker_config) + and proxy_config.is_yaml(config_file_path=worker_config) + ): + ( + llm_router, + llm_model_list, + general_settings, + ) = await proxy_config.load_config( + router=llm_router, config_file_path=worker_config + ) + elif os.environ.get("LITELLM_CONFIG_BUCKET_NAME") is not None and isinstance( + worker_config, str + ): + ( + llm_router, + llm_model_list, + general_settings, + ) = await proxy_config.load_config( + router=llm_router, config_file_path=worker_config + ) + elif isinstance(worker_config, dict): + await initialize(**worker_config) + else: + # if not, assume it's a json string + worker_config = json.loads(worker_config) + if isinstance(worker_config, dict): + await initialize(**worker_config) + + ProxyStartupEvent._initialize_startup_logging( + llm_router=llm_router, + proxy_logging_obj=proxy_logging_obj, + redis_usage_cache=redis_usage_cache, + ) + + ## JWT AUTH ## + ProxyStartupEvent._initialize_jwt_auth( + general_settings=general_settings, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + ) + + if use_background_health_checks: + asyncio.create_task( + _run_background_health_check() + ) # start the background health check coroutine. + + if prompt_injection_detection_obj is not None: # [TODO] - REFACTOR THIS + prompt_injection_detection_obj.update_environment(router=llm_router) + + verbose_proxy_logger.debug("prisma_client: %s", prisma_client) + if prisma_client is not None and litellm.max_budget > 0: + ProxyStartupEvent._add_proxy_budget_to_db( + litellm_proxy_budget_name=litellm_proxy_admin_name + ) + + ### START BATCH WRITING DB + CHECKING NEW MODELS### + if prisma_client is not None: + await ProxyStartupEvent.initialize_scheduled_background_jobs( + general_settings=general_settings, + prisma_client=prisma_client, + proxy_budget_rescheduler_min_time=proxy_budget_rescheduler_min_time, + proxy_budget_rescheduler_max_time=proxy_budget_rescheduler_max_time, + proxy_batch_write_at=proxy_batch_write_at, + proxy_logging_obj=proxy_logging_obj, + ) + ## [Optional] Initialize dd tracer + ProxyStartupEvent._init_dd_tracer() + + # End of startup event + yield + + # Shutdown event + await proxy_shutdown_event() + + +app = FastAPI( + docs_url=_get_docs_url(), + redoc_url=_get_redoc_url(), + title=_title, + description=_description, + version=version, + root_path=server_root_path, # check if user passed root path, FastAPI defaults this value to "" + lifespan=proxy_startup_event, +) + + +### CUSTOM API DOCS [ENTERPRISE FEATURE] ### +# Custom OpenAPI schema generator to include only selected routes +from fastapi.routing import APIWebSocketRoute + + +def get_openapi_schema(): + if app.openapi_schema: + return app.openapi_schema + + openapi_schema = get_openapi( + title=app.title, + version=app.version, + description=app.description, + routes=app.routes, + ) + + # Find all WebSocket routes + websocket_routes = [ + route for route in app.routes if isinstance(route, APIWebSocketRoute) + ] + + # Add each WebSocket route to the schema + for route in websocket_routes: + # Get the base path without query parameters + base_path = route.path.split("{")[0].rstrip("?") + + # Extract parameters from the route + parameters = [] + if hasattr(route, "dependant"): + for param in route.dependant.query_params: + parameters.append( + { + "name": param.name, + "in": "query", + "required": param.required, + "schema": { + "type": "string" + }, # You can make this more specific if needed + } + ) + + openapi_schema["paths"][base_path] = { + "get": { + "summary": f"WebSocket: {route.name or base_path}", + "description": "WebSocket connection endpoint", + "operationId": f"websocket_{route.name or base_path.replace('/', '_')}", + "parameters": parameters, + "responses": {"101": {"description": "WebSocket Protocol Switched"}}, + "tags": ["WebSocket"], + } + } + + app.openapi_schema = openapi_schema + return app.openapi_schema + + +def custom_openapi(): + if app.openapi_schema: + return app.openapi_schema + openapi_schema = get_openapi_schema() + + # Filter routes to include only specific ones + openai_routes = LiteLLMRoutes.openai_routes.value + paths_to_include: dict = {} + for route in openai_routes: + if route in openapi_schema["paths"]: + paths_to_include[route] = openapi_schema["paths"][route] + openapi_schema["paths"] = paths_to_include + app.openapi_schema = openapi_schema + return app.openapi_schema + + +if os.getenv("DOCS_FILTERED", "False") == "True" and premium_user: + app.openapi = custom_openapi # type: ignore + + +class UserAPIKeyCacheTTLEnum(enum.Enum): + in_memory_cache_ttl = 60 # 1 min ttl ## configure via `general_settings::user_api_key_cache_ttl: <your-value>` + + +@app.exception_handler(ProxyException) +async def openai_exception_handler(request: Request, exc: ProxyException): + # NOTE: DO NOT MODIFY THIS, its crucial to map to Openai exceptions + headers = exc.headers + return JSONResponse( + status_code=( + int(exc.code) if exc.code else status.HTTP_500_INTERNAL_SERVER_ERROR + ), + content={ + "error": { + "message": exc.message, + "type": exc.type, + "param": exc.param, + "code": exc.code, + } + }, + headers=headers, + ) + + +router = APIRouter() +origins = ["*"] + +# get current directory +try: + current_dir = os.path.dirname(os.path.abspath(__file__)) + ui_path = os.path.join(current_dir, "_experimental", "out") + app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui") + # Iterate through files in the UI directory + for filename in os.listdir(ui_path): + if filename.endswith(".html") and filename != "index.html": + # Create a folder with the same name as the HTML file + folder_name = os.path.splitext(filename)[0] + folder_path = os.path.join(ui_path, folder_name) + os.makedirs(folder_path, exist_ok=True) + + # Move the HTML file into the folder and rename it to 'index.html' + src = os.path.join(ui_path, filename) + dst = os.path.join(folder_path, "index.html") + os.rename(src, dst) + + if server_root_path != "": + print( # noqa + f"server_root_path is set, forwarding any /ui requests to {server_root_path}/ui" + ) # noqa + if os.getenv("PROXY_BASE_URL") is None: + os.environ["PROXY_BASE_URL"] = server_root_path + + @app.middleware("http") + async def redirect_ui_middleware(request: Request, call_next): + if request.url.path.startswith("/ui"): + new_url = str(request.url).replace("/ui", f"{server_root_path}/ui", 1) + return RedirectResponse(new_url) + return await call_next(request) + +except Exception: + pass +# current_dir = os.path.dirname(os.path.abspath(__file__)) +# ui_path = os.path.join(current_dir, "_experimental", "out") +# # Mount this test directory instead +# app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui") + + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +from typing import Dict + +user_api_base = None +user_model = None +user_debug = False +user_max_tokens = None +user_request_timeout = None +user_temperature = None +user_telemetry = True +user_config = None +user_headers = None +user_config_file_path: Optional[str] = None +local_logging = True # writes logs to a local api_log.json file for debugging +experimental = False +#### GLOBAL VARIABLES #### +llm_router: Optional[Router] = None +llm_model_list: Optional[list] = None +general_settings: dict = {} +callback_settings: dict = {} +log_file = "api_log.json" +worker_config = None +master_key: Optional[str] = None +otel_logging = False +prisma_client: Optional[PrismaClient] = None +user_api_key_cache = DualCache( + default_in_memory_ttl=UserAPIKeyCacheTTLEnum.in_memory_cache_ttl.value +) +model_max_budget_limiter = _PROXY_VirtualKeyModelMaxBudgetLimiter( + dual_cache=user_api_key_cache +) +litellm.logging_callback_manager.add_litellm_callback(model_max_budget_limiter) +redis_usage_cache: Optional[RedisCache] = ( + None # redis cache used for tracking spend, tpm/rpm limits +) +user_custom_auth = None +user_custom_key_generate = None +user_custom_sso = None +use_background_health_checks = None +use_queue = False +health_check_interval = None +health_check_details = None +health_check_results = {} +queue: List = [] +litellm_proxy_budget_name = "litellm-proxy-budget" +litellm_proxy_admin_name = LITELLM_PROXY_ADMIN_NAME +ui_access_mode: Literal["admin", "all"] = "all" +proxy_budget_rescheduler_min_time = 597 +proxy_budget_rescheduler_max_time = 605 +proxy_batch_write_at = 10 # in seconds +litellm_master_key_hash = None +disable_spend_logs = False +jwt_handler = JWTHandler() +prompt_injection_detection_obj: Optional[_OPTIONAL_PromptInjectionDetection] = None +store_model_in_db: bool = False +open_telemetry_logger: Optional[OpenTelemetry] = None +### INITIALIZE GLOBAL LOGGING OBJECT ### +proxy_logging_obj = ProxyLogging( + user_api_key_cache=user_api_key_cache, premium_user=premium_user +) +### REDIS QUEUE ### +async_result = None +celery_app_conn = None +celery_fn = None # Redis Queue for handling requests +### DB WRITER ### +db_writer_client: Optional[AsyncHTTPHandler] = None +### logger ### + + +async def check_request_disconnection(request: Request, llm_api_call_task): + """ + Asynchronously checks if the request is disconnected at regular intervals. + If the request is disconnected + - cancel the litellm.router task + - raises an HTTPException with status code 499 and detail "Client disconnected the request". + + Parameters: + - request: Request: The request object to check for disconnection. + Returns: + - None + """ + + # only run this function for 10 mins -> if these don't get cancelled -> we don't want the server to have many while loops + start_time = time.time() + while time.time() - start_time < 600: + await asyncio.sleep(1) + if await request.is_disconnected(): + + # cancel the LLM API Call task if any passed - this is passed from individual providers + # Example OpenAI, Azure, VertexAI etc + llm_api_call_task.cancel() + + raise HTTPException( + status_code=499, + detail="Client disconnected the request", + ) + + +def _resolve_typed_dict_type(typ): + """Resolve the actual TypedDict class from a potentially wrapped type.""" + from typing_extensions import _TypedDictMeta # type: ignore + + origin = get_origin(typ) + if origin is Union: # Check if it's a Union (like Optional) + for arg in get_args(typ): + if isinstance(arg, _TypedDictMeta): + return arg + elif isinstance(typ, type) and isinstance(typ, dict): + return typ + return None + + +def _resolve_pydantic_type(typ) -> List: + """Resolve the actual TypedDict class from a potentially wrapped type.""" + origin = get_origin(typ) + typs = [] + if origin is Union: # Check if it's a Union (like Optional) + for arg in get_args(typ): + if ( + arg is not None + and not isinstance(arg, type(None)) + and "NoneType" not in str(arg) + ): + typs.append(arg) + elif isinstance(typ, type) and isinstance(typ, BaseModel): + return [typ] + return typs + + +def load_from_azure_key_vault(use_azure_key_vault: bool = False): + if use_azure_key_vault is False: + return + + try: + from azure.identity import DefaultAzureCredential + from azure.keyvault.secrets import SecretClient + + # Set your Azure Key Vault URI + KVUri = os.getenv("AZURE_KEY_VAULT_URI", None) + + if KVUri is None: + raise Exception( + "Error when loading keys from Azure Key Vault: AZURE_KEY_VAULT_URI is not set." + ) + + credential = DefaultAzureCredential() + + # Create the SecretClient using the credential + client = SecretClient(vault_url=KVUri, credential=credential) + + litellm.secret_manager_client = client + litellm._key_management_system = KeyManagementSystem.AZURE_KEY_VAULT + except Exception as e: + _error_str = str(e) + verbose_proxy_logger.exception( + "Error when loading keys from Azure Key Vault: %s .Ensure you run `pip install azure-identity azure-keyvault-secrets`", + _error_str, + ) + + +def cost_tracking(): + global prisma_client + if prisma_client is not None: + litellm.logging_callback_manager.add_litellm_callback(_ProxyDBLogger()) + + +def _set_spend_logs_payload( + payload: Union[dict, SpendLogsPayload], + prisma_client: PrismaClient, + spend_logs_url: Optional[str] = None, +): + verbose_proxy_logger.info( + "Writing spend log to db - request_id: {}, spend: {}".format( + payload.get("request_id"), payload.get("spend") + ) + ) + if prisma_client is not None and spend_logs_url is not None: + if isinstance(payload["startTime"], datetime): + payload["startTime"] = payload["startTime"].isoformat() + if isinstance(payload["endTime"], datetime): + payload["endTime"] = payload["endTime"].isoformat() + prisma_client.spend_log_transactions.append(payload) + elif prisma_client is not None: + prisma_client.spend_log_transactions.append(payload) + return prisma_client + + +async def update_database( # noqa: PLR0915 + token, + response_cost, + user_id=None, + end_user_id=None, + team_id=None, + kwargs=None, + completion_response=None, + start_time=None, + end_time=None, + org_id=None, +): + try: + global prisma_client + verbose_proxy_logger.debug( + f"Enters prisma db call, response_cost: {response_cost}, token: {token}; user_id: {user_id}; team_id: {team_id}" + ) + if ProxyUpdateSpend.disable_spend_updates() is True: + return + if token is not None and isinstance(token, str) and token.startswith("sk-"): + hashed_token = hash_token(token=token) + else: + hashed_token = token + + ### UPDATE USER SPEND ### + async def _update_user_db(): + """ + - Update that user's row + - Update litellm-proxy-budget row (global proxy spend) + """ + ## if an end-user is passed in, do an upsert - we can't guarantee they already exist in db + existing_user_obj = await user_api_key_cache.async_get_cache(key=user_id) + if existing_user_obj is not None and isinstance(existing_user_obj, dict): + existing_user_obj = LiteLLM_UserTable(**existing_user_obj) + try: + if prisma_client is not None: # update + user_ids = [user_id] + if ( + litellm.max_budget > 0 + ): # track global proxy budget, if user set max budget + user_ids.append(litellm_proxy_budget_name) + ### KEY CHANGE ### + for _id in user_ids: + if _id is not None: + prisma_client.user_list_transactons[_id] = ( + response_cost + + prisma_client.user_list_transactons.get(_id, 0) + ) + if end_user_id is not None: + prisma_client.end_user_list_transactons[end_user_id] = ( + response_cost + + prisma_client.end_user_list_transactons.get( + end_user_id, 0 + ) + ) + except Exception as e: + verbose_proxy_logger.info( + "\033[91m" + + f"Update User DB call failed to execute {str(e)}\n{traceback.format_exc()}" + ) + + ### UPDATE KEY SPEND ### + async def _update_key_db(): + try: + verbose_proxy_logger.debug( + f"adding spend to key db. Response cost: {response_cost}. Token: {hashed_token}." + ) + if hashed_token is None: + return + if prisma_client is not None: + prisma_client.key_list_transactons[hashed_token] = ( + response_cost + + prisma_client.key_list_transactons.get(hashed_token, 0) + ) + except Exception as e: + verbose_proxy_logger.exception( + f"Update Key DB Call failed to execute - {str(e)}" + ) + raise e + + ### UPDATE SPEND LOGS ### + async def _insert_spend_log_to_db(): + try: + global prisma_client + if prisma_client is not None: + # Helper to generate payload to log + payload = get_logging_payload( + kwargs=kwargs, + response_obj=completion_response, + start_time=start_time, + end_time=end_time, + ) + payload["spend"] = response_cost + prisma_client = _set_spend_logs_payload( + payload=payload, + spend_logs_url=os.getenv("SPEND_LOGS_URL"), + prisma_client=prisma_client, + ) + except Exception as e: + verbose_proxy_logger.debug( + f"Update Spend Logs DB failed to execute - {str(e)}\n{traceback.format_exc()}" + ) + raise e + + ### UPDATE TEAM SPEND ### + async def _update_team_db(): + try: + verbose_proxy_logger.debug( + f"adding spend to team db. Response cost: {response_cost}. team_id: {team_id}." + ) + if team_id is None: + verbose_proxy_logger.debug( + "track_cost_callback: team_id is None. Not tracking spend for team" + ) + return + if prisma_client is not None: + prisma_client.team_list_transactons[team_id] = ( + response_cost + + prisma_client.team_list_transactons.get(team_id, 0) + ) + + try: + # Track spend of the team member within this team + # key is "team_id::<value>::user_id::<value>" + team_member_key = f"team_id::{team_id}::user_id::{user_id}" + prisma_client.team_member_list_transactons[team_member_key] = ( + response_cost + + prisma_client.team_member_list_transactons.get( + team_member_key, 0 + ) + ) + except Exception: + pass + except Exception as e: + verbose_proxy_logger.info( + f"Update Team DB failed to execute - {str(e)}\n{traceback.format_exc()}" + ) + raise e + + ### UPDATE ORG SPEND ### + async def _update_org_db(): + try: + verbose_proxy_logger.debug( + "adding spend to org db. Response cost: {}. org_id: {}.".format( + response_cost, org_id + ) + ) + if org_id is None: + verbose_proxy_logger.debug( + "track_cost_callback: org_id is None. Not tracking spend for org" + ) + return + if prisma_client is not None: + prisma_client.org_list_transactons[org_id] = ( + response_cost + + prisma_client.org_list_transactons.get(org_id, 0) + ) + except Exception as e: + verbose_proxy_logger.info( + f"Update Org DB failed to execute - {str(e)}\n{traceback.format_exc()}" + ) + raise e + + asyncio.create_task(_update_user_db()) + asyncio.create_task(_update_key_db()) + asyncio.create_task(_update_team_db()) + asyncio.create_task(_update_org_db()) + # asyncio.create_task(_insert_spend_log_to_db()) + if disable_spend_logs is False: + await _insert_spend_log_to_db() + else: + verbose_proxy_logger.info( + "disable_spend_logs=True. Skipping writing spend logs to db. Other spend updates - Key/User/Team table will still occur." + ) + + verbose_proxy_logger.debug("Runs spend update on all tables") + except Exception: + verbose_proxy_logger.debug( + f"Error updating Prisma database: {traceback.format_exc()}" + ) + + +async def update_cache( # noqa: PLR0915 + token: Optional[str], + user_id: Optional[str], + end_user_id: Optional[str], + team_id: Optional[str], + response_cost: Optional[float], + parent_otel_span: Optional[Span], # type: ignore +): + """ + Use this to update the cache with new user spend. + + Put any alerting logic in here. + """ + + values_to_update_in_cache: List[Tuple[Any, Any]] = [] + + ### UPDATE KEY SPEND ### + async def _update_key_cache(token: str, response_cost: float): + # Fetch the existing cost for the given token + if isinstance(token, str) and token.startswith("sk-"): + hashed_token = hash_token(token=token) + else: + hashed_token = token + verbose_proxy_logger.debug("_update_key_cache: hashed_token=%s", hashed_token) + existing_spend_obj: LiteLLM_VerificationTokenView = await user_api_key_cache.async_get_cache(key=hashed_token) # type: ignore + verbose_proxy_logger.debug( + f"_update_key_cache: existing_spend_obj={existing_spend_obj}" + ) + verbose_proxy_logger.debug( + f"_update_key_cache: existing spend: {existing_spend_obj}" + ) + if existing_spend_obj is None: + return + else: + existing_spend = existing_spend_obj.spend + # Calculate the new cost by adding the existing cost and response_cost + new_spend = existing_spend + response_cost + + ## CHECK IF USER PROJECTED SPEND > SOFT LIMIT + if ( + existing_spend_obj.soft_budget_cooldown is False + and existing_spend_obj.litellm_budget_table is not None + and ( + _is_projected_spend_over_limit( + current_spend=new_spend, + soft_budget_limit=existing_spend_obj.litellm_budget_table[ + "soft_budget" + ], + ) + is True + ) + ): + projected_spend, projected_exceeded_date = _get_projected_spend_over_limit( + current_spend=new_spend, + soft_budget_limit=existing_spend_obj.litellm_budget_table.get( + "soft_budget", None + ), + ) # type: ignore + soft_limit = existing_spend_obj.litellm_budget_table.get( + "soft_budget", float("inf") + ) + call_info = CallInfo( + token=existing_spend_obj.token or "", + spend=new_spend, + key_alias=existing_spend_obj.key_alias, + max_budget=soft_limit, + user_id=existing_spend_obj.user_id, + projected_spend=projected_spend, + projected_exceeded_date=projected_exceeded_date, + ) + # alert user + asyncio.create_task( + proxy_logging_obj.budget_alerts( + type="projected_limit_exceeded", + user_info=call_info, + ) + ) + # set cooldown on alert + + if ( + existing_spend_obj is not None + and getattr(existing_spend_obj, "team_spend", None) is not None + ): + existing_team_spend = existing_spend_obj.team_spend or 0 + # Calculate the new cost by adding the existing cost and response_cost + existing_spend_obj.team_spend = existing_team_spend + response_cost + + if ( + existing_spend_obj is not None + and getattr(existing_spend_obj, "team_member_spend", None) is not None + ): + existing_team_member_spend = existing_spend_obj.team_member_spend or 0 + # Calculate the new cost by adding the existing cost and response_cost + existing_spend_obj.team_member_spend = ( + existing_team_member_spend + response_cost + ) + + # Update the cost column for the given token + existing_spend_obj.spend = new_spend + values_to_update_in_cache.append((hashed_token, existing_spend_obj)) + + ### UPDATE USER SPEND ### + async def _update_user_cache(): + ## UPDATE CACHE FOR USER ID + GLOBAL PROXY + user_ids = [user_id] + try: + for _id in user_ids: + # Fetch the existing cost for the given user + if _id is None: + continue + existing_spend_obj = await user_api_key_cache.async_get_cache(key=_id) + if existing_spend_obj is None: + # do nothing if there is no cache value + return + verbose_proxy_logger.debug( + f"_update_user_db: existing spend: {existing_spend_obj}; response_cost: {response_cost}" + ) + + if isinstance(existing_spend_obj, dict): + existing_spend = existing_spend_obj["spend"] + else: + existing_spend = existing_spend_obj.spend + # Calculate the new cost by adding the existing cost and response_cost + new_spend = existing_spend + response_cost + + # Update the cost column for the given user + if isinstance(existing_spend_obj, dict): + existing_spend_obj["spend"] = new_spend + values_to_update_in_cache.append((_id, existing_spend_obj)) + else: + existing_spend_obj.spend = new_spend + values_to_update_in_cache.append((_id, existing_spend_obj.json())) + ## UPDATE GLOBAL PROXY ## + global_proxy_spend = await user_api_key_cache.async_get_cache( + key="{}:spend".format(litellm_proxy_admin_name) + ) + if global_proxy_spend is None: + # do nothing if not in cache + return + elif response_cost is not None and global_proxy_spend is not None: + increment = global_proxy_spend + response_cost + values_to_update_in_cache.append( + ("{}:spend".format(litellm_proxy_admin_name), increment) + ) + except Exception as e: + verbose_proxy_logger.debug( + f"An error occurred updating user cache: {str(e)}\n\n{traceback.format_exc()}" + ) + + ### UPDATE END-USER SPEND ### + async def _update_end_user_cache(): + if end_user_id is None or response_cost is None: + return + + _id = "end_user_id:{}".format(end_user_id) + try: + # Fetch the existing cost for the given user + existing_spend_obj = await user_api_key_cache.async_get_cache(key=_id) + if existing_spend_obj is None: + # if user does not exist in LiteLLM_UserTable, create a new user + # do nothing if end-user not in api key cache + return + verbose_proxy_logger.debug( + f"_update_end_user_db: existing spend: {existing_spend_obj}; response_cost: {response_cost}" + ) + if existing_spend_obj is None: + existing_spend = 0 + else: + if isinstance(existing_spend_obj, dict): + existing_spend = existing_spend_obj["spend"] + else: + existing_spend = existing_spend_obj.spend + # Calculate the new cost by adding the existing cost and response_cost + new_spend = existing_spend + response_cost + + # Update the cost column for the given user + if isinstance(existing_spend_obj, dict): + existing_spend_obj["spend"] = new_spend + values_to_update_in_cache.append((_id, existing_spend_obj)) + else: + existing_spend_obj.spend = new_spend + values_to_update_in_cache.append((_id, existing_spend_obj.json())) + except Exception as e: + verbose_proxy_logger.exception( + f"An error occurred updating end user cache: {str(e)}" + ) + + ### UPDATE TEAM SPEND ### + async def _update_team_cache(): + if team_id is None or response_cost is None: + return + + _id = "team_id:{}".format(team_id) + try: + # Fetch the existing cost for the given user + existing_spend_obj: Optional[LiteLLM_TeamTable] = ( + await user_api_key_cache.async_get_cache(key=_id) + ) + if existing_spend_obj is None: + # do nothing if team not in api key cache + return + verbose_proxy_logger.debug( + f"_update_team_db: existing spend: {existing_spend_obj}; response_cost: {response_cost}" + ) + if existing_spend_obj is None: + existing_spend: Optional[float] = 0.0 + else: + if isinstance(existing_spend_obj, dict): + existing_spend = existing_spend_obj["spend"] + else: + existing_spend = existing_spend_obj.spend + + if existing_spend is None: + existing_spend = 0.0 + # Calculate the new cost by adding the existing cost and response_cost + new_spend = existing_spend + response_cost + + # Update the cost column for the given user + if isinstance(existing_spend_obj, dict): + existing_spend_obj["spend"] = new_spend + values_to_update_in_cache.append((_id, existing_spend_obj)) + else: + existing_spend_obj.spend = new_spend + values_to_update_in_cache.append((_id, existing_spend_obj)) + except Exception as e: + verbose_proxy_logger.exception( + f"An error occurred updating end user cache: {str(e)}" + ) + + if token is not None and response_cost is not None: + await _update_key_cache(token=token, response_cost=response_cost) + + if user_id is not None: + await _update_user_cache() + + if end_user_id is not None: + await _update_end_user_cache() + + if team_id is not None: + await _update_team_cache() + + asyncio.create_task( + user_api_key_cache.async_set_cache_pipeline( + cache_list=values_to_update_in_cache, + ttl=60, + litellm_parent_otel_span=parent_otel_span, + ) + ) + + +def run_ollama_serve(): + try: + command = ["ollama", "serve"] + + with open(os.devnull, "w") as devnull: + subprocess.Popen(command, stdout=devnull, stderr=devnull) + except Exception as e: + verbose_proxy_logger.debug( + f""" + LiteLLM Warning: proxy started with `ollama` model\n`ollama serve` failed with Exception{e}. \nEnsure you run `ollama serve` + """ + ) + + +async def _run_background_health_check(): + """ + Periodically run health checks in the background on the endpoints. + + Update health_check_results, based on this. + """ + global health_check_results, llm_model_list, health_check_interval, health_check_details + + # make 1 deep copy of llm_model_list -> use this for all background health checks + _llm_model_list = copy.deepcopy(llm_model_list) + + if _llm_model_list is None: + return + + while True: + healthy_endpoints, unhealthy_endpoints = await perform_health_check( + model_list=_llm_model_list, details=health_check_details + ) + + # Update the global variable with the health check results + health_check_results["healthy_endpoints"] = healthy_endpoints + health_check_results["unhealthy_endpoints"] = unhealthy_endpoints + health_check_results["healthy_count"] = len(healthy_endpoints) + health_check_results["unhealthy_count"] = len(unhealthy_endpoints) + + if health_check_interval is not None and isinstance( + health_check_interval, float + ): + await asyncio.sleep(health_check_interval) + + +class StreamingCallbackError(Exception): + pass + + +class ProxyConfig: + """ + Abstraction class on top of config loading/updating logic. Gives us one place to control all config updating logic. + """ + + def __init__(self) -> None: + self.config: Dict[str, Any] = {} + + def is_yaml(self, config_file_path: str) -> bool: + if not os.path.isfile(config_file_path): + return False + + _, file_extension = os.path.splitext(config_file_path) + return file_extension.lower() == ".yaml" or file_extension.lower() == ".yml" + + def _load_yaml_file(self, file_path: str) -> dict: + """ + Load and parse a YAML file + """ + try: + with open(file_path, "r") as file: + return yaml.safe_load(file) or {} + except Exception as e: + raise Exception(f"Error loading yaml file {file_path}: {str(e)}") + + async def _get_config_from_file( + self, config_file_path: Optional[str] = None + ) -> dict: + """ + Given a config file path, load the config from the file. + Args: + config_file_path (str): path to the config file + Returns: + dict: config + """ + global prisma_client, user_config_file_path + + file_path = config_file_path or user_config_file_path + if config_file_path is not None: + user_config_file_path = config_file_path + # Load existing config + ## Yaml + if os.path.exists(f"{file_path}"): + with open(f"{file_path}", "r") as config_file: + config = yaml.safe_load(config_file) + elif file_path is not None: + raise Exception(f"Config file not found: {file_path}") + else: + config = { + "model_list": [], + "general_settings": {}, + "router_settings": {}, + "litellm_settings": {}, + } + + # Process includes + config = self._process_includes( + config=config, base_dir=os.path.dirname(os.path.abspath(file_path or "")) + ) + + verbose_proxy_logger.debug(f"loaded config={json.dumps(config, indent=4)}") + return config + + def _process_includes(self, config: dict, base_dir: str) -> dict: + """ + Process includes by appending their contents to the main config + + Handles nested config.yamls with `include` section + + Example config: This will get the contents from files in `include` and append it + ```yaml + include: + - model_config.yaml + + litellm_settings: + callbacks: ["prometheus"] + ``` + """ + if "include" not in config: + return config + + if not isinstance(config["include"], list): + raise ValueError("'include' must be a list of file paths") + + # Load and append all included files + for include_file in config["include"]: + file_path = os.path.join(base_dir, include_file) + if not os.path.exists(file_path): + raise FileNotFoundError(f"Included file not found: {file_path}") + + included_config = self._load_yaml_file(file_path) + # Simply update/extend the main config with included config + for key, value in included_config.items(): + if isinstance(value, list) and key in config: + config[key].extend(value) + else: + config[key] = value + + # Remove the include directive + del config["include"] + return config + + async def save_config(self, new_config: dict): + global prisma_client, general_settings, user_config_file_path, store_model_in_db + # Load existing config + ## DB - writes valid config to db + """ + - Do not write restricted params like 'api_key' to the database + - if api_key is passed, save that to the local environment or connected secret manage (maybe expose `litellm.save_secret()`) + """ + if prisma_client is not None and ( + general_settings.get("store_model_in_db", False) is True + or store_model_in_db + ): + # if using - db for config - models are in ModelTable + new_config.pop("model_list", None) + await prisma_client.insert_data(data=new_config, table_name="config") + else: + # Save the updated config - if user is not using a dB + ## YAML + with open(f"{user_config_file_path}", "w") as config_file: + yaml.dump(new_config, config_file, default_flow_style=False) + + def _check_for_os_environ_vars( + self, config: dict, depth: int = 0, max_depth: int = 10 + ) -> dict: + """ + Check for os.environ/ variables in the config and replace them with the actual values. + Includes a depth limit to prevent infinite recursion. + + Args: + config (dict): The configuration dictionary to process. + depth (int): Current recursion depth. + max_depth (int): Maximum allowed recursion depth. + + Returns: + dict: Processed configuration dictionary. + """ + if depth > max_depth: + verbose_proxy_logger.warning( + f"Maximum recursion depth ({max_depth}) reached while processing config." + ) + return config + + for key, value in config.items(): + if isinstance(value, dict): + config[key] = self._check_for_os_environ_vars( + config=value, depth=depth + 1, max_depth=max_depth + ) + elif isinstance(value, list): + for item in value: + if isinstance(item, dict): + item = self._check_for_os_environ_vars( + config=item, depth=depth + 1, max_depth=max_depth + ) + # if the value is a string and starts with "os.environ/" - then it's an environment variable + elif isinstance(value, str) and value.startswith("os.environ/"): + config[key] = get_secret(value) + return config + + def _get_team_config(self, team_id: str, all_teams_config: List[Dict]) -> Dict: + team_config: dict = {} + for team in all_teams_config: + if "team_id" not in team: + raise Exception(f"team_id missing from team: {team}") + if team_id == team["team_id"]: + team_config = team + break + for k, v in team_config.items(): + if isinstance(v, str) and v.startswith("os.environ/"): + team_config[k] = get_secret(v) + return team_config + + def load_team_config(self, team_id: str): + """ + - for a given team id + - return the relevant completion() call params + """ + + # load existing config + config = self.get_config_state() + + ## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..) + litellm_settings = config.get("litellm_settings", {}) + all_teams_config = litellm_settings.get("default_team_settings", None) + if all_teams_config is None: + return {} + team_config = self._get_team_config( + team_id=team_id, all_teams_config=all_teams_config + ) + return team_config + + def _init_cache( + self, + cache_params: dict, + ): + global redis_usage_cache, llm_router + from litellm import Cache + + if "default_in_memory_ttl" in cache_params: + litellm.default_in_memory_ttl = cache_params["default_in_memory_ttl"] + + if "default_redis_ttl" in cache_params: + litellm.default_redis_ttl = cache_params["default_in_redis_ttl"] + + litellm.cache = Cache(**cache_params) + + if litellm.cache is not None and isinstance(litellm.cache.cache, RedisCache): + ## INIT PROXY REDIS USAGE CLIENT ## + redis_usage_cache = litellm.cache.cache + + async def get_config(self, config_file_path: Optional[str] = None) -> dict: + """ + Load config file + Supports reading from: + - .yaml file paths + - LiteLLM connected DB + - GCS + - S3 + + Args: + config_file_path (str): path to the config file + Returns: + dict: config + + """ + global prisma_client, store_model_in_db + # Load existing config + + if os.environ.get("LITELLM_CONFIG_BUCKET_NAME") is not None: + bucket_name = os.environ.get("LITELLM_CONFIG_BUCKET_NAME") + object_key = os.environ.get("LITELLM_CONFIG_BUCKET_OBJECT_KEY") + bucket_type = os.environ.get("LITELLM_CONFIG_BUCKET_TYPE") + verbose_proxy_logger.debug( + "bucket_name: %s, object_key: %s", bucket_name, object_key + ) + if bucket_type == "gcs": + config = await get_config_file_contents_from_gcs( + bucket_name=bucket_name, object_key=object_key + ) + else: + config = get_file_contents_from_s3( + bucket_name=bucket_name, object_key=object_key + ) + + if config is None: + raise Exception("Unable to load config from given source.") + else: + # default to file + config = await self._get_config_from_file(config_file_path=config_file_path) + ## UPDATE CONFIG WITH DB + if prisma_client is not None and store_model_in_db is True: + config = await self._update_config_from_db( + config=config, + prisma_client=prisma_client, + store_model_in_db=store_model_in_db, + ) + + ## PRINT YAML FOR CONFIRMING IT WORKS + printed_yaml = copy.deepcopy(config) + printed_yaml.pop("environment_variables", None) + + config = self._check_for_os_environ_vars(config=config) + + self.update_config_state(config=config) + return config + + def update_config_state(self, config: dict): + self.config = config + + def get_config_state(self): + """ + Returns a deep copy of the config, + + Do this, to avoid mutating the config state outside of allowed methods + """ + try: + return copy.deepcopy(self.config) + except Exception as e: + verbose_proxy_logger.debug( + "ProxyConfig:get_config_state(): Error returning copy of config state. self.config={}\nError: {}".format( + self.config, e + ) + ) + return {} + + def load_credential_list(self, config: dict) -> List[CredentialItem]: + """ + Load the credential list from the database + """ + credential_list_dict = config.get("credential_list") + credential_list = [] + if credential_list_dict: + credential_list = [CredentialItem(**cred) for cred in credential_list_dict] + return credential_list + + async def load_config( # noqa: PLR0915 + self, router: Optional[litellm.Router], config_file_path: str + ): + """ + Load config values into proxy global state + """ + global master_key, user_config_file_path, otel_logging, user_custom_auth, user_custom_auth_path, user_custom_key_generate, user_custom_sso, use_background_health_checks, health_check_interval, use_queue, proxy_budget_rescheduler_max_time, proxy_budget_rescheduler_min_time, ui_access_mode, litellm_master_key_hash, proxy_batch_write_at, disable_spend_logs, prompt_injection_detection_obj, redis_usage_cache, store_model_in_db, premium_user, open_telemetry_logger, health_check_details, callback_settings + + config: dict = await self.get_config(config_file_path=config_file_path) + + ## ENVIRONMENT VARIABLES + environment_variables = config.get("environment_variables", None) + if environment_variables: + for key, value in environment_variables.items(): + os.environ[key] = str(get_secret(secret_name=key, default_value=value)) + + # check if litellm_license in general_settings + if "LITELLM_LICENSE" in environment_variables: + _license_check.license_str = os.getenv("LITELLM_LICENSE", None) + premium_user = _license_check.is_premium() + + ## Callback settings + callback_settings = config.get("callback_settings", None) + + ## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..) + litellm_settings = config.get("litellm_settings", None) + if litellm_settings is None: + litellm_settings = {} + if litellm_settings: + # ANSI escape code for blue text + blue_color_code = "\033[94m" + reset_color_code = "\033[0m" + for key, value in litellm_settings.items(): + if key == "cache" and value is True: + print(f"{blue_color_code}\nSetting Cache on Proxy") # noqa + from litellm.caching.caching import Cache + + cache_params = {} + if "cache_params" in litellm_settings: + cache_params_in_config = litellm_settings["cache_params"] + # overwrie cache_params with cache_params_in_config + cache_params.update(cache_params_in_config) + + cache_type = cache_params.get("type", "redis") + + verbose_proxy_logger.debug("passed cache type=%s", cache_type) + + if ( + cache_type == "redis" or cache_type == "redis-semantic" + ) and len(cache_params.keys()) == 0: + cache_host = get_secret("REDIS_HOST", None) + cache_port = get_secret("REDIS_PORT", None) + cache_password = None + cache_params.update( + { + "type": cache_type, + "host": cache_host, + "port": cache_port, + } + ) + + if get_secret("REDIS_PASSWORD", None) is not None: + cache_password = get_secret("REDIS_PASSWORD", None) + cache_params.update( + { + "password": cache_password, + } + ) + + # Assuming cache_type, cache_host, cache_port, and cache_password are strings + verbose_proxy_logger.debug( + "%sCache Type:%s %s", + blue_color_code, + reset_color_code, + cache_type, + ) + verbose_proxy_logger.debug( + "%sCache Host:%s %s", + blue_color_code, + reset_color_code, + cache_host, + ) + verbose_proxy_logger.debug( + "%sCache Port:%s %s", + blue_color_code, + reset_color_code, + cache_port, + ) + verbose_proxy_logger.debug( + "%sCache Password:%s %s", + blue_color_code, + reset_color_code, + cache_password, + ) + if cache_type == "redis-semantic": + # by default this should always be async + cache_params.update({"redis_semantic_cache_use_async": True}) + + # users can pass os.environ/ variables on the proxy - we should read them from the env + for key, value in cache_params.items(): + if type(value) is str and value.startswith("os.environ/"): + cache_params[key] = get_secret(value) + + ## to pass a complete url, or set ssl=True, etc. just set it as `os.environ[REDIS_URL] = <your-redis-url>`, _redis.py checks for REDIS specific environment variables + self._init_cache(cache_params=cache_params) + if litellm.cache is not None: + verbose_proxy_logger.debug( + f"{blue_color_code}Set Cache on LiteLLM Proxy{reset_color_code}" + ) + elif key == "cache" and value is False: + pass + elif key == "guardrails": + guardrail_name_config_map = initialize_guardrails( + guardrails_config=value, + premium_user=premium_user, + config_file_path=config_file_path, + litellm_settings=litellm_settings, + ) + + litellm.guardrail_name_config_map = guardrail_name_config_map + elif key == "callbacks": + + initialize_callbacks_on_proxy( + value=value, + premium_user=premium_user, + config_file_path=config_file_path, + litellm_settings=litellm_settings, + ) + + elif key == "post_call_rules": + litellm.post_call_rules = [ + get_instance_fn(value=value, config_file_path=config_file_path) + ] + verbose_proxy_logger.debug( + f"litellm.post_call_rules: {litellm.post_call_rules}" + ) + elif key == "max_internal_user_budget": + litellm.max_internal_user_budget = float(value) # type: ignore + elif key == "default_max_internal_user_budget": + litellm.default_max_internal_user_budget = float(value) + if litellm.max_internal_user_budget is None: + litellm.max_internal_user_budget = ( + litellm.default_max_internal_user_budget + ) + elif key == "custom_provider_map": + from litellm.utils import custom_llm_setup + + litellm.custom_provider_map = [ + { + "provider": item["provider"], + "custom_handler": get_instance_fn( + value=item["custom_handler"], + config_file_path=config_file_path, + ), + } + for item in value + ] + + custom_llm_setup() + elif key == "success_callback": + litellm.success_callback = [] + + # initialize success callbacks + for callback in value: + # user passed custom_callbacks.async_on_succes_logger. They need us to import a function + if "." in callback: + litellm.logging_callback_manager.add_litellm_success_callback( + get_instance_fn(value=callback) + ) + # these are litellm callbacks - "langfuse", "sentry", "wandb" + else: + litellm.logging_callback_manager.add_litellm_success_callback( + callback + ) + if "prometheus" in callback: + verbose_proxy_logger.debug( + "Starting Prometheus Metrics on /metrics" + ) + from prometheus_client import make_asgi_app + + # Add prometheus asgi middleware to route /metrics requests + metrics_app = make_asgi_app() + app.mount("/metrics", metrics_app) + print( # noqa + f"{blue_color_code} Initialized Success Callbacks - {litellm.success_callback} {reset_color_code}" + ) # noqa + elif key == "failure_callback": + litellm.failure_callback = [] + + # initialize success callbacks + for callback in value: + # user passed custom_callbacks.async_on_succes_logger. They need us to import a function + if "." in callback: + litellm.logging_callback_manager.add_litellm_failure_callback( + get_instance_fn(value=callback) + ) + # these are litellm callbacks - "langfuse", "sentry", "wandb" + else: + litellm.logging_callback_manager.add_litellm_failure_callback( + callback + ) + print( # noqa + f"{blue_color_code} Initialized Failure Callbacks - {litellm.failure_callback} {reset_color_code}" + ) # noqa + elif key == "cache_params": + # this is set in the cache branch + # see usage here: https://docs.litellm.ai/docs/proxy/caching + pass + elif key == "default_team_settings": + for idx, team_setting in enumerate( + value + ): # run through pydantic validation + try: + TeamDefaultSettings(**team_setting) + except Exception: + if isinstance(team_setting, dict): + raise Exception( + f"team_id missing from default_team_settings at index={idx}\npassed in value={team_setting.keys()}" + ) + raise Exception( + f"team_id missing from default_team_settings at index={idx}\npassed in value={type(team_setting)}" + ) + verbose_proxy_logger.debug( + f"{blue_color_code} setting litellm.{key}={value}{reset_color_code}" + ) + setattr(litellm, key, value) + elif key == "upperbound_key_generate_params": + if value is not None and isinstance(value, dict): + for _k, _v in value.items(): + if isinstance(_v, str) and _v.startswith("os.environ/"): + value[_k] = get_secret(_v) + litellm.upperbound_key_generate_params = ( + LiteLLM_UpperboundKeyGenerateParams(**value) + ) + else: + raise Exception( + f"Invalid value set for upperbound_key_generate_params - value={value}" + ) + else: + verbose_proxy_logger.debug( + f"{blue_color_code} setting litellm.{key}={value}{reset_color_code}" + ) + setattr(litellm, key, value) + + ## GENERAL SERVER SETTINGS (e.g. master key,..) # do this after initializing litellm, to ensure sentry logging works for proxylogging + general_settings = config.get("general_settings", {}) + if general_settings is None: + general_settings = {} + if general_settings: + ### LOAD SECRET MANAGER ### + key_management_system = general_settings.get("key_management_system", None) + self.initialize_secret_manager(key_management_system=key_management_system) + key_management_settings = general_settings.get( + "key_management_settings", None + ) + if key_management_settings is not None: + litellm._key_management_settings = KeyManagementSettings( + **key_management_settings + ) + ### [DEPRECATED] LOAD FROM GOOGLE KMS ### old way of loading from google kms + use_google_kms = general_settings.get("use_google_kms", False) + load_google_kms(use_google_kms=use_google_kms) + ### [DEPRECATED] LOAD FROM AZURE KEY VAULT ### old way of loading from azure secret manager + use_azure_key_vault = general_settings.get("use_azure_key_vault", False) + load_from_azure_key_vault(use_azure_key_vault=use_azure_key_vault) + ### ALERTING ### + self._load_alerting_settings(general_settings=general_settings) + ### CONNECT TO DATABASE ### + database_url = general_settings.get("database_url", None) + if database_url and database_url.startswith("os.environ/"): + verbose_proxy_logger.debug("GOING INTO LITELLM.GET_SECRET!") + database_url = get_secret(database_url) + verbose_proxy_logger.debug("RETRIEVED DB URL: %s", database_url) + ### MASTER KEY ### + master_key = general_settings.get( + "master_key", get_secret("LITELLM_MASTER_KEY", None) + ) + + if master_key and master_key.startswith("os.environ/"): + master_key = get_secret(master_key) # type: ignore + if not isinstance(master_key, str): + raise Exception( + "Master key must be a string. Current type - {}".format( + type(master_key) + ) + ) + + if master_key is not None and isinstance(master_key, str): + litellm_master_key_hash = hash_token(master_key) + ### USER API KEY CACHE IN-MEMORY TTL ### + user_api_key_cache_ttl = general_settings.get( + "user_api_key_cache_ttl", None + ) + if user_api_key_cache_ttl is not None: + user_api_key_cache.update_cache_ttl( + default_in_memory_ttl=float(user_api_key_cache_ttl), + default_redis_ttl=None, # user_api_key_cache is an in-memory cache + ) + ### STORE MODEL IN DB ### feature flag for `/model/new` + store_model_in_db = general_settings.get("store_model_in_db", False) + if store_model_in_db is None: + store_model_in_db = False + ### CUSTOM API KEY AUTH ### + ## pass filepath + custom_auth = general_settings.get("custom_auth", None) + if custom_auth is not None: + user_custom_auth = get_instance_fn( + value=custom_auth, config_file_path=config_file_path + ) + + custom_key_generate = general_settings.get("custom_key_generate", None) + if custom_key_generate is not None: + user_custom_key_generate = get_instance_fn( + value=custom_key_generate, config_file_path=config_file_path + ) + + custom_sso = general_settings.get("custom_sso", None) + if custom_sso is not None: + user_custom_sso = get_instance_fn( + value=custom_sso, config_file_path=config_file_path + ) + + ## pass through endpoints + if general_settings.get("pass_through_endpoints", None) is not None: + await initialize_pass_through_endpoints( + pass_through_endpoints=general_settings["pass_through_endpoints"] + ) + ## ADMIN UI ACCESS ## + ui_access_mode = general_settings.get( + "ui_access_mode", "all" + ) # can be either ["admin_only" or "all"] + ### ALLOWED IP ### + allowed_ips = general_settings.get("allowed_ips", None) + if allowed_ips is not None and premium_user is False: + raise ValueError( + "allowed_ips is an Enterprise Feature. Please add a valid LITELLM_LICENSE to your envionment." + ) + ## BUDGET RESCHEDULER ## + proxy_budget_rescheduler_min_time = general_settings.get( + "proxy_budget_rescheduler_min_time", proxy_budget_rescheduler_min_time + ) + proxy_budget_rescheduler_max_time = general_settings.get( + "proxy_budget_rescheduler_max_time", proxy_budget_rescheduler_max_time + ) + ## BATCH WRITER ## + proxy_batch_write_at = general_settings.get( + "proxy_batch_write_at", proxy_batch_write_at + ) + ## DISABLE SPEND LOGS ## - gives a perf improvement + disable_spend_logs = general_settings.get( + "disable_spend_logs", disable_spend_logs + ) + ### BACKGROUND HEALTH CHECKS ### + # Enable background health checks + use_background_health_checks = general_settings.get( + "background_health_checks", False + ) + health_check_interval = general_settings.get("health_check_interval", 300) + health_check_details = general_settings.get("health_check_details", True) + + ### RBAC ### + rbac_role_permissions = general_settings.get("role_permissions", None) + if rbac_role_permissions is not None: + general_settings["role_permissions"] = [ # validate role permissions + RoleBasedPermissions(**role_permission) + for role_permission in rbac_role_permissions + ] + + ## check if user has set a premium feature in general_settings + if ( + general_settings.get("enforced_params") is not None + and premium_user is not True + ): + raise ValueError( + "Trying to use `enforced_params`" + + CommonProxyErrors.not_premium_user.value + ) + + # check if litellm_license in general_settings + if "litellm_license" in general_settings: + _license_check.license_str = general_settings["litellm_license"] + premium_user = _license_check.is_premium() + + router_params: dict = { + "cache_responses": litellm.cache + is not None, # cache if user passed in cache values + } + ## MODEL LIST + model_list = config.get("model_list", None) + if model_list: + router_params["model_list"] = model_list + print( # noqa + "\033[32mLiteLLM: Proxy initialized with Config, Set models:\033[0m" + ) # noqa + for model in model_list: + ### LOAD FROM os.environ/ ### + for k, v in model["litellm_params"].items(): + if isinstance(v, str) and v.startswith("os.environ/"): + model["litellm_params"][k] = get_secret(v) + print(f"\033[32m {model.get('model_name', '')}\033[0m") # noqa + litellm_model_name = model["litellm_params"]["model"] + litellm_model_api_base = model["litellm_params"].get("api_base", None) + if "ollama" in litellm_model_name and litellm_model_api_base is None: + run_ollama_serve() + + ## ASSISTANT SETTINGS + assistants_config: Optional[AssistantsTypedDict] = None + assistant_settings = config.get("assistant_settings", None) + if assistant_settings: + for k, v in assistant_settings["litellm_params"].items(): + if isinstance(v, str) and v.startswith("os.environ/"): + _v = v.replace("os.environ/", "") + v = os.getenv(_v) + assistant_settings["litellm_params"][k] = v + assistants_config = AssistantsTypedDict(**assistant_settings) # type: ignore + + ## /fine_tuning/jobs endpoints config + finetuning_config = config.get("finetune_settings", None) + set_fine_tuning_config(config=finetuning_config) + + ## /files endpoint config + files_config = config.get("files_settings", None) + set_files_config(config=files_config) + + ## default config for vertex ai routes + default_vertex_config = config.get("default_vertex_config", None) + set_default_vertex_config(config=default_vertex_config) + + ## ROUTER SETTINGS (e.g. routing_strategy, ...) + router_settings = config.get("router_settings", None) + if router_settings and isinstance(router_settings, dict): + arg_spec = inspect.getfullargspec(litellm.Router) + # model list already set + exclude_args = { + "self", + "model_list", + } + + available_args = [x for x in arg_spec.args if x not in exclude_args] + + for k, v in router_settings.items(): + if k in available_args: + router_params[k] = v + router = litellm.Router( + **router_params, + assistants_config=assistants_config, + router_general_settings=RouterGeneralSettings( + async_only_mode=True # only init async clients + ), + ) # type:ignore + + if redis_usage_cache is not None and router.cache.redis_cache is None: + router._update_redis_cache(cache=redis_usage_cache) + + # Guardrail settings + guardrails_v2: Optional[List[Dict]] = None + + if config is not None: + guardrails_v2 = config.get("guardrails", None) + if guardrails_v2: + init_guardrails_v2( + all_guardrails=guardrails_v2, config_file_path=config_file_path + ) + + ## CREDENTIALS + credential_list_dict = self.load_credential_list(config=config) + litellm.credential_list = credential_list_dict + return router, router.get_model_list(), general_settings + + def _load_alerting_settings(self, general_settings: dict): + """ + Initialize alerting settings + """ + from litellm.litellm_core_utils.litellm_logging import ( + _init_custom_logger_compatible_class, + ) + + _alerting_callbacks = general_settings.get("alerting", None) + verbose_proxy_logger.debug(f"_alerting_callbacks: {general_settings}") + if _alerting_callbacks is None: + return + for _alert in _alerting_callbacks: + if _alert == "slack": + # [OLD] v0 implementation + proxy_logging_obj.update_values( + alerting=general_settings.get("alerting", None), + alerting_threshold=general_settings.get("alerting_threshold", 600), + alert_types=general_settings.get("alert_types", None), + alert_to_webhook_url=general_settings.get( + "alert_to_webhook_url", None + ), + alerting_args=general_settings.get("alerting_args", None), + redis_cache=redis_usage_cache, + ) + else: + # [NEW] v1 implementation - init as a custom logger + if _alert in litellm._known_custom_logger_compatible_callbacks: + _logger = _init_custom_logger_compatible_class( + logging_integration=_alert, + internal_usage_cache=None, + llm_router=None, + custom_logger_init_args={ + "alerting_args": general_settings.get("alerting_args", None) + }, + ) + if _logger is not None: + litellm.logging_callback_manager.add_litellm_callback(_logger) + pass + + def initialize_secret_manager(self, key_management_system: Optional[str]): + """ + Initialize the relevant secret manager if `key_management_system` is provided + """ + if key_management_system is not None: + if key_management_system == KeyManagementSystem.AZURE_KEY_VAULT.value: + ### LOAD FROM AZURE KEY VAULT ### + load_from_azure_key_vault(use_azure_key_vault=True) + elif key_management_system == KeyManagementSystem.GOOGLE_KMS.value: + ### LOAD FROM GOOGLE KMS ### + load_google_kms(use_google_kms=True) + elif ( + key_management_system + == KeyManagementSystem.AWS_SECRET_MANAGER.value # noqa: F405 + ): + from litellm.secret_managers.aws_secret_manager_v2 import ( + AWSSecretsManagerV2, + ) + + AWSSecretsManagerV2.load_aws_secret_manager(use_aws_secret_manager=True) + elif key_management_system == KeyManagementSystem.AWS_KMS.value: + load_aws_kms(use_aws_kms=True) + elif ( + key_management_system == KeyManagementSystem.GOOGLE_SECRET_MANAGER.value + ): + from litellm.secret_managers.google_secret_manager import ( + GoogleSecretManager, + ) + + GoogleSecretManager() + elif key_management_system == KeyManagementSystem.HASHICORP_VAULT.value: + from litellm.secret_managers.hashicorp_secret_manager import ( + HashicorpSecretManager, + ) + + HashicorpSecretManager() + else: + raise ValueError("Invalid Key Management System selected") + + def get_model_info_with_id(self, model, db_model=False) -> RouterModelInfo: + """ + Common logic across add + delete router models + Parameters: + - deployment + - db_model -> flag for differentiating model stored in db vs. config -> used on UI + + Return model info w/ id + """ + _id: Optional[str] = getattr(model, "model_id", None) + if _id is not None: + model.model_info["id"] = _id + model.model_info["db_model"] = True + + if premium_user is True: + # seeing "created_at", "updated_at", "created_by", "updated_by" is a LiteLLM Enterprise Feature + model.model_info["created_at"] = getattr(model, "created_at", None) + model.model_info["updated_at"] = getattr(model, "updated_at", None) + model.model_info["created_by"] = getattr(model, "created_by", None) + model.model_info["updated_by"] = getattr(model, "updated_by", None) + + if model.model_info is not None and isinstance(model.model_info, dict): + if "id" not in model.model_info: + model.model_info["id"] = model.model_id + if "db_model" in model.model_info and model.model_info["db_model"] is False: + model.model_info["db_model"] = db_model + _model_info = RouterModelInfo(**model.model_info) + + else: + _model_info = RouterModelInfo(id=model.model_id, db_model=db_model) + return _model_info + + async def _delete_deployment(self, db_models: list) -> int: + """ + (Helper function of add deployment) -> combined to reduce prisma db calls + + - Create all up list of model id's (db + config) + - Compare all up list to router model id's + - Remove any that are missing + + Return: + - int - returns number of deleted deployments + """ + global user_config_file_path, llm_router + combined_id_list = [] + + ## BASE CASES ## + # if llm_router is None or db_models is empty, return 0 + if llm_router is None or len(db_models) == 0: + return 0 + + ## DB MODELS ## + for m in db_models: + model_info = self.get_model_info_with_id(model=m) + if model_info.id is not None: + combined_id_list.append(model_info.id) + + ## CONFIG MODELS ## + config = await self.get_config(config_file_path=user_config_file_path) + model_list = config.get("model_list", None) + if model_list: + for model in model_list: + ### LOAD FROM os.environ/ ### + for k, v in model["litellm_params"].items(): + if isinstance(v, str) and v.startswith("os.environ/"): + model["litellm_params"][k] = get_secret(v) + + ## check if they have model-id's ## + model_id = model.get("model_info", {}).get("id", None) + if model_id is None: + ## else - generate stable id's ## + model_id = llm_router._generate_model_id( + model_group=model["model_name"], + litellm_params=model["litellm_params"], + ) + combined_id_list.append(model_id) # ADD CONFIG MODEL TO COMBINED LIST + + router_model_ids = llm_router.get_model_ids() + # Check for model IDs in llm_router not present in combined_id_list and delete them + + deleted_deployments = 0 + for model_id in router_model_ids: + if model_id not in combined_id_list: + is_deleted = llm_router.delete_deployment(id=model_id) + if is_deleted is not None: + deleted_deployments += 1 + return deleted_deployments + + def _add_deployment(self, db_models: list) -> int: + """ + Iterate through db models + + for any not in router - add them. + + Return - number of deployments added + """ + import base64 + + if master_key is None or not isinstance(master_key, str): + raise Exception( + f"Master key is not initialized or formatted. master_key={master_key}" + ) + + if llm_router is None: + return 0 + + added_models = 0 + ## ADD MODEL LOGIC + for m in db_models: + _litellm_params = m.litellm_params + if isinstance(_litellm_params, dict): + # decrypt values + for k, v in _litellm_params.items(): + if isinstance(v, str): + # decrypt value + _value = decrypt_value_helper(value=v) + if _value is None: + raise Exception("Unable to decrypt value={}".format(v)) + # sanity check if string > size 0 + if len(_value) > 0: + _litellm_params[k] = _value + _litellm_params = LiteLLM_Params(**_litellm_params) + + else: + verbose_proxy_logger.error( + f"Invalid model added to proxy db. Invalid litellm params. litellm_params={_litellm_params}" + ) + continue # skip to next model + _model_info = self.get_model_info_with_id( + model=m, db_model=True + ) ## 👈 FLAG = True for db_models + + added = llm_router.upsert_deployment( + deployment=Deployment( + model_name=m.model_name, + litellm_params=_litellm_params, + model_info=_model_info, + ) + ) + + if added is not None: + added_models += 1 + return added_models + + def decrypt_model_list_from_db(self, new_models: list) -> list: + _model_list: list = [] + for m in new_models: + _litellm_params = m.litellm_params + if isinstance(_litellm_params, dict): + # decrypt values + for k, v in _litellm_params.items(): + decrypted_value = decrypt_value_helper(value=v) + _litellm_params[k] = decrypted_value + _litellm_params = LiteLLM_Params(**_litellm_params) + else: + verbose_proxy_logger.error( + f"Invalid model added to proxy db. Invalid litellm params. litellm_params={_litellm_params}" + ) + continue # skip to next model + + _model_info = self.get_model_info_with_id(model=m) + _model_list.append( + Deployment( + model_name=m.model_name, + litellm_params=_litellm_params, + model_info=_model_info, + ).to_json(exclude_none=True) + ) + + return _model_list + + async def _update_llm_router( + self, + new_models: list, + proxy_logging_obj: ProxyLogging, + ): + global llm_router, llm_model_list, master_key, general_settings + + try: + if llm_router is None and master_key is not None: + verbose_proxy_logger.debug(f"len new_models: {len(new_models)}") + + _model_list: list = self.decrypt_model_list_from_db( + new_models=new_models + ) + if len(_model_list) > 0: + verbose_proxy_logger.debug(f"_model_list: {_model_list}") + llm_router = litellm.Router( + model_list=_model_list, + router_general_settings=RouterGeneralSettings( + async_only_mode=True # only init async clients + ), + ) + verbose_proxy_logger.debug(f"updated llm_router: {llm_router}") + else: + verbose_proxy_logger.debug(f"len new_models: {len(new_models)}") + ## DELETE MODEL LOGIC + await self._delete_deployment(db_models=new_models) + + ## ADD MODEL LOGIC + self._add_deployment(db_models=new_models) + + except Exception as e: + verbose_proxy_logger.exception( + f"Error adding/deleting model to llm_router: {str(e)}" + ) + + if llm_router is not None: + llm_model_list = llm_router.get_model_list() + + # check if user set any callbacks in Config Table + config_data = await proxy_config.get_config() + self._add_callbacks_from_db_config(config_data) + + # we need to set env variables too + self._add_environment_variables_from_db_config(config_data) + + # router settings + await self._add_router_settings_from_db_config( + config_data=config_data, llm_router=llm_router, prisma_client=prisma_client + ) + + # general settings + self._add_general_settings_from_db_config( + config_data=config_data, + general_settings=general_settings, + proxy_logging_obj=proxy_logging_obj, + ) + + def _add_callbacks_from_db_config(self, config_data: dict) -> None: + """ + Adds callbacks from DB config to litellm + """ + litellm_settings = config_data.get("litellm_settings", {}) or {} + success_callbacks = litellm_settings.get("success_callback", None) + failure_callbacks = litellm_settings.get("failure_callback", None) + + if success_callbacks is not None and isinstance(success_callbacks, list): + for success_callback in success_callbacks: + if ( + success_callback + in litellm._known_custom_logger_compatible_callbacks + ): + _add_custom_logger_callback_to_specific_event( + success_callback, "success" + ) + elif success_callback not in litellm.success_callback: + litellm.logging_callback_manager.add_litellm_success_callback( + success_callback + ) + + # Add failure callbacks from DB to litellm + if failure_callbacks is not None and isinstance(failure_callbacks, list): + for failure_callback in failure_callbacks: + if ( + failure_callback + in litellm._known_custom_logger_compatible_callbacks + ): + _add_custom_logger_callback_to_specific_event( + failure_callback, "failure" + ) + elif failure_callback not in litellm.failure_callback: + litellm.logging_callback_manager.add_litellm_failure_callback( + failure_callback + ) + + def _add_environment_variables_from_db_config(self, config_data: dict) -> None: + """ + Adds environment variables from DB config to litellm + """ + environment_variables = config_data.get("environment_variables", {}) + self._decrypt_and_set_db_env_variables(environment_variables) + + def _encrypt_env_variables( + self, environment_variables: dict, new_encryption_key: Optional[str] = None + ) -> dict: + """ + Encrypts a dictionary of environment variables and returns them. + """ + encrypted_env_vars = {} + for k, v in environment_variables.items(): + encrypted_value = encrypt_value_helper( + value=v, new_encryption_key=new_encryption_key + ) + encrypted_env_vars[k] = encrypted_value + return encrypted_env_vars + + def _decrypt_and_set_db_env_variables(self, environment_variables: dict) -> dict: + """ + Decrypts a dictionary of environment variables and then sets them in the environment + + Args: + environment_variables: dict - dictionary of environment variables to decrypt and set + eg. `{"LANGFUSE_PUBLIC_KEY": "kFiKa1VZukMmD8RB6WXB9F......."}` + """ + decrypted_env_vars = {} + for k, v in environment_variables.items(): + try: + decrypted_value = decrypt_value_helper(value=v) + if decrypted_value is not None: + os.environ[k] = decrypted_value + decrypted_env_vars[k] = decrypted_value + except Exception as e: + verbose_proxy_logger.error( + "Error setting env variable: %s - %s", k, str(e) + ) + return decrypted_env_vars + + async def _add_router_settings_from_db_config( + self, + config_data: dict, + llm_router: Optional[Router], + prisma_client: Optional[PrismaClient], + ) -> None: + """ + Adds router settings from DB config to litellm proxy + """ + if llm_router is not None and prisma_client is not None: + db_router_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "router_settings"} + ) + if ( + db_router_settings is not None + and db_router_settings.param_value is not None + ): + _router_settings = db_router_settings.param_value + llm_router.update_settings(**_router_settings) + + def _add_general_settings_from_db_config( + self, config_data: dict, general_settings: dict, proxy_logging_obj: ProxyLogging + ) -> None: + """ + Adds general settings from DB config to litellm proxy + + Args: + config_data: dict + general_settings: dict - global general_settings currently in use + proxy_logging_obj: ProxyLogging + """ + _general_settings = config_data.get("general_settings", {}) + if "alerting" in _general_settings: + if ( + general_settings is not None + and general_settings.get("alerting", None) is not None + and isinstance(general_settings["alerting"], list) + and _general_settings.get("alerting", None) is not None + and isinstance(_general_settings["alerting"], list) + ): + verbose_proxy_logger.debug( + "Overriding Default 'alerting' values with db 'alerting' values." + ) + general_settings["alerting"] = _general_settings[ + "alerting" + ] # override yaml values with db + proxy_logging_obj.alerting = general_settings["alerting"] + proxy_logging_obj.slack_alerting_instance.alerting = general_settings[ + "alerting" + ] + elif general_settings is None: + general_settings = {} + general_settings["alerting"] = _general_settings["alerting"] + proxy_logging_obj.alerting = general_settings["alerting"] + proxy_logging_obj.slack_alerting_instance.alerting = general_settings[ + "alerting" + ] + elif isinstance(general_settings, dict): + general_settings["alerting"] = _general_settings["alerting"] + proxy_logging_obj.alerting = general_settings["alerting"] + proxy_logging_obj.slack_alerting_instance.alerting = general_settings[ + "alerting" + ] + + if "alert_types" in _general_settings: + general_settings["alert_types"] = _general_settings["alert_types"] + proxy_logging_obj.alert_types = general_settings["alert_types"] + proxy_logging_obj.slack_alerting_instance.update_values( + alert_types=general_settings["alert_types"], llm_router=llm_router + ) + + if "alert_to_webhook_url" in _general_settings: + general_settings["alert_to_webhook_url"] = _general_settings[ + "alert_to_webhook_url" + ] + proxy_logging_obj.slack_alerting_instance.update_values( + alert_to_webhook_url=general_settings["alert_to_webhook_url"], + llm_router=llm_router, + ) + + async def _update_general_settings(self, db_general_settings: Optional[Json]): + """ + Pull from DB, read general settings value + """ + global general_settings + if db_general_settings is None: + return + _general_settings = dict(db_general_settings) + ## MAX PARALLEL REQUESTS ## + if "max_parallel_requests" in _general_settings: + general_settings["max_parallel_requests"] = _general_settings[ + "max_parallel_requests" + ] + + if "global_max_parallel_requests" in _general_settings: + general_settings["global_max_parallel_requests"] = _general_settings[ + "global_max_parallel_requests" + ] + + ## ALERTING ARGS ## + if "alerting_args" in _general_settings: + general_settings["alerting_args"] = _general_settings["alerting_args"] + proxy_logging_obj.slack_alerting_instance.update_values( + alerting_args=general_settings["alerting_args"], + ) + + ## PASS-THROUGH ENDPOINTS ## + if "pass_through_endpoints" in _general_settings: + general_settings["pass_through_endpoints"] = _general_settings[ + "pass_through_endpoints" + ] + await initialize_pass_through_endpoints( + pass_through_endpoints=general_settings["pass_through_endpoints"] + ) + + def _update_config_fields( + self, + current_config: dict, + param_name: Literal[ + "general_settings", + "router_settings", + "litellm_settings", + "environment_variables", + ], + db_param_value: Any, + ) -> dict: + """ + Updates the config fields with the new values from the DB + + Args: + current_config (dict): Current configuration dictionary to update + param_name (Literal): Name of the parameter to update + db_param_value (Any): New value from the database + + Returns: + dict: Updated configuration dictionary + """ + if param_name == "environment_variables": + self._decrypt_and_set_db_env_variables(db_param_value) + return current_config + + # If param doesn't exist in config, add it + if param_name not in current_config: + current_config[param_name] = db_param_value + return current_config + + # For dictionary values, update only non-empty values + if isinstance(current_config[param_name], dict): + # Only keep non None values from db_param_value + non_empty_values = {k: v for k, v in db_param_value.items() if v} + + # Update the config with non-empty values + current_config[param_name].update(non_empty_values) + else: + current_config[param_name] = db_param_value + return current_config + + async def _update_config_from_db( + self, + prisma_client: PrismaClient, + config: dict, + store_model_in_db: Optional[bool], + ): + if store_model_in_db is not True: + verbose_proxy_logger.info( + "'store_model_in_db' is not True, skipping db updates" + ) + return config + + _tasks = [] + keys = [ + "general_settings", + "router_settings", + "litellm_settings", + "environment_variables", + ] + for k in keys: + response = prisma_client.get_generic_data( + key="param_name", value=k, table_name="config" + ) + _tasks.append(response) + + responses = await asyncio.gather(*_tasks) + for response in responses: + if response is None: + continue + + param_name = getattr(response, "param_name", None) + param_value = getattr(response, "param_value", None) + verbose_proxy_logger.debug( + f"param_name={param_name}, param_value={param_value}" + ) + + if param_name is not None and param_value is not None: + config = self._update_config_fields( + current_config=config, + param_name=param_name, + db_param_value=param_value, + ) + + return config + + async def _get_models_from_db(self, prisma_client: PrismaClient) -> list: + try: + new_models = await prisma_client.db.litellm_proxymodeltable.find_many() + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy_server.py::add_deployment() - Error getting new models from DB - {}".format( + str(e) + ) + ) + new_models = [] + + return new_models + + async def add_deployment( + self, + prisma_client: PrismaClient, + proxy_logging_obj: ProxyLogging, + ): + """ + - Check db for new models + - Check if model id's in router already + - If not, add to router + """ + global llm_router, llm_model_list, master_key, general_settings + + try: + if master_key is None or not isinstance(master_key, str): + raise ValueError( + f"Master key is not initialized or formatted. master_key={master_key}" + ) + + new_models = await self._get_models_from_db(prisma_client=prisma_client) + + # update llm router + await self._update_llm_router( + new_models=new_models, proxy_logging_obj=proxy_logging_obj + ) + + db_general_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "general_settings"} + ) + + # update general settings + if db_general_settings is not None: + await self._update_general_settings( + db_general_settings=db_general_settings.param_value, + ) + + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.py::ProxyConfig:add_deployment - {}".format( + str(e) + ) + ) + + def decrypt_credentials(self, credential: Union[dict, BaseModel]) -> CredentialItem: + if isinstance(credential, dict): + credential_object = CredentialItem(**credential) + elif isinstance(credential, BaseModel): + credential_object = CredentialItem(**credential.model_dump()) + + decrypted_credential_values = {} + for k, v in credential_object.credential_values.items(): + decrypted_credential_values[k] = decrypt_value_helper(v) or v + + credential_object.credential_values = decrypted_credential_values + return credential_object + + async def delete_credentials(self, db_credentials: List[CredentialItem]): + """ + Create all-up list of db credentials + local credentials + Compare to the litellm.credential_list + Delete any from litellm.credential_list that are not in the all-up list + """ + ## CONFIG credentials ## + config = await self.get_config(config_file_path=user_config_file_path) + credential_list = self.load_credential_list(config=config) + + ## COMBINED LIST ## + combined_list = db_credentials + credential_list + + ## DELETE ## + idx_to_delete = [] + for idx, credential in enumerate(litellm.credential_list): + if credential.credential_name not in [ + cred.credential_name for cred in combined_list + ]: + idx_to_delete.append(idx) + for idx in sorted(idx_to_delete, reverse=True): + litellm.credential_list.pop(idx) + + async def get_credentials(self, prisma_client: PrismaClient): + try: + credentials = await prisma_client.db.litellm_credentialstable.find_many() + credentials = [self.decrypt_credentials(cred) for cred in credentials] + await self.delete_credentials( + credentials + ) # delete credentials that are not in the all-up list + CredentialAccessor.upsert_credentials( + credentials + ) # upsert credentials that are in the all-up list + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy_server.py::get_credentials() - Error getting credentials from DB - {}".format( + str(e) + ) + ) + return [] + + +proxy_config = ProxyConfig() + + +def save_worker_config(**data): + import json + + os.environ["WORKER_CONFIG"] = json.dumps(data) + + +async def initialize( # noqa: PLR0915 + model=None, + alias=None, + api_base=None, + api_version=None, + debug=False, + detailed_debug=False, + temperature=None, + max_tokens=None, + request_timeout=600, + max_budget=None, + telemetry=False, + drop_params=True, + add_function_to_prompt=True, + headers=None, + save=False, + use_queue=False, + config=None, +): + global user_model, user_api_base, user_debug, user_detailed_debug, user_user_max_tokens, user_request_timeout, user_temperature, user_telemetry, user_headers, experimental, llm_model_list, llm_router, general_settings, master_key, user_custom_auth, prisma_client + if os.getenv("LITELLM_DONT_SHOW_FEEDBACK_BOX", "").lower() != "true": + generate_feedback_box() + user_model = model + user_debug = debug + if debug is True: # this needs to be first, so users can see Router init debugg + import logging + + from litellm._logging import ( + verbose_logger, + verbose_proxy_logger, + verbose_router_logger, + ) + + # this must ALWAYS remain logging.INFO, DO NOT MODIFY THIS + verbose_logger.setLevel(level=logging.INFO) # sets package logs to info + verbose_router_logger.setLevel(level=logging.INFO) # set router logs to info + verbose_proxy_logger.setLevel(level=logging.INFO) # set proxy logs to info + if detailed_debug is True: + import logging + + from litellm._logging import ( + verbose_logger, + verbose_proxy_logger, + verbose_router_logger, + ) + + verbose_logger.setLevel(level=logging.DEBUG) # set package log to debug + verbose_router_logger.setLevel(level=logging.DEBUG) # set router logs to debug + verbose_proxy_logger.setLevel(level=logging.DEBUG) # set proxy logs to debug + elif debug is False and detailed_debug is False: + # users can control proxy debugging using env variable = 'LITELLM_LOG' + litellm_log_setting = os.environ.get("LITELLM_LOG", "") + if litellm_log_setting is not None: + if litellm_log_setting.upper() == "INFO": + import logging + + from litellm._logging import verbose_proxy_logger, verbose_router_logger + + # this must ALWAYS remain logging.INFO, DO NOT MODIFY THIS + + verbose_router_logger.setLevel( + level=logging.INFO + ) # set router logs to info + verbose_proxy_logger.setLevel( + level=logging.INFO + ) # set proxy logs to info + elif litellm_log_setting.upper() == "DEBUG": + import logging + + from litellm._logging import verbose_proxy_logger, verbose_router_logger + + verbose_router_logger.setLevel( + level=logging.DEBUG + ) # set router logs to info + verbose_proxy_logger.setLevel( + level=logging.DEBUG + ) # set proxy logs to debug + dynamic_config = {"general": {}, user_model: {}} + if config: + ( + llm_router, + llm_model_list, + general_settings, + ) = await proxy_config.load_config(router=llm_router, config_file_path=config) + if headers: # model-specific param + user_headers = headers + dynamic_config[user_model]["headers"] = headers + if api_base: # model-specific param + user_api_base = api_base + dynamic_config[user_model]["api_base"] = api_base + if api_version: + os.environ["AZURE_API_VERSION"] = ( + api_version # set this for azure - litellm can read this from the env + ) + if max_tokens: # model-specific param + dynamic_config[user_model]["max_tokens"] = max_tokens + if temperature: # model-specific param + user_temperature = temperature + dynamic_config[user_model]["temperature"] = temperature + if request_timeout: + user_request_timeout = request_timeout + dynamic_config[user_model]["request_timeout"] = request_timeout + if alias: # model-specific param + dynamic_config[user_model]["alias"] = alias + if drop_params is True: # litellm-specific param + litellm.drop_params = True + dynamic_config["general"]["drop_params"] = True + if add_function_to_prompt is True: # litellm-specific param + litellm.add_function_to_prompt = True + dynamic_config["general"]["add_function_to_prompt"] = True + if max_budget: # litellm-specific param + litellm.max_budget = max_budget + dynamic_config["general"]["max_budget"] = max_budget + if experimental: + pass + user_telemetry = telemetry + + +# for streaming +def data_generator(response): + verbose_proxy_logger.debug("inside generator") + for chunk in response: + verbose_proxy_logger.debug("returned chunk: %s", chunk) + try: + yield f"data: {json.dumps(chunk.dict())}\n\n" + except Exception: + yield f"data: {json.dumps(chunk)}\n\n" + + +async def async_assistants_data_generator( + response, user_api_key_dict: UserAPIKeyAuth, request_data: dict +): + verbose_proxy_logger.debug("inside generator") + try: + time.time() + async with response as chunk: + + ### CALL HOOKS ### - modify outgoing data + chunk = await proxy_logging_obj.async_post_call_streaming_hook( + user_api_key_dict=user_api_key_dict, response=chunk + ) + + # chunk = chunk.model_dump_json(exclude_none=True) + async for c in chunk: # type: ignore + c = c.model_dump_json(exclude_none=True) + try: + yield f"data: {c}\n\n" + except Exception as e: + yield f"data: {str(e)}\n\n" + + # Streaming is done, yield the [DONE] chunk + done_message = "[DONE]" + yield f"data: {done_message}\n\n" + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.async_assistants_data_generator(): Exception occured - {}".format( + str(e) + ) + ) + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data=request_data, + ) + verbose_proxy_logger.debug( + f"\033[1;31mAn error occurred: {e}\n\n Debug this by setting `--debug`, e.g. `litellm --model gpt-3.5-turbo --debug`" + ) + if isinstance(e, HTTPException): + raise e + else: + error_traceback = traceback.format_exc() + error_msg = f"{str(e)}\n\n{error_traceback}" + + proxy_exception = ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + error_returned = json.dumps({"error": proxy_exception.to_dict()}) + yield f"data: {error_returned}\n\n" + + +async def async_data_generator( + response, user_api_key_dict: UserAPIKeyAuth, request_data: dict +): + verbose_proxy_logger.debug("inside generator") + try: + async for chunk in proxy_logging_obj.async_post_call_streaming_iterator_hook( + user_api_key_dict=user_api_key_dict, + response=response, + request_data=request_data, + ): + verbose_proxy_logger.debug( + "async_data_generator: received streaming chunk - {}".format(chunk) + ) + ### CALL HOOKS ### - modify outgoing data + chunk = await proxy_logging_obj.async_post_call_streaming_hook( + user_api_key_dict=user_api_key_dict, response=chunk + ) + + if isinstance(chunk, BaseModel): + chunk = chunk.model_dump_json(exclude_none=True, exclude_unset=True) + + try: + yield f"data: {chunk}\n\n" + except Exception as e: + yield f"data: {str(e)}\n\n" + + # Streaming is done, yield the [DONE] chunk + done_message = "[DONE]" + yield f"data: {done_message}\n\n" + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.async_data_generator(): Exception occured - {}".format( + str(e) + ) + ) + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data=request_data, + ) + verbose_proxy_logger.debug( + f"\033[1;31mAn error occurred: {e}\n\n Debug this by setting `--debug`, e.g. `litellm --model gpt-3.5-turbo --debug`" + ) + + if isinstance(e, HTTPException): + raise e + elif isinstance(e, StreamingCallbackError): + error_msg = str(e) + else: + error_traceback = traceback.format_exc() + error_msg = f"{str(e)}\n\n{error_traceback}" + + proxy_exception = ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + error_returned = json.dumps({"error": proxy_exception.to_dict()}) + yield f"data: {error_returned}\n\n" + + +def select_data_generator( + response, user_api_key_dict: UserAPIKeyAuth, request_data: dict +): + return async_data_generator( + response=response, + user_api_key_dict=user_api_key_dict, + request_data=request_data, + ) + + +def get_litellm_model_info(model: dict = {}): + model_info = model.get("model_info", {}) + model_to_lookup = model.get("litellm_params", {}).get("model", None) + try: + if "azure" in model_to_lookup: + model_to_lookup = model_info.get("base_model", None) + litellm_model_info = litellm.get_model_info(model_to_lookup) + return litellm_model_info + except Exception: + # this should not block returning on /model/info + # if litellm does not have info on the model it should return {} + return {} + + +def on_backoff(details): + # The 'tries' key in the details dictionary contains the number of completed tries + verbose_proxy_logger.debug("Backing off... this was attempt # %s", details["tries"]) + + +def giveup(e): + result = not ( + isinstance(e, ProxyException) + and getattr(e, "message", None) is not None + and isinstance(e.message, str) + and "Max parallel request limit reached" in e.message + ) + + if ( + general_settings.get("disable_retry_on_max_parallel_request_limit_error") + is True + ): + return True # giveup if queuing max parallel request limits is disabled + + if result: + verbose_proxy_logger.info(json.dumps({"event": "giveup", "exception": str(e)})) + return result + + +class ProxyStartupEvent: + @classmethod + def _initialize_startup_logging( + cls, + llm_router: Optional[Router], + proxy_logging_obj: ProxyLogging, + redis_usage_cache: Optional[RedisCache], + ): + """Initialize logging and alerting on startup""" + ## COST TRACKING ## + cost_tracking() + + proxy_logging_obj.startup_event( + llm_router=llm_router, redis_usage_cache=redis_usage_cache + ) + + @classmethod + def _initialize_jwt_auth( + cls, + general_settings: dict, + prisma_client: Optional[PrismaClient], + user_api_key_cache: DualCache, + ): + """Initialize JWT auth on startup""" + if general_settings.get("litellm_jwtauth", None) is not None: + for k, v in general_settings["litellm_jwtauth"].items(): + if isinstance(v, str) and v.startswith("os.environ/"): + general_settings["litellm_jwtauth"][k] = get_secret(v) + litellm_jwtauth = LiteLLM_JWTAuth(**general_settings["litellm_jwtauth"]) + else: + litellm_jwtauth = LiteLLM_JWTAuth() + jwt_handler.update_environment( + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + litellm_jwtauth=litellm_jwtauth, + ) + + @classmethod + def _add_proxy_budget_to_db(cls, litellm_proxy_budget_name: str): + """Adds a global proxy budget to db""" + if litellm.budget_duration is None: + raise Exception( + "budget_duration not set on Proxy. budget_duration is required to use max_budget." + ) + + # add proxy budget to db in the user table + asyncio.create_task( + generate_key_helper_fn( # type: ignore + request_type="user", + user_id=litellm_proxy_budget_name, + duration=None, + models=[], + aliases={}, + config={}, + spend=0, + max_budget=litellm.max_budget, + budget_duration=litellm.budget_duration, + query_type="update_data", + update_key_values={ + "max_budget": litellm.max_budget, + "budget_duration": litellm.budget_duration, + }, + ) + ) + + @classmethod + async def initialize_scheduled_background_jobs( + cls, + general_settings: dict, + prisma_client: PrismaClient, + proxy_budget_rescheduler_min_time: int, + proxy_budget_rescheduler_max_time: int, + proxy_batch_write_at: int, + proxy_logging_obj: ProxyLogging, + ): + """Initializes scheduled background jobs""" + global store_model_in_db + scheduler = AsyncIOScheduler() + interval = random.randint( + proxy_budget_rescheduler_min_time, proxy_budget_rescheduler_max_time + ) # random interval, so multiple workers avoid resetting budget at the same time + batch_writing_interval = random.randint( + proxy_batch_write_at - 3, proxy_batch_write_at + 3 + ) # random interval, so multiple workers avoid batch writing at the same time + + ### RESET BUDGET ### + if general_settings.get("disable_reset_budget", False) is False: + budget_reset_job = ResetBudgetJob( + proxy_logging_obj=proxy_logging_obj, + prisma_client=prisma_client, + ) + scheduler.add_job( + budget_reset_job.reset_budget, + "interval", + seconds=interval, + ) + + ### UPDATE SPEND ### + scheduler.add_job( + update_spend, + "interval", + seconds=batch_writing_interval, + args=[prisma_client, db_writer_client, proxy_logging_obj], + ) + + ### ADD NEW MODELS ### + store_model_in_db = ( + get_secret_bool("STORE_MODEL_IN_DB", store_model_in_db) or store_model_in_db + ) + + if store_model_in_db is True: + scheduler.add_job( + proxy_config.add_deployment, + "interval", + seconds=10, + args=[prisma_client, proxy_logging_obj], + ) + + # this will load all existing models on proxy startup + await proxy_config.add_deployment( + prisma_client=prisma_client, proxy_logging_obj=proxy_logging_obj + ) + + ### GET STORED CREDENTIALS ### + scheduler.add_job( + proxy_config.get_credentials, + "interval", + seconds=10, + args=[prisma_client], + ) + await proxy_config.get_credentials(prisma_client=prisma_client) + if ( + proxy_logging_obj is not None + and proxy_logging_obj.slack_alerting_instance.alerting is not None + and prisma_client is not None + ): + print("Alerting: Initializing Weekly/Monthly Spend Reports") # noqa + ### Schedule weekly/monthly spend reports ### + ### Schedule spend reports ### + spend_report_frequency: str = ( + general_settings.get("spend_report_frequency", "7d") or "7d" + ) + + # Parse the frequency + days = int(spend_report_frequency[:-1]) + if spend_report_frequency[-1].lower() != "d": + raise ValueError( + "spend_report_frequency must be specified in days, e.g., '1d', '7d'" + ) + + scheduler.add_job( + proxy_logging_obj.slack_alerting_instance.send_weekly_spend_report, + "interval", + days=days, + next_run_time=datetime.now() + + timedelta(seconds=10), # Start 10 seconds from now + args=[spend_report_frequency], + ) + + scheduler.add_job( + proxy_logging_obj.slack_alerting_instance.send_monthly_spend_report, + "cron", + day=1, + ) + + # Beta Feature - only used when prometheus api is in .env + if os.getenv("PROMETHEUS_URL"): + from zoneinfo import ZoneInfo + + scheduler.add_job( + proxy_logging_obj.slack_alerting_instance.send_fallback_stats_from_prometheus, + "cron", + hour=9, + minute=0, + timezone=ZoneInfo("America/Los_Angeles"), # Pacific Time + ) + await proxy_logging_obj.slack_alerting_instance.send_fallback_stats_from_prometheus() + + scheduler.start() + + @classmethod + async def _setup_prisma_client( + cls, + database_url: Optional[str], + proxy_logging_obj: ProxyLogging, + user_api_key_cache: DualCache, + ) -> Optional[PrismaClient]: + """ + - Sets up prisma client + - Adds necessary views to proxy + """ + prisma_client: Optional[PrismaClient] = None + if database_url is not None: + try: + prisma_client = PrismaClient( + database_url=database_url, proxy_logging_obj=proxy_logging_obj + ) + except Exception as e: + raise e + + await prisma_client.connect() + + ## Add necessary views to proxy ## + asyncio.create_task( + prisma_client.check_view_exists() + ) # check if all necessary views exist. Don't block execution + + asyncio.create_task( + prisma_client._set_spend_logs_row_count_in_proxy_state() + ) # set the spend logs row count in proxy state. Don't block execution + + # run a health check to ensure the DB is ready + if ( + get_secret_bool("DISABLE_PRISMA_HEALTH_CHECK_ON_STARTUP", False) + is not True + ): + await prisma_client.health_check() + return prisma_client + + @classmethod + def _init_dd_tracer(cls): + """ + Initialize dd tracer - if `USE_DDTRACE=true` in .env + + DD tracer is used to trace Python applications. + Doc: https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/python/ + """ + from litellm.litellm_core_utils.dd_tracing import _should_use_dd_tracer + + if _should_use_dd_tracer(): + import ddtrace + + ddtrace.patch_all(logging=True, openai=False) + + +#### API ENDPOINTS #### +@router.get( + "/v1/models", dependencies=[Depends(user_api_key_auth)], tags=["model management"] +) +@router.get( + "/models", dependencies=[Depends(user_api_key_auth)], tags=["model management"] +) # if project requires model list +async def model_list( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + return_wildcard_routes: Optional[bool] = False, + team_id: Optional[str] = None, +): + """ + Use `/model/info` - to get detailed model information, example - pricing, mode, etc. + + This is just for compatibility with openai projects like aider. + """ + global llm_model_list, general_settings, llm_router, prisma_client, user_api_key_cache, proxy_logging_obj + all_models = [] + model_access_groups: Dict[str, List[str]] = defaultdict(list) + ## CHECK IF MODEL RESTRICTIONS ARE SET AT KEY/TEAM LEVEL ## + if llm_router is None: + proxy_model_list = [] + else: + proxy_model_list = llm_router.get_model_names() + model_access_groups = llm_router.get_model_access_groups() + key_models = get_key_models( + user_api_key_dict=user_api_key_dict, + proxy_model_list=proxy_model_list, + model_access_groups=model_access_groups, + ) + + team_models: List[str] = user_api_key_dict.team_models + + if team_id: + team_object = await get_team_object( + team_id=team_id, + prisma_client=prisma_client, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + validate_membership(user_api_key_dict=user_api_key_dict, team_table=team_object) + team_models = team_object.models + + team_models = get_team_models( + team_models=team_models, + proxy_model_list=proxy_model_list, + model_access_groups=model_access_groups, + ) + + all_models = get_complete_model_list( + key_models=key_models if not team_models else [], + team_models=team_models, + proxy_model_list=proxy_model_list, + user_model=user_model, + infer_model_from_keys=general_settings.get("infer_model_from_keys", False), + return_wildcard_routes=return_wildcard_routes, + ) + + return dict( + data=[ + { + "id": model, + "object": "model", + "created": 1677610602, + "owned_by": "openai", + } + for model in all_models + ], + object="list", + ) + + +@router.post( + "/v1/chat/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["chat/completions"], +) +@router.post( + "/chat/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["chat/completions"], +) +@router.post( + "/engines/{model:path}/chat/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["chat/completions"], +) +@router.post( + "/openai/deployments/{model:path}/chat/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["chat/completions"], + responses={200: {"description": "Successful response"}, **ERROR_RESPONSES}, +) # azure compatible endpoint +@backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=global_max_parallel_request_retries, # maximum number of retries + max_time=global_max_parallel_request_retry_timeout, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + giveup=giveup, + logger=verbose_proxy_logger, +) +async def chat_completion( # noqa: PLR0915 + request: Request, + fastapi_response: Response, + model: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + + Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat` + + ```bash + curl -X POST http://localhost:4000/v1/chat/completions \ + + -H "Content-Type: application/json" \ + + -H "Authorization: Bearer sk-1234" \ + + -d '{ + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": "Hello!" + } + ] + }' + ``` + + """ + global general_settings, user_debug, proxy_logging_obj, llm_model_list + global user_temperature, user_request_timeout, user_max_tokens, user_api_base + data = await _read_request_body(request=request) + base_llm_response_processor = ProxyBaseLLMRequestProcessing(data=data) + try: + return await base_llm_response_processor.base_process_llm_request( + request=request, + fastapi_response=fastapi_response, + user_api_key_dict=user_api_key_dict, + route_type="acompletion", + proxy_logging_obj=proxy_logging_obj, + llm_router=llm_router, + general_settings=general_settings, + proxy_config=proxy_config, + select_data_generator=select_data_generator, + model=model, + user_model=user_model, + user_temperature=user_temperature, + user_request_timeout=user_request_timeout, + user_max_tokens=user_max_tokens, + user_api_base=user_api_base, + version=version, + ) + except RejectedRequestError as e: + _data = e.request_data + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data=_data, + ) + _chat_response = litellm.ModelResponse() + _chat_response.choices[0].message.content = e.message # type: ignore + + if data.get("stream", None) is not None and data["stream"] is True: + _iterator = litellm.utils.ModelResponseIterator( + model_response=_chat_response, convert_to_delta=True + ) + _streaming_response = litellm.CustomStreamWrapper( + completion_stream=_iterator, + model=data.get("model", ""), + custom_llm_provider="cached_response", + logging_obj=data.get("litellm_logging_obj", None), + ) + selected_data_generator = select_data_generator( + response=_streaming_response, + user_api_key_dict=user_api_key_dict, + request_data=_data, + ) + + return StreamingResponse( + selected_data_generator, + media_type="text/event-stream", + ) + _usage = litellm.Usage(prompt_tokens=0, completion_tokens=0, total_tokens=0) + _chat_response.usage = _usage # type: ignore + return _chat_response + except Exception as e: + raise await base_llm_response_processor._handle_llm_api_exception( + e=e, + user_api_key_dict=user_api_key_dict, + proxy_logging_obj=proxy_logging_obj, + ) + + +@router.post( + "/v1/completions", dependencies=[Depends(user_api_key_auth)], tags=["completions"] +) +@router.post( + "/completions", dependencies=[Depends(user_api_key_auth)], tags=["completions"] +) +@router.post( + "/engines/{model:path}/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["completions"], +) +@router.post( + "/openai/deployments/{model:path}/completions", + dependencies=[Depends(user_api_key_auth)], + tags=["completions"], +) +async def completion( # noqa: PLR0915 + request: Request, + fastapi_response: Response, + model: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions` + + ```bash + curl -X POST http://localhost:4000/v1/completions \ + + -H "Content-Type: application/json" \ + + -H "Authorization: Bearer sk-1234" \ + + -d '{ + "model": "gpt-3.5-turbo-instruct", + "prompt": "Once upon a time", + "max_tokens": 50, + "temperature": 0.7 + }' + ``` + """ + global user_temperature, user_request_timeout, user_max_tokens, user_api_base + data = {} + try: + data = await _read_request_body(request=request) + + data["model"] = ( + general_settings.get("completion_model", None) # server default + or user_model # model name passed via cli args + or model # for azure deployments + or data.get("model", None) + ) + if user_model: + data["model"] = user_model + + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # override with user settings, these are params passed via cli + if user_temperature: + data["temperature"] = user_temperature + if user_request_timeout: + data["request_timeout"] = user_request_timeout + if user_max_tokens: + data["max_tokens"] = user_max_tokens + if user_api_base: + data["api_base"] = user_api_base + + ### MODEL ALIAS MAPPING ### + # check if model name in model alias map + # get the actual model name + if data["model"] in litellm.model_alias_map: + data["model"] = litellm.model_alias_map[data["model"]] + + ### CALL HOOKS ### - modify incoming data before calling the model + data = await proxy_logging_obj.pre_call_hook( # type: ignore + user_api_key_dict=user_api_key_dict, data=data, call_type="text_completion" + ) + + ### ROUTE THE REQUESTs ### + llm_call = await route_request( + data=data, + route_type="atext_completion", + llm_router=llm_router, + user_model=user_model, + ) + + # Await the llm_response task + response = await llm_call + + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + litellm_call_id = hidden_params.get("litellm_call_id", None) or "" + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + verbose_proxy_logger.debug("final response: %s", response) + if ( + "stream" in data and data["stream"] is True + ): # use generate_responses to stream responses + custom_headers = ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=litellm_call_id, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + hidden_params=hidden_params, + request_data=data, + ) + selected_data_generator = select_data_generator( + response=response, + user_api_key_dict=user_api_key_dict, + request_data=data, + ) + + return StreamingResponse( + selected_data_generator, + media_type="text/event-stream", + headers=custom_headers, + ) + ### CALL HOOKS ### - modify outgoing data + response = await proxy_logging_obj.post_call_success_hook( + data=data, user_api_key_dict=user_api_key_dict, response=response # type: ignore + ) + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + call_id=litellm_call_id, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + request_data=data, + hidden_params=hidden_params, + ) + ) + await check_response_size_is_safe(response=response) + return response + except RejectedRequestError as e: + _data = e.request_data + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, + original_exception=e, + request_data=_data, + ) + if _data.get("stream", None) is not None and _data["stream"] is True: + _chat_response = litellm.ModelResponse() + _usage = litellm.Usage( + prompt_tokens=0, + completion_tokens=0, + total_tokens=0, + ) + _chat_response.usage = _usage # type: ignore + _chat_response.choices[0].message.content = e.message # type: ignore + _iterator = litellm.utils.ModelResponseIterator( + model_response=_chat_response, convert_to_delta=True + ) + _streaming_response = litellm.TextCompletionStreamWrapper( + completion_stream=_iterator, + model=_data.get("model", ""), + ) + + selected_data_generator = select_data_generator( + response=_streaming_response, + user_api_key_dict=user_api_key_dict, + request_data=data, + ) + + return StreamingResponse( + selected_data_generator, + media_type="text/event-stream", + headers={}, + ) + else: + _response = litellm.TextCompletionResponse() + _response.choices[0].text = e.message + return _response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.completion(): Exception occured - {}".format( + str(e) + ) + ) + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + openai_code=getattr(e, "code", None), + code=getattr(e, "status_code", 500), + ) + + +@router.post( + "/v1/embeddings", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["embeddings"], +) +@router.post( + "/embeddings", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["embeddings"], +) +@router.post( + "/engines/{model:path}/embeddings", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["embeddings"], +) # azure compatible endpoint +@router.post( + "/openai/deployments/{model:path}/embeddings", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["embeddings"], +) # azure compatible endpoint +async def embeddings( # noqa: PLR0915 + request: Request, + fastapi_response: Response, + model: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings` + + ```bash + curl -X POST http://localhost:4000/v1/embeddings \ + + -H "Content-Type: application/json" \ + + -H "Authorization: Bearer sk-1234" \ + + -d '{ + "model": "text-embedding-ada-002", + "input": "The quick brown fox jumps over the lazy dog" + }' + ``` + +""" + global proxy_logging_obj + data: Any = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + body = await request.body() + data = orjson.loads(body) + + verbose_proxy_logger.debug( + "Request received by LiteLLM:\n%s", + json.dumps(data, indent=4), + ) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + data["model"] = ( + general_settings.get("embedding_model", None) # server default + or user_model # model name passed via cli args + or model # for azure deployments + or data.get("model", None) # default passed in http request + ) + if user_model: + data["model"] = user_model + + ### MODEL ALIAS MAPPING ### + # check if model name in model alias map + # get the actual model name + if data["model"] in litellm.model_alias_map: + data["model"] = litellm.model_alias_map[data["model"]] + + router_model_names = llm_router.model_names if llm_router is not None else [] + if ( + "input" in data + and isinstance(data["input"], list) + and len(data["input"]) > 0 + and isinstance(data["input"][0], list) + and isinstance(data["input"][0][0], int) + ): # check if array of tokens passed in + # check if non-openai/azure model called - e.g. for langchain integration + if llm_model_list is not None and data["model"] in router_model_names: + for m in llm_model_list: + if m["model_name"] == data["model"] and ( + m["litellm_params"]["model"] in litellm.open_ai_embedding_models + or m["litellm_params"]["model"].startswith("azure/") + ): + pass + else: + # non-openai/azure embedding model called with token input + input_list = [] + for i in data["input"]: + input_list.append( + litellm.decode(model="gpt-3.5-turbo", tokens=i) + ) + data["input"] = input_list + break + + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + data = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, data=data, call_type="embeddings" + ) + + tasks = [] + tasks.append( + proxy_logging_obj.during_call_hook( + data=data, + user_api_key_dict=user_api_key_dict, + call_type="embeddings", + ) + ) + + ## ROUTE TO CORRECT ENDPOINT ## + llm_call = await route_request( + data=data, + route_type="aembedding", + llm_router=llm_router, + user_model=user_model, + ) + tasks.append(llm_call) + + # wait for call to end + llm_responses = asyncio.gather( + *tasks + ) # run the moderation check in parallel to the actual llm api call + + responses = await llm_responses + + response = responses[1] + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + litellm_call_id = hidden_params.get("litellm_call_id", None) or "" + additional_headers: dict = hidden_params.get("additional_headers", {}) or {} + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + call_id=litellm_call_id, + request_data=data, + hidden_params=hidden_params, + **additional_headers, + ) + ) + await check_response_size_is_safe(response=response) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + litellm_debug_info = getattr(e, "litellm_debug_info", "") + verbose_proxy_logger.debug( + "\033[1;31mAn error occurred: %s %s\n\n Debug this by setting `--debug`, e.g. `litellm --model gpt-3.5-turbo --debug`", + e, + litellm_debug_info, + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.embeddings(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + message = get_error_message_str(e) + raise ProxyException( + message=message, + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + openai_code=getattr(e, "code", None), + code=getattr(e, "status_code", 500), + ) + + +@router.post( + "/v1/images/generations", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["images"], +) +@router.post( + "/images/generations", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["images"], +) +async def image_generation( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + global proxy_logging_obj + data = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + body = await request.body() + data = orjson.loads(body) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + data["model"] = ( + general_settings.get("image_generation_model", None) # server default + or user_model # model name passed via cli args + or data.get("model", None) # default passed in http request + ) + if user_model: + data["model"] = user_model + + ### MODEL ALIAS MAPPING ### + # check if model name in model alias map + # get the actual model name + if data["model"] in litellm.model_alias_map: + data["model"] = litellm.model_alias_map[data["model"]] + + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + data = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, data=data, call_type="image_generation" + ) + + ## ROUTE TO CORRECT ENDPOINT ## + llm_call = await route_request( + data=data, + route_type="aimage_generation", + llm_router=llm_router, + user_model=user_model, + ) + response = await llm_call + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + litellm_call_id = hidden_params.get("litellm_call_id", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + call_id=litellm_call_id, + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.image_generation(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + openai_code=getattr(e, "code", None), + code=getattr(e, "status_code", 500), + ) + + +@router.post( + "/v1/audio/speech", + dependencies=[Depends(user_api_key_auth)], + tags=["audio"], +) +@router.post( + "/audio/speech", + dependencies=[Depends(user_api_key_auth)], + tags=["audio"], +) +async def audio_speech( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Same params as: + + https://platform.openai.com/docs/api-reference/audio/createSpeech + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + body = await request.body() + data = orjson.loads(body) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + if data.get("user", None) is None and user_api_key_dict.user_id is not None: + data["user"] = user_api_key_dict.user_id + + if user_model: + data["model"] = user_model + + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + data = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, data=data, call_type="image_generation" + ) + + ## ROUTE TO CORRECT ENDPOINT ## + llm_call = await route_request( + data=data, + route_type="aspeech", + llm_router=llm_router, + user_model=user_model, + ) + response = await llm_call + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + litellm_call_id = hidden_params.get("litellm_call_id", None) or "" + + # Printing each chunk size + async def generate(_response: HttpxBinaryResponseContent): + _generator = await _response.aiter_bytes(chunk_size=1024) + async for chunk in _generator: + yield chunk + + custom_headers = ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + fastest_response_batch_completion=None, + call_id=litellm_call_id, + request_data=data, + hidden_params=hidden_params, + ) + + select_data_generator( + response=response, + user_api_key_dict=user_api_key_dict, + request_data=data, + ) + return StreamingResponse( + generate(response), media_type="audio/mpeg", headers=custom_headers # type: ignore + ) + + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.audio_speech(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + raise e + + +@router.post( + "/v1/audio/transcriptions", + dependencies=[Depends(user_api_key_auth)], + tags=["audio"], +) +@router.post( + "/audio/transcriptions", + dependencies=[Depends(user_api_key_auth)], + tags=["audio"], +) +async def audio_transcriptions( + request: Request, + fastapi_response: Response, + file: UploadFile = File(...), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Same params as: + + https://platform.openai.com/docs/api-reference/audio/createTranscription?lang=curl + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + form_data = await request.form() + data = {key: value for key, value in form_data.items() if key != "file"} + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + if data.get("user", None) is None and user_api_key_dict.user_id is not None: + data["user"] = user_api_key_dict.user_id + + data["model"] = ( + general_settings.get("moderation_model", None) # server default + or user_model # model name passed via cli args + or data.get("model", None) # default passed in http request + ) + if user_model: + data["model"] = user_model + + router_model_names = llm_router.model_names if llm_router is not None else [] + + if file.filename is None: + raise ProxyException( + message="File name is None. Please check your file name", + code=status.HTTP_400_BAD_REQUEST, + type="bad_request", + param="file", + ) + + # Check if File can be read in memory before reading + check_file_size_under_limit( + request_data=data, + file=file, + router_model_names=router_model_names, + ) + + file_content = await file.read() + file_object = io.BytesIO(file_content) + file_object.name = file.filename + data["file"] = file_object + try: + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + data = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, + data=data, + call_type="audio_transcription", + ) + + ## ROUTE TO CORRECT ENDPOINT ## + llm_call = await route_request( + data=data, + route_type="atranscription", + llm_router=llm_router, + user_model=user_model, + ) + response = await llm_call + except Exception as e: + raise HTTPException(status_code=500, detail=str(e)) + finally: + file_object.close() # close the file read in by io library + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + response_cost = hidden_params.get("response_cost", None) or "" + litellm_call_id = hidden_params.get("litellm_call_id", None) or "" + additional_headers: dict = hidden_params.get("additional_headers", {}) or {} + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + response_cost=response_cost, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + call_id=litellm_call_id, + request_data=data, + hidden_params=hidden_params, + **additional_headers, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.audio_transcription(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + openai_code=getattr(e, "code", None), + code=getattr(e, "status_code", 500), + ) + + +###################################################################### + +# /v1/realtime Endpoints + +###################################################################### +from fastapi import FastAPI, WebSocket, WebSocketDisconnect + +from litellm import _arealtime + + +@app.websocket("/v1/realtime") +@app.websocket("/realtime") +async def websocket_endpoint( + websocket: WebSocket, + model: str, + user_api_key_dict=Depends(user_api_key_auth_websocket), +): + import websockets + + await websocket.accept() + + data = { + "model": model, + "websocket": websocket, + } + + ### ROUTE THE REQUEST ### + try: + llm_call = await route_request( + data=data, + route_type="_arealtime", + llm_router=llm_router, + user_model=user_model, + ) + + await llm_call + except websockets.exceptions.InvalidStatusCode as e: # type: ignore + verbose_proxy_logger.exception("Invalid status code") + await websocket.close(code=e.status_code, reason="Invalid status code") + except Exception: + verbose_proxy_logger.exception("Internal server error") + await websocket.close(code=1011, reason="Internal server error") + + +###################################################################### + +# /v1/assistant Endpoints + + +###################################################################### + + +@router.get( + "/v1/assistants", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.get( + "/assistants", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def get_assistants( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Returns a list of assistants. + + API Reference docs - https://platform.openai.com/docs/api-reference/assistants/listAssistants + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + await request.body() + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.aget_assistants(**data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.get_assistants(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + openai_code=getattr(e, "code", None), + code=getattr(e, "status_code", 500), + ) + + +@router.post( + "/v1/assistants", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.post( + "/assistants", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def create_assistant( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create assistant + + API Reference docs - https://platform.openai.com/docs/api-reference/assistants/createAssistant + """ + global proxy_logging_obj + data = {} # ensure data always dict + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + body = await request.body() + data = orjson.loads(body) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.acreate_assistants(**data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.create_assistant(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.delete( + "/v1/assistants/{assistant_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.delete( + "/assistants/{assistant_id:path}", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def delete_assistant( + request: Request, + assistant_id: str, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete assistant + + API Reference docs - https://platform.openai.com/docs/api-reference/assistants/createAssistant + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.adelete_assistant(assistant_id=assistant_id, **data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.delete_assistant(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.post( + "/v1/threads", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.post( + "/threads", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def create_threads( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create a thread. + + API Reference - https://platform.openai.com/docs/api-reference/threads/createThread + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + await request.body() + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.acreate_thread(**data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.create_threads(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.get( + "/v1/threads/{thread_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.get( + "/threads/{thread_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def get_thread( + request: Request, + thread_id: str, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Retrieves a thread. + + API Reference - https://platform.openai.com/docs/api-reference/threads/getThread + """ + global proxy_logging_obj + data: Dict = {} + try: + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.aget_thread(thread_id=thread_id, **data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.get_thread(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.post( + "/v1/threads/{thread_id}/messages", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.post( + "/threads/{thread_id}/messages", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def add_messages( + request: Request, + thread_id: str, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create a message. + + API Reference - https://platform.openai.com/docs/api-reference/messages/createMessage + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + body = await request.body() + data = orjson.loads(body) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.a_add_message(thread_id=thread_id, **data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.add_messages(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.get( + "/v1/threads/{thread_id}/messages", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.get( + "/threads/{thread_id}/messages", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def get_messages( + request: Request, + thread_id: str, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Returns a list of messages for a given thread. + + API Reference - https://platform.openai.com/docs/api-reference/messages/listMessages + """ + global proxy_logging_obj + data: Dict = {} + try: + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.aget_messages(thread_id=thread_id, **data) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.get_messages(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.post( + "/v1/threads/{thread_id}/runs", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +@router.post( + "/threads/{thread_id}/runs", + dependencies=[Depends(user_api_key_auth)], + tags=["assistants"], +) +async def run_thread( + request: Request, + thread_id: str, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Create a run. + + API Reference: https://platform.openai.com/docs/api-reference/runs/createRun + """ + global proxy_logging_obj + data: Dict = {} + try: + body = await request.body() + data = orjson.loads(body) + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + # for now use custom_llm_provider=="openai" -> this will change as LiteLLM adds more providers for acreate_batch + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + response = await llm_router.arun_thread(thread_id=thread_id, **data) + + if ( + "stream" in data and data["stream"] is True + ): # use generate_responses to stream responses + return StreamingResponse( + async_assistants_data_generator( + user_api_key_dict=user_api_key_dict, + response=response, + request_data=data, + ), + media_type="text/event-stream", + ) + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.run_thread(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "code", getattr(e, "status_code", 500)), + ) + + +@router.post( + "/v1/moderations", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["moderations"], +) +@router.post( + "/moderations", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["moderations"], +) +async def moderations( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies. + + Quick Start + ``` + curl --location 'http://0.0.0.0:4000/moderations' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Bearer sk-1234' \ + --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' + ``` + """ + global proxy_logging_obj + data: Dict = {} + try: + # Use orjson to parse JSON data, orjson speeds up requests significantly + body = await request.body() + data = orjson.loads(body) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + data["model"] = ( + general_settings.get("moderation_model", None) # server default + or user_model # model name passed via cli args + or data.get("model") # default passed in http request + ) + if user_model: + data["model"] = user_model + + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + data = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, data=data, call_type="moderation" + ) + + time.time() + + ## ROUTE TO CORRECT ENDPOINT ## + llm_call = await route_request( + data=data, + route_type="amoderation", + llm_router=llm_router, + user_model=user_model, + ) + response = await llm_call + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + hidden_params=hidden_params, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.moderations(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +#### DEV UTILS #### + +# @router.get( +# "/utils/available_routes", +# tags=["llm utils"], +# dependencies=[Depends(user_api_key_auth)], +# ) +# async def get_available_routes(user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth)): + + +@router.post( + "/utils/token_counter", + tags=["llm utils"], + dependencies=[Depends(user_api_key_auth)], + response_model=TokenCountResponse, +) +async def token_counter(request: TokenCountRequest): + """ """ + from litellm import token_counter + + global llm_router + + prompt = request.prompt + messages = request.messages + if prompt is None and messages is None: + raise HTTPException( + status_code=400, detail="prompt or messages must be provided" + ) + + deployment = None + litellm_model_name = None + model_info: Optional[ModelMapInfo] = None + if llm_router is not None: + # get 1 deployment corresponding to the model + for _model in llm_router.model_list: + if _model["model_name"] == request.model: + deployment = _model + model_info = llm_router.get_router_model_info( + deployment=deployment, + received_model_name=request.model, + ) + break + if deployment is not None: + litellm_model_name = deployment.get("litellm_params", {}).get("model") + # remove the custom_llm_provider_prefix in the litellm_model_name + if "/" in litellm_model_name: + litellm_model_name = litellm_model_name.split("/", 1)[1] + + model_to_use = ( + litellm_model_name or request.model + ) # use litellm model name, if it's not avalable then fallback to request.model + + custom_tokenizer: Optional[CustomHuggingfaceTokenizer] = None + if model_info is not None: + custom_tokenizer = cast( + Optional[CustomHuggingfaceTokenizer], + model_info.get("custom_tokenizer", None), + ) + _tokenizer_used = litellm.utils._select_tokenizer( + model=model_to_use, custom_tokenizer=custom_tokenizer + ) + + tokenizer_used = str(_tokenizer_used["type"]) + total_tokens = token_counter( + model=model_to_use, + text=prompt, + messages=messages, + custom_tokenizer=_tokenizer_used, # type: ignore + ) + return TokenCountResponse( + total_tokens=total_tokens, + request_model=request.model, + model_used=model_to_use, + tokenizer_type=tokenizer_used, + ) + + +@router.get( + "/utils/supported_openai_params", + tags=["llm utils"], + dependencies=[Depends(user_api_key_auth)], +) +async def supported_openai_params(model: str): + """ + Returns supported openai params for a given litellm model name + + e.g. `gpt-4` vs `gpt-3.5-turbo` + + Example curl: + ``` + curl -X GET --location 'http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k' \ + --header 'Authorization: Bearer sk-1234' + ``` + """ + try: + model, custom_llm_provider, _, _ = litellm.get_llm_provider(model=model) + return { + "supported_openai_params": litellm.get_supported_openai_params( + model=model, custom_llm_provider=custom_llm_provider + ) + } + except Exception: + raise HTTPException( + status_code=400, detail={"error": "Could not map model={}".format(model)} + ) + + +@router.post( + "/utils/transform_request", + tags=["llm utils"], + dependencies=[Depends(user_api_key_auth)], + response_model=RawRequestTypedDict, +) +async def transform_request(request: TransformRequestBody): + from litellm.utils import return_raw_request + + return return_raw_request(endpoint=request.call_type, kwargs=request.request_body) + + +@router.get( + "/v2/model/info", + description="v2 - returns all the models set on the config.yaml, shows 'user_access' = True if the user has access to the model. Provides more info about each model in /models, including config.yaml descriptions (except api key and api base)", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def model_info_v2( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + model: Optional[str] = fastapi.Query( + None, description="Specify the model name (optional)" + ), + debug: Optional[bool] = False, +): + """ + BETA ENDPOINT. Might change unexpectedly. Use `/v1/model/info` for now. + """ + global llm_model_list, general_settings, user_config_file_path, proxy_config, llm_router + + if llm_router is None: + raise HTTPException( + status_code=500, + detail={ + "error": f"No model list passed, models router={llm_router}. You can add a model through the config.yaml or on the LiteLLM Admin UI." + }, + ) + + # Load existing config + await proxy_config.get_config() + all_models = copy.deepcopy(llm_router.model_list) + + if user_model is not None: + # if user does not use a config.yaml, https://github.com/BerriAI/litellm/issues/2061 + all_models += [user_model] + + # check all models user has access to in user_api_key_dict + if len(user_api_key_dict.models) > 0: + pass + + if model is not None: + all_models = [m for m in all_models if m["model_name"] == model] + + # fill in model info based on config.yaml and litellm model_prices_and_context_window.json + for _model in all_models: + # provided model_info in config.yaml + model_info = _model.get("model_info", {}) + if debug is True: + _openai_client = "None" + if llm_router is not None: + _openai_client = ( + llm_router._get_client( + deployment=_model, kwargs={}, client_type="async" + ) + or "None" + ) + else: + _openai_client = "llm_router_is_None" + openai_client = str(_openai_client) + _model["openai_client"] = openai_client + + # read litellm model_prices_and_context_window.json to get the following: + # input_cost_per_token, output_cost_per_token, max_tokens + litellm_model_info = get_litellm_model_info(model=_model) + + # 2nd pass on the model, try seeing if we can find model in litellm model_cost map + if litellm_model_info == {}: + # use litellm_param model_name to get model_info + litellm_params = _model.get("litellm_params", {}) + litellm_model = litellm_params.get("model", None) + try: + litellm_model_info = litellm.get_model_info(model=litellm_model) + except Exception: + litellm_model_info = {} + # 3rd pass on the model, try seeing if we can find model but without the "/" in model cost map + if litellm_model_info == {}: + # use litellm_param model_name to get model_info + litellm_params = _model.get("litellm_params", {}) + litellm_model = litellm_params.get("model", None) + split_model = litellm_model.split("/") + if len(split_model) > 0: + litellm_model = split_model[-1] + try: + litellm_model_info = litellm.get_model_info( + model=litellm_model, custom_llm_provider=split_model[0] + ) + except Exception: + litellm_model_info = {} + for k, v in litellm_model_info.items(): + if k not in model_info: + model_info[k] = v + _model["model_info"] = model_info + # don't return the api key / vertex credentials + # don't return the llm credentials + _model["litellm_params"].pop("api_key", None) + _model["litellm_params"].pop("vertex_credentials", None) + _model["litellm_params"].pop("aws_access_key_id", None) + _model["litellm_params"].pop("aws_secret_access_key", None) + + verbose_proxy_logger.debug("all_models: %s", all_models) + return {"data": all_models} + + +@router.get( + "/model/streaming_metrics", + description="View time to first token for models in spend logs", + tags=["model management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def model_streaming_metrics( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + _selected_model_group: Optional[str] = None, + startTime: Optional[datetime] = None, + endTime: Optional[datetime] = None, +): + global prisma_client, llm_router + if prisma_client is None: + raise ProxyException( + message=CommonProxyErrors.db_not_connected_error.value, + type="internal_error", + param="None", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + startTime = startTime or datetime.now() - timedelta(days=7) # show over past week + endTime = endTime or datetime.now() + + is_same_day = startTime.date() == endTime.date() + if is_same_day: + sql_query = """ + SELECT + api_base, + model_group, + model, + "startTime", + request_id, + EXTRACT(epoch FROM ("completionStartTime" - "startTime")) AS time_to_first_token + FROM + "LiteLLM_SpendLogs" + WHERE + "model_group" = $1 AND "cache_hit" != 'True' + AND "completionStartTime" IS NOT NULL + AND "completionStartTime" != "endTime" + AND DATE("startTime") = DATE($2::timestamp) + GROUP BY + api_base, + model_group, + model, + request_id + ORDER BY + time_to_first_token DESC; + """ + else: + sql_query = """ + SELECT + api_base, + model_group, + model, + DATE_TRUNC('day', "startTime")::DATE AS day, + AVG(EXTRACT(epoch FROM ("completionStartTime" - "startTime"))) AS time_to_first_token + FROM + "LiteLLM_SpendLogs" + WHERE + "startTime" BETWEEN $2::timestamp AND $3::timestamp + AND "model_group" = $1 AND "cache_hit" != 'True' + AND "completionStartTime" IS NOT NULL + AND "completionStartTime" != "endTime" + GROUP BY + api_base, + model_group, + model, + day + ORDER BY + time_to_first_token DESC; + """ + + _all_api_bases = set() + db_response = await prisma_client.db.query_raw( + sql_query, _selected_model_group, startTime, endTime + ) + _daily_entries: dict = {} # {"Jun 23": {"model1": 0.002, "model2": 0.003}} + if db_response is not None: + for model_data in db_response: + _api_base = model_data["api_base"] + _model = model_data["model"] + time_to_first_token = model_data["time_to_first_token"] + unique_key = "" + if is_same_day: + _request_id = model_data["request_id"] + unique_key = _request_id + if _request_id not in _daily_entries: + _daily_entries[_request_id] = {} + else: + _day = model_data["day"] + unique_key = _day + time_to_first_token = model_data["time_to_first_token"] + if _day not in _daily_entries: + _daily_entries[_day] = {} + _combined_model_name = str(_model) + if "https://" in _api_base: + _combined_model_name = str(_api_base) + if "/openai/" in _combined_model_name: + _combined_model_name = _combined_model_name.split("/openai/")[0] + + _all_api_bases.add(_combined_model_name) + + _daily_entries[unique_key][_combined_model_name] = time_to_first_token + + """ + each entry needs to be like this: + { + date: 'Jun 23', + 'gpt-4-https://api.openai.com/v1/': 0.002, + 'gpt-43-https://api.openai.com-12/v1/': 0.002, + } + """ + # convert daily entries to list of dicts + + response: List[dict] = [] + + # sort daily entries by date + _daily_entries = dict(sorted(_daily_entries.items(), key=lambda item: item[0])) + for day in _daily_entries: + entry = {"date": str(day)} + for model_key, latency in _daily_entries[day].items(): + entry[model_key] = latency + response.append(entry) + + return { + "data": response, + "all_api_bases": list(_all_api_bases), + } + + +@router.get( + "/model/metrics", + description="View number of requests & avg latency per model on config.yaml", + tags=["model management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def model_metrics( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + _selected_model_group: Optional[str] = "gpt-4-32k", + startTime: Optional[datetime] = None, + endTime: Optional[datetime] = None, + api_key: Optional[str] = None, + customer: Optional[str] = None, +): + global prisma_client, llm_router + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + startTime = startTime or datetime.now() - timedelta(days=30) + endTime = endTime or datetime.now() + + if api_key is None or api_key == "undefined": + api_key = "null" + + if customer is None or customer == "undefined": + customer = "null" + + sql_query = """ + SELECT + api_base, + model_group, + model, + DATE_TRUNC('day', "startTime")::DATE AS day, + AVG(EXTRACT(epoch FROM ("endTime" - "startTime")) / NULLIF("completion_tokens", 0)) AS avg_latency_per_token + FROM + "LiteLLM_SpendLogs" + WHERE + "startTime" >= $2::timestamp AND "startTime" <= $3::timestamp + AND "model_group" = $1 AND "cache_hit" != 'True' + AND ( + CASE + WHEN $4 != 'null' THEN "api_key" = $4 + ELSE TRUE + END + ) + AND ( + CASE + WHEN $5 != 'null' THEN "end_user" = $5 + ELSE TRUE + END + ) + GROUP BY + api_base, + model_group, + model, + day + HAVING + SUM(completion_tokens) > 0 + ORDER BY + avg_latency_per_token DESC; + """ + _all_api_bases = set() + db_response = await prisma_client.db.query_raw( + sql_query, _selected_model_group, startTime, endTime, api_key, customer + ) + _daily_entries: dict = {} # {"Jun 23": {"model1": 0.002, "model2": 0.003}} + + if db_response is not None: + for model_data in db_response: + _api_base = model_data["api_base"] + _model = model_data["model"] + _day = model_data["day"] + _avg_latency_per_token = model_data["avg_latency_per_token"] + if _day not in _daily_entries: + _daily_entries[_day] = {} + _combined_model_name = str(_model) + if _api_base is not None and "https://" in _api_base: + _combined_model_name = str(_api_base) + if _combined_model_name is not None and "/openai/" in _combined_model_name: + _combined_model_name = _combined_model_name.split("/openai/")[0] + + _all_api_bases.add(_combined_model_name) + _daily_entries[_day][_combined_model_name] = _avg_latency_per_token + + """ + each entry needs to be like this: + { + date: 'Jun 23', + 'gpt-4-https://api.openai.com/v1/': 0.002, + 'gpt-43-https://api.openai.com-12/v1/': 0.002, + } + """ + # convert daily entries to list of dicts + + response: List[dict] = [] + + # sort daily entries by date + _daily_entries = dict(sorted(_daily_entries.items(), key=lambda item: item[0])) + for day in _daily_entries: + entry = {"date": str(day)} + for model_key, latency in _daily_entries[day].items(): + entry[model_key] = latency + response.append(entry) + + return { + "data": response, + "all_api_bases": list(_all_api_bases), + } + + +@router.get( + "/model/metrics/slow_responses", + description="View number of hanging requests per model_group", + tags=["model management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def model_metrics_slow_responses( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + _selected_model_group: Optional[str] = "gpt-4-32k", + startTime: Optional[datetime] = None, + endTime: Optional[datetime] = None, + api_key: Optional[str] = None, + customer: Optional[str] = None, +): + global prisma_client, llm_router, proxy_logging_obj + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + if api_key is None or api_key == "undefined": + api_key = "null" + + if customer is None or customer == "undefined": + customer = "null" + + startTime = startTime or datetime.now() - timedelta(days=30) + endTime = endTime or datetime.now() + + alerting_threshold = ( + proxy_logging_obj.slack_alerting_instance.alerting_threshold or 300 + ) + alerting_threshold = int(alerting_threshold) + + sql_query = """ +SELECT + api_base, + COUNT(*) AS total_count, + SUM(CASE + WHEN ("endTime" - "startTime") >= (INTERVAL '1 SECOND' * CAST($1 AS INTEGER)) THEN 1 + ELSE 0 + END) AS slow_count +FROM + "LiteLLM_SpendLogs" +WHERE + "model_group" = $2 + AND "cache_hit" != 'True' + AND "startTime" >= $3::timestamp + AND "startTime" <= $4::timestamp + AND ( + CASE + WHEN $5 != 'null' THEN "api_key" = $5 + ELSE TRUE + END + ) + AND ( + CASE + WHEN $6 != 'null' THEN "end_user" = $6 + ELSE TRUE + END + ) +GROUP BY + api_base +ORDER BY + slow_count DESC; + """ + + db_response = await prisma_client.db.query_raw( + sql_query, + alerting_threshold, + _selected_model_group, + startTime, + endTime, + api_key, + customer, + ) + + if db_response is not None: + for row in db_response: + _api_base = row.get("api_base") or "" + if "/openai/" in _api_base: + _api_base = _api_base.split("/openai/")[0] + row["api_base"] = _api_base + return db_response + + +@router.get( + "/model/metrics/exceptions", + description="View number of failed requests per model on config.yaml", + tags=["model management"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def model_metrics_exceptions( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + _selected_model_group: Optional[str] = None, + startTime: Optional[datetime] = None, + endTime: Optional[datetime] = None, + api_key: Optional[str] = None, + customer: Optional[str] = None, +): + global prisma_client, llm_router + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + startTime = startTime or datetime.now() - timedelta(days=30) + endTime = endTime or datetime.now() + + if api_key is None or api_key == "undefined": + api_key = "null" + + """ + """ + sql_query = """ + WITH cte AS ( + SELECT + CASE WHEN api_base = '' THEN litellm_model_name ELSE CONCAT(litellm_model_name, '-', api_base) END AS combined_model_api_base, + exception_type, + COUNT(*) AS num_rate_limit_exceptions + FROM "LiteLLM_ErrorLogs" + WHERE + "startTime" >= $1::timestamp + AND "endTime" <= $2::timestamp + AND model_group = $3 + GROUP BY combined_model_api_base, exception_type + ) + SELECT + combined_model_api_base, + COUNT(*) AS total_exceptions, + json_object_agg(exception_type, num_rate_limit_exceptions) AS exception_counts + FROM cte + GROUP BY combined_model_api_base + ORDER BY total_exceptions DESC + LIMIT 200; + """ + db_response = await prisma_client.db.query_raw( + sql_query, startTime, endTime, _selected_model_group, api_key + ) + response: List[dict] = [] + exception_types = set() + + """ + Return Data + { + "combined_model_api_base": "gpt-3.5-turbo-https://api.openai.com/v1/, + "total_exceptions": 5, + "BadRequestException": 5, + "TimeoutException": 2 + } + """ + + if db_response is not None: + # loop through all models + for model_data in db_response: + model = model_data.get("combined_model_api_base", "") + total_exceptions = model_data.get("total_exceptions", 0) + exception_counts = model_data.get("exception_counts", {}) + curr_row = { + "model": model, + "total_exceptions": total_exceptions, + } + curr_row.update(exception_counts) + response.append(curr_row) + for k, v in exception_counts.items(): + exception_types.add(k) + + return {"data": response, "exception_types": list(exception_types)} + + +def _get_proxy_model_info(model: dict) -> dict: + # provided model_info in config.yaml + model_info = model.get("model_info", {}) + + # read litellm model_prices_and_context_window.json to get the following: + # input_cost_per_token, output_cost_per_token, max_tokens + litellm_model_info = get_litellm_model_info(model=model) + + # 2nd pass on the model, try seeing if we can find model in litellm model_cost map + if litellm_model_info == {}: + # use litellm_param model_name to get model_info + litellm_params = model.get("litellm_params", {}) + litellm_model = litellm_params.get("model", None) + try: + litellm_model_info = litellm.get_model_info(model=litellm_model) + except Exception: + litellm_model_info = {} + # 3rd pass on the model, try seeing if we can find model but without the "/" in model cost map + if litellm_model_info == {}: + # use litellm_param model_name to get model_info + litellm_params = model.get("litellm_params", {}) + litellm_model = litellm_params.get("model", None) + split_model = litellm_model.split("/") + if len(split_model) > 0: + litellm_model = split_model[-1] + try: + litellm_model_info = litellm.get_model_info( + model=litellm_model, custom_llm_provider=split_model[0] + ) + except Exception: + litellm_model_info = {} + for k, v in litellm_model_info.items(): + if k not in model_info: + model_info[k] = v + model["model_info"] = model_info + # don't return the llm credentials + model = remove_sensitive_info_from_deployment(deployment_dict=model) + + return model + + +@router.get( + "/model/info", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +@router.get( + "/v1/model/info", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +async def model_info_v1( # noqa: PLR0915 + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + litellm_model_id: Optional[str] = None, +): + """ + Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) + + Parameters: + litellm_model_id: Optional[str] = None (this is the value of `x-litellm-model-id` returned in response headers) + + - When litellm_model_id is passed, it will return the info for that specific model + - When litellm_model_id is not passed, it will return the info for all models + + Returns: + Returns a dictionary containing information about each model. + + Example Response: + ```json + { + "data": [ + { + "model_name": "fake-openai-endpoint", + "litellm_params": { + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", + "model": "openai/fake" + }, + "model_info": { + "id": "112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af", + "db_model": false + } + } + ] + } + + ``` + """ + global llm_model_list, general_settings, user_config_file_path, proxy_config, llm_router, user_model + + if user_model is not None: + # user is trying to get specific model from litellm router + try: + model_info: Dict = cast(Dict, litellm.get_model_info(model=user_model)) + except Exception: + model_info = {} + _deployment_info = Deployment( + model_name="*", + litellm_params=LiteLLM_Params( + model=user_model, + ), + model_info=model_info, + ) + _deployment_info_dict = _deployment_info.model_dump() + _deployment_info_dict = remove_sensitive_info_from_deployment( + deployment_dict=_deployment_info_dict + ) + return {"data": _deployment_info_dict} + + if llm_model_list is None: + raise HTTPException( + status_code=500, + detail={ + "error": "LLM Model List not loaded in. Make sure you passed models in your config.yaml or on the LiteLLM Admin UI. - https://docs.litellm.ai/docs/proxy/configs" + }, + ) + + if llm_router is None: + raise HTTPException( + status_code=500, + detail={ + "error": "LLM Router is not loaded in. Make sure you passed models in your config.yaml or on the LiteLLM Admin UI. - https://docs.litellm.ai/docs/proxy/configs" + }, + ) + + if litellm_model_id is not None: + # user is trying to get specific model from litellm router + deployment_info = llm_router.get_deployment(model_id=litellm_model_id) + if deployment_info is None: + raise HTTPException( + status_code=400, + detail={ + "error": f"Model id = {litellm_model_id} not found on litellm proxy" + }, + ) + _deployment_info_dict = _get_proxy_model_info( + model=deployment_info.model_dump(exclude_none=True) + ) + return {"data": [_deployment_info_dict]} + + all_models: List[dict] = [] + model_access_groups: Dict[str, List[str]] = defaultdict(list) + ## CHECK IF MODEL RESTRICTIONS ARE SET AT KEY/TEAM LEVEL ## + if llm_router is None: + proxy_model_list = [] + else: + proxy_model_list = llm_router.get_model_names() + model_access_groups = llm_router.get_model_access_groups() + key_models = get_key_models( + user_api_key_dict=user_api_key_dict, + proxy_model_list=proxy_model_list, + model_access_groups=model_access_groups, + ) + team_models = get_team_models( + team_models=user_api_key_dict.team_models, + proxy_model_list=proxy_model_list, + model_access_groups=model_access_groups, + ) + all_models_str = get_complete_model_list( + key_models=key_models, + team_models=team_models, + proxy_model_list=proxy_model_list, + user_model=user_model, + infer_model_from_keys=general_settings.get("infer_model_from_keys", False), + ) + + if len(all_models_str) > 0: + model_names = all_models_str + llm_model_list = llm_router.get_model_list() + if llm_model_list is not None: + _relevant_models = [ + m for m in llm_model_list if m["model_name"] in model_names + ] + all_models = copy.deepcopy(_relevant_models) # type: ignore + else: + all_models = [] + + for model in all_models: + model = _get_proxy_model_info(model=model) + + verbose_proxy_logger.debug("all_models: %s", all_models) + return {"data": all_models} + + +def _get_model_group_info( + llm_router: Router, all_models_str: List[str], model_group: Optional[str] +) -> List[ModelGroupInfo]: + model_groups: List[ModelGroupInfo] = [] + for model in all_models_str: + if model_group is not None and model_group != model: + continue + + _model_group_info = llm_router.get_model_group_info(model_group=model) + if _model_group_info is not None: + model_groups.append(_model_group_info) + return model_groups + + +@router.get( + "/model_group/info", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], +) +async def model_group_info( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), + model_group: Optional[str] = None, +): + """ + Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) + + - /model_group/info returns all model groups. End users of proxy should use /model_group/info since those models will be used for /chat/completions, /embeddings, etc. + - /model_group/info?model_group=rerank-english-v3.0 returns all model groups for a specific model group (`model_name` in config.yaml) + + + + Example Request (All Models): + ```shell + curl -X 'GET' \ + 'http://localhost:4000/model_group/info' \ + -H 'accept: application/json' \ + -H 'x-api-key: sk-1234' + ``` + + Example Request (Specific Model Group): + ```shell + curl -X 'GET' \ + 'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0' \ + -H 'accept: application/json' \ + -H 'Authorization: Bearer sk-1234' + ``` + + Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml) + ```shell + curl -X 'GET' \ + 'http://localhost:4000/model_group/info?model_group=openai/tts-1' + -H 'accept: application/json' \ + -H 'Authorization: Bearersk-1234' + ``` + + Learn how to use and set wildcard models [here](https://docs.litellm.ai/docs/wildcard_routing) + + Example Response: + ```json + { + "data": [ + { + "model_group": "rerank-english-v3.0", + "providers": [ + "cohere" + ], + "max_input_tokens": null, + "max_output_tokens": null, + "input_cost_per_token": 0.0, + "output_cost_per_token": 0.0, + "mode": null, + "tpm": null, + "rpm": null, + "supports_parallel_function_calling": false, + "supports_vision": false, + "supports_function_calling": false, + "supported_openai_params": [ + "stream", + "temperature", + "max_tokens", + "logit_bias", + "top_p", + "frequency_penalty", + "presence_penalty", + "stop", + "n", + "extra_headers" + ] + }, + { + "model_group": "gpt-3.5-turbo", + "providers": [ + "openai" + ], + "max_input_tokens": 16385.0, + "max_output_tokens": 4096.0, + "input_cost_per_token": 1.5e-06, + "output_cost_per_token": 2e-06, + "mode": "chat", + "tpm": null, + "rpm": null, + "supports_parallel_function_calling": false, + "supports_vision": false, + "supports_function_calling": true, + "supported_openai_params": [ + "frequency_penalty", + "logit_bias", + "logprobs", + "top_logprobs", + "max_tokens", + "max_completion_tokens", + "n", + "presence_penalty", + "seed", + "stop", + "stream", + "stream_options", + "temperature", + "top_p", + "tools", + "tool_choice", + "function_call", + "functions", + "max_retries", + "extra_headers", + "parallel_tool_calls", + "response_format" + ] + }, + { + "model_group": "llava-hf", + "providers": [ + "openai" + ], + "max_input_tokens": null, + "max_output_tokens": null, + "input_cost_per_token": 0.0, + "output_cost_per_token": 0.0, + "mode": null, + "tpm": null, + "rpm": null, + "supports_parallel_function_calling": false, + "supports_vision": true, + "supports_function_calling": false, + "supported_openai_params": [ + "frequency_penalty", + "logit_bias", + "logprobs", + "top_logprobs", + "max_tokens", + "max_completion_tokens", + "n", + "presence_penalty", + "seed", + "stop", + "stream", + "stream_options", + "temperature", + "top_p", + "tools", + "tool_choice", + "function_call", + "functions", + "max_retries", + "extra_headers", + "parallel_tool_calls", + "response_format" + ] + } + ] + } + ``` + """ + global llm_model_list, general_settings, user_config_file_path, proxy_config, llm_router + + if llm_model_list is None: + raise HTTPException( + status_code=500, detail={"error": "LLM Model List not loaded in"} + ) + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": "LLM Router is not loaded in"} + ) + ## CHECK IF MODEL RESTRICTIONS ARE SET AT KEY/TEAM LEVEL ## + model_access_groups: Dict[str, List[str]] = defaultdict(list) + if llm_router is None: + proxy_model_list = [] + else: + proxy_model_list = llm_router.get_model_names() + model_access_groups = llm_router.get_model_access_groups() + + key_models = get_key_models( + user_api_key_dict=user_api_key_dict, + proxy_model_list=proxy_model_list, + model_access_groups=model_access_groups, + ) + team_models = get_team_models( + team_models=user_api_key_dict.team_models, + proxy_model_list=proxy_model_list, + model_access_groups=model_access_groups, + ) + all_models_str = get_complete_model_list( + key_models=key_models, + team_models=team_models, + proxy_model_list=proxy_model_list, + user_model=user_model, + infer_model_from_keys=general_settings.get("infer_model_from_keys", False), + ) + + model_groups: List[ModelGroupInfo] = _get_model_group_info( + llm_router=llm_router, all_models_str=all_models_str, model_group=model_group + ) + + return {"data": model_groups} + + +@router.get( + "/model/settings", + description="Returns provider name, description, and required parameters for each provider", + tags=["model management"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def model_settings(): + """ + Used by UI to generate 'model add' page + { + field_name=field_name, + field_type=allowed_args[field_name]["type"], # string/int + field_description=field_info.description or "", # human-friendly description + field_value=general_settings.get(field_name, None), # example value + } + """ + + returned_list = [] + for provider in litellm.provider_list: + returned_list.append( + ProviderInfo( + name=provider, + fields=litellm.get_provider_fields(custom_llm_provider=provider), + ) + ) + + return returned_list + + +#### ALERTING MANAGEMENT ENDPOINTS #### + + +@router.get( + "/alerting/settings", + description="Return the configurable alerting param, description, and current value", + tags=["alerting"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def alerting_settings( + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + global proxy_logging_obj, prisma_client + """ + Used by UI to generate 'alerting settings' page + { + field_name=field_name, + field_type=allowed_args[field_name]["type"], # string/int + field_description=field_info.description or "", # human-friendly description + field_value=general_settings.get(field_name, None), # example value + } + """ + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + ## get general settings from db + db_general_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "general_settings"} + ) + + if db_general_settings is not None and db_general_settings.param_value is not None: + db_general_settings_dict = dict(db_general_settings.param_value) + alerting_args_dict: dict = db_general_settings_dict.get("alerting_args", {}) # type: ignore + alerting_values: Optional[list] = db_general_settings_dict.get("alerting") # type: ignore + else: + alerting_args_dict = {} + alerting_values = None + + allowed_args = { + "slack_alerting": {"type": "Boolean"}, + "daily_report_frequency": {"type": "Integer"}, + "report_check_interval": {"type": "Integer"}, + "budget_alert_ttl": {"type": "Integer"}, + "outage_alert_ttl": {"type": "Integer"}, + "region_outage_alert_ttl": {"type": "Integer"}, + "minor_outage_alert_threshold": {"type": "Integer"}, + "major_outage_alert_threshold": {"type": "Integer"}, + "max_outage_alert_list_size": {"type": "Integer"}, + } + + _slack_alerting: SlackAlerting = proxy_logging_obj.slack_alerting_instance + _slack_alerting_args_dict = _slack_alerting.alerting_args.model_dump() + + return_val = [] + + is_slack_enabled = False + + if general_settings.get("alerting") and isinstance( + general_settings["alerting"], list + ): + if "slack" in general_settings["alerting"]: + is_slack_enabled = True + + _response_obj = ConfigList( + field_name="slack_alerting", + field_type=allowed_args["slack_alerting"]["type"], + field_description="Enable slack alerting for monitoring proxy in production: llm outages, budgets, spend tracking failures.", + field_value=is_slack_enabled, + stored_in_db=True if alerting_values is not None else False, + field_default_value=None, + premium_field=False, + ) + return_val.append(_response_obj) + + for field_name, field_info in SlackAlertingArgs.model_fields.items(): + if field_name in allowed_args: + + _stored_in_db: Optional[bool] = None + if field_name in alerting_args_dict: + _stored_in_db = True + else: + _stored_in_db = False + + _response_obj = ConfigList( + field_name=field_name, + field_type=allowed_args[field_name]["type"], + field_description=field_info.description or "", + field_value=_slack_alerting_args_dict.get(field_name, None), + stored_in_db=_stored_in_db, + field_default_value=field_info.default, + premium_field=( + True if field_name == "region_outage_alert_ttl" else False + ), + ) + return_val.append(_response_obj) + return return_val + + +#### EXPERIMENTAL QUEUING #### +@router.post( + "/queue/chat/completions", + tags=["experimental"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def async_queue_request( + request: Request, + fastapi_response: Response, + model: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + global general_settings, user_debug, proxy_logging_obj + """ + v2 attempt at a background worker to handle queuing. + + Just supports /chat/completion calls currently. + + Now using a FastAPI background task + /chat/completions compatible endpoint + """ + data = {} + try: + data = await request.json() # type: ignore + + # Include original request and headers in the data + data["proxy_server_request"] = { + "url": str(request.url), + "method": request.method, + "headers": dict(request.headers), + "body": copy.copy(data), # use copy instead of deepcopy + } + + verbose_proxy_logger.debug("receiving data: %s", data) + data["model"] = ( + general_settings.get("completion_model", None) # server default + or user_model # model name passed via cli args + or model # for azure deployments + or data.get("model", None) # default passed in http request + ) + + # users can pass in 'user' param to /chat/completions. Don't override it + if data.get("user", None) is None and user_api_key_dict.user_id is not None: + # if users are using user_api_key_auth, set `user` in `data` + data["user"] = user_api_key_dict.user_id + + if "metadata" not in data: + data["metadata"] = {} + data["metadata"]["user_api_key"] = user_api_key_dict.api_key + data["metadata"]["user_api_key_metadata"] = user_api_key_dict.metadata + _headers = dict(request.headers) + _headers.pop( + "authorization", None + ) # do not store the original `sk-..` api key in the db + data["metadata"]["headers"] = _headers + data["metadata"]["user_api_key_alias"] = getattr( + user_api_key_dict, "key_alias", None + ) + data["metadata"]["user_api_key_user_id"] = user_api_key_dict.user_id + data["metadata"]["user_api_key_team_id"] = getattr( + user_api_key_dict, "team_id", None + ) + data["metadata"]["endpoint"] = str(request.url) + + global user_temperature, user_request_timeout, user_max_tokens, user_api_base + # override with user settings, these are params passed via cli + if user_temperature: + data["temperature"] = user_temperature + if user_request_timeout: + data["request_timeout"] = user_request_timeout + if user_max_tokens: + data["max_tokens"] = user_max_tokens + if user_api_base: + data["api_base"] = user_api_base + + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": CommonProxyErrors.no_llm_router.value} + ) + + response = await llm_router.schedule_acompletion(**data) + + if ( + "stream" in data and data["stream"] is True + ): # use generate_responses to stream responses + return StreamingResponse( + async_data_generator( + user_api_key_dict=user_api_key_dict, + response=response, + request_data=data, + ), + media_type="text/event-stream", + ) + + fastapi_response.headers.update({"x-litellm-priority": str(data["priority"])}) + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +@app.get("/fallback/login", tags=["experimental"], include_in_schema=False) +async def fallback_login(request: Request): + """ + Create Proxy API Keys using Google Workspace SSO. Requires setting PROXY_BASE_URL in .env + PROXY_BASE_URL should be the your deployed proxy endpoint, e.g. PROXY_BASE_URL="https://litellm-production-7002.up.railway.app/" + Example: + """ + # get url from request + redirect_url = os.getenv("PROXY_BASE_URL", str(request.base_url)) + ui_username = os.getenv("UI_USERNAME") + if redirect_url.endswith("/"): + redirect_url += "sso/callback" + else: + redirect_url += "/sso/callback" + + if ui_username is not None: + # No Google, Microsoft SSO + # Use UI Credentials set in .env + from fastapi.responses import HTMLResponse + + return HTMLResponse(content=html_form, status_code=200) + else: + from fastapi.responses import HTMLResponse + + return HTMLResponse(content=html_form, status_code=200) + + +@router.post( + "/login", include_in_schema=False +) # hidden since this is a helper for UI sso login +async def login(request: Request): # noqa: PLR0915 + global premium_user, general_settings + try: + import multipart + except ImportError: + subprocess.run(["pip", "install", "python-multipart"]) + global master_key + if master_key is None: + raise ProxyException( + message="Master Key not set for Proxy. Please set Master Key to use Admin UI. Set `LITELLM_MASTER_KEY` in .env or set general_settings:master_key in config.yaml. https://docs.litellm.ai/docs/proxy/virtual_keys. If set, use `--detailed_debug` to debug issue.", + type=ProxyErrorTypes.auth_error, + param="master_key", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + form = await request.form() + username = str(form.get("username")) + password = str(form.get("password")) + ui_username = os.getenv("UI_USERNAME", "admin") + ui_password = os.getenv("UI_PASSWORD", None) + if ui_password is None: + ui_password = str(master_key) if master_key is not None else None + if ui_password is None: + raise ProxyException( + message="set Proxy master key to use UI. https://docs.litellm.ai/docs/proxy/virtual_keys. If set, use `--detailed_debug` to debug issue.", + type=ProxyErrorTypes.auth_error, + param="UI_PASSWORD", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + # check if we can find the `username` in the db. on the ui, users can enter username=their email + _user_row = None + user_role: Optional[ + Literal[ + LitellmUserRoles.PROXY_ADMIN, + LitellmUserRoles.PROXY_ADMIN_VIEW_ONLY, + LitellmUserRoles.INTERNAL_USER, + LitellmUserRoles.INTERNAL_USER_VIEW_ONLY, + ] + ] = None + if prisma_client is not None: + _user_row = await prisma_client.db.litellm_usertable.find_first( + where={"user_email": {"equals": username}} + ) + disabled_non_admin_personal_key_creation = ( + get_disabled_non_admin_personal_key_creation() + ) + """ + To login to Admin UI, we support the following + - Login with UI_USERNAME and UI_PASSWORD + - Login with Invite Link `user_email` and `password` combination + """ + if secrets.compare_digest(username, ui_username) and secrets.compare_digest( + password, ui_password + ): + # Non SSO -> If user is using UI_USERNAME and UI_PASSWORD they are Proxy admin + user_role = LitellmUserRoles.PROXY_ADMIN + user_id = litellm_proxy_admin_name + + # we want the key created to have PROXY_ADMIN_PERMISSIONS + key_user_id = litellm_proxy_admin_name + if ( + os.getenv("PROXY_ADMIN_ID", None) is not None + and os.environ["PROXY_ADMIN_ID"] == user_id + ) or user_id == litellm_proxy_admin_name: + # checks if user is admin + key_user_id = os.getenv("PROXY_ADMIN_ID", litellm_proxy_admin_name) + + # Admin is Authe'd in - generate key for the UI to access Proxy + + # ensure this user is set as the proxy admin, in this route there is no sso, we can assume this user is only the admin + await user_update( + data=UpdateUserRequest( + user_id=key_user_id, + user_role=user_role, + ) + ) + if os.getenv("DATABASE_URL") is not None: + response = await generate_key_helper_fn( + request_type="key", + **{ + "user_role": LitellmUserRoles.PROXY_ADMIN, + "duration": "24hr", + "key_max_budget": litellm.max_ui_session_budget, + "models": [], + "aliases": {}, + "config": {}, + "spend": 0, + "user_id": key_user_id, + "team_id": "litellm-dashboard", + }, # type: ignore + ) + else: + raise ProxyException( + message="No Database connected. Set DATABASE_URL in .env. If set, use `--detailed_debug` to debug issue.", + type=ProxyErrorTypes.auth_error, + param="DATABASE_URL", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + key = response["token"] # type: ignore + litellm_dashboard_ui = os.getenv("PROXY_BASE_URL", "") + if litellm_dashboard_ui.endswith("/"): + litellm_dashboard_ui += "ui/" + else: + litellm_dashboard_ui += "/ui/" + import jwt + + jwt_token = jwt.encode( # type: ignore + { + "user_id": user_id, + "key": key, + "user_email": None, + "user_role": user_role, # this is the path without sso - we can assume only admins will use this + "login_method": "username_password", + "premium_user": premium_user, + "auth_header_name": general_settings.get( + "litellm_key_header_name", "Authorization" + ), + "disabled_non_admin_personal_key_creation": disabled_non_admin_personal_key_creation, + }, + master_key, + algorithm="HS256", + ) + litellm_dashboard_ui += "?userID=" + user_id + redirect_response = RedirectResponse(url=litellm_dashboard_ui, status_code=303) + redirect_response.set_cookie(key="token", value=jwt_token) + return redirect_response + elif _user_row is not None: + """ + When sharing invite links + + -> if the user has no role in the DB assume they are only a viewer + """ + user_id = getattr(_user_row, "user_id", "unknown") + user_role = getattr( + _user_row, "user_role", LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ) + user_email = getattr(_user_row, "user_email", "unknown") + _password = getattr(_user_row, "password", "unknown") + + # check if password == _user_row.password + hash_password = hash_token(token=password) + if secrets.compare_digest(password, _password) or secrets.compare_digest( + hash_password, _password + ): + if os.getenv("DATABASE_URL") is not None: + response = await generate_key_helper_fn( + request_type="key", + **{ # type: ignore + "user_role": user_role, + "duration": "24hr", + "key_max_budget": litellm.max_ui_session_budget, + "models": [], + "aliases": {}, + "config": {}, + "spend": 0, + "user_id": user_id, + "team_id": "litellm-dashboard", + }, + ) + else: + raise ProxyException( + message="No Database connected. Set DATABASE_URL in .env. If set, use `--detailed_debug` to debug issue.", + type=ProxyErrorTypes.auth_error, + param="DATABASE_URL", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + key = response["token"] # type: ignore + litellm_dashboard_ui = os.getenv("PROXY_BASE_URL", "") + if litellm_dashboard_ui.endswith("/"): + litellm_dashboard_ui += "ui/" + else: + litellm_dashboard_ui += "/ui/" + import jwt + + jwt_token = jwt.encode( # type: ignore + { + "user_id": user_id, + "key": key, + "user_email": user_email, + "user_role": user_role, + "login_method": "username_password", + "premium_user": premium_user, + "auth_header_name": general_settings.get( + "litellm_key_header_name", "Authorization" + ), + "disabled_non_admin_personal_key_creation": disabled_non_admin_personal_key_creation, + }, + master_key, + algorithm="HS256", + ) + litellm_dashboard_ui += "?userID=" + user_id + redirect_response = RedirectResponse( + url=litellm_dashboard_ui, status_code=303 + ) + redirect_response.set_cookie(key="token", value=jwt_token) + return redirect_response + else: + raise ProxyException( + message=f"Invalid credentials used to access UI.\nNot valid credentials for {username}", + type=ProxyErrorTypes.auth_error, + param="invalid_credentials", + code=status.HTTP_401_UNAUTHORIZED, + ) + else: + raise ProxyException( + message="Invalid credentials used to access UI.\nCheck 'UI_USERNAME', 'UI_PASSWORD' in .env file", + type=ProxyErrorTypes.auth_error, + param="invalid_credentials", + code=status.HTTP_401_UNAUTHORIZED, + ) + + +@app.get("/onboarding/get_token", include_in_schema=False) +async def onboarding(invite_link: str): + """ + - Get the invite link + - Validate it's still 'valid' + - Invalidate the link (prevents abuse) + - Get user from db + - Pass in user_email if set + """ + global prisma_client, master_key, general_settings + if master_key is None: + raise ProxyException( + message="Master Key not set for Proxy. Please set Master Key to use Admin UI. Set `LITELLM_MASTER_KEY` in .env or set general_settings:master_key in config.yaml. https://docs.litellm.ai/docs/proxy/virtual_keys. If set, use `--detailed_debug` to debug issue.", + type=ProxyErrorTypes.auth_error, + param="master_key", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + ### VALIDATE INVITE LINK ### + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + invite_obj = await prisma_client.db.litellm_invitationlink.find_unique( + where={"id": invite_link} + ) + if invite_obj is None: + raise HTTPException( + status_code=401, detail={"error": "Invitation link does not exist in db."} + ) + #### CHECK IF EXPIRED + # Extract the date part from both datetime objects + utc_now_date = litellm.utils.get_utc_datetime().date() + expires_at_date = invite_obj.expires_at.date() + if expires_at_date < utc_now_date: + raise HTTPException( + status_code=401, detail={"error": "Invitation link has expired."} + ) + + #### INVALIDATE LINK + current_time = litellm.utils.get_utc_datetime() + + _ = await prisma_client.db.litellm_invitationlink.update( + where={"id": invite_link}, + data={ + "accepted_at": current_time, + "updated_at": current_time, + "is_accepted": True, + "updated_by": invite_obj.user_id, # type: ignore + }, + ) + + ### GET USER OBJECT ### + user_obj = await prisma_client.db.litellm_usertable.find_unique( + where={"user_id": invite_obj.user_id} + ) + + if user_obj is None: + raise HTTPException( + status_code=401, detail={"error": "User does not exist in db."} + ) + + user_email = user_obj.user_email + + response = await generate_key_helper_fn( + request_type="key", + **{ + "user_role": user_obj.user_role, + "duration": "24hr", + "key_max_budget": litellm.max_ui_session_budget, + "models": [], + "aliases": {}, + "config": {}, + "spend": 0, + "user_id": user_obj.user_id, + "team_id": "litellm-dashboard", + }, # type: ignore + ) + key = response["token"] # type: ignore + + litellm_dashboard_ui = os.getenv("PROXY_BASE_URL", "") + if litellm_dashboard_ui.endswith("/"): + litellm_dashboard_ui += "ui/onboarding" + else: + litellm_dashboard_ui += "/ui/onboarding" + import jwt + + disabled_non_admin_personal_key_creation = ( + get_disabled_non_admin_personal_key_creation() + ) + + jwt_token = jwt.encode( # type: ignore + { + "user_id": user_obj.user_id, + "key": key, + "user_email": user_obj.user_email, + "user_role": user_obj.user_role, + "login_method": "username_password", + "premium_user": premium_user, + "auth_header_name": general_settings.get( + "litellm_key_header_name", "Authorization" + ), + "disabled_non_admin_personal_key_creation": disabled_non_admin_personal_key_creation, + }, + master_key, + algorithm="HS256", + ) + + litellm_dashboard_ui += "?token={}&user_email={}".format(jwt_token, user_email) + return { + "login_url": litellm_dashboard_ui, + "token": jwt_token, + "user_email": user_email, + } + + +@app.post("/onboarding/claim_token", include_in_schema=False) +async def claim_onboarding_link(data: InvitationClaim): + """ + Special route. Allows UI link share user to update their password. + + - Get the invite link + - Validate it's still 'valid' + - Check if user within initial session (prevents abuse) + - Get user from db + - Update user password + + This route can only update user password. + """ + global prisma_client + ### VALIDATE INVITE LINK ### + if prisma_client is None: + raise HTTPException( + status_code=500, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + invite_obj = await prisma_client.db.litellm_invitationlink.find_unique( + where={"id": data.invitation_link} + ) + if invite_obj is None: + raise HTTPException( + status_code=401, detail={"error": "Invitation link does not exist in db."} + ) + #### CHECK IF EXPIRED + # Extract the date part from both datetime objects + utc_now_date = litellm.utils.get_utc_datetime().date() + expires_at_date = invite_obj.expires_at.date() + if expires_at_date < utc_now_date: + raise HTTPException( + status_code=401, detail={"error": "Invitation link has expired."} + ) + + #### CHECK IF CLAIMED + ##### if claimed - accept + ##### if unclaimed - reject + + if invite_obj.is_accepted is True: + # this is a valid invite that was accepted + pass + else: + raise HTTPException( + status_code=401, + detail={ + "error": "The invitation link was never validated. Please file an issue, if this is not intended - https://github.com/BerriAI/litellm/issues." + }, + ) + + #### CHECK IF VALID USER ID + if invite_obj.user_id != data.user_id: + raise HTTPException( + status_code=401, + detail={ + "error": "Invalid invitation link. The user id submitted does not match the user id this link is attached to. Got={}, Expected={}".format( + data.user_id, invite_obj.user_id + ) + }, + ) + ### UPDATE USER OBJECT ### + hash_password = hash_token(token=data.password) + user_obj = await prisma_client.db.litellm_usertable.update( + where={"user_id": invite_obj.user_id}, data={"password": hash_password} + ) + + if user_obj is None: + raise HTTPException( + status_code=401, detail={"error": "User does not exist in db."} + ) + + return user_obj + + +@app.get("/get_image", include_in_schema=False) +def get_image(): + """Get logo to show on admin UI""" + + # get current_dir + current_dir = os.path.dirname(os.path.abspath(__file__)) + default_logo = os.path.join(current_dir, "logo.jpg") + + logo_path = os.getenv("UI_LOGO_PATH", default_logo) + verbose_proxy_logger.debug("Reading logo from path: %s", logo_path) + + # Check if the logo path is an HTTP/HTTPS URL + if logo_path.startswith(("http://", "https://")): + # Download the image and cache it + client = HTTPHandler() + response = client.get(logo_path) + if response.status_code == 200: + # Save the image to a local file + cache_path = os.path.join(current_dir, "cached_logo.jpg") + with open(cache_path, "wb") as f: + f.write(response.content) + + # Return the cached image as a FileResponse + return FileResponse(cache_path, media_type="image/jpeg") + else: + # Handle the case when the image cannot be downloaded + return FileResponse(default_logo, media_type="image/jpeg") + else: + # Return the local image file if the logo path is not an HTTP/HTTPS URL + return FileResponse(logo_path, media_type="image/jpeg") + + +#### INVITATION MANAGEMENT #### + + +@router.post( + "/invitation/new", + tags=["Invite Links"], + dependencies=[Depends(user_api_key_auth)], + response_model=InvitationModel, + include_in_schema=False, +) +async def new_invitation( + data: InvitationNew, user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth) +): + """ + Allow admin to create invite links, to onboard new users to Admin UI. + + ``` + curl -X POST 'http://localhost:4000/invitation/new' \ + -H 'Content-Type: application/json' \ + -d '{ + "user_id": "1234" // 👈 id of user in 'LiteLLM_UserTable' + }' + ``` + """ + global prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + current_time = litellm.utils.get_utc_datetime() + expires_at = current_time + timedelta(days=7) + + try: + response = await prisma_client.db.litellm_invitationlink.create( + data={ + "user_id": data.user_id, + "created_at": current_time, + "expires_at": expires_at, + "created_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + "updated_at": current_time, + "updated_by": user_api_key_dict.user_id or litellm_proxy_admin_name, + } # type: ignore + ) + return response + except Exception as e: + if "Foreign key constraint failed on the field" in str(e): + raise HTTPException( + status_code=400, + detail={ + "error": "User id does not exist in 'LiteLLM_UserTable'. Fix this by creating user via `/user/new`." + }, + ) + raise HTTPException(status_code=500, detail={"error": str(e)}) + + +@router.get( + "/invitation/info", + tags=["Invite Links"], + dependencies=[Depends(user_api_key_auth)], + response_model=InvitationModel, + include_in_schema=False, +) +async def invitation_info( + invitation_id: str, user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth) +): + """ + Allow admin to create invite links, to onboard new users to Admin UI. + + ``` + curl -X POST 'http://localhost:4000/invitation/new' \ + -H 'Content-Type: application/json' \ + -d '{ + "user_id": "1234" // 👈 id of user in 'LiteLLM_UserTable' + }' + ``` + """ + global prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + response = await prisma_client.db.litellm_invitationlink.find_unique( + where={"id": invitation_id} + ) + + if response is None: + raise HTTPException( + status_code=400, + detail={"error": "Invitation id does not exist in the database."}, + ) + return response + + +@router.post( + "/invitation/update", + tags=["Invite Links"], + dependencies=[Depends(user_api_key_auth)], + response_model=InvitationModel, + include_in_schema=False, +) +async def invitation_update( + data: InvitationUpdate, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Update when invitation is accepted + + ``` + curl -X POST 'http://localhost:4000/invitation/update' \ + -H 'Content-Type: application/json' \ + -d '{ + "invitation_id": "1234" // 👈 id of invitation in 'LiteLLM_InvitationTable' + "is_accepted": True // when invitation is accepted + }' + ``` + """ + global prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_id is None: + raise HTTPException( + status_code=500, + detail={ + "error": "Unable to identify user id. Received={}".format( + user_api_key_dict.user_id + ) + }, + ) + + current_time = litellm.utils.get_utc_datetime() + response = await prisma_client.db.litellm_invitationlink.update( + where={"id": data.invitation_id}, + data={ + "id": data.invitation_id, + "is_accepted": data.is_accepted, + "accepted_at": current_time, + "updated_at": current_time, + "updated_by": user_api_key_dict.user_id, # type: ignore + }, + ) + + if response is None: + raise HTTPException( + status_code=400, + detail={"error": "Invitation id does not exist in the database."}, + ) + return response + + +@router.post( + "/invitation/delete", + tags=["Invite Links"], + dependencies=[Depends(user_api_key_auth)], + response_model=InvitationModel, + include_in_schema=False, +) +async def invitation_delete( + data: InvitationDelete, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete invitation link + + ``` + curl -X POST 'http://localhost:4000/invitation/delete' \ + -H 'Content-Type: application/json' \ + -d '{ + "invitation_id": "1234" // 👈 id of invitation in 'LiteLLM_InvitationTable' + }' + ``` + """ + global prisma_client + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + response = await prisma_client.db.litellm_invitationlink.delete( + where={"id": data.invitation_id} + ) + + if response is None: + raise HTTPException( + status_code=400, + detail={"error": "Invitation id does not exist in the database."}, + ) + return response + + +#### CONFIG MANAGEMENT #### +@router.post( + "/config/update", + tags=["config.yaml"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def update_config(config_info: ConfigYAML): # noqa: PLR0915 + """ + For Admin UI - allows admin to update config via UI + + Currently supports modifying General Settings + LiteLLM settings + """ + global llm_router, llm_model_list, general_settings, proxy_config, proxy_logging_obj, master_key, prisma_client + try: + import base64 + + """ + - Update the ConfigTable DB + - Run 'add_deployment' + """ + if prisma_client is None: + raise Exception("No DB Connected") + + if store_model_in_db is not True: + raise HTTPException( + status_code=500, + detail={ + "error": "Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature." + }, + ) + + updated_settings = config_info.json(exclude_none=True) + updated_settings = prisma_client.jsonify_object(updated_settings) + for k, v in updated_settings.items(): + if k == "router_settings": + await prisma_client.db.litellm_config.upsert( + where={"param_name": k}, + data={ + "create": {"param_name": k, "param_value": v}, + "update": {"param_value": v}, + }, + ) + + ### OLD LOGIC [TODO] MOVE TO DB ### + + # Load existing config + config = await proxy_config.get_config() + verbose_proxy_logger.debug("Loaded config: %s", config) + + # update the general settings + if config_info.general_settings is not None: + config.setdefault("general_settings", {}) + updated_general_settings = config_info.general_settings.dict( + exclude_none=True + ) + + _existing_settings = config["general_settings"] + for k, v in updated_general_settings.items(): + # overwrite existing settings with updated values + if k == "alert_to_webhook_url": + # check if slack is already enabled. if not, enable it + if "alerting" not in _existing_settings: + _existing_settings = {"alerting": ["slack"]} + elif isinstance(_existing_settings["alerting"], list): + if "slack" not in _existing_settings["alerting"]: + _existing_settings["alerting"].append("slack") + _existing_settings[k] = v + config["general_settings"] = _existing_settings + + if config_info.environment_variables is not None: + config.setdefault("environment_variables", {}) + _updated_environment_variables = config_info.environment_variables + + # encrypt updated_environment_variables # + for k, v in _updated_environment_variables.items(): + encrypted_value = encrypt_value_helper(value=v) + _updated_environment_variables[k] = encrypted_value + + _existing_env_variables = config["environment_variables"] + + for k, v in _updated_environment_variables.items(): + # overwrite existing env variables with updated values + _existing_env_variables[k] = _updated_environment_variables[k] + + # update the litellm settings + if config_info.litellm_settings is not None: + config.setdefault("litellm_settings", {}) + updated_litellm_settings = config_info.litellm_settings + config["litellm_settings"] = { + **updated_litellm_settings, + **config["litellm_settings"], + } + + # if litellm.success_callback in updated_litellm_settings and config["litellm_settings"] + if ( + "success_callback" in updated_litellm_settings + and "success_callback" in config["litellm_settings"] + ): + + # check both success callback are lists + if isinstance( + config["litellm_settings"]["success_callback"], list + ) and isinstance(updated_litellm_settings["success_callback"], list): + combined_success_callback = ( + config["litellm_settings"]["success_callback"] + + updated_litellm_settings["success_callback"] + ) + combined_success_callback = list(set(combined_success_callback)) + config["litellm_settings"][ + "success_callback" + ] = combined_success_callback + + # Save the updated config + await proxy_config.save_config(new_config=config) + + await proxy_config.add_deployment( + prisma_client=prisma_client, proxy_logging_obj=proxy_logging_obj + ) + + return {"message": "Config updated successfully"} + except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.update_config(): Exception occured - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +### CONFIG GENERAL SETTINGS +""" +- Update config settings +- Get config settings + +Keep it more precise, to prevent overwrite other values unintentially +""" + + +@router.post( + "/config/field/update", + tags=["config.yaml"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def update_config_general_settings( + data: ConfigFieldUpdate, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Update a specific field in litellm general settings + """ + global prisma_client + ## VALIDATION ## + """ + - Check if prisma_client is None + - Check if user allowed to call this endpoint (admin-only) + - Check if param in general settings + - Check if config value is valid type + """ + + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.not_allowed_access.value}, + ) + + if data.field_name not in ConfigGeneralSettings.model_fields: + raise HTTPException( + status_code=400, + detail={"error": "Invalid field={} passed in.".format(data.field_name)}, + ) + + try: + ConfigGeneralSettings(**{data.field_name: data.field_value}) + except Exception: + raise HTTPException( + status_code=400, + detail={ + "error": "Invalid type of field value={} passed in.".format( + type(data.field_value), + ) + }, + ) + + ## get general settings from db + db_general_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "general_settings"} + ) + ### update value + + if db_general_settings is None or db_general_settings.param_value is None: + general_settings = {} + else: + general_settings = dict(db_general_settings.param_value) + + ## update db + + general_settings[data.field_name] = data.field_value + + response = await prisma_client.db.litellm_config.upsert( + where={"param_name": "general_settings"}, + data={ + "create": {"param_name": "general_settings", "param_value": json.dumps(general_settings)}, # type: ignore + "update": {"param_value": json.dumps(general_settings)}, # type: ignore + }, + ) + + return response + + +@router.get( + "/config/field/info", + tags=["config.yaml"], + dependencies=[Depends(user_api_key_auth)], + response_model=ConfigFieldInfo, + include_in_schema=False, +) +async def get_config_general_settings( + field_name: str, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + global prisma_client + + ## VALIDATION ## + """ + - Check if prisma_client is None + - Check if user allowed to call this endpoint (admin-only) + - Check if param in general settings + """ + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.not_allowed_access.value}, + ) + + if field_name not in ConfigGeneralSettings.model_fields: + raise HTTPException( + status_code=400, + detail={"error": "Invalid field={} passed in.".format(field_name)}, + ) + + ## get general settings from db + db_general_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "general_settings"} + ) + ### pop the value + + if db_general_settings is None or db_general_settings.param_value is None: + raise HTTPException( + status_code=400, + detail={"error": "Field name={} not in DB".format(field_name)}, + ) + else: + general_settings = dict(db_general_settings.param_value) + + if field_name in general_settings: + return ConfigFieldInfo( + field_name=field_name, field_value=general_settings[field_name] + ) + else: + raise HTTPException( + status_code=400, + detail={"error": "Field name={} not in DB".format(field_name)}, + ) + + +@router.get( + "/config/list", + tags=["config.yaml"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def get_config_list( + config_type: Literal["general_settings"], + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +) -> List[ConfigList]: + """ + List the available fields + current values for a given type of setting (currently just 'general_settings'user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),) + """ + global prisma_client, general_settings + + ## VALIDATION ## + """ + - Check if prisma_client is None + - Check if user allowed to call this endpoint (admin-only) + - Check if param in general settings + """ + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + ## get general settings from db + db_general_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "general_settings"} + ) + + if db_general_settings is not None and db_general_settings.param_value is not None: + db_general_settings_dict = dict(db_general_settings.param_value) + else: + db_general_settings_dict = {} + + allowed_args = { + "max_parallel_requests": {"type": "Integer"}, + "global_max_parallel_requests": {"type": "Integer"}, + "max_request_size_mb": {"type": "Integer"}, + "max_response_size_mb": {"type": "Integer"}, + "pass_through_endpoints": {"type": "PydanticModel"}, + } + + return_val = [] + + for field_name, field_info in ConfigGeneralSettings.model_fields.items(): + if field_name in allowed_args: + + ## HANDLE TYPED DICT + + typed_dict_type = allowed_args[field_name]["type"] + + if typed_dict_type == "PydanticModel": + if field_name == "pass_through_endpoints": + pydantic_class_list = [PassThroughGenericEndpoint] + else: + pydantic_class_list = [] + + for pydantic_class in pydantic_class_list: + # Get type hints from the TypedDict to create FieldDetail objects + nested_fields = [ + FieldDetail( + field_name=sub_field, + field_type=sub_field_type.__name__, + field_description="", # Add custom logic if descriptions are available + field_default_value=general_settings.get(sub_field, None), + stored_in_db=None, + ) + for sub_field, sub_field_type in pydantic_class.__annotations__.items() + ] + + idx = 0 + for ( + sub_field, + sub_field_info, + ) in pydantic_class.model_fields.items(): + if ( + hasattr(sub_field_info, "description") + and sub_field_info.description is not None + ): + nested_fields[idx].field_description = ( + sub_field_info.description + ) + idx += 1 + + _stored_in_db = None + if field_name in db_general_settings_dict: + _stored_in_db = True + elif field_name in general_settings: + _stored_in_db = False + + _response_obj = ConfigList( + field_name=field_name, + field_type=allowed_args[field_name]["type"], + field_description=field_info.description or "", + field_value=general_settings.get(field_name, None), + stored_in_db=_stored_in_db, + field_default_value=field_info.default, + nested_fields=nested_fields, + ) + return_val.append(_response_obj) + + else: + nested_fields = None + + _stored_in_db = None + if field_name in db_general_settings_dict: + _stored_in_db = True + elif field_name in general_settings: + _stored_in_db = False + + _response_obj = ConfigList( + field_name=field_name, + field_type=allowed_args[field_name]["type"], + field_description=field_info.description or "", + field_value=general_settings.get(field_name, None), + stored_in_db=_stored_in_db, + field_default_value=field_info.default, + nested_fields=nested_fields, + ) + return_val.append(_response_obj) + + return return_val + + +@router.post( + "/config/field/delete", + tags=["config.yaml"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def delete_config_general_settings( + data: ConfigFieldDelete, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete the db value of this field in litellm general settings. Resets it to it's initial default value on litellm. + """ + global prisma_client + ## VALIDATION ## + """ + - Check if prisma_client is None + - Check if user allowed to call this endpoint (admin-only) + - Check if param in general settings + """ + if prisma_client is None: + raise HTTPException( + status_code=400, + detail={"error": CommonProxyErrors.db_not_connected_error.value}, + ) + + if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN: + raise HTTPException( + status_code=400, + detail={ + "error": "{}, your role={}".format( + CommonProxyErrors.not_allowed_access.value, + user_api_key_dict.user_role, + ) + }, + ) + + if data.field_name not in ConfigGeneralSettings.model_fields: + raise HTTPException( + status_code=400, + detail={"error": "Invalid field={} passed in.".format(data.field_name)}, + ) + + ## get general settings from db + db_general_settings = await prisma_client.db.litellm_config.find_first( + where={"param_name": "general_settings"} + ) + ### pop the value + + if db_general_settings is None or db_general_settings.param_value is None: + raise HTTPException( + status_code=400, + detail={"error": "Field name={} not in config".format(data.field_name)}, + ) + else: + general_settings = dict(db_general_settings.param_value) + + ## update db + + general_settings.pop(data.field_name, None) + + response = await prisma_client.db.litellm_config.upsert( + where={"param_name": "general_settings"}, + data={ + "create": {"param_name": "general_settings", "param_value": json.dumps(general_settings)}, # type: ignore + "update": {"param_value": json.dumps(general_settings)}, # type: ignore + }, + ) + + return response + + +@router.get( + "/get/config/callbacks", + tags=["config.yaml"], + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def get_config(): # noqa: PLR0915 + """ + For Admin UI - allows admin to view config via UI + # return the callbacks and the env variables for the callback + + """ + global llm_router, llm_model_list, general_settings, proxy_config, proxy_logging_obj, master_key + try: + import base64 + + all_available_callbacks = AllCallbacks() + + config_data = await proxy_config.get_config() + _litellm_settings = config_data.get("litellm_settings", {}) + _general_settings = config_data.get("general_settings", {}) + environment_variables = config_data.get("environment_variables", {}) + + # check if "langfuse" in litellm_settings + _success_callbacks = _litellm_settings.get("success_callback", []) + _data_to_return = [] + """ + [ + { + "name": "langfuse", + "variables": { + "LANGFUSE_PUB_KEY": "value", + "LANGFUSE_SECRET_KEY": "value", + "LANGFUSE_HOST": "value" + }, + } + ] + + """ + for _callback in _success_callbacks: + if _callback != "langfuse": + if _callback == "openmeter": + env_vars = [ + "OPENMETER_API_KEY", + ] + elif _callback == "braintrust": + env_vars = [ + "BRAINTRUST_API_KEY", + ] + elif _callback == "traceloop": + env_vars = ["TRACELOOP_API_KEY"] + elif _callback == "custom_callback_api": + env_vars = ["GENERIC_LOGGER_ENDPOINT"] + elif _callback == "otel": + env_vars = ["OTEL_EXPORTER", "OTEL_ENDPOINT", "OTEL_HEADERS"] + elif _callback == "langsmith": + env_vars = [ + "LANGSMITH_API_KEY", + "LANGSMITH_PROJECT", + "LANGSMITH_DEFAULT_RUN_NAME", + ] + else: + env_vars = [] + + env_vars_dict = {} + for _var in env_vars: + env_variable = environment_variables.get(_var, None) + if env_variable is None: + env_vars_dict[_var] = None + else: + # decode + decrypt the value + decrypted_value = decrypt_value_helper(value=env_variable) + env_vars_dict[_var] = decrypted_value + + _data_to_return.append({"name": _callback, "variables": env_vars_dict}) + elif _callback == "langfuse": + _langfuse_vars = [ + "LANGFUSE_PUBLIC_KEY", + "LANGFUSE_SECRET_KEY", + "LANGFUSE_HOST", + ] + _langfuse_env_vars = {} + for _var in _langfuse_vars: + env_variable = environment_variables.get(_var, None) + if env_variable is None: + _langfuse_env_vars[_var] = None + else: + # decode + decrypt the value + decrypted_value = decrypt_value_helper(value=env_variable) + _langfuse_env_vars[_var] = decrypted_value + + _data_to_return.append( + {"name": _callback, "variables": _langfuse_env_vars} + ) + + # Check if slack alerting is on + _alerting = _general_settings.get("alerting", []) + alerting_data = [] + if "slack" in _alerting: + _slack_vars = [ + "SLACK_WEBHOOK_URL", + ] + _slack_env_vars = {} + for _var in _slack_vars: + env_variable = environment_variables.get(_var, None) + if env_variable is None: + _value = os.getenv("SLACK_WEBHOOK_URL", None) + _slack_env_vars[_var] = _value + else: + # decode + decrypt the value + _decrypted_value = decrypt_value_helper(value=env_variable) + _slack_env_vars[_var] = _decrypted_value + + _alerting_types = proxy_logging_obj.slack_alerting_instance.alert_types + _all_alert_types = ( + proxy_logging_obj.slack_alerting_instance._all_possible_alert_types() + ) + _alerts_to_webhook = ( + proxy_logging_obj.slack_alerting_instance.alert_to_webhook_url + ) + alerting_data.append( + { + "name": "slack", + "variables": _slack_env_vars, + "active_alerts": _alerting_types, + "alerts_to_webhook": _alerts_to_webhook, + } + ) + # pass email alerting vars + _email_vars = [ + "SMTP_HOST", + "SMTP_PORT", + "SMTP_USERNAME", + "SMTP_PASSWORD", + "SMTP_SENDER_EMAIL", + "TEST_EMAIL_ADDRESS", + "EMAIL_LOGO_URL", + "EMAIL_SUPPORT_CONTACT", + ] + _email_env_vars = {} + for _var in _email_vars: + env_variable = environment_variables.get(_var, None) + if env_variable is None: + _email_env_vars[_var] = None + else: + # decode + decrypt the value + _decrypted_value = decrypt_value_helper(value=env_variable) + _email_env_vars[_var] = _decrypted_value + + alerting_data.append( + { + "name": "email", + "variables": _email_env_vars, + } + ) + + if llm_router is None: + _router_settings = {} + else: + _router_settings = llm_router.get_settings() + + return { + "status": "success", + "callbacks": _data_to_return, + "alerts": alerting_data, + "router_settings": _router_settings, + "available_callbacks": all_available_callbacks, + } + except Exception as e: + verbose_proxy_logger.exception( + "litellm.proxy.proxy_server.get_config(): Exception occured - {}".format( + str(e) + ) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"Authentication Error({str(e)})"), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="Authentication Error, " + str(e), + type=ProxyErrorTypes.auth_error, + param=getattr(e, "param", "None"), + code=status.HTTP_400_BAD_REQUEST, + ) + + +@router.get( + "/config/yaml", + tags=["config.yaml"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def config_yaml_endpoint(config_info: ConfigYAML): + """ + This is a mock endpoint, to show what you can set in config.yaml details in the Swagger UI. + + Parameters: + + The config.yaml object has the following attributes: + - **model_list**: *Optional[List[ModelParams]]* - A list of supported models on the server, along with model-specific configurations. ModelParams includes "model_name" (name of the model), "litellm_params" (litellm-specific parameters for the model), and "model_info" (additional info about the model such as id, mode, cost per token, etc). + + - **litellm_settings**: *Optional[dict]*: Settings for the litellm module. You can specify multiple properties like "drop_params", "set_verbose", "api_base", "cache". + + - **general_settings**: *Optional[ConfigGeneralSettings]*: General settings for the server like "completion_model" (default model for chat completion calls), "use_azure_key_vault" (option to load keys from azure key vault), "master_key" (key required for all calls to proxy), and others. + + Please, refer to each class's description for a better understanding of the specific attributes within them. + + Note: This is a mock endpoint primarily meant for demonstration purposes, and does not actually provide or change any configurations. + """ + return {"hello": "world"} + + +@router.get( + "/get/litellm_model_cost_map", + include_in_schema=False, + dependencies=[Depends(user_api_key_auth)], +) +async def get_litellm_model_cost_map(): + try: + _model_cost_map = litellm.model_cost + return _model_cost_map + except Exception as e: + raise HTTPException( + status_code=500, + detail=f"Internal Server Error ({str(e)})", + ) + + +@router.get("/", dependencies=[Depends(user_api_key_auth)]) +async def home(request: Request): + return "LiteLLM: RUNNING" + + +@router.get("/routes", dependencies=[Depends(user_api_key_auth)]) +async def get_routes(): + """ + Get a list of available routes in the FastAPI application. + """ + routes = [] + for route in app.routes: + endpoint_route = getattr(route, "endpoint", None) + if endpoint_route is not None: + route_info = { + "path": getattr(route, "path", None), + "methods": getattr(route, "methods", None), + "name": getattr(route, "name", None), + "endpoint": ( + endpoint_route.__name__ + if getattr(route, "endpoint", None) + else None + ), + } + routes.append(route_info) + + return {"routes": routes} + + +#### TEST ENDPOINTS #### +# @router.get( +# "/token/generate", +# dependencies=[Depends(user_api_key_auth)], +# include_in_schema=False, +# ) +# async def token_generate(): +# """ +# Test endpoint. Admin-only access. Meant for generating admin tokens with specific claims and testing if they work for creating keys, etc. +# """ +# # Initialize AuthJWTSSO with your OpenID Provider configuration +# from fastapi_sso import AuthJWTSSO + +# auth_jwt_sso = AuthJWTSSO( +# issuer=os.getenv("OPENID_BASE_URL"), +# client_id=os.getenv("OPENID_CLIENT_ID"), +# client_secret=os.getenv("OPENID_CLIENT_SECRET"), +# scopes=["litellm_proxy_admin"], +# ) + +# token = auth_jwt_sso.create_access_token() + +# return {"token": token} + + +app.include_router(router) +app.include_router(response_router) +app.include_router(batches_router) +app.include_router(rerank_router) +app.include_router(fine_tuning_router) +app.include_router(credential_router) +app.include_router(vertex_router) +app.include_router(llm_passthrough_router) +app.include_router(anthropic_router) +app.include_router(langfuse_router) +app.include_router(pass_through_router) +app.include_router(health_router) +app.include_router(key_management_router) +app.include_router(internal_user_router) +app.include_router(team_router) +app.include_router(ui_sso_router) +app.include_router(organization_router) +app.include_router(customer_router) +app.include_router(spend_management_router) +app.include_router(caching_router) +app.include_router(analytics_router) +app.include_router(guardrails_router) +app.include_router(debugging_endpoints_router) +app.include_router(ui_crud_endpoints_router) +app.include_router(openai_files_router) +app.include_router(team_callback_router) +app.include_router(budget_management_router) +app.include_router(model_management_router) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/rerank_endpoints/endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/rerank_endpoints/endpoints.py new file mode 100644 index 00000000..ba9046b3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/rerank_endpoints/endpoints.py @@ -0,0 +1,127 @@ +#### Rerank Endpoints ##### + +import orjson +from fastapi import APIRouter, Depends, HTTPException, Request, Response, status +from fastapi.responses import ORJSONResponse + +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing + +router = APIRouter() +import asyncio + + +@router.post( + "/v2/rerank", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["rerank"], +) +@router.post( + "/v1/rerank", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["rerank"], +) +@router.post( + "/rerank", + dependencies=[Depends(user_api_key_auth)], + response_class=ORJSONResponse, + tags=["rerank"], +) +async def rerank( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + from litellm.proxy.proxy_server import ( + add_litellm_data_to_request, + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + route_request, + user_model, + version, + ) + + data = {} + try: + body = await request.body() + data = orjson.loads(body) + + # Include original request and headers in the data + data = await add_litellm_data_to_request( + data=data, + request=request, + general_settings=general_settings, + user_api_key_dict=user_api_key_dict, + version=version, + proxy_config=proxy_config, + ) + + ### CALL HOOKS ### - modify incoming data / reject request before calling the model + data = await proxy_logging_obj.pre_call_hook( + user_api_key_dict=user_api_key_dict, data=data, call_type="rerank" + ) + + ## ROUTE TO CORRECT ENDPOINT ## + llm_call = await route_request( + data=data, + route_type="arerank", + llm_router=llm_router, + user_model=user_model, + ) + response = await llm_call + + ### ALERTING ### + asyncio.create_task( + proxy_logging_obj.update_request_status( + litellm_call_id=data.get("litellm_call_id", ""), status="success" + ) + ) + + ### RESPONSE HEADERS ### + hidden_params = getattr(response, "_hidden_params", {}) or {} + model_id = hidden_params.get("model_id", None) or "" + cache_key = hidden_params.get("cache_key", None) or "" + api_base = hidden_params.get("api_base", None) or "" + additional_headers = hidden_params.get("additional_headers", None) or {} + fastapi_response.headers.update( + ProxyBaseLLMRequestProcessing.get_custom_headers( + user_api_key_dict=user_api_key_dict, + model_id=model_id, + cache_key=cache_key, + api_base=api_base, + version=version, + model_region=getattr(user_api_key_dict, "allowed_model_region", ""), + request_data=data, + **additional_headers, + ) + ) + + return response + except Exception as e: + await proxy_logging_obj.post_call_failure_hook( + user_api_key_dict=user_api_key_dict, original_exception=e, request_data=data + ) + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.rerank(): Exception occured - {}".format(str(e)) + ) + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "message", str(e)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/response_api_endpoints/endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/response_api_endpoints/endpoints.py new file mode 100644 index 00000000..f9ddf306 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/response_api_endpoints/endpoints.py @@ -0,0 +1,170 @@ +from fastapi import APIRouter, Depends, Request, Response + +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import UserAPIKeyAuth, user_api_key_auth +from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing + +router = APIRouter() + + +@router.post( + "/v1/responses", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +@router.post( + "/responses", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +async def responses_api( + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses + + ```bash + curl -X POST http://localhost:4000/v1/responses \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer sk-1234" \ + -d '{ + "model": "gpt-4o", + "input": "Tell me about AI" + }' + ``` + """ + from litellm.proxy.proxy_server import ( + _read_request_body, + general_settings, + llm_router, + proxy_config, + proxy_logging_obj, + select_data_generator, + user_api_base, + user_max_tokens, + user_model, + user_request_timeout, + user_temperature, + version, + ) + + data = await _read_request_body(request=request) + processor = ProxyBaseLLMRequestProcessing(data=data) + try: + return await processor.base_process_llm_request( + request=request, + fastapi_response=fastapi_response, + user_api_key_dict=user_api_key_dict, + route_type="aresponses", + proxy_logging_obj=proxy_logging_obj, + llm_router=llm_router, + general_settings=general_settings, + proxy_config=proxy_config, + select_data_generator=select_data_generator, + model=None, + user_model=user_model, + user_temperature=user_temperature, + user_request_timeout=user_request_timeout, + user_max_tokens=user_max_tokens, + user_api_base=user_api_base, + version=version, + ) + except Exception as e: + raise await processor._handle_llm_api_exception( + e=e, + user_api_key_dict=user_api_key_dict, + proxy_logging_obj=proxy_logging_obj, + version=version, + ) + + +@router.get( + "/v1/responses/{response_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +@router.get( + "/responses/{response_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +async def get_response( + response_id: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get a response by ID. + + Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/get + + ```bash + curl -X GET http://localhost:4000/v1/responses/resp_abc123 \ + -H "Authorization: Bearer sk-1234" + ``` + """ + # TODO: Implement response retrieval logic + pass + + +@router.delete( + "/v1/responses/{response_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +@router.delete( + "/responses/{response_id}", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +async def delete_response( + response_id: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Delete a response by ID. + + Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete + + ```bash + curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 \ + -H "Authorization: Bearer sk-1234" + ``` + """ + # TODO: Implement response deletion logic + pass + + +@router.get( + "/v1/responses/{response_id}/input_items", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +@router.get( + "/responses/{response_id}/input_items", + dependencies=[Depends(user_api_key_auth)], + tags=["responses"], +) +async def get_response_input_items( + response_id: str, + request: Request, + fastapi_response: Response, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get input items for a response. + + Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/input-items + + ```bash + curl -X GET http://localhost:4000/v1/responses/resp_abc123/input_items \ + -H "Authorization: Bearer sk-1234" + ``` + """ + # TODO: Implement input items retrieval logic + pass diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/route_llm_request.py b/.venv/lib/python3.12/site-packages/litellm/proxy/route_llm_request.py new file mode 100644 index 00000000..ac9332b2 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/route_llm_request.py @@ -0,0 +1,116 @@ +from typing import TYPE_CHECKING, Any, Literal, Optional + +from fastapi import HTTPException, status + +import litellm + +if TYPE_CHECKING: + from litellm.router import Router as _Router + + LitellmRouter = _Router +else: + LitellmRouter = Any + + +ROUTE_ENDPOINT_MAPPING = { + "acompletion": "/chat/completions", + "atext_completion": "/completions", + "aembedding": "/embeddings", + "aimage_generation": "/image/generations", + "aspeech": "/audio/speech", + "atranscription": "/audio/transcriptions", + "amoderation": "/moderations", + "arerank": "/rerank", + "aresponses": "/responses", +} + + +class ProxyModelNotFoundError(HTTPException): + def __init__(self, route: str, model_name: str): + detail = { + "error": f"{route}: Invalid model name passed in model={model_name}. Call `/v1/models` to view available models for your key." + } + super().__init__(status_code=status.HTTP_400_BAD_REQUEST, detail=detail) + + +async def route_request( + data: dict, + llm_router: Optional[LitellmRouter], + user_model: Optional[str], + route_type: Literal[ + "acompletion", + "atext_completion", + "aembedding", + "aimage_generation", + "aspeech", + "atranscription", + "amoderation", + "arerank", + "aresponses", + "_arealtime", # private function for realtime API + ], +): + """ + Common helper to route the request + """ + router_model_names = llm_router.model_names if llm_router is not None else [] + if "api_key" in data or "api_base" in data: + return getattr(llm_router, f"{route_type}")(**data) + + elif "user_config" in data: + router_config = data.pop("user_config") + user_router = litellm.Router(**router_config) + ret_val = getattr(user_router, f"{route_type}")(**data) + user_router.discard() + return ret_val + + elif ( + route_type == "acompletion" + and data.get("model", "") is not None + and "," in data.get("model", "") + and llm_router is not None + ): + if data.get("fastest_response", False): + return llm_router.abatch_completion_fastest_response(**data) + else: + models = [model.strip() for model in data.pop("model").split(",")] + return llm_router.abatch_completion(models=models, **data) + elif llm_router is not None: + if ( + data["model"] in router_model_names + or data["model"] in llm_router.get_model_ids() + ): + return getattr(llm_router, f"{route_type}")(**data) + + elif ( + llm_router.model_group_alias is not None + and data["model"] in llm_router.model_group_alias + ): + return getattr(llm_router, f"{route_type}")(**data) + + elif data["model"] in llm_router.deployment_names: + return getattr(llm_router, f"{route_type}")( + **data, specific_deployment=True + ) + + elif data["model"] not in router_model_names: + if llm_router.router_general_settings.pass_through_all_models: + return getattr(litellm, f"{route_type}")(**data) + elif ( + llm_router.default_deployment is not None + or len(llm_router.pattern_router.patterns) > 0 + ): + return getattr(llm_router, f"{route_type}")(**data) + elif route_type == "amoderation": + # moderation endpoint does not require `model` parameter + return getattr(llm_router, f"{route_type}")(**data) + + elif user_model is not None: + return getattr(litellm, f"{route_type}")(**data) + + # if no route found then it's a bad request + route_name = ROUTE_ENDPOINT_MAPPING.get(route_type, route_type) + raise ProxyModelNotFoundError( + route=route_name, + model_name=data.get("model", ""), + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/schema.prisma b/.venv/lib/python3.12/site-packages/litellm/proxy/schema.prisma new file mode 100644 index 00000000..e453e74b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/schema.prisma @@ -0,0 +1,315 @@ +datasource client { + provider = "postgresql" + url = env("DATABASE_URL") +} + +generator client { + provider = "prisma-client-py" +} + +// Budget / Rate Limits for an org +model LiteLLM_BudgetTable { + budget_id String @id @default(uuid()) + max_budget Float? + soft_budget Float? + max_parallel_requests Int? + tpm_limit BigInt? + rpm_limit BigInt? + model_max_budget Json? + budget_duration String? + budget_reset_at DateTime? + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String + organization LiteLLM_OrganizationTable[] // multiple orgs can have the same budget + keys LiteLLM_VerificationToken[] // multiple keys can have the same budget + end_users LiteLLM_EndUserTable[] // multiple end-users can have the same budget + team_membership LiteLLM_TeamMembership[] // budgets of Users within a Team + organization_membership LiteLLM_OrganizationMembership[] // budgets of Users within a Organization +} + +// Models on proxy +model LiteLLM_CredentialsTable { + credential_id String @id @default(uuid()) + credential_name String @unique + credential_values Json + credential_info Json? + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String +} + +// Models on proxy +model LiteLLM_ProxyModelTable { + model_id String @id @default(uuid()) + model_name String + litellm_params Json + model_info Json? + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String +} + +model LiteLLM_OrganizationTable { + organization_id String @id @default(uuid()) + organization_alias String + budget_id String + metadata Json @default("{}") + models String[] + spend Float @default(0.0) + model_spend Json @default("{}") + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + teams LiteLLM_TeamTable[] + users LiteLLM_UserTable[] + keys LiteLLM_VerificationToken[] + members LiteLLM_OrganizationMembership[] @relation("OrganizationToMembership") +} + +// Model info for teams, just has model aliases for now. +model LiteLLM_ModelTable { + id Int @id @default(autoincrement()) + model_aliases Json? @map("aliases") + created_at DateTime @default(now()) @map("created_at") + created_by String + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + updated_by String + team LiteLLM_TeamTable? +} + + +// Assign prod keys to groups, not individuals +model LiteLLM_TeamTable { + team_id String @id @default(uuid()) + team_alias String? + organization_id String? + admins String[] + members String[] + members_with_roles Json @default("{}") + metadata Json @default("{}") + max_budget Float? + spend Float @default(0.0) + models String[] + max_parallel_requests Int? + tpm_limit BigInt? + rpm_limit BigInt? + budget_duration String? + budget_reset_at DateTime? + blocked Boolean @default(false) + created_at DateTime @default(now()) @map("created_at") + updated_at DateTime @default(now()) @updatedAt @map("updated_at") + model_spend Json @default("{}") + model_max_budget Json @default("{}") + model_id Int? @unique // id for LiteLLM_ModelTable -> stores team-level model aliases + litellm_organization_table LiteLLM_OrganizationTable? @relation(fields: [organization_id], references: [organization_id]) + litellm_model_table LiteLLM_ModelTable? @relation(fields: [model_id], references: [id]) +} + +// Track spend, rate limit, budget Users +model LiteLLM_UserTable { + user_id String @id + user_alias String? + team_id String? + sso_user_id String? @unique + organization_id String? + password String? + teams String[] @default([]) + user_role String? + max_budget Float? + spend Float @default(0.0) + user_email String? + models String[] + metadata Json @default("{}") + max_parallel_requests Int? + tpm_limit BigInt? + rpm_limit BigInt? + budget_duration String? + budget_reset_at DateTime? + allowed_cache_controls String[] @default([]) + model_spend Json @default("{}") + model_max_budget Json @default("{}") + created_at DateTime? @default(now()) @map("created_at") + updated_at DateTime? @default(now()) @updatedAt @map("updated_at") + + // relations + litellm_organization_table LiteLLM_OrganizationTable? @relation(fields: [organization_id], references: [organization_id]) + organization_memberships LiteLLM_OrganizationMembership[] + invitations_created LiteLLM_InvitationLink[] @relation("CreatedBy") + invitations_updated LiteLLM_InvitationLink[] @relation("UpdatedBy") + invitations_user LiteLLM_InvitationLink[] @relation("UserId") +} + +// Generate Tokens for Proxy +model LiteLLM_VerificationToken { + token String @id + key_name String? + key_alias String? + soft_budget_cooldown Boolean @default(false) // key-level state on if budget alerts need to be cooled down + spend Float @default(0.0) + expires DateTime? + models String[] + aliases Json @default("{}") + config Json @default("{}") + user_id String? + team_id String? + permissions Json @default("{}") + max_parallel_requests Int? + metadata Json @default("{}") + blocked Boolean? + tpm_limit BigInt? + rpm_limit BigInt? + max_budget Float? + budget_duration String? + budget_reset_at DateTime? + allowed_cache_controls String[] @default([]) + model_spend Json @default("{}") + model_max_budget Json @default("{}") + budget_id String? + organization_id String? + created_at DateTime? @default(now()) @map("created_at") + created_by String? + updated_at DateTime? @default(now()) @updatedAt @map("updated_at") + updated_by String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + litellm_organization_table LiteLLM_OrganizationTable? @relation(fields: [organization_id], references: [organization_id]) +} + +model LiteLLM_EndUserTable { + user_id String @id + alias String? // admin-facing alias + spend Float @default(0.0) + allowed_model_region String? // require all user requests to use models in this specific region + default_model String? // use along with 'allowed_model_region'. if no available model in region, default to this model. + budget_id String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + blocked Boolean @default(false) +} + +// store proxy config.yaml +model LiteLLM_Config { + param_name String @id + param_value Json? +} + +// View spend, model, api_key per request +model LiteLLM_SpendLogs { + request_id String @id + call_type String + api_key String @default ("") // Hashed API Token. Not the actual Virtual Key. Equivalent to 'token' column in LiteLLM_VerificationToken + spend Float @default(0.0) + total_tokens Int @default(0) + prompt_tokens Int @default(0) + completion_tokens Int @default(0) + startTime DateTime // Assuming start_time is a DateTime field + endTime DateTime // Assuming end_time is a DateTime field + completionStartTime DateTime? // Assuming completionStartTime is a DateTime field + model String @default("") + model_id String? @default("") // the model id stored in proxy model db + model_group String? @default("") // public model_name / model_group + custom_llm_provider String? @default("") // litellm used custom_llm_provider + api_base String? @default("") + user String? @default("") + metadata Json? @default("{}") + cache_hit String? @default("") + cache_key String? @default("") + request_tags Json? @default("[]") + team_id String? + end_user String? + requester_ip_address String? + messages Json? @default("{}") + response Json? @default("{}") + @@index([startTime]) + @@index([end_user]) +} + +// View spend, model, api_key per request +model LiteLLM_ErrorLogs { + request_id String @id @default(uuid()) + startTime DateTime // Assuming start_time is a DateTime field + endTime DateTime // Assuming end_time is a DateTime field + api_base String @default("") + model_group String @default("") // public model_name / model_group + litellm_model_name String @default("") // model passed to litellm + model_id String @default("") // ID of model in ProxyModelTable + request_kwargs Json @default("{}") + exception_type String @default("") + exception_string String @default("") + status_code String @default("") +} + +// Beta - allow team members to request access to a model +model LiteLLM_UserNotifications { + request_id String @id + user_id String + models String[] + justification String + status String // approved, disapproved, pending +} + +model LiteLLM_TeamMembership { + // Use this table to track the Internal User's Spend within a Team + Set Budgets, rpm limits for the user within the team + user_id String + team_id String + spend Float @default(0.0) + budget_id String? + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + @@id([user_id, team_id]) +} + +model LiteLLM_OrganizationMembership { + // Use this table to track Internal User and Organization membership. Helps tracking a users role within an Organization + user_id String + organization_id String + user_role String? + spend Float? @default(0.0) + budget_id String? + created_at DateTime? @default(now()) @map("created_at") + updated_at DateTime? @default(now()) @updatedAt @map("updated_at") + + // relations + user LiteLLM_UserTable @relation(fields: [user_id], references: [user_id]) + organization LiteLLM_OrganizationTable @relation("OrganizationToMembership", fields: [organization_id], references: [organization_id]) + litellm_budget_table LiteLLM_BudgetTable? @relation(fields: [budget_id], references: [budget_id]) + + + + @@id([user_id, organization_id]) + @@unique([user_id, organization_id]) +} + +model LiteLLM_InvitationLink { + // use this table to track invite links sent by admin for people to join the proxy + id String @id @default(uuid()) + user_id String + is_accepted Boolean @default(false) + accepted_at DateTime? // when link is claimed (user successfully onboards via link) + expires_at DateTime // till when is link valid + created_at DateTime // when did admin create the link + created_by String // who created the link + updated_at DateTime // when was invite status updated + updated_by String // who updated the status (admin/user who accepted invite) + + // Relations + liteLLM_user_table_user LiteLLM_UserTable @relation("UserId", fields: [user_id], references: [user_id]) + liteLLM_user_table_created LiteLLM_UserTable @relation("CreatedBy", fields: [created_by], references: [user_id]) + liteLLM_user_table_updated LiteLLM_UserTable @relation("UpdatedBy", fields: [updated_by], references: [user_id]) +} + + +model LiteLLM_AuditLog { + id String @id @default(uuid()) + updated_at DateTime @default(now()) + changed_by String @default("") // user or system that performed the action + changed_by_api_key String @default("") // api key hash that performed the action + action String // create, update, delete + table_name String // on of LitellmTableNames.TEAM_TABLE_NAME, LitellmTableNames.USER_TABLE_NAME, LitellmTableNames.PROXY_MODEL_TABLE_NAME, + object_id String // id of the object being audited. This can be the key id, team id, user id, model id + before_value Json? // value of the row + updated_values Json? // value of the row after change +} diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/spend_tracking/spend_management_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/spend_tracking/spend_management_endpoints.py new file mode 100644 index 00000000..9789e2a0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/spend_tracking/spend_management_endpoints.py @@ -0,0 +1,2857 @@ +#### SPEND MANAGEMENT ##### +import collections +import os +from datetime import datetime, timedelta, timezone +from functools import lru_cache +from typing import TYPE_CHECKING, Any, List, Optional + +import fastapi +from fastapi import APIRouter, Depends, HTTPException, status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy._types import ProviderBudgetResponse, ProviderBudgetResponseObject +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.spend_tracking.spend_tracking_utils import ( + get_spend_by_team_and_customer, +) +from litellm.proxy.utils import handle_exception_on_proxy + +if TYPE_CHECKING: + from litellm.proxy.proxy_server import PrismaClient +else: + PrismaClient = Any + +router = APIRouter() + + +@router.get( + "/spend/keys", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def spend_key_fn(): + """ + View all keys created, ordered by spend + + Example Request: + ``` + curl -X GET "http://0.0.0.0:8000/spend/keys" \ +-H "Authorization: Bearer sk-1234" + ``` + """ + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + key_info = await prisma_client.get_data(table_name="key", query_type="find_all") + return key_info + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) + + +@router.get( + "/spend/users", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def spend_user_fn( + user_id: Optional[str] = fastapi.Query( + default=None, + description="Get User Table row for user_id", + ), +): + """ + View all users created, ordered by spend + + Example Request: + ``` + curl -X GET "http://0.0.0.0:8000/spend/users" \ +-H "Authorization: Bearer sk-1234" + ``` + + View User Table row for user_id + ``` + curl -X GET "http://0.0.0.0:8000/spend/users?user_id=1234" \ +-H "Authorization: Bearer sk-1234" + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + if user_id is not None: + user_info = await prisma_client.get_data( + table_name="user", query_type="find_unique", user_id=user_id + ) + return [user_info] + else: + user_info = await prisma_client.get_data( + table_name="user", query_type="find_all" + ) + + return user_info + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) + + +@router.get( + "/spend/tags", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def view_spend_tags( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing key spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view key spend", + ), +): + """ + LiteLLM Enterprise - View Spend Per Request Tag + + Example Request: + ``` + curl -X GET "http://0.0.0.0:8000/spend/tags" \ +-H "Authorization: Bearer sk-1234" + ``` + + Spend with Start Date and End Date + ``` + curl -X GET "http://0.0.0.0:8000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" \ +-H "Authorization: Bearer sk-1234" + ``` + """ + + from enterprise.utils import get_spend_by_tags + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + # run the following SQL query on prisma + """ + SELECT + jsonb_array_elements_text(request_tags) AS individual_request_tag, + COUNT(*) AS log_count, + SUM(spend) AS total_spend + FROM "LiteLLM_SpendLogs" + GROUP BY individual_request_tag; + """ + response = await get_spend_by_tags( + start_date=start_date, end_date=end_date, prisma_client=prisma_client + ) + + return response + except Exception as e: + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"/spend/tags Error({str(e)})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="/spend/tags Error" + str(e), + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +async def get_global_activity_internal_user( + user_api_key_dict: UserAPIKeyAuth, start_date: datetime, end_date: datetime +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + user_id = user_api_key_dict.user_id + if user_id is None: + raise HTTPException(status_code=500, detail={"error": "No user_id found"}) + + sql_query = """ + SELECT + date_trunc('day', "startTime") AS date, + COUNT(*) AS api_requests, + SUM(total_tokens) AS total_tokens + FROM "LiteLLM_SpendLogs" + WHERE "startTime" BETWEEN $1::date AND $2::date + interval '1 day' + AND "user" = $3 + GROUP BY date_trunc('day', "startTime") + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date, end_date, user_id + ) + + return db_response + + +@router.get( + "/global/activity", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, + include_in_schema=False, +) +async def get_global_activity( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get number of API Requests, total tokens through proxy + + { + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + api_requests: 10, + total_tokens: 2000 + }, + { + date: 'Jan 23', + api_requests: 10, + total_tokens: 12 + }, + ], + "sum_api_requests": 20, + "sum_total_tokens": 2012 + } + """ + + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + db_response = await get_global_activity_internal_user( + user_api_key_dict, start_date_obj, end_date_obj + ) + else: + + sql_query = """ + SELECT + date_trunc('day', "startTime") AS date, + COUNT(*) AS api_requests, + SUM(total_tokens) AS total_tokens + FROM "LiteLLM_SpendLogs" + WHERE "startTime" BETWEEN $1::date AND $2::date + interval '1 day' + GROUP BY date_trunc('day', "startTime") + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + + if db_response is None: + return [] + + sum_api_requests = 0 + sum_total_tokens = 0 + daily_data = [] + for row in db_response: + # cast date to datetime + _date_obj = datetime.fromisoformat(row["date"]) + row["date"] = _date_obj.strftime("%b %d") + + daily_data.append(row) + sum_api_requests += row.get("api_requests", 0) + sum_total_tokens += row.get("total_tokens", 0) + + # sort daily_data by date + daily_data = sorted(daily_data, key=lambda x: x["date"]) + + data_to_return = { + "daily_data": daily_data, + "sum_api_requests": sum_api_requests, + "sum_total_tokens": sum_total_tokens, + } + + return data_to_return + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) + + +async def get_global_activity_model_internal_user( + user_api_key_dict: UserAPIKeyAuth, start_date: datetime, end_date: datetime +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + user_id = user_api_key_dict.user_id + if user_id is None: + raise HTTPException(status_code=500, detail={"error": "No user_id found"}) + + sql_query = """ + SELECT + model_group, + date_trunc('day', "startTime") AS date, + COUNT(*) AS api_requests, + SUM(total_tokens) AS total_tokens + FROM "LiteLLM_SpendLogs" + WHERE "startTime" BETWEEN $1::date AND $2::date + interval '1 day' + AND "user" = $3 + GROUP BY model_group, date_trunc('day', "startTime") + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date, end_date, user_id + ) + + return db_response + + +@router.get( + "/global/activity/model", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, + include_in_schema=False, +) +async def get_global_activity_model( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get number of API Requests, total tokens through proxy - Grouped by MODEL + + [ + { + "model": "gpt-4", + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + api_requests: 10, + total_tokens: 2000 + }, + { + date: 'Jan 23', + api_requests: 10, + total_tokens: 12 + }, + ], + "sum_api_requests": 20, + "sum_total_tokens": 2012 + + }, + { + "model": "azure/gpt-4-turbo", + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + api_requests: 10, + total_tokens: 2000 + }, + { + date: 'Jan 23', + api_requests: 10, + total_tokens: 12 + }, + ], + "sum_api_requests": 20, + "sum_total_tokens": 2012 + + }, + ] + """ + + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + db_response = await get_global_activity_model_internal_user( + user_api_key_dict, start_date_obj, end_date_obj + ) + else: + + sql_query = """ + SELECT + model_group, + date_trunc('day', "startTime") AS date, + COUNT(*) AS api_requests, + SUM(total_tokens) AS total_tokens + FROM "LiteLLM_SpendLogs" + WHERE "startTime" BETWEEN $1::date AND $2::date + interval '1 day' + GROUP BY model_group, date_trunc('day', "startTime") + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + if db_response is None: + return [] + + model_ui_data: dict = ( + {} + ) # {"gpt-4": {"daily_data": [], "sum_api_requests": 0, "sum_total_tokens": 0}} + + for row in db_response: + _model = row["model_group"] + if _model not in model_ui_data: + model_ui_data[_model] = { + "daily_data": [], + "sum_api_requests": 0, + "sum_total_tokens": 0, + } + _date_obj = datetime.fromisoformat(row["date"]) + row["date"] = _date_obj.strftime("%b %d") + + model_ui_data[_model]["daily_data"].append(row) + model_ui_data[_model]["sum_api_requests"] += row.get("api_requests", 0) + model_ui_data[_model]["sum_total_tokens"] += row.get("total_tokens", 0) + + # sort mode ui data by sum_api_requests -> get top 10 models + model_ui_data = dict( + sorted( + model_ui_data.items(), + key=lambda x: x[1]["sum_api_requests"], + reverse=True, + )[:10] + ) + + response = [] + for model, data in model_ui_data.items(): + _sort_daily_data = sorted(data["daily_data"], key=lambda x: x["date"]) + + response.append( + { + "model": model, + "daily_data": _sort_daily_data, + "sum_api_requests": data["sum_api_requests"], + "sum_total_tokens": data["sum_total_tokens"], + } + ) + + return response + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": str(e)}, + ) + + +@router.get( + "/global/activity/exceptions/deployment", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, + include_in_schema=False, +) +async def get_global_activity_exceptions_per_deployment( + model_group: str = fastapi.Query( + description="Filter by model group", + ), + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), +): + """ + Get number of 429 errors - Grouped by deployment + + [ + { + "deployment": "https://azure-us-east-1.openai.azure.com/", + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + num_rate_limit_exceptions: 10 + }, + { + date: 'Jan 23', + num_rate_limit_exceptions: 12 + }, + ], + "sum_num_rate_limit_exceptions": 20, + + }, + { + "deployment": "https://azure-us-east-1.openai.azure.com/", + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + num_rate_limit_exceptions: 10, + }, + { + date: 'Jan 23', + num_rate_limit_exceptions: 12 + }, + ], + "sum_num_rate_limit_exceptions": 20, + + }, + ] + """ + + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + sql_query = """ + SELECT + api_base, + date_trunc('day', "startTime")::date AS date, + COUNT(*) AS num_rate_limit_exceptions + FROM + "LiteLLM_ErrorLogs" + WHERE + "startTime" >= $1::date + AND "startTime" < ($2::date + INTERVAL '1 day') + AND model_group = $3 + AND status_code = '429' + GROUP BY + api_base, + date_trunc('day', "startTime") + ORDER BY + date; + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj, model_group + ) + if db_response is None: + return [] + + model_ui_data: dict = ( + {} + ) # {"gpt-4": {"daily_data": [], "sum_api_requests": 0, "sum_total_tokens": 0}} + + for row in db_response: + _model = row["api_base"] + if _model not in model_ui_data: + model_ui_data[_model] = { + "daily_data": [], + "sum_num_rate_limit_exceptions": 0, + } + _date_obj = datetime.fromisoformat(row["date"]) + row["date"] = _date_obj.strftime("%b %d") + + model_ui_data[_model]["daily_data"].append(row) + model_ui_data[_model]["sum_num_rate_limit_exceptions"] += row.get( + "num_rate_limit_exceptions", 0 + ) + + # sort mode ui data by sum_api_requests -> get top 10 models + model_ui_data = dict( + sorted( + model_ui_data.items(), + key=lambda x: x[1]["sum_num_rate_limit_exceptions"], + reverse=True, + )[:10] + ) + + response = [] + for model, data in model_ui_data.items(): + _sort_daily_data = sorted(data["daily_data"], key=lambda x: x["date"]) + + response.append( + { + "api_base": model, + "daily_data": _sort_daily_data, + "sum_num_rate_limit_exceptions": data[ + "sum_num_rate_limit_exceptions" + ], + } + ) + + return response + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": str(e)}, + ) + + +@router.get( + "/global/activity/exceptions", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, + include_in_schema=False, +) +async def get_global_activity_exceptions( + model_group: str = fastapi.Query( + description="Filter by model group", + ), + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), +): + """ + Get number of API Requests, total tokens through proxy + + { + "daily_data": [ + const chartdata = [ + { + date: 'Jan 22', + num_rate_limit_exceptions: 10, + }, + { + date: 'Jan 23', + num_rate_limit_exceptions: 10, + }, + ], + "sum_api_exceptions": 20, + } + """ + + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + sql_query = """ + SELECT + date_trunc('day', "startTime")::date AS date, + COUNT(*) AS num_rate_limit_exceptions + FROM + "LiteLLM_ErrorLogs" + WHERE + "startTime" >= $1::date + AND "startTime" < ($2::date + INTERVAL '1 day') + AND model_group = $3 + AND status_code = '429' + GROUP BY + date_trunc('day', "startTime") + ORDER BY + date; + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj, model_group + ) + + if db_response is None: + return [] + + sum_num_rate_limit_exceptions = 0 + daily_data = [] + for row in db_response: + # cast date to datetime + _date_obj = datetime.fromisoformat(row["date"]) + row["date"] = _date_obj.strftime("%b %d") + + daily_data.append(row) + sum_num_rate_limit_exceptions += row.get("num_rate_limit_exceptions", 0) + + # sort daily_data by date + daily_data = sorted(daily_data, key=lambda x: x["date"]) + + data_to_return = { + "daily_data": daily_data, + "sum_num_rate_limit_exceptions": sum_num_rate_limit_exceptions, + } + + return data_to_return + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) + + +@router.get( + "/global/spend/provider", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def get_global_spend_provider( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + Get breakdown of spend per provider + [ + { + "provider": "Azure OpenAI", + "spend": 20 + }, + { + "provider": "OpenAI", + "spend": 10 + }, + { + "provider": "VertexAI", + "spend": 30 + } + ] + """ + from collections import defaultdict + + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import llm_router, prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + user_id = user_api_key_dict.user_id + if user_id is None: + raise HTTPException( + status_code=400, detail={"error": "No user_id found"} + ) + + sql_query = """ + SELECT + model_id, + SUM(spend) AS spend + FROM "LiteLLM_SpendLogs" + WHERE "startTime" BETWEEN $1::date AND $2::date + AND length(model_id) > 0 + AND "user" = $3 + GROUP BY model_id + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj, user_id + ) + else: + sql_query = """ + SELECT + model_id, + SUM(spend) AS spend + FROM "LiteLLM_SpendLogs" + WHERE "startTime" BETWEEN $1::date AND $2::date AND length(model_id) > 0 + GROUP BY model_id + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + + if db_response is None: + return [] + + ################################### + # Convert model_id -> to Provider # + ################################### + + # we use the in memory router for this + ui_response = [] + provider_spend_mapping: defaultdict = defaultdict(int) + for row in db_response: + _model_id = row["model_id"] + _provider = "Unknown" + if llm_router is not None: + _deployment = llm_router.get_deployment(model_id=_model_id) + if _deployment is not None: + try: + _, _provider, _, _ = litellm.get_llm_provider( + model=_deployment.litellm_params.model, + custom_llm_provider=_deployment.litellm_params.custom_llm_provider, + api_base=_deployment.litellm_params.api_base, + litellm_params=_deployment.litellm_params, + ) + provider_spend_mapping[_provider] += row["spend"] + except Exception: + pass + + for provider, spend in provider_spend_mapping.items(): + ui_response.append({"provider": provider, "spend": spend}) + + return ui_response + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) + + +@router.get( + "/global/spend/report", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def get_global_spend_report( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view spend", + ), + group_by: Optional[Literal["team", "customer", "api_key"]] = fastapi.Query( + default="team", + description="Group spend by internal team or customer or api_key", + ), + api_key: Optional[str] = fastapi.Query( + default=None, + description="View spend for a specific api_key. Example api_key='sk-1234", + ), + internal_user_id: Optional[str] = fastapi.Query( + default=None, + description="View spend for a specific internal_user_id. Example internal_user_id='1234", + ), + team_id: Optional[str] = fastapi.Query( + default=None, + description="View spend for a specific team_id. Example team_id='1234", + ), + customer_id: Optional[str] = fastapi.Query( + default=None, + description="View spend for a specific customer_id. Example customer_id='1234. Can be used in conjunction with team_id as well.", + ), +): + """ + Get Daily Spend per Team, based on specific startTime and endTime. Per team, view usage by each key, model + [ + { + "group-by-day": "2024-05-10", + "teams": [ + { + "team_name": "team-1" + "spend": 10, + "keys": [ + "key": "1213", + "usage": { + "model-1": { + "cost": 12.50, + "input_tokens": 1000, + "output_tokens": 5000, + "requests": 100 + }, + "audio-modelname1": { + "cost": 25.50, + "seconds": 25, + "requests": 50 + }, + } + } + ] + ] + } + """ + if start_date is None or end_date is None: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": "Please provide start_date and end_date"}, + ) + + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + from litellm.proxy.proxy_server import premium_user, prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + if premium_user is not True: + verbose_proxy_logger.debug("accessing /spend/report but not a premium user") + raise ValueError( + "/spend/report endpoint " + CommonProxyErrors.not_premium_user.value + ) + if api_key is not None: + verbose_proxy_logger.debug("Getting /spend for api_key: %s", api_key) + if api_key.startswith("sk-"): + api_key = hash_token(token=api_key) + sql_query = """ + WITH SpendByModelApiKey AS ( + SELECT + sl.api_key, + sl.model, + SUM(sl.spend) AS model_cost, + SUM(sl.prompt_tokens) AS model_input_tokens, + SUM(sl.completion_tokens) AS model_output_tokens + FROM + "LiteLLM_SpendLogs" sl + WHERE + sl."startTime" BETWEEN $1::date AND $2::date AND sl.api_key = $3 + GROUP BY + sl.api_key, + sl.model + ) + SELECT + api_key, + SUM(model_cost) AS total_cost, + SUM(model_input_tokens) AS total_input_tokens, + SUM(model_output_tokens) AS total_output_tokens, + jsonb_agg(jsonb_build_object( + 'model', model, + 'total_cost', model_cost, + 'total_input_tokens', model_input_tokens, + 'total_output_tokens', model_output_tokens + )) AS model_details + FROM + SpendByModelApiKey + GROUP BY + api_key + ORDER BY + total_cost DESC; + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj, api_key + ) + if db_response is None: + return [] + + return db_response + elif internal_user_id is not None: + verbose_proxy_logger.debug( + "Getting /spend for internal_user_id: %s", internal_user_id + ) + sql_query = """ + WITH SpendByModelApiKey AS ( + SELECT + sl.api_key, + sl.model, + SUM(sl.spend) AS model_cost, + SUM(sl.prompt_tokens) AS model_input_tokens, + SUM(sl.completion_tokens) AS model_output_tokens + FROM + "LiteLLM_SpendLogs" sl + WHERE + sl."startTime" BETWEEN $1::date AND $2::date AND sl.user = $3 + GROUP BY + sl.api_key, + sl.model + ) + SELECT + api_key, + SUM(model_cost) AS total_cost, + SUM(model_input_tokens) AS total_input_tokens, + SUM(model_output_tokens) AS total_output_tokens, + jsonb_agg(jsonb_build_object( + 'model', model, + 'total_cost', model_cost, + 'total_input_tokens', model_input_tokens, + 'total_output_tokens', model_output_tokens + )) AS model_details + FROM + SpendByModelApiKey + GROUP BY + api_key + ORDER BY + total_cost DESC; + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj, internal_user_id + ) + if db_response is None: + return [] + + return db_response + elif team_id is not None and customer_id is not None: + return await get_spend_by_team_and_customer( + start_date_obj, end_date_obj, team_id, customer_id, prisma_client + ) + if group_by == "team": + + # first get data from spend logs -> SpendByModelApiKey + # then read data from "SpendByModelApiKey" to format the response obj + sql_query = """ + + WITH SpendByModelApiKey AS ( + SELECT + date_trunc('day', sl."startTime") AS group_by_day, + COALESCE(tt.team_alias, 'Unassigned Team') AS team_name, + sl.model, + sl.api_key, + SUM(sl.spend) AS model_api_spend, + SUM(sl.total_tokens) AS model_api_tokens + FROM + "LiteLLM_SpendLogs" sl + LEFT JOIN + "LiteLLM_TeamTable" tt + ON + sl.team_id = tt.team_id + WHERE + sl."startTime" BETWEEN $1::date AND $2::date + GROUP BY + date_trunc('day', sl."startTime"), + tt.team_alias, + sl.model, + sl.api_key + ) + SELECT + group_by_day, + jsonb_agg(jsonb_build_object( + 'team_name', team_name, + 'total_spend', total_spend, + 'metadata', metadata + )) AS teams + FROM ( + SELECT + group_by_day, + team_name, + SUM(model_api_spend) AS total_spend, + jsonb_agg(jsonb_build_object( + 'model', model, + 'api_key', api_key, + 'spend', model_api_spend, + 'total_tokens', model_api_tokens + )) AS metadata + FROM + SpendByModelApiKey + GROUP BY + group_by_day, + team_name + ) AS aggregated + GROUP BY + group_by_day + ORDER BY + group_by_day; + """ + + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + if db_response is None: + return [] + + return db_response + + elif group_by == "customer": + sql_query = """ + + WITH SpendByModelApiKey AS ( + SELECT + date_trunc('day', sl."startTime") AS group_by_day, + sl.end_user AS customer, + sl.model, + sl.api_key, + SUM(sl.spend) AS model_api_spend, + SUM(sl.total_tokens) AS model_api_tokens + FROM + "LiteLLM_SpendLogs" sl + WHERE + sl."startTime" BETWEEN $1::date AND $2::date + GROUP BY + date_trunc('day', sl."startTime"), + customer, + sl.model, + sl.api_key + ) + SELECT + group_by_day, + jsonb_agg(jsonb_build_object( + 'customer', customer, + 'total_spend', total_spend, + 'metadata', metadata + )) AS customers + FROM + ( + SELECT + group_by_day, + customer, + SUM(model_api_spend) AS total_spend, + jsonb_agg(jsonb_build_object( + 'model', model, + 'api_key', api_key, + 'spend', model_api_spend, + 'total_tokens', model_api_tokens + )) AS metadata + FROM + SpendByModelApiKey + GROUP BY + group_by_day, + customer + ) AS aggregated + GROUP BY + group_by_day + ORDER BY + group_by_day; + """ + + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + if db_response is None: + return [] + + return db_response + elif group_by == "api_key": + sql_query = """ + WITH SpendByModelApiKey AS ( + SELECT + sl.api_key, + sl.model, + SUM(sl.spend) AS model_cost, + SUM(sl.prompt_tokens) AS model_input_tokens, + SUM(sl.completion_tokens) AS model_output_tokens + FROM + "LiteLLM_SpendLogs" sl + WHERE + sl."startTime" BETWEEN $1::date AND $2::date + GROUP BY + sl.api_key, + sl.model + ) + SELECT + api_key, + SUM(model_cost) AS total_cost, + SUM(model_input_tokens) AS total_input_tokens, + SUM(model_output_tokens) AS total_output_tokens, + jsonb_agg(jsonb_build_object( + 'model', model, + 'total_cost', model_cost, + 'total_input_tokens', model_input_tokens, + 'total_output_tokens', model_output_tokens + )) AS model_details + FROM + SpendByModelApiKey + GROUP BY + api_key + ORDER BY + total_cost DESC; + """ + db_response = await prisma_client.db.query_raw( + sql_query, start_date_obj, end_date_obj + ) + if db_response is None: + return [] + + return db_response + + except Exception as e: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail={"error": str(e)}, + ) + + +@router.get( + "/global/spend/all_tag_names", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def global_get_all_tag_names(): + try: + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + sql_query = """ + SELECT DISTINCT + jsonb_array_elements_text(request_tags) AS individual_request_tag + FROM "LiteLLM_SpendLogs"; + """ + + db_response = await prisma_client.db.query_raw(sql_query) + if db_response is None: + return [] + + _tag_names = [] + for row in db_response: + _tag_names.append(row.get("individual_request_tag")) + + return {"tag_names": _tag_names} + + except Exception as e: + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"/spend/all_tag_names Error({str(e)})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="/spend/all_tag_names Error" + str(e), + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.get( + "/global/spend/tags", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def global_view_spend_tags( + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing key spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view key spend", + ), + tags: Optional[str] = fastapi.Query( + default=None, + description="comman separated tags to filter on", + ), +): + """ + LiteLLM Enterprise - View Spend Per Request Tag. Used by LiteLLM UI + + Example Request: + ``` + curl -X GET "http://0.0.0.0:4000/spend/tags" \ +-H "Authorization: Bearer sk-1234" + ``` + + Spend with Start Date and End Date + ``` + curl -X GET "http://0.0.0.0:4000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" \ +-H "Authorization: Bearer sk-1234" + ``` + """ + import traceback + + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + + if end_date is None or start_date is None: + raise ProxyException( + message="Please provide start_date and end_date", + type="bad_request", + param=None, + code=status.HTTP_400_BAD_REQUEST, + ) + response = await ui_get_spend_by_tags( + start_date=start_date, + end_date=end_date, + tags_str=tags, + prisma_client=prisma_client, + ) + + return response + except Exception as e: + error_trace = traceback.format_exc() + error_str = str(e) + "\n" + error_trace + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"/spend/tags Error({error_str})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="/spend/tags Error" + error_str, + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +async def _get_spend_report_for_time_range( + start_date: str, + end_date: str, +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + verbose_proxy_logger.error( + "Database not connected. Connect a database to your proxy for weekly, monthly spend reports" + ) + return None + + try: + sql_query = """ + SELECT + t.team_alias, + SUM(s.spend) AS total_spend + FROM + "LiteLLM_SpendLogs" s + LEFT JOIN + "LiteLLM_TeamTable" t ON s.team_id = t.team_id + WHERE + s."startTime"::DATE >= $1::date AND s."startTime"::DATE <= $2::date + GROUP BY + t.team_alias + ORDER BY + total_spend DESC; + """ + response = await prisma_client.db.query_raw(sql_query, start_date, end_date) + + # get spend per tag for today + sql_query = """ + SELECT + jsonb_array_elements_text(request_tags) AS individual_request_tag, + SUM(spend) AS total_spend + FROM "LiteLLM_SpendLogs" + WHERE "startTime"::DATE >= $1::date AND "startTime"::DATE <= $2::date + GROUP BY individual_request_tag + ORDER BY total_spend DESC; + """ + + spend_per_tag = await prisma_client.db.query_raw( + sql_query, start_date, end_date + ) + + return response, spend_per_tag + except Exception as e: + verbose_proxy_logger.error( + "Exception in _get_daily_spend_reports {}".format(str(e)) + ) + + +@router.post( + "/spend/calculate", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: { + "cost": { + "description": "The calculated cost", + "example": 0.0, + "type": "float", + } + } + }, +) +async def calculate_spend(request: SpendCalculateRequest): + """ + Accepts all the params of completion_cost. + + Calculate spend **before** making call: + + Note: If you see a spend of $0.0 you need to set custom_pricing for your model: https://docs.litellm.ai/docs/proxy/custom_pricing + + ``` + curl --location 'http://localhost:4000/spend/calculate' + --header 'Authorization: Bearer sk-1234' + --header 'Content-Type: application/json' + --data '{ + "model": "anthropic.claude-v2", + "messages": [{"role": "user", "content": "Hey, how'''s it going?"}] + }' + ``` + + Calculate spend **after** making call: + + ``` + curl --location 'http://localhost:4000/spend/calculate' + --header 'Authorization: Bearer sk-1234' + --header 'Content-Type: application/json' + --data '{ + "completion_response": { + "id": "chatcmpl-123", + "object": "chat.completion", + "created": 1677652288, + "model": "gpt-3.5-turbo-0125", + "system_fingerprint": "fp_44709d6fcb", + "choices": [{ + "index": 0, + "message": { + "role": "assistant", + "content": "Hello there, how may I assist you today?" + }, + "logprobs": null, + "finish_reason": "stop" + }] + "usage": { + "prompt_tokens": 9, + "completion_tokens": 12, + "total_tokens": 21 + } + } + }' + ``` + """ + try: + from litellm import completion_cost + from litellm.cost_calculator import CostPerToken + from litellm.proxy.proxy_server import llm_router + + _cost = None + if request.model is not None: + if request.messages is None: + raise HTTPException( + status_code=400, + detail="Bad Request - messages must be provided if 'model' is provided", + ) + + # check if model in llm_router + _model_in_llm_router = None + cost_per_token: Optional[CostPerToken] = None + if llm_router is not None: + if ( + llm_router.model_group_alias is not None + and request.model in llm_router.model_group_alias + ): + # lookup alias in llm_router + _model_group_name = llm_router.model_group_alias[request.model] + for model in llm_router.model_list: + if model.get("model_name") == _model_group_name: + _model_in_llm_router = model + + else: + # no model_group aliases set -> try finding model in llm_router + # find model in llm_router + for model in llm_router.model_list: + if model.get("model_name") == request.model: + _model_in_llm_router = model + + """ + 3 cases for /spend/calculate + + 1. user passes model, and model is defined on litellm config.yaml or in DB. use info on config or in DB in this case + 2. user passes model, and model is not defined on litellm config.yaml or in DB. Pass model as is to litellm.completion_cost + 3. user passes completion_response + + """ + if _model_in_llm_router is not None: + _litellm_params = _model_in_llm_router.get("litellm_params") + _litellm_model_name = _litellm_params.get("model") + input_cost_per_token = _litellm_params.get("input_cost_per_token") + output_cost_per_token = _litellm_params.get("output_cost_per_token") + if ( + input_cost_per_token is not None + or output_cost_per_token is not None + ): + cost_per_token = CostPerToken( + input_cost_per_token=input_cost_per_token, + output_cost_per_token=output_cost_per_token, + ) + + _cost = completion_cost( + model=_litellm_model_name, + messages=request.messages, + custom_cost_per_token=cost_per_token, + ) + else: + _cost = completion_cost(model=request.model, messages=request.messages) + elif request.completion_response is not None: + _completion_response = litellm.ModelResponse(**request.completion_response) + _cost = completion_cost(completion_response=_completion_response) + else: + raise HTTPException( + status_code=400, + detail="Bad Request - Either 'model' or 'completion_response' must be provided", + ) + return {"cost": _cost} + except Exception as e: + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", str(e)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + error_msg = f"{str(e)}" + raise ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +@router.get( + "/spend/logs/ui", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def ui_view_spend_logs( # noqa: PLR0915 + api_key: Optional[str] = fastapi.Query( + default=None, + description="Get spend logs based on api key", + ), + user_id: Optional[str] = fastapi.Query( + default=None, + description="Get spend logs based on user_id", + ), + request_id: Optional[str] = fastapi.Query( + default=None, + description="request_id to get spend logs for specific request_id", + ), + team_id: Optional[str] = fastapi.Query( + default=None, + description="Filter spend logs by team_id", + ), + min_spend: Optional[float] = fastapi.Query( + default=None, + description="Filter logs with spend greater than or equal to this value", + ), + max_spend: Optional[float] = fastapi.Query( + default=None, + description="Filter logs with spend less than or equal to this value", + ), + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing key spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view key spend", + ), + page: int = fastapi.Query( + default=1, description="Page number for pagination", ge=1 + ), + page_size: int = fastapi.Query( + default=50, description="Number of items per page", ge=1, le=100 + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + View spend logs for UI with pagination support + + Returns: + { + "data": List[LiteLLM_SpendLogs], # Paginated spend logs + "total": int, # Total number of records + "page": int, # Current page number + "page_size": int, # Number of items per page + "total_pages": int # Total number of pages + } + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_401_UNAUTHORIZED, + ) + + if start_date is None or end_date is None: + raise ProxyException( + message="Start date and end date are required", + type="bad_request", + param="None", + code=status.HTTP_400_BAD_REQUEST, + ) + + try: + + # Convert the date strings to datetime objects + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S").replace( + tzinfo=timezone.utc + ) + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S").replace( + tzinfo=timezone.utc + ) + + # Convert to ISO format strings for Prisma + start_date_iso = start_date_obj.isoformat() # Already in UTC, no need to add Z + end_date_iso = end_date_obj.isoformat() # Already in UTC, no need to add Z + + # Build where conditions + where_conditions: dict[str, Any] = { + "startTime": {"gte": start_date_iso, "lte": end_date_iso}, + } + + if team_id is not None: + where_conditions["team_id"] = team_id + + if api_key is not None: + where_conditions["api_key"] = api_key + + if user_id is not None: + where_conditions["user"] = user_id + + if request_id is not None: + where_conditions["request_id"] = request_id + + if min_spend is not None or max_spend is not None: + where_conditions["spend"] = {} + if min_spend is not None: + where_conditions["spend"]["gte"] = min_spend + if max_spend is not None: + where_conditions["spend"]["lte"] = max_spend + # Calculate skip value for pagination + skip = (page - 1) * page_size + + # Get total count of records + total_records = await prisma_client.db.litellm_spendlogs.count( + where=where_conditions, + ) + + # Get paginated data + data = await prisma_client.db.litellm_spendlogs.find_many( + where=where_conditions, + order={ + "startTime": "desc", + }, + skip=skip, + take=page_size, + ) + + # Calculate total pages + total_pages = (total_records + page_size - 1) // page_size + + verbose_proxy_logger.debug("data= %s", json.dumps(data, indent=4, default=str)) + + return { + "data": data, + "total": total_records, + "page": page, + "page_size": page_size, + "total_pages": total_pages, + } + except Exception as e: + verbose_proxy_logger.exception(f"Error in ui_view_spend_logs: {e}") + raise handle_exception_on_proxy(e) + + +@lru_cache(maxsize=128) +@router.get( + "/spend/logs/ui/{request_id}", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def ui_view_request_response_for_request_id( + request_id: str, + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing key spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view key spend", + ), +): + """ + View request / response for a specific request_id + + - goes through all callbacks, checks if any of them have a @property -> has_request_response_payload + - if so, it will return the request and response payload + """ + custom_loggers = ( + litellm.logging_callback_manager.get_active_additional_logging_utils_from_custom_logger() + ) + start_date_obj: Optional[datetime] = None + end_date_obj: Optional[datetime] = None + if start_date is not None: + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S").replace( + tzinfo=timezone.utc + ) + if end_date is not None: + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S").replace( + tzinfo=timezone.utc + ) + + for custom_logger in custom_loggers: + payload = await custom_logger.get_request_response_payload( + request_id=request_id, + start_time_utc=start_date_obj, + end_time_utc=end_date_obj, + ) + if payload is not None: + return payload + + return None + + +@router.get( + "/spend/logs", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + responses={ + 200: {"model": List[LiteLLM_SpendLogs]}, + }, +) +async def view_spend_logs( # noqa: PLR0915 + api_key: Optional[str] = fastapi.Query( + default=None, + description="Get spend logs based on api key", + ), + user_id: Optional[str] = fastapi.Query( + default=None, + description="Get spend logs based on user_id", + ), + request_id: Optional[str] = fastapi.Query( + default=None, + description="request_id to get spend logs for specific request_id. If none passed then pass spend logs for all requests", + ), + start_date: Optional[str] = fastapi.Query( + default=None, + description="Time from which to start viewing key spend", + ), + end_date: Optional[str] = fastapi.Query( + default=None, + description="Time till which to view key spend", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + View all spend logs, if request_id is provided, only logs for that request_id will be returned + + Example Request for all logs + ``` + curl -X GET "http://0.0.0.0:8000/spend/logs" \ +-H "Authorization: Bearer sk-1234" + ``` + + Example Request for specific request_id + ``` + curl -X GET "http://0.0.0.0:8000/spend/logs?request_id=chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e" \ +-H "Authorization: Bearer sk-1234" + ``` + + Example Request for specific api_key + ``` + curl -X GET "http://0.0.0.0:8000/spend/logs?api_key=sk-Fn8Ej39NkBQmUagFEoUWPQ" \ +-H "Authorization: Bearer sk-1234" + ``` + + Example Request for specific user_id + ``` + curl -X GET "http://0.0.0.0:8000/spend/logs?user_id=ishaan@berri.ai" \ +-H "Authorization: Bearer sk-1234" + ``` + """ + from litellm.proxy.proxy_server import prisma_client + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + user_id = user_api_key_dict.user_id + + try: + verbose_proxy_logger.debug("inside view_spend_logs") + if prisma_client is None: + raise Exception( + "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" + ) + spend_logs = [] + if ( + start_date is not None + and isinstance(start_date, str) + and end_date is not None + and isinstance(end_date, str) + ): + # Convert the date strings to datetime objects + start_date_obj = datetime.strptime(start_date, "%Y-%m-%d") + end_date_obj = datetime.strptime(end_date, "%Y-%m-%d") + + filter_query = { + "startTime": { + "gte": start_date_obj, # Greater than or equal to Start Date + "lte": end_date_obj, # Less than or equal to End Date + } + } + + if api_key is not None and isinstance(api_key, str): + filter_query["api_key"] = api_key # type: ignore + elif request_id is not None and isinstance(request_id, str): + filter_query["request_id"] = request_id # type: ignore + elif user_id is not None and isinstance(user_id, str): + filter_query["user"] = user_id # type: ignore + + # SQL query + response = await prisma_client.db.litellm_spendlogs.group_by( + by=["api_key", "user", "model", "startTime"], + where=filter_query, # type: ignore + sum={ + "spend": True, + }, + ) + + if ( + isinstance(response, list) + and len(response) > 0 + and isinstance(response[0], dict) + ): + result: dict = {} + for record in response: + dt_object = datetime.strptime( + str(record["startTime"]), "%Y-%m-%dT%H:%M:%S.%fZ" # type: ignore + ) # type: ignore + date = dt_object.date() + if date not in result: + result[date] = {"users": {}, "models": {}} + api_key = record["api_key"] # type: ignore + user_id = record["user"] # type: ignore + model = record["model"] # type: ignore + result[date]["spend"] = result[date].get("spend", 0) + record.get( + "_sum", {} + ).get("spend", 0) + result[date][api_key] = result[date].get(api_key, 0) + record.get( + "_sum", {} + ).get("spend", 0) + result[date]["users"][user_id] = result[date]["users"].get( + user_id, 0 + ) + record.get("_sum", {}).get("spend", 0) + result[date]["models"][model] = result[date]["models"].get( + model, 0 + ) + record.get("_sum", {}).get("spend", 0) + return_list = [] + final_date = None + for k, v in sorted(result.items()): + return_list.append({**v, "startTime": k}) + final_date = k + + end_date_date = end_date_obj.date() + if final_date is not None and final_date < end_date_date: + current_date = final_date + timedelta(days=1) + while current_date <= end_date_date: + # Represent current_date as string because original response has it this way + return_list.append( + { + "startTime": current_date, + "spend": 0, + "users": {}, + "models": {}, + } + ) # If no data, will stay as zero + current_date += timedelta(days=1) # Move on to the next day + + return return_list + + return response + + elif api_key is not None and isinstance(api_key, str): + if api_key.startswith("sk-"): + hashed_token = prisma_client.hash_token(token=api_key) + else: + hashed_token = api_key + spend_log = await prisma_client.get_data( + table_name="spend", + query_type="find_all", + key_val={"key": "api_key", "value": hashed_token}, + ) + if isinstance(spend_log, list): + return spend_log + else: + return [spend_log] + elif request_id is not None: + spend_log = await prisma_client.get_data( + table_name="spend", + query_type="find_unique", + key_val={"key": "request_id", "value": request_id}, + ) + return [spend_log] + elif user_id is not None: + spend_log = await prisma_client.get_data( + table_name="spend", + query_type="find_all", + key_val={"key": "user", "value": user_id}, + ) + if isinstance(spend_log, list): + return spend_log + else: + return [spend_log] + else: + spend_logs = await prisma_client.get_data( + table_name="spend", query_type="find_all" + ) + + return spend_logs + + return None + + except Exception as e: + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"/spend/logs Error({str(e)})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="/spend/logs Error" + str(e), + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.post( + "/global/spend/reset", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], +) +async def global_spend_reset(): + """ + ADMIN ONLY / MASTER KEY Only Endpoint + + Globally reset spend for All API Keys and Teams, maintain LiteLLM_SpendLogs + + 1. LiteLLM_SpendLogs will maintain the logs on spend, no data gets deleted from there + 2. LiteLLM_VerificationTokens spend will be set = 0 + 3. LiteLLM_TeamTable spend will be set = 0 + + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_401_UNAUTHORIZED, + ) + + await prisma_client.db.litellm_verificationtoken.update_many( + data={"spend": 0.0}, where={} + ) + await prisma_client.db.litellm_teamtable.update_many(data={"spend": 0.0}, where={}) + + return { + "message": "Spend for all API Keys and Teams reset successfully", + "status": "success", + } + + +@router.post( + "/global/spend/refresh", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend_refresh(): + """ + ADMIN ONLY / MASTER KEY Only Endpoint + + Globally refresh spend MonthlyGlobalSpend view + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_401_UNAUTHORIZED, + ) + + ## RESET GLOBAL SPEND VIEW ### + async def is_materialized_global_spend_view() -> bool: + """ + Return True if materialized view exists + + Else False + """ + sql_query = """ + SELECT relname, relkind + FROM pg_class + WHERE relname = 'MonthlyGlobalSpend'; + """ + try: + resp = await prisma_client.db.query_raw(sql_query) + + assert resp[0]["relkind"] == "m" + return True + except Exception: + return False + + view_exists = await is_materialized_global_spend_view() + + if view_exists: + # refresh materialized view + sql_query = """ + REFRESH MATERIALIZED VIEW "MonthlyGlobalSpend"; + """ + try: + from litellm.proxy._types import CommonProxyErrors + from litellm.proxy.proxy_server import proxy_logging_obj + from litellm.proxy.utils import PrismaClient + + db_url = os.getenv("DATABASE_URL") + if db_url is None: + raise Exception(CommonProxyErrors.db_not_connected_error.value) + new_client = PrismaClient( + database_url=db_url, + proxy_logging_obj=proxy_logging_obj, + http_client={ + "timeout": 6000, + }, + ) + await new_client.db.connect() + await new_client.db.query_raw(sql_query) + verbose_proxy_logger.info("MonthlyGlobalSpend view refreshed") + return { + "message": "MonthlyGlobalSpend view refreshed", + "status": "success", + } + + except Exception as e: + verbose_proxy_logger.exception( + "Failed to refresh materialized view - {}".format(str(e)) + ) + return { + "message": "Failed to refresh materialized view", + "status": "failure", + } + + +async def global_spend_for_internal_user( + api_key: Optional[str] = None, + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + try: + + user_id = user_api_key_dict.user_id + if user_id is None: + raise ValueError("/global/spend/logs Error: User ID is None") + if api_key is not None: + sql_query = """ + SELECT * FROM "MonthlyGlobalSpendPerUserPerKey" + WHERE "api_key" = $1 AND "user" = $2 + ORDER BY "date"; + """ + + response = await prisma_client.db.query_raw(sql_query, api_key, user_id) + + return response + + sql_query = """SELECT * FROM "MonthlyGlobalSpendPerUserPerKey" WHERE "user" = $1 ORDER BY "date";""" + + response = await prisma_client.db.query_raw(sql_query, user_id) + + return response + except Exception as e: + verbose_proxy_logger.error(f"/global/spend/logs Error: {str(e)}") + raise e + + +@router.get( + "/global/spend/logs", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend_logs( + api_key: Optional[str] = fastapi.Query( + default=None, + description="API Key to get global spend (spend per day for last 30d). Admin-only endpoint", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] This is a beta endpoint. It will change. + + Use this to get global spend (spend per day for last 30d). Admin-only endpoint + + More efficient implementation of /spend/logs, by creating a view over the spend logs table. + """ + import traceback + + from litellm.integrations.prometheus_helpers.prometheus_api import ( + get_daily_spend_from_prometheus, + is_prometheus_connected, + ) + from litellm.proxy.proxy_server import prisma_client + + try: + if prisma_client is None: + raise ProxyException( + message="Prisma Client is not initialized", + type="internal_error", + param="None", + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + response = await global_spend_for_internal_user( + api_key=api_key, user_api_key_dict=user_api_key_dict + ) + + return response + + prometheus_api_enabled = is_prometheus_connected() + + if prometheus_api_enabled: + response = await get_daily_spend_from_prometheus(api_key=api_key) + return response + else: + if api_key is None: + sql_query = """SELECT * FROM "MonthlyGlobalSpend" ORDER BY "date";""" + + response = await prisma_client.db.query_raw(query=sql_query) + + return response + else: + sql_query = """ + SELECT * FROM "MonthlyGlobalSpendPerKey" + WHERE "api_key" = $1 + ORDER BY "date"; + """ + + response = await prisma_client.db.query_raw(sql_query, api_key) + + return response + + except Exception as e: + error_trace = traceback.format_exc() + error_str = str(e) + "\n" + error_trace + verbose_proxy_logger.error(f"/global/spend/logs Error: {error_str}") + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"/global/spend/logs Error({error_str})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="/global/spend/logs Error" + error_str, + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +@router.get( + "/global/spend", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend(): + """ + [BETA] This is a beta endpoint. It will change. + + View total spend across all proxy keys + """ + import traceback + + from litellm.proxy.proxy_server import prisma_client + + try: + + total_spend = 0.0 + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + sql_query = """SELECT SUM(spend) as total_spend FROM "MonthlyGlobalSpend";""" + response = await prisma_client.db.query_raw(query=sql_query) + if response is not None: + if isinstance(response, list) and len(response) > 0: + total_spend = response[0].get("total_spend", 0.0) + + return {"spend": total_spend, "max_budget": litellm.max_budget} + except Exception as e: + error_trace = traceback.format_exc() + error_str = str(e) + "\n" + error_trace + if isinstance(e, HTTPException): + raise ProxyException( + message=getattr(e, "detail", f"/global/spend Error({error_str})"), + type="internal_error", + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + raise e + raise ProxyException( + message="/global/spend Error" + error_str, + type="internal_error", + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +async def global_spend_key_internal_user( + user_api_key_dict: UserAPIKeyAuth, limit: int = 10 +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + user_id = user_api_key_dict.user_id + if user_id is None: + raise HTTPException(status_code=500, detail={"error": "No user_id found"}) + + sql_query = """ + WITH top_api_keys AS ( + SELECT + api_key, + SUM(spend) as total_spend + FROM + "LiteLLM_SpendLogs" + WHERE + "user" = $1 + GROUP BY + api_key + ORDER BY + total_spend DESC + LIMIT $2 -- Adjust this number to get more or fewer top keys + ) + SELECT + t.api_key, + t.total_spend, + v.key_alias, + v.key_name + FROM + top_api_keys t + LEFT JOIN + "LiteLLM_VerificationToken" v ON t.api_key = v.token + ORDER BY + t.total_spend DESC; + + """ + + response = await prisma_client.db.query_raw(sql_query, user_id, limit) + + return response + + +@router.get( + "/global/spend/keys", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend_keys( + limit: int = fastapi.Query( + default=None, + description="Number of keys to get. Will return Top 'n' keys.", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] This is a beta endpoint. It will change. + + Use this to get the top 'n' keys with the highest spend, ordered by spend. + """ + from litellm.proxy.proxy_server import prisma_client + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + response = await global_spend_key_internal_user( + user_api_key_dict=user_api_key_dict + ) + + return response + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + sql_query = f"""SELECT * FROM "Last30dKeysBySpend" LIMIT {limit};""" + + response = await prisma_client.db.query_raw(query=sql_query) + + return response + + +@router.get( + "/global/spend/teams", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend_per_team(): + """ + [BETA] This is a beta endpoint. It will change. + + Use this to get daily spend, grouped by `team_id` and `date` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + sql_query = """ + SELECT + t.team_alias as team_alias, + DATE(s."startTime") AS spend_date, + SUM(s.spend) AS total_spend + FROM + "LiteLLM_SpendLogs" s + LEFT JOIN + "LiteLLM_TeamTable" t ON s.team_id = t.team_id + WHERE + s."startTime" >= CURRENT_DATE - INTERVAL '30 days' + GROUP BY + t.team_alias, + DATE(s."startTime") + ORDER BY + spend_date; + """ + response = await prisma_client.db.query_raw(query=sql_query) + + # transform the response for the Admin UI + spend_by_date = {} + team_aliases = set() + total_spend_per_team = {} + for row in response: + row_date = row["spend_date"] + if row_date is None: + continue + team_alias = row["team_alias"] + if team_alias is None: + team_alias = "Unassigned" + team_aliases.add(team_alias) + if row_date in spend_by_date: + # get the team_id for this entry + # get the spend for this entry + spend = row["total_spend"] + spend = round(spend, 2) + current_date_entries = spend_by_date[row_date] + current_date_entries[team_alias] = spend + else: + spend = row["total_spend"] + spend = round(spend, 2) + spend_by_date[row_date] = {team_alias: spend} + + if team_alias in total_spend_per_team: + total_spend_per_team[team_alias] += spend + else: + total_spend_per_team[team_alias] = spend + + total_spend_per_team_ui = [] + # order the elements in total_spend_per_team by spend + total_spend_per_team = dict( + sorted(total_spend_per_team.items(), key=lambda item: item[1], reverse=True) + ) + for team_id in total_spend_per_team: + # only add first 10 elements to total_spend_per_team_ui + if len(total_spend_per_team_ui) >= 10: + break + if team_id is None: + team_id = "Unassigned" + total_spend_per_team_ui.append( + {"team_id": team_id, "total_spend": total_spend_per_team[team_id]} + ) + + # sort spend_by_date by it's key (which is a date) + + response_data = [] + for key in spend_by_date: + value = spend_by_date[key] + response_data.append({"date": key, **value}) + + return { + "daily_spend": response_data, + "teams": list(team_aliases), + "total_spend_per_team": total_spend_per_team_ui, + } + + +@router.get( + "/global/all_end_users", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_view_all_end_users(): + """ + [BETA] This is a beta endpoint. It will change. + + Use this to just get all the unique `end_users` + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + sql_query = """ + SELECT DISTINCT end_user FROM "LiteLLM_SpendLogs" + """ + + db_response = await prisma_client.db.query_raw(query=sql_query) + if db_response is None: + return [] + + _end_users = [] + for row in db_response: + _end_users.append(row["end_user"]) + + return {"end_users": _end_users} + + +@router.post( + "/global/spend/end_users", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend_end_users(data: Optional[GlobalEndUsersSpend] = None): + """ + [BETA] This is a beta endpoint. It will change. + + Use this to get the top 'n' keys with the highest spend, ordered by spend. + """ + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + """ + Gets the top 100 end-users for a given api key + """ + startTime = None + endTime = None + selected_api_key = None + if data is not None: + startTime = data.startTime + endTime = data.endTime + selected_api_key = data.api_key + + startTime = startTime or datetime.now() - timedelta(days=30) + endTime = endTime or datetime.now() + + sql_query = """ +SELECT end_user, COUNT(*) AS total_count, SUM(spend) AS total_spend +FROM "LiteLLM_SpendLogs" +WHERE "startTime" >= $1::timestamp + AND "startTime" < $2::timestamp + AND ( + CASE + WHEN $3::TEXT IS NULL THEN TRUE + ELSE api_key = $3 + END + ) +GROUP BY end_user +ORDER BY total_spend DESC +LIMIT 100 + """ + response = await prisma_client.db.query_raw( + sql_query, startTime, endTime, selected_api_key + ) + + return response + + +async def global_spend_models_internal_user( + user_api_key_dict: UserAPIKeyAuth, limit: int = 10 +): + from litellm.proxy.proxy_server import prisma_client + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + user_id = user_api_key_dict.user_id + if user_id is None: + raise HTTPException(status_code=500, detail={"error": "No user_id found"}) + + sql_query = """ + SELECT + model, + SUM(spend) as total_spend, + SUM(total_tokens) as total_tokens + FROM + "LiteLLM_SpendLogs" + WHERE + "user" = $1 + GROUP BY + model + ORDER BY + total_spend DESC + LIMIT $2; + """ + + response = await prisma_client.db.query_raw(sql_query, user_id, limit) + + return response + + +@router.get( + "/global/spend/models", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def global_spend_models( + limit: int = fastapi.Query( + default=10, + description="Number of models to get. Will return Top 'n' models.", + ), + user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), +): + """ + [BETA] This is a beta endpoint. It will change. + + Use this to get the top 'n' models with the highest spend, ordered by spend. + """ + from litellm.proxy.proxy_server import prisma_client + + if ( + user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER + or user_api_key_dict.user_role == LitellmUserRoles.INTERNAL_USER_VIEW_ONLY + ): + response = await global_spend_models_internal_user( + user_api_key_dict=user_api_key_dict, limit=limit + ) + return response + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + sql_query = f"""SELECT * FROM "Last30dModelsBySpend" LIMIT {limit};""" + + response = await prisma_client.db.query_raw(query=sql_query) + + return response + + +@router.get("/provider/budgets", response_model=ProviderBudgetResponse) +async def provider_budgets() -> ProviderBudgetResponse: + """ + Provider Budget Routing - Get Budget, Spend Details https://docs.litellm.ai/docs/proxy/provider_budget_routing + + Use this endpoint to check current budget, spend and budget reset time for a provider + + Example Request + + ```bash + curl -X GET http://localhost:4000/provider/budgets \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer sk-1234" + ``` + + Example Response + + ```json + { + "providers": { + "openai": { + "budget_limit": 1e-12, + "time_period": "1d", + "spend": 0.0, + "budget_reset_at": null + }, + "azure": { + "budget_limit": 100.0, + "time_period": "1d", + "spend": 0.0, + "budget_reset_at": null + }, + "anthropic": { + "budget_limit": 100.0, + "time_period": "10d", + "spend": 0.0, + "budget_reset_at": null + }, + "vertex_ai": { + "budget_limit": 100.0, + "time_period": "12d", + "spend": 0.0, + "budget_reset_at": null + } + } + } + ``` + + """ + from litellm.proxy.proxy_server import llm_router + + try: + if llm_router is None: + raise HTTPException( + status_code=500, detail={"error": "No llm_router found"} + ) + + provider_budget_config = llm_router.provider_budget_config + if provider_budget_config is None: + raise ValueError( + "No provider budget config found. Please set a provider budget config in the router settings. https://docs.litellm.ai/docs/proxy/provider_budget_routing" + ) + + provider_budget_response_dict: Dict[str, ProviderBudgetResponseObject] = {} + for _provider, _budget_info in provider_budget_config.items(): + if llm_router.router_budget_logger is None: + raise ValueError("No router budget logger found") + _provider_spend = ( + await llm_router.router_budget_logger._get_current_provider_spend( + _provider + ) + or 0.0 + ) + _provider_budget_ttl = await llm_router.router_budget_logger._get_current_provider_budget_reset_at( + _provider + ) + provider_budget_response_object = ProviderBudgetResponseObject( + budget_limit=_budget_info.max_budget, + time_period=_budget_info.budget_duration, + spend=_provider_spend, + budget_reset_at=_provider_budget_ttl, + ) + provider_budget_response_dict[_provider] = provider_budget_response_object + return ProviderBudgetResponse(providers=provider_budget_response_dict) + except Exception as e: + verbose_proxy_logger.exception( + "/provider/budgets: Exception occured - {}".format(str(e)) + ) + raise handle_exception_on_proxy(e) + + +async def get_spend_by_tags( + prisma_client: PrismaClient, start_date=None, end_date=None +): + response = await prisma_client.db.query_raw( + """ + SELECT + jsonb_array_elements_text(request_tags) AS individual_request_tag, + COUNT(*) AS log_count, + SUM(spend) AS total_spend + FROM "LiteLLM_SpendLogs" + GROUP BY individual_request_tag; + """ + ) + + return response + + +async def ui_get_spend_by_tags( + start_date: str, + end_date: str, + prisma_client: Optional[PrismaClient] = None, + tags_str: Optional[str] = None, +): + """ + Should cover 2 cases: + 1. When user is getting spend for all_tags. "all_tags" in tags_list + 2. When user is getting spend for specific tags. + """ + + # tags_str is a list of strings csv of tags + # tags_str = tag1,tag2,tag3 + # convert to list if it's not None + tags_list: Optional[List[str]] = None + if tags_str is not None and len(tags_str) > 0: + tags_list = tags_str.split(",") + + if prisma_client is None: + raise HTTPException(status_code=500, detail={"error": "No db connected"}) + + response = None + if tags_list is None or (isinstance(tags_list, list) and "all-tags" in tags_list): + # Get spend for all tags + sql_query = """ + SELECT + individual_request_tag, + spend_date, + log_count, + total_spend + FROM "DailyTagSpend" + WHERE spend_date >= $1::date AND spend_date <= $2::date + ORDER BY total_spend DESC; + """ + response = await prisma_client.db.query_raw( + sql_query, + start_date, + end_date, + ) + else: + # filter by tags list + sql_query = """ + SELECT + individual_request_tag, + SUM(log_count) AS log_count, + SUM(total_spend) AS total_spend + FROM "DailyTagSpend" + WHERE spend_date >= $1::date AND spend_date <= $2::date + AND individual_request_tag = ANY($3::text[]) + GROUP BY individual_request_tag + ORDER BY total_spend DESC; + """ + response = await prisma_client.db.query_raw( + sql_query, + start_date, + end_date, + tags_list, + ) + + # print("tags - spend") + # print(response) + # Bar Chart 1 - Spend per tag - Top 10 tags by spend + total_spend_per_tag: collections.defaultdict = collections.defaultdict(float) + total_requests_per_tag: collections.defaultdict = collections.defaultdict(int) + for row in response: + tag_name = row["individual_request_tag"] + tag_spend = row["total_spend"] + + total_spend_per_tag[tag_name] += tag_spend + total_requests_per_tag[tag_name] += row["log_count"] + + sorted_tags = sorted(total_spend_per_tag.items(), key=lambda x: x[1], reverse=True) + # convert to ui format + ui_tags = [] + for tag in sorted_tags: + current_spend = tag[1] + if current_spend is not None and isinstance(current_spend, float): + current_spend = round(current_spend, 4) + ui_tags.append( + { + "name": tag[0], + "spend": current_spend, + "log_count": total_requests_per_tag[tag[0]], + } + ) + + return {"spend_per_tag": ui_tags} diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/spend_tracking/spend_tracking_utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/spend_tracking/spend_tracking_utils.py new file mode 100644 index 00000000..6e9a0880 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/spend_tracking/spend_tracking_utils.py @@ -0,0 +1,386 @@ +import hashlib +import json +import secrets +from datetime import datetime +from datetime import datetime as dt +from datetime import timezone +from typing import Any, List, Optional, cast + +from pydantic import BaseModel + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.litellm_core_utils.core_helpers import get_litellm_metadata_from_kwargs +from litellm.proxy._types import SpendLogsMetadata, SpendLogsPayload +from litellm.proxy.utils import PrismaClient, hash_token +from litellm.types.utils import StandardLoggingPayload +from litellm.utils import get_end_user_id_for_cost_tracking + + +def _is_master_key(api_key: str, _master_key: Optional[str]) -> bool: + if _master_key is None: + return False + + ## string comparison + is_master_key = secrets.compare_digest(api_key, _master_key) + if is_master_key: + return True + + ## hash comparison + is_master_key = secrets.compare_digest(api_key, hash_token(_master_key)) + if is_master_key: + return True + + return False + + +def _get_spend_logs_metadata( + metadata: Optional[dict], + applied_guardrails: Optional[List[str]] = None, + batch_models: Optional[List[str]] = None, +) -> SpendLogsMetadata: + if metadata is None: + return SpendLogsMetadata( + user_api_key=None, + user_api_key_alias=None, + user_api_key_team_id=None, + user_api_key_org_id=None, + user_api_key_user_id=None, + user_api_key_team_alias=None, + spend_logs_metadata=None, + requester_ip_address=None, + additional_usage_values=None, + applied_guardrails=None, + status=None or "success", + error_information=None, + proxy_server_request=None, + batch_models=None, + ) + verbose_proxy_logger.debug( + "getting payload for SpendLogs, available keys in metadata: " + + str(list(metadata.keys())) + ) + + # Filter the metadata dictionary to include only the specified keys + clean_metadata = SpendLogsMetadata( + **{ # type: ignore + key: metadata[key] + for key in SpendLogsMetadata.__annotations__.keys() + if key in metadata + } + ) + clean_metadata["applied_guardrails"] = applied_guardrails + clean_metadata["batch_models"] = batch_models + return clean_metadata + + +def generate_hash_from_response(response_obj: Any) -> str: + """ + Generate a stable hash from a response object. + + Args: + response_obj: The response object to hash (can be dict, list, etc.) + + Returns: + A hex string representation of the MD5 hash + """ + try: + # Create a stable JSON string of the entire response object + # Sort keys to ensure consistent ordering + json_str = json.dumps(response_obj, sort_keys=True) + + # Generate a hash of the response object + unique_hash = hashlib.md5(json_str.encode()).hexdigest() + return unique_hash + except Exception: + # Return a fallback hash if serialization fails + return hashlib.md5(str(response_obj).encode()).hexdigest() + + +def get_spend_logs_id( + call_type: str, response_obj: dict, kwargs: dict +) -> Optional[str]: + if call_type == "aretrieve_batch": + # Generate a hash from the response object + id: Optional[str] = generate_hash_from_response(response_obj) + else: + id = cast(Optional[str], response_obj.get("id")) or cast( + Optional[str], kwargs.get("litellm_call_id") + ) + return id + + +def get_logging_payload( # noqa: PLR0915 + kwargs, response_obj, start_time, end_time +) -> SpendLogsPayload: + from litellm.proxy.proxy_server import general_settings, master_key + + if kwargs is None: + kwargs = {} + if response_obj is None or ( + not isinstance(response_obj, BaseModel) and not isinstance(response_obj, dict) + ): + response_obj = {} + # standardize this function to be used across, s3, dynamoDB, langfuse logging + litellm_params = kwargs.get("litellm_params", {}) + metadata = get_litellm_metadata_from_kwargs(kwargs) + metadata = _add_proxy_server_request_to_metadata( + metadata=metadata, litellm_params=litellm_params + ) + completion_start_time = kwargs.get("completion_start_time", end_time) + call_type = kwargs.get("call_type") + cache_hit = kwargs.get("cache_hit", False) + usage = cast(dict, response_obj).get("usage", None) or {} + if isinstance(usage, litellm.Usage): + usage = dict(usage) + + if isinstance(response_obj, dict): + response_obj_dict = response_obj + elif isinstance(response_obj, BaseModel): + response_obj_dict = response_obj.model_dump() + else: + response_obj_dict = {} + + id = get_spend_logs_id(call_type or "acompletion", response_obj_dict, kwargs) + standard_logging_payload = cast( + Optional[StandardLoggingPayload], kwargs.get("standard_logging_object", None) + ) + + end_user_id = get_end_user_id_for_cost_tracking(litellm_params) + + api_key = metadata.get("user_api_key", "") + + if api_key is not None and isinstance(api_key, str): + if api_key.startswith("sk-"): + # hash the api_key + api_key = hash_token(api_key) + if ( + _is_master_key(api_key=api_key, _master_key=master_key) + and general_settings.get("disable_adding_master_key_hash_to_db") is True + ): + api_key = "litellm_proxy_master_key" # use a known alias, if the user disabled storing master key in db + + if ( + standard_logging_payload is not None + ): # [TODO] migrate completely to sl payload. currently missing pass-through endpoint data + api_key = ( + api_key + or standard_logging_payload["metadata"].get("user_api_key_hash") + or "" + ) + end_user_id = end_user_id or standard_logging_payload["metadata"].get( + "user_api_key_end_user_id" + ) + else: + api_key = "" + request_tags = ( + json.dumps(metadata.get("tags", [])) + if isinstance(metadata.get("tags", []), list) + else "[]" + ) + if ( + _is_master_key(api_key=api_key, _master_key=master_key) + and general_settings.get("disable_adding_master_key_hash_to_db") is True + ): + api_key = "litellm_proxy_master_key" # use a known alias, if the user disabled storing master key in db + + _model_id = metadata.get("model_info", {}).get("id", "") + _model_group = metadata.get("model_group", "") + + # clean up litellm metadata + clean_metadata = _get_spend_logs_metadata( + metadata, + applied_guardrails=( + standard_logging_payload["metadata"].get("applied_guardrails", None) + if standard_logging_payload is not None + else None + ), + batch_models=( + standard_logging_payload.get("hidden_params", {}).get("batch_models", None) + if standard_logging_payload is not None + else None + ), + ) + + special_usage_fields = ["completion_tokens", "prompt_tokens", "total_tokens"] + additional_usage_values = {} + for k, v in usage.items(): + if k not in special_usage_fields: + if isinstance(v, BaseModel): + v = v.model_dump() + additional_usage_values.update({k: v}) + clean_metadata["additional_usage_values"] = additional_usage_values + + if litellm.cache is not None: + cache_key = litellm.cache.get_cache_key(**kwargs) + else: + cache_key = "Cache OFF" + if cache_hit is True: + import time + + id = f"{id}_cache_hit{time.time()}" # SpendLogs does not allow duplicate request_id + try: + payload: SpendLogsPayload = SpendLogsPayload( + request_id=str(id), + call_type=call_type or "", + api_key=str(api_key), + cache_hit=str(cache_hit), + startTime=_ensure_datetime_utc(start_time), + endTime=_ensure_datetime_utc(end_time), + completionStartTime=_ensure_datetime_utc(completion_start_time), + model=kwargs.get("model", "") or "", + user=metadata.get("user_api_key_user_id", "") or "", + team_id=metadata.get("user_api_key_team_id", "") or "", + metadata=json.dumps(clean_metadata), + cache_key=cache_key, + spend=kwargs.get("response_cost", 0), + total_tokens=usage.get("total_tokens", 0), + prompt_tokens=usage.get("prompt_tokens", 0), + completion_tokens=usage.get("completion_tokens", 0), + request_tags=request_tags, + end_user=end_user_id or "", + api_base=litellm_params.get("api_base", ""), + model_group=_model_group, + model_id=_model_id, + requester_ip_address=clean_metadata.get("requester_ip_address", None), + custom_llm_provider=kwargs.get("custom_llm_provider", ""), + messages=_get_messages_for_spend_logs_payload( + standard_logging_payload=standard_logging_payload, metadata=metadata + ), + response=_get_response_for_spend_logs_payload(standard_logging_payload), + ) + + verbose_proxy_logger.debug( + "SpendTable: created payload - payload: %s\n\n", + json.dumps(payload, indent=4, default=str), + ) + + return payload + except Exception as e: + verbose_proxy_logger.exception( + "Error creating spendlogs object - {}".format(str(e)) + ) + raise e + + +def _ensure_datetime_utc(timestamp: datetime) -> datetime: + """Helper to ensure datetime is in UTC""" + timestamp = timestamp.astimezone(timezone.utc) + return timestamp + + +async def get_spend_by_team_and_customer( + start_date: dt, + end_date: dt, + team_id: str, + customer_id: str, + prisma_client: PrismaClient, +): + sql_query = """ + WITH SpendByModelApiKey AS ( + SELECT + date_trunc('day', sl."startTime") AS group_by_day, + COALESCE(tt.team_alias, 'Unassigned Team') AS team_name, + sl.end_user AS customer, + sl.model, + sl.api_key, + SUM(sl.spend) AS model_api_spend, + SUM(sl.total_tokens) AS model_api_tokens + FROM + "LiteLLM_SpendLogs" sl + LEFT JOIN + "LiteLLM_TeamTable" tt + ON + sl.team_id = tt.team_id + WHERE + sl."startTime" BETWEEN $1::date AND $2::date + AND sl.team_id = $3 + AND sl.end_user = $4 + GROUP BY + date_trunc('day', sl."startTime"), + tt.team_alias, + sl.end_user, + sl.model, + sl.api_key + ) + SELECT + group_by_day, + jsonb_agg(jsonb_build_object( + 'team_name', team_name, + 'customer', customer, + 'total_spend', total_spend, + 'metadata', metadata + )) AS teams_customers + FROM ( + SELECT + group_by_day, + team_name, + customer, + SUM(model_api_spend) AS total_spend, + jsonb_agg(jsonb_build_object( + 'model', model, + 'api_key', api_key, + 'spend', model_api_spend, + 'total_tokens', model_api_tokens + )) AS metadata + FROM + SpendByModelApiKey + GROUP BY + group_by_day, + team_name, + customer + ) AS aggregated + GROUP BY + group_by_day + ORDER BY + group_by_day; + """ + + db_response = await prisma_client.db.query_raw( + sql_query, start_date, end_date, team_id, customer_id + ) + if db_response is None: + return [] + + return db_response + + +def _get_messages_for_spend_logs_payload( + standard_logging_payload: Optional[StandardLoggingPayload], + metadata: Optional[dict] = None, +) -> str: + return "{}" + + +def _add_proxy_server_request_to_metadata( + metadata: dict, + litellm_params: dict, +) -> dict: + """ + Only store if _should_store_prompts_and_responses_in_spend_logs() is True + """ + if _should_store_prompts_and_responses_in_spend_logs(): + _proxy_server_request = cast( + Optional[dict], litellm_params.get("proxy_server_request", {}) + ) + if _proxy_server_request is not None: + _request_body = _proxy_server_request.get("body", {}) or {} + _request_body_json_str = json.dumps(_request_body, default=str) + metadata["proxy_server_request"] = _request_body_json_str + return metadata + + +def _get_response_for_spend_logs_payload( + payload: Optional[StandardLoggingPayload], +) -> str: + if payload is None: + return "{}" + if _should_store_prompts_and_responses_in_spend_logs(): + return json.dumps(payload.get("response", {})) + return "{}" + + +def _should_store_prompts_and_responses_in_spend_logs() -> bool: + from litellm.proxy.proxy_server import general_settings + + return general_settings.get("store_prompts_in_spend_logs") is True diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/start.sh b/.venv/lib/python3.12/site-packages/litellm/proxy/start.sh new file mode 100755 index 00000000..44df50aa --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/start.sh @@ -0,0 +1,2 @@ +#!/bin/bash +python3 proxy_cli.py
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/types_utils/README.md b/.venv/lib/python3.12/site-packages/litellm/proxy/types_utils/README.md new file mode 100644 index 00000000..1d14cf51 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/types_utils/README.md @@ -0,0 +1 @@ +Utility functions for proxy types.py
\ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/types_utils/utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/types_utils/utils.py new file mode 100644 index 00000000..788849b3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/types_utils/utils.py @@ -0,0 +1,64 @@ +import importlib +import os +from typing import Any, Callable, Literal, Optional, get_type_hints + + +def get_instance_fn(value: str, config_file_path: Optional[str] = None) -> Any: + module_name = value + instance_name = None + try: + # Split the path by dots to separate module from instance + parts = value.split(".") + + # The module path is all but the last part, and the instance_name is the last part + module_name = ".".join(parts[:-1]) + instance_name = parts[-1] + + # If config_file_path is provided, use it to determine the module spec and load the module + if config_file_path is not None: + directory = os.path.dirname(config_file_path) + module_file_path = os.path.join(directory, *module_name.split(".")) + module_file_path += ".py" + + spec = importlib.util.spec_from_file_location(module_name, module_file_path) # type: ignore + if spec is None: + raise ImportError( + f"Could not find a module specification for {module_file_path}" + ) + module = importlib.util.module_from_spec(spec) # type: ignore + spec.loader.exec_module(module) # type: ignore + else: + # Dynamically import the module + module = importlib.import_module(module_name) + + # Get the instance from the module + instance = getattr(module, instance_name) + + return instance + except ImportError as e: + # Re-raise the exception with a user-friendly message + if instance_name and module_name: + raise ImportError( + f"Could not import {instance_name} from {module_name}" + ) from e + else: + raise e + except Exception as e: + raise e + + +def validate_custom_validate_return_type( + fn: Optional[Callable[..., Any]] +) -> Optional[Callable[..., Literal[True]]]: + if fn is None: + return None + + hints = get_type_hints(fn) + return_type = hints.get("return") + + if return_type != Literal[True]: + raise TypeError( + f"Custom validator must be annotated to return Literal[True], got {return_type}" + ) + + return fn diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py new file mode 100644 index 00000000..504ba953 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py @@ -0,0 +1,202 @@ +#### CRUD ENDPOINTS for UI Settings ##### +from typing import List + +from fastapi import APIRouter, Depends, HTTPException + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth + +router = APIRouter() + + +class IPAddress(BaseModel): + ip: str + + +@router.get( + "/get/allowed_ips", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], + include_in_schema=False, +) +async def get_allowed_ips(): + from litellm.proxy.proxy_server import general_settings + + _allowed_ip = general_settings.get("allowed_ips") + return {"data": _allowed_ip} + + +@router.post( + "/add/allowed_ip", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], +) +async def add_allowed_ip(ip_address: IPAddress): + from litellm.proxy.proxy_server import ( + general_settings, + prisma_client, + proxy_config, + store_model_in_db, + ) + + _allowed_ips: List = general_settings.get("allowed_ips", []) + if ip_address.ip not in _allowed_ips: + _allowed_ips.append(ip_address.ip) + general_settings["allowed_ips"] = _allowed_ips + else: + raise HTTPException(status_code=400, detail="IP address already exists") + + if prisma_client is None: + raise Exception("No DB Connected") + + if store_model_in_db is not True: + raise HTTPException( + status_code=500, + detail={ + "error": "Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature." + }, + ) + + # Load existing config + config = await proxy_config.get_config() + verbose_proxy_logger.debug("Loaded config: %s", config) + if "general_settings" not in config: + config["general_settings"] = {} + + if "allowed_ips" not in config["general_settings"]: + config["general_settings"]["allowed_ips"] = [] + + if ip_address.ip not in config["general_settings"]["allowed_ips"]: + config["general_settings"]["allowed_ips"].append(ip_address.ip) + + await proxy_config.save_config(new_config=config) + + return { + "message": f"IP {ip_address.ip} address added successfully", + "status": "success", + } + + +@router.post( + "/delete/allowed_ip", + tags=["Budget & Spend Tracking"], + dependencies=[Depends(user_api_key_auth)], +) +async def delete_allowed_ip(ip_address: IPAddress): + from litellm.proxy.proxy_server import general_settings, proxy_config + + _allowed_ips: List = general_settings.get("allowed_ips", []) + if ip_address.ip in _allowed_ips: + _allowed_ips.remove(ip_address.ip) + general_settings["allowed_ips"] = _allowed_ips + else: + raise HTTPException(status_code=404, detail="IP address not found") + + # Load existing config + config = await proxy_config.get_config() + verbose_proxy_logger.debug("Loaded config: %s", config) + if "general_settings" not in config: + config["general_settings"] = {} + + if "allowed_ips" not in config["general_settings"]: + config["general_settings"]["allowed_ips"] = [] + + if ip_address.ip in config["general_settings"]["allowed_ips"]: + config["general_settings"]["allowed_ips"].remove(ip_address.ip) + + await proxy_config.save_config(new_config=config) + + return {"message": f"IP {ip_address.ip} deleted successfully", "status": "success"} + + +@router.get( + "/get/internal_user_settings", + tags=["SSO Settings"], + dependencies=[Depends(user_api_key_auth)], +) +async def get_sso_settings(): + """ + Get all SSO settings from the litellm_settings configuration. + Returns a structured object with values and descriptions for UI display. + """ + from pydantic import TypeAdapter + + from litellm.proxy.proxy_server import proxy_config + + # Load existing config + config = await proxy_config.get_config() + litellm_settings = config.get("litellm_settings", {}) or {} + default_internal_user_params = ( + litellm_settings.get("default_internal_user_params", {}) or {} + ) + + # Create the settings object first + sso_settings = DefaultInternalUserParams(**(default_internal_user_params)) + # Get the schema for UISSOSettings + schema = TypeAdapter(DefaultInternalUserParams).json_schema(by_alias=True) + + # Convert to dict for response + settings_dict = sso_settings.model_dump() + + # Add descriptions to the response + result = { + "values": settings_dict, + "schema": {"description": schema.get("description", ""), "properties": {}}, + } + + # Add property descriptions + for field_name, field_info in schema["properties"].items(): + result["schema"]["properties"][field_name] = { + "description": field_info.get("description", ""), + "type": field_info.get("type", "string"), + } + + # Add nested object descriptions + for def_name, def_schema in schema.get("definitions", {}).items(): + result["schema"][def_name] = { + "description": def_schema.get("description", ""), + "properties": { + prop_name: {"description": prop_info.get("description", "")} + for prop_name, prop_info in def_schema.get("properties", {}).items() + }, + } + + return result + + +@router.patch( + "/update/internal_user_settings", + tags=["SSO Settings"], + dependencies=[Depends(user_api_key_auth)], +) +async def update_internal_user_settings(settings: DefaultInternalUserParams): + """ + Update the default internal user parameters for SSO users. + These settings will be applied to new users who sign in via SSO. + """ + from litellm.proxy.proxy_server import proxy_config + + # Update the in-memory settings + litellm.default_internal_user_params = settings.model_dump(exclude_none=True) + + # Load existing config + config = await proxy_config.get_config() + + # Update config with new settings + if "litellm_settings" not in config: + config["litellm_settings"] = {} + + config["litellm_settings"]["default_internal_user_params"] = settings.model_dump( + exclude_none=True + ) + + # Save the updated config + await proxy_config.save_config(new_config=config) + + return { + "message": "Internal user settings updated successfully", + "status": "success", + "settings": litellm.default_internal_user_params, + } diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/utils.py b/.venv/lib/python3.12/site-packages/litellm/proxy/utils.py new file mode 100644 index 00000000..0e7ae455 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/utils.py @@ -0,0 +1,2913 @@ +import asyncio +import copy +import hashlib +import json +import os +import smtplib +import threading +import time +import traceback +from datetime import datetime, timedelta +from email.mime.multipart import MIMEMultipart +from email.mime.text import MIMEText +from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union, overload + +from litellm.proxy._types import ( + DB_CONNECTION_ERROR_TYPES, + CommonProxyErrors, + ProxyErrorTypes, + ProxyException, +) +from litellm.types.guardrails import GuardrailEventHooks + +try: + import backoff +except ImportError: + raise ImportError( + "backoff is not installed. Please install it via 'pip install backoff'" + ) + +from fastapi import HTTPException, status + +import litellm +import litellm.litellm_core_utils +import litellm.litellm_core_utils.litellm_logging +from litellm import ( + EmbeddingResponse, + ImageResponse, + ModelResponse, + ModelResponseStream, + Router, +) +from litellm._logging import verbose_proxy_logger +from litellm._service_logger import ServiceLogging, ServiceTypes +from litellm.caching.caching import DualCache, RedisCache +from litellm.exceptions import RejectedRequestError +from litellm.integrations.custom_guardrail import CustomGuardrail +from litellm.integrations.custom_logger import CustomLogger +from litellm.integrations.SlackAlerting.slack_alerting import SlackAlerting +from litellm.integrations.SlackAlerting.utils import _add_langfuse_trace_id_to_alert +from litellm.litellm_core_utils.litellm_logging import Logging +from litellm.llms.custom_httpx.httpx_handler import HTTPHandler +from litellm.proxy._types import ( + AlertType, + CallInfo, + LiteLLM_VerificationTokenView, + Member, + UserAPIKeyAuth, +) +from litellm.proxy.db.create_views import ( + create_missing_views, + should_create_missing_views, +) +from litellm.proxy.db.log_db_metrics import log_db_metrics +from litellm.proxy.db.prisma_client import PrismaWrapper +from litellm.proxy.hooks.cache_control_check import _PROXY_CacheControlCheck +from litellm.proxy.hooks.max_budget_limiter import _PROXY_MaxBudgetLimiter +from litellm.proxy.hooks.parallel_request_limiter import ( + _PROXY_MaxParallelRequestsHandler, +) +from litellm.proxy.litellm_pre_call_utils import LiteLLMProxyRequestSetup +from litellm.secret_managers.main import str_to_bool +from litellm.types.integrations.slack_alerting import DEFAULT_ALERT_TYPES +from litellm.types.utils import CallTypes, LoggedLiteLLMParams + +if TYPE_CHECKING: + from opentelemetry.trace import Span as _Span + + Span = _Span +else: + Span = Any + + +def print_verbose(print_statement): + """ + Prints the given `print_statement` to the console if `litellm.set_verbose` is True. + Also logs the `print_statement` at the debug level using `verbose_proxy_logger`. + + :param print_statement: The statement to be printed and logged. + :type print_statement: Any + """ + import traceback + + verbose_proxy_logger.debug("{}\n{}".format(print_statement, traceback.format_exc())) + if litellm.set_verbose: + print(f"LiteLLM Proxy: {print_statement}") # noqa + + +def safe_deep_copy(data): + """ + Safe Deep Copy + + The LiteLLM Request has some object that can-not be pickled / deep copied + + Use this function to safely deep copy the LiteLLM Request + """ + if litellm.safe_memory_mode is True: + return data + + litellm_parent_otel_span: Optional[Any] = None + # Step 1: Remove the litellm_parent_otel_span + litellm_parent_otel_span = None + if isinstance(data, dict): + # remove litellm_parent_otel_span since this is not picklable + if "metadata" in data and "litellm_parent_otel_span" in data["metadata"]: + litellm_parent_otel_span = data["metadata"].pop("litellm_parent_otel_span") + new_data = copy.deepcopy(data) + + # Step 2: re-add the litellm_parent_otel_span after doing a deep copy + if isinstance(data, dict) and litellm_parent_otel_span is not None: + if "metadata" in data: + data["metadata"]["litellm_parent_otel_span"] = litellm_parent_otel_span + return new_data + + +class InternalUsageCache: + def __init__(self, dual_cache: DualCache): + self.dual_cache: DualCache = dual_cache + + async def async_get_cache( + self, + key, + litellm_parent_otel_span: Union[Span, None], + local_only: bool = False, + **kwargs, + ) -> Any: + return await self.dual_cache.async_get_cache( + key=key, + local_only=local_only, + parent_otel_span=litellm_parent_otel_span, + **kwargs, + ) + + async def async_set_cache( + self, + key, + value, + litellm_parent_otel_span: Union[Span, None], + local_only: bool = False, + **kwargs, + ) -> None: + return await self.dual_cache.async_set_cache( + key=key, + value=value, + local_only=local_only, + litellm_parent_otel_span=litellm_parent_otel_span, + **kwargs, + ) + + async def async_batch_set_cache( + self, + cache_list: List, + litellm_parent_otel_span: Union[Span, None], + local_only: bool = False, + **kwargs, + ) -> None: + return await self.dual_cache.async_set_cache_pipeline( + cache_list=cache_list, + local_only=local_only, + litellm_parent_otel_span=litellm_parent_otel_span, + **kwargs, + ) + + async def async_batch_get_cache( + self, + keys: list, + parent_otel_span: Optional[Span] = None, + local_only: bool = False, + ): + return await self.dual_cache.async_batch_get_cache( + keys=keys, + parent_otel_span=parent_otel_span, + local_only=local_only, + ) + + async def async_increment_cache( + self, + key, + value: float, + litellm_parent_otel_span: Union[Span, None], + local_only: bool = False, + **kwargs, + ): + return await self.dual_cache.async_increment_cache( + key=key, + value=value, + local_only=local_only, + parent_otel_span=litellm_parent_otel_span, + **kwargs, + ) + + def set_cache( + self, + key, + value, + local_only: bool = False, + **kwargs, + ) -> None: + return self.dual_cache.set_cache( + key=key, + value=value, + local_only=local_only, + **kwargs, + ) + + def get_cache( + self, + key, + local_only: bool = False, + **kwargs, + ) -> Any: + return self.dual_cache.get_cache( + key=key, + local_only=local_only, + **kwargs, + ) + + +### LOGGING ### +class ProxyLogging: + """ + Logging/Custom Handlers for proxy. + + Implemented mainly to: + - log successful/failed db read/writes + - support the max parallel request integration + """ + + def __init__( + self, + user_api_key_cache: DualCache, + premium_user: bool = False, + ): + ## INITIALIZE LITELLM CALLBACKS ## + self.call_details: dict = {} + self.call_details["user_api_key_cache"] = user_api_key_cache + self.internal_usage_cache: InternalUsageCache = InternalUsageCache( + dual_cache=DualCache(default_in_memory_ttl=1) # ping redis cache every 1s + ) + self.max_parallel_request_limiter = _PROXY_MaxParallelRequestsHandler( + self.internal_usage_cache + ) + self.max_budget_limiter = _PROXY_MaxBudgetLimiter() + self.cache_control_check = _PROXY_CacheControlCheck() + self.alerting: Optional[List] = None + self.alerting_threshold: float = 300 # default to 5 min. threshold + self.alert_types: List[AlertType] = DEFAULT_ALERT_TYPES + self.alert_to_webhook_url: Optional[dict] = None + self.slack_alerting_instance: SlackAlerting = SlackAlerting( + alerting_threshold=self.alerting_threshold, + alerting=self.alerting, + internal_usage_cache=self.internal_usage_cache.dual_cache, + ) + self.premium_user = premium_user + self.service_logging_obj = ServiceLogging() + + def startup_event( + self, + llm_router: Optional[Router], + redis_usage_cache: Optional[RedisCache], + ): + """Initialize logging and alerting on proxy startup""" + ## UPDATE SLACK ALERTING ## + self.slack_alerting_instance.update_values(llm_router=llm_router) + + ## UPDATE INTERNAL USAGE CACHE ## + self.update_values( + redis_cache=redis_usage_cache + ) # used by parallel request limiter for rate limiting keys across instances + + self._init_litellm_callbacks( + llm_router=llm_router + ) # INITIALIZE LITELLM CALLBACKS ON SERVER STARTUP <- do this to catch any logging errors on startup, not when calls are being made + + if ( + self.slack_alerting_instance is not None + and "daily_reports" in self.slack_alerting_instance.alert_types + ): + asyncio.create_task( + self.slack_alerting_instance._run_scheduled_daily_report( + llm_router=llm_router + ) + ) # RUN DAILY REPORT (if scheduled) + + def update_values( + self, + alerting: Optional[List] = None, + alerting_threshold: Optional[float] = None, + redis_cache: Optional[RedisCache] = None, + alert_types: Optional[List[AlertType]] = None, + alerting_args: Optional[dict] = None, + alert_to_webhook_url: Optional[dict] = None, + ): + updated_slack_alerting: bool = False + if alerting is not None: + self.alerting = alerting + updated_slack_alerting = True + if alerting_threshold is not None: + self.alerting_threshold = alerting_threshold + updated_slack_alerting = True + if alert_types is not None: + self.alert_types = alert_types + updated_slack_alerting = True + if alert_to_webhook_url is not None: + self.alert_to_webhook_url = alert_to_webhook_url + updated_slack_alerting = True + + if updated_slack_alerting is True: + self.slack_alerting_instance.update_values( + alerting=self.alerting, + alerting_threshold=self.alerting_threshold, + alert_types=self.alert_types, + alerting_args=alerting_args, + alert_to_webhook_url=self.alert_to_webhook_url, + ) + + if self.alerting is not None and "slack" in self.alerting: + # NOTE: ENSURE we only add callbacks when alerting is on + # We should NOT add callbacks when alerting is off + if "daily_reports" in self.alert_types: + litellm.logging_callback_manager.add_litellm_callback(self.slack_alerting_instance) # type: ignore + litellm.logging_callback_manager.add_litellm_success_callback( + self.slack_alerting_instance.response_taking_too_long_callback + ) + + if redis_cache is not None: + self.internal_usage_cache.dual_cache.redis_cache = redis_cache + + def _init_litellm_callbacks(self, llm_router: Optional[Router] = None): + litellm.logging_callback_manager.add_litellm_callback(self.max_parallel_request_limiter) # type: ignore + litellm.logging_callback_manager.add_litellm_callback(self.max_budget_limiter) # type: ignore + litellm.logging_callback_manager.add_litellm_callback(self.cache_control_check) # type: ignore + litellm.logging_callback_manager.add_litellm_callback(self.service_logging_obj) # type: ignore + for callback in litellm.callbacks: + if isinstance(callback, str): + callback = litellm.litellm_core_utils.litellm_logging._init_custom_logger_compatible_class( # type: ignore + callback, + internal_usage_cache=self.internal_usage_cache.dual_cache, + llm_router=llm_router, + ) + if callback is None: + continue + if callback not in litellm.input_callback: + litellm.input_callback.append(callback) # type: ignore + if callback not in litellm.success_callback: + litellm.logging_callback_manager.add_litellm_success_callback(callback) # type: ignore + if callback not in litellm.failure_callback: + litellm.logging_callback_manager.add_litellm_failure_callback(callback) # type: ignore + if callback not in litellm._async_success_callback: + litellm.logging_callback_manager.add_litellm_async_success_callback(callback) # type: ignore + if callback not in litellm._async_failure_callback: + litellm.logging_callback_manager.add_litellm_async_failure_callback(callback) # type: ignore + if callback not in litellm.service_callback: + litellm.service_callback.append(callback) # type: ignore + + if ( + len(litellm.input_callback) > 0 + or len(litellm.success_callback) > 0 + or len(litellm.failure_callback) > 0 + ): + callback_list = list( + set( + litellm.input_callback + + litellm.success_callback + + litellm.failure_callback + ) + ) + litellm.litellm_core_utils.litellm_logging.set_callbacks( + callback_list=callback_list + ) + + async def update_request_status( + self, litellm_call_id: str, status: Literal["success", "fail"] + ): + # only use this if slack alerting is being used + if self.alerting is None: + return + + # current alerting threshold + alerting_threshold: float = self.alerting_threshold + + # add a 100 second buffer to the alerting threshold + # ensures we don't send errant hanging request slack alerts + alerting_threshold += 100 + + await self.internal_usage_cache.async_set_cache( + key="request_status:{}".format(litellm_call_id), + value=status, + local_only=True, + ttl=alerting_threshold, + litellm_parent_otel_span=None, + ) + + async def process_pre_call_hook_response(self, response, data, call_type): + if isinstance(response, Exception): + raise response + if isinstance(response, dict): + return response + if isinstance(response, str): + if call_type in ["completion", "text_completion"]: + raise RejectedRequestError( + message=response, + model=data.get("model", ""), + llm_provider="", + request_data=data, + ) + else: + raise HTTPException(status_code=400, detail={"error": response}) + return data + + # The actual implementation of the function + @overload + async def pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + data: None, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> None: + pass + + @overload + async def pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + data: dict, + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> dict: + pass + + async def pre_call_hook( + self, + user_api_key_dict: UserAPIKeyAuth, + data: Optional[dict], + call_type: Literal[ + "completion", + "text_completion", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + "pass_through_endpoint", + "rerank", + ], + ) -> Optional[dict]: + """ + Allows users to modify/reject the incoming request to the proxy, without having to deal with parsing Request body. + + Covers: + 1. /chat/completions + 2. /embeddings + 3. /image/generation + """ + verbose_proxy_logger.debug("Inside Proxy Logging Pre-call hook!") + + self._init_response_taking_too_long_task(data=data) + + if data is None: + return None + + try: + for callback in litellm.callbacks: + + _callback = None + if isinstance(callback, str): + _callback = litellm.litellm_core_utils.litellm_logging.get_custom_logger_compatible_class( + callback + ) + else: + _callback = callback # type: ignore + if _callback is not None and isinstance(_callback, CustomGuardrail): + from litellm.types.guardrails import GuardrailEventHooks + + if ( + _callback.should_run_guardrail( + data=data, event_type=GuardrailEventHooks.pre_call + ) + is not True + ): + continue + + response = await _callback.async_pre_call_hook( + user_api_key_dict=user_api_key_dict, + cache=self.call_details["user_api_key_cache"], + data=data, # type: ignore + call_type=call_type, + ) + if response is not None: + data = await self.process_pre_call_hook_response( + response=response, data=data, call_type=call_type + ) + + elif ( + _callback is not None + and isinstance(_callback, CustomLogger) + and "async_pre_call_hook" in vars(_callback.__class__) + and _callback.__class__.async_pre_call_hook + != CustomLogger.async_pre_call_hook + ): + response = await _callback.async_pre_call_hook( + user_api_key_dict=user_api_key_dict, + cache=self.call_details["user_api_key_cache"], + data=data, # type: ignore + call_type=call_type, + ) + if response is not None: + data = await self.process_pre_call_hook_response( + response=response, data=data, call_type=call_type + ) + + return data + except Exception as e: + raise e + + async def during_call_hook( + self, + data: dict, + user_api_key_dict: UserAPIKeyAuth, + call_type: Literal[ + "completion", + "responses", + "embeddings", + "image_generation", + "moderation", + "audio_transcription", + ], + ): + """ + Runs the CustomGuardrail's async_moderation_hook() + """ + for callback in litellm.callbacks: + try: + if isinstance(callback, CustomGuardrail): + ################################################################ + # Check if guardrail should be run for GuardrailEventHooks.during_call hook + ################################################################ + + # V1 implementation - backwards compatibility + if callback.event_hook is None and hasattr( + callback, "moderation_check" + ): + if callback.moderation_check == "pre_call": # type: ignore + return + else: + # Main - V2 Guardrails implementation + from litellm.types.guardrails import GuardrailEventHooks + + if ( + callback.should_run_guardrail( + data=data, event_type=GuardrailEventHooks.during_call + ) + is not True + ): + continue + await callback.async_moderation_hook( + data=data, + user_api_key_dict=user_api_key_dict, + call_type=call_type, + ) + except Exception as e: + raise e + return data + + async def failed_tracking_alert( + self, + error_message: str, + failing_model: str, + ): + if self.alerting is None: + return + + if self.slack_alerting_instance: + await self.slack_alerting_instance.failed_tracking_alert( + error_message=error_message, + failing_model=failing_model, + ) + + async def budget_alerts( + self, + type: Literal[ + "token_budget", + "user_budget", + "soft_budget", + "team_budget", + "proxy_budget", + "projected_limit_exceeded", + ], + user_info: CallInfo, + ): + if self.alerting is None: + # do nothing if alerting is not switched on + return + await self.slack_alerting_instance.budget_alerts( + type=type, + user_info=user_info, + ) + + async def alerting_handler( + self, + message: str, + level: Literal["Low", "Medium", "High"], + alert_type: AlertType, + request_data: Optional[dict] = None, + ): + """ + Alerting based on thresholds: - https://github.com/BerriAI/litellm/issues/1298 + + - Responses taking too long + - Requests are hanging + - Calls are failing + - DB Read/Writes are failing + - Proxy Close to max budget + - Key Close to max budget + + Parameters: + level: str - Low|Medium|High - if calls might fail (Medium) or are failing (High); Currently, no alerts would be 'Low'. + message: str - what is the alert about + """ + if self.alerting is None: + return + + from datetime import datetime + + # Get the current timestamp + current_time = datetime.now().strftime("%H:%M:%S") + _proxy_base_url = os.getenv("PROXY_BASE_URL", None) + formatted_message = ( + f"Level: `{level}`\nTimestamp: `{current_time}`\n\nMessage: {message}" + ) + if _proxy_base_url is not None: + formatted_message += f"\n\nProxy URL: `{_proxy_base_url}`" + + extra_kwargs = {} + alerting_metadata = {} + if request_data is not None: + _url = await _add_langfuse_trace_id_to_alert(request_data=request_data) + + if _url is not None: + extra_kwargs["🪢 Langfuse Trace"] = _url + formatted_message += "\n\n🪢 Langfuse Trace: {}".format(_url) + if ( + "metadata" in request_data + and request_data["metadata"].get("alerting_metadata", None) is not None + and isinstance(request_data["metadata"]["alerting_metadata"], dict) + ): + alerting_metadata = request_data["metadata"]["alerting_metadata"] + for client in self.alerting: + if client == "slack": + await self.slack_alerting_instance.send_alert( + message=message, + level=level, + alert_type=alert_type, + user_info=None, + alerting_metadata=alerting_metadata, + **extra_kwargs, + ) + elif client == "sentry": + if litellm.utils.sentry_sdk_instance is not None: + litellm.utils.sentry_sdk_instance.capture_message(formatted_message) + else: + raise Exception("Missing SENTRY_DSN from environment") + + async def failure_handler( + self, original_exception, duration: float, call_type: str, traceback_str="" + ): + """ + Log failed db read/writes + + Currently only logs exceptions to sentry + """ + ### ALERTING ### + if AlertType.db_exceptions not in self.alert_types: + return + if isinstance(original_exception, HTTPException): + if isinstance(original_exception.detail, str): + error_message = original_exception.detail + elif isinstance(original_exception.detail, dict): + error_message = json.dumps(original_exception.detail) + else: + error_message = str(original_exception) + else: + error_message = str(original_exception) + if isinstance(traceback_str, str): + error_message += traceback_str[:1000] + asyncio.create_task( + self.alerting_handler( + message=f"DB read/write call failed: {error_message}", + level="High", + alert_type=AlertType.db_exceptions, + request_data={}, + ) + ) + + if hasattr(self, "service_logging_obj"): + await self.service_logging_obj.async_service_failure_hook( + service=ServiceTypes.DB, + duration=duration, + error=error_message, + call_type=call_type, + ) + + if litellm.utils.capture_exception: + litellm.utils.capture_exception(error=original_exception) + + async def post_call_failure_hook( + self, + request_data: dict, + original_exception: Exception, + user_api_key_dict: UserAPIKeyAuth, + error_type: Optional[ProxyErrorTypes] = None, + route: Optional[str] = None, + ): + """ + Allows users to raise custom exceptions/log when a call fails, without having to deal with parsing Request body. + + Covers: + 1. /chat/completions + 2. /embeddings + 3. /image/generation + """ + + ### ALERTING ### + await self.update_request_status( + litellm_call_id=request_data.get("litellm_call_id", ""), status="fail" + ) + if AlertType.llm_exceptions in self.alert_types and not isinstance( + original_exception, HTTPException + ): + """ + Just alert on LLM API exceptions. Do not alert on user errors + + Related issue - https://github.com/BerriAI/litellm/issues/3395 + """ + litellm_debug_info = getattr(original_exception, "litellm_debug_info", None) + exception_str = str(original_exception) + if litellm_debug_info is not None: + exception_str += litellm_debug_info + + asyncio.create_task( + self.alerting_handler( + message=f"LLM API call failed: `{exception_str}`", + level="High", + alert_type=AlertType.llm_exceptions, + request_data=request_data, + ) + ) + + ### LOGGING ### + if self._is_proxy_only_error( + original_exception=original_exception, error_type=error_type + ): + await self._handle_logging_proxy_only_error( + request_data=request_data, + user_api_key_dict=user_api_key_dict, + route=route, + original_exception=original_exception, + ) + + for callback in litellm.callbacks: + try: + _callback: Optional[CustomLogger] = None + if isinstance(callback, str): + _callback = litellm.litellm_core_utils.litellm_logging.get_custom_logger_compatible_class( + callback + ) + else: + _callback = callback # type: ignore + if _callback is not None and isinstance(_callback, CustomLogger): + asyncio.create_task( + _callback.async_post_call_failure_hook( + request_data=request_data, + user_api_key_dict=user_api_key_dict, + original_exception=original_exception, + ) + ) + except Exception as e: + verbose_proxy_logger.exception( + f"[Non-Blocking] Error in post_call_failure_hook: {e}" + ) + return + + def _is_proxy_only_error( + self, + original_exception: Exception, + error_type: Optional[ProxyErrorTypes] = None, + ) -> bool: + """ + Return True if the error is a Proxy Only Error + + Prevents double logging of LLM API exceptions + + e.g should only return True for: + - Authentication Errors from user_api_key_auth + - HTTP HTTPException (rate limit errors) + """ + return isinstance(original_exception, HTTPException) or ( + error_type == ProxyErrorTypes.auth_error + ) + + async def _handle_logging_proxy_only_error( + self, + request_data: dict, + user_api_key_dict: UserAPIKeyAuth, + route: Optional[str] = None, + original_exception: Optional[Exception] = None, + ): + """ + Handle logging for proxy only errors by calling `litellm_logging_obj.async_failure_handler` + + Is triggered when self._is_proxy_only_error() returns True + """ + litellm_logging_obj: Optional[Logging] = request_data.get( + "litellm_logging_obj", None + ) + if litellm_logging_obj is None: + import uuid + + request_data["litellm_call_id"] = str(uuid.uuid4()) + user_api_key_logged_metadata = ( + LiteLLMProxyRequestSetup.get_sanitized_user_information_from_key( + user_api_key_dict=user_api_key_dict + ) + ) + + litellm_logging_obj, data = litellm.utils.function_setup( + original_function=route or "IGNORE_THIS", + rules_obj=litellm.utils.Rules(), + start_time=datetime.now(), + **request_data, + ) + if "metadata" not in request_data: + request_data["metadata"] = {} + request_data["metadata"].update(user_api_key_logged_metadata) + + if litellm_logging_obj is not None: + ## UPDATE LOGGING INPUT + _optional_params = {} + _litellm_params = {} + + litellm_param_keys = LoggedLiteLLMParams.__annotations__.keys() + for k, v in request_data.items(): + if k in litellm_param_keys: + _litellm_params[k] = v + elif k != "model" and k != "user": + _optional_params[k] = v + + litellm_logging_obj.update_environment_variables( + model=request_data.get("model", ""), + user=request_data.get("user", ""), + optional_params=_optional_params, + litellm_params=_litellm_params, + ) + + input: Union[list, str, dict] = "" + if "messages" in request_data and isinstance( + request_data["messages"], list + ): + input = request_data["messages"] + litellm_logging_obj.model_call_details["messages"] = input + litellm_logging_obj.call_type = CallTypes.acompletion.value + elif "prompt" in request_data and isinstance(request_data["prompt"], str): + input = request_data["prompt"] + litellm_logging_obj.model_call_details["prompt"] = input + litellm_logging_obj.call_type = CallTypes.atext_completion.value + elif "input" in request_data and isinstance(request_data["input"], list): + input = request_data["input"] + litellm_logging_obj.model_call_details["input"] = input + litellm_logging_obj.call_type = CallTypes.aembedding.value + litellm_logging_obj.pre_call( + input=input, + api_key="", + ) + + # log the custom exception + await litellm_logging_obj.async_failure_handler( + exception=original_exception, + traceback_exception=traceback.format_exc(), + ) + + threading.Thread( + target=litellm_logging_obj.failure_handler, + args=( + original_exception, + traceback.format_exc(), + ), + ).start() + + async def post_call_success_hook( + self, + data: dict, + response: Union[ModelResponse, EmbeddingResponse, ImageResponse], + user_api_key_dict: UserAPIKeyAuth, + ): + """ + Allow user to modify outgoing data + + Covers: + 1. /chat/completions + """ + + for callback in litellm.callbacks: + try: + _callback: Optional[CustomLogger] = None + if isinstance(callback, str): + _callback = litellm.litellm_core_utils.litellm_logging.get_custom_logger_compatible_class( + callback + ) + else: + _callback = callback # type: ignore + + if _callback is not None: + ############## Handle Guardrails ######################################## + ############################################################################# + if isinstance(callback, CustomGuardrail): + # Main - V2 Guardrails implementation + from litellm.types.guardrails import GuardrailEventHooks + + if ( + callback.should_run_guardrail( + data=data, event_type=GuardrailEventHooks.post_call + ) + is not True + ): + continue + + await callback.async_post_call_success_hook( + user_api_key_dict=user_api_key_dict, + data=data, + response=response, + ) + + ############ Handle CustomLogger ############################### + ################################################################# + elif isinstance(_callback, CustomLogger): + await _callback.async_post_call_success_hook( + user_api_key_dict=user_api_key_dict, + data=data, + response=response, + ) + except Exception as e: + raise e + return response + + async def async_post_call_streaming_hook( + self, + response: Union[ + ModelResponse, EmbeddingResponse, ImageResponse, ModelResponseStream + ], + user_api_key_dict: UserAPIKeyAuth, + ): + """ + Allow user to modify outgoing streaming data -> per chunk + + Covers: + 1. /chat/completions + """ + response_str: Optional[str] = None + if isinstance(response, (ModelResponse, ModelResponseStream)): + response_str = litellm.get_response_string(response_obj=response) + if response_str is not None: + for callback in litellm.callbacks: + try: + _callback: Optional[CustomLogger] = None + if isinstance(callback, str): + _callback = litellm.litellm_core_utils.litellm_logging.get_custom_logger_compatible_class( + callback + ) + else: + _callback = callback # type: ignore + if _callback is not None and isinstance(_callback, CustomLogger): + await _callback.async_post_call_streaming_hook( + user_api_key_dict=user_api_key_dict, response=response_str + ) + except Exception as e: + raise e + return response + + def async_post_call_streaming_iterator_hook( + self, + response, + user_api_key_dict: UserAPIKeyAuth, + request_data: dict, + ): + """ + Allow user to modify outgoing streaming data -> Given a whole response iterator. + This hook is best used when you need to modify multiple chunks of the response at once. + + Covers: + 1. /chat/completions + """ + for callback in litellm.callbacks: + _callback: Optional[CustomLogger] = None + if isinstance(callback, str): + _callback = litellm.litellm_core_utils.litellm_logging.get_custom_logger_compatible_class( + callback + ) + else: + _callback = callback # type: ignore + if _callback is not None and isinstance(_callback, CustomLogger): + if not isinstance( + _callback, CustomGuardrail + ) or _callback.should_run_guardrail( + data=request_data, event_type=GuardrailEventHooks.post_call + ): + response = _callback.async_post_call_streaming_iterator_hook( + user_api_key_dict=user_api_key_dict, + response=response, + request_data=request_data, + ) + return response + + async def post_call_streaming_hook( + self, + response: str, + user_api_key_dict: UserAPIKeyAuth, + ): + """ + - Check outgoing streaming response uptil that point + - Run through moderation check + - Reject request if it fails moderation check + """ + new_response = copy.deepcopy(response) + for callback in litellm.callbacks: + try: + if isinstance(callback, CustomLogger): + await callback.async_post_call_streaming_hook( + user_api_key_dict=user_api_key_dict, response=new_response + ) + except Exception as e: + raise e + return new_response + + def _init_response_taking_too_long_task(self, data: Optional[dict] = None): + """ + Initialize the response taking too long task if user is using slack alerting + + Only run task if user is using slack alerting + + This handles checking for if a request is hanging for too long + """ + ## ALERTING ### + if ( + self.slack_alerting_instance + and self.slack_alerting_instance.alerting is not None + ): + asyncio.create_task( + self.slack_alerting_instance.response_taking_too_long(request_data=data) + ) + + +### DB CONNECTOR ### +# Define the retry decorator with backoff strategy +# Function to be called whenever a retry is about to happen +def on_backoff(details): + # The 'tries' key in the details dictionary contains the number of completed tries + print_verbose(f"Backing off... this was attempt #{details['tries']}") + + +def jsonify_object(data: dict) -> dict: + db_data = copy.deepcopy(data) + + for k, v in db_data.items(): + if isinstance(v, dict): + try: + db_data[k] = json.dumps(v) + except Exception: + # This avoids Prisma retrying this 5 times, and making 5 clients + db_data[k] = "failed-to-serialize-json" + return db_data + + +class PrismaClient: + user_list_transactons: dict = {} + end_user_list_transactons: dict = {} + key_list_transactons: dict = {} + team_list_transactons: dict = {} + team_member_list_transactons: dict = {} # key is ["team_id" + "user_id"] + org_list_transactons: dict = {} + spend_log_transactions: List = [] + + def __init__( + self, + database_url: str, + proxy_logging_obj: ProxyLogging, + http_client: Optional[Any] = None, + ): + ## init logging object + self.proxy_logging_obj = proxy_logging_obj + self.iam_token_db_auth: Optional[bool] = str_to_bool( + os.getenv("IAM_TOKEN_DB_AUTH") + ) + verbose_proxy_logger.debug("Creating Prisma Client..") + try: + from prisma import Prisma # type: ignore + except Exception: + raise Exception("Unable to find Prisma binaries.") + if http_client is not None: + self.db = PrismaWrapper( + original_prisma=Prisma(http=http_client), + iam_token_db_auth=( + self.iam_token_db_auth + if self.iam_token_db_auth is not None + else False + ), + ) + else: + self.db = PrismaWrapper( + original_prisma=Prisma(), + iam_token_db_auth=( + self.iam_token_db_auth + if self.iam_token_db_auth is not None + else False + ), + ) # Client to connect to Prisma db + verbose_proxy_logger.debug("Success - Created Prisma Client") + + def hash_token(self, token: str): + # Hash the string using SHA-256 + hashed_token = hashlib.sha256(token.encode()).hexdigest() + + return hashed_token + + def jsonify_object(self, data: dict) -> dict: + db_data = copy.deepcopy(data) + + for k, v in db_data.items(): + if isinstance(v, dict): + try: + db_data[k] = json.dumps(v) + except Exception: + # This avoids Prisma retrying this 5 times, and making 5 clients + db_data[k] = "failed-to-serialize-json" + return db_data + + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def check_view_exists(self): + """ + Checks if the LiteLLM_VerificationTokenView and MonthlyGlobalSpend exists in the user's db. + + LiteLLM_VerificationTokenView: This view is used for getting the token + team data in user_api_key_auth + + MonthlyGlobalSpend: This view is used for the admin view to see global spend for this month + + If the view doesn't exist, one will be created. + """ + + # Check to see if all of the necessary views exist and if they do, simply return + # This is more efficient because it lets us check for all views in one + # query instead of multiple queries. + try: + expected_views = [ + "LiteLLM_VerificationTokenView", + "MonthlyGlobalSpend", + "Last30dKeysBySpend", + "Last30dModelsBySpend", + "MonthlyGlobalSpendPerKey", + "MonthlyGlobalSpendPerUserPerKey", + "Last30dTopEndUsersSpend", + "DailyTagSpend", + ] + required_view = "LiteLLM_VerificationTokenView" + expected_views_str = ", ".join(f"'{view}'" for view in expected_views) + pg_schema = os.getenv("DATABASE_SCHEMA", "public") + ret = await self.db.query_raw( + f""" + WITH existing_views AS ( + SELECT viewname + FROM pg_views + WHERE schemaname = '{pg_schema}' AND viewname IN ( + {expected_views_str} + ) + ) + SELECT + (SELECT COUNT(*) FROM existing_views) AS view_count, + ARRAY_AGG(viewname) AS view_names + FROM existing_views + """ + ) + expected_total_views = len(expected_views) + if ret[0]["view_count"] == expected_total_views: + verbose_proxy_logger.info("All necessary views exist!") + return + else: + ## check if required view exists ## + if ret[0]["view_names"] and required_view not in ret[0]["view_names"]: + await self.health_check() # make sure we can connect to db + await self.db.execute_raw( + """ + CREATE VIEW "LiteLLM_VerificationTokenView" AS + SELECT + v.*, + t.spend AS team_spend, + t.max_budget AS team_max_budget, + t.tpm_limit AS team_tpm_limit, + t.rpm_limit AS team_rpm_limit + FROM "LiteLLM_VerificationToken" v + LEFT JOIN "LiteLLM_TeamTable" t ON v.team_id = t.team_id; + """ + ) + + verbose_proxy_logger.info( + "LiteLLM_VerificationTokenView Created in DB!" + ) + else: + should_create_views = await should_create_missing_views(db=self.db) + if should_create_views: + await create_missing_views(db=self.db) + else: + # don't block execution if these views are missing + # Convert lists to sets for efficient difference calculation + ret_view_names_set = ( + set(ret[0]["view_names"]) if ret[0]["view_names"] else set() + ) + expected_views_set = set(expected_views) + # Find missing views + missing_views = expected_views_set - ret_view_names_set + + verbose_proxy_logger.warning( + "\n\n\033[93mNot all views exist in db, needed for UI 'Usage' tab. Missing={}.\nRun 'create_views.py' from https://github.com/BerriAI/litellm/tree/main/db_scripts to create missing views.\033[0m\n".format( + missing_views + ) + ) + + except Exception: + raise + return + + @log_db_metrics + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=1, # maximum number of retries + max_time=2, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def get_generic_data( + self, + key: str, + value: Any, + table_name: Literal["users", "keys", "config", "spend"], + ): + """ + Generic implementation of get data + """ + start_time = time.time() + try: + if table_name == "users": + response = await self.db.litellm_usertable.find_first( + where={key: value} # type: ignore + ) + elif table_name == "keys": + response = await self.db.litellm_verificationtoken.find_first( # type: ignore + where={key: value} # type: ignore + ) + elif table_name == "config": + response = await self.db.litellm_config.find_first( # type: ignore + where={key: value} # type: ignore + ) + elif table_name == "spend": + response = await self.db.l.find_first( # type: ignore + where={key: value} # type: ignore + ) + return response + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception get_generic_data: {str(e)}" + verbose_proxy_logger.error(error_msg) + error_msg = error_msg + "\nException Type: {}".format(type(e)) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + traceback_str=error_traceback, + call_type="get_generic_data", + ) + ) + + raise e + + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + @log_db_metrics + async def get_data( # noqa: PLR0915 + self, + token: Optional[Union[str, list]] = None, + user_id: Optional[str] = None, + user_id_list: Optional[list] = None, + team_id: Optional[str] = None, + team_id_list: Optional[list] = None, + key_val: Optional[dict] = None, + table_name: Optional[ + Literal[ + "user", + "key", + "config", + "spend", + "team", + "user_notification", + "combined_view", + ] + ] = None, + query_type: Literal["find_unique", "find_all"] = "find_unique", + expires: Optional[datetime] = None, + reset_at: Optional[datetime] = None, + offset: Optional[int] = None, # pagination, what row number to start from + limit: Optional[ + int + ] = None, # pagination, number of rows to getch when find_all==True + parent_otel_span: Optional[Span] = None, + proxy_logging_obj: Optional[ProxyLogging] = None, + ): + args_passed_in = locals() + start_time = time.time() + hashed_token: Optional[str] = None + try: + response: Any = None + if (token is not None and table_name is None) or ( + table_name is not None and table_name == "key" + ): + # check if plain text or hash + if token is not None: + if isinstance(token, str): + hashed_token = _hash_token_if_needed(token=token) + verbose_proxy_logger.debug( + f"PrismaClient: find_unique for token: {hashed_token}" + ) + if query_type == "find_unique" and hashed_token is not None: + if token is None: + raise HTTPException( + status_code=400, + detail={"error": f"No token passed in. Token={token}"}, + ) + response = await self.db.litellm_verificationtoken.find_unique( + where={"token": hashed_token}, # type: ignore + include={"litellm_budget_table": True}, + ) + if response is not None: + # for prisma we need to cast the expires time to str + if response.expires is not None and isinstance( + response.expires, datetime + ): + response.expires = response.expires.isoformat() + else: + # Token does not exist. + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail=f"Authentication Error: invalid user key - user key does not exist in db. User Key={token}", + ) + elif query_type == "find_all" and user_id is not None: + response = await self.db.litellm_verificationtoken.find_many( + where={"user_id": user_id}, + include={"litellm_budget_table": True}, + ) + if response is not None and len(response) > 0: + for r in response: + if isinstance(r.expires, datetime): + r.expires = r.expires.isoformat() + elif query_type == "find_all" and team_id is not None: + response = await self.db.litellm_verificationtoken.find_many( + where={"team_id": team_id}, + include={"litellm_budget_table": True}, + ) + if response is not None and len(response) > 0: + for r in response: + if isinstance(r.expires, datetime): + r.expires = r.expires.isoformat() + elif ( + query_type == "find_all" + and expires is not None + and reset_at is not None + ): + response = await self.db.litellm_verificationtoken.find_many( + where={ # type:ignore + "OR": [ + {"expires": None}, + {"expires": {"gt": expires}}, + ], + "budget_reset_at": {"lt": reset_at}, + } + ) + if response is not None and len(response) > 0: + for r in response: + if isinstance(r.expires, datetime): + r.expires = r.expires.isoformat() + elif query_type == "find_all": + where_filter: dict = {} + if token is not None: + where_filter["token"] = {} + if isinstance(token, str): + token = _hash_token_if_needed(token=token) + where_filter["token"]["in"] = [token] + elif isinstance(token, list): + hashed_tokens = [] + for t in token: + assert isinstance(t, str) + if t.startswith("sk-"): + new_token = self.hash_token(token=t) + hashed_tokens.append(new_token) + else: + hashed_tokens.append(t) + where_filter["token"]["in"] = hashed_tokens + response = await self.db.litellm_verificationtoken.find_many( + order={"spend": "desc"}, + where=where_filter, # type: ignore + include={"litellm_budget_table": True}, + ) + if response is not None: + return response + else: + # Token does not exist. + raise HTTPException( + status_code=status.HTTP_401_UNAUTHORIZED, + detail="Authentication Error: invalid user key - token does not exist", + ) + elif (user_id is not None and table_name is None) or ( + table_name is not None and table_name == "user" + ): + if query_type == "find_unique": + if key_val is None: + key_val = {"user_id": user_id} + response = await self.db.litellm_usertable.find_unique( # type: ignore + where=key_val, # type: ignore + include={"organization_memberships": True}, + ) + elif query_type == "find_all" and key_val is not None: + response = await self.db.litellm_usertable.find_many( + where=key_val # type: ignore + ) # type: ignore + elif query_type == "find_all" and reset_at is not None: + response = await self.db.litellm_usertable.find_many( + where={ # type:ignore + "budget_reset_at": {"lt": reset_at}, + } + ) + elif query_type == "find_all" and user_id_list is not None: + response = await self.db.litellm_usertable.find_many( + where={"user_id": {"in": user_id_list}} + ) + elif query_type == "find_all": + if expires is not None: + response = await self.db.litellm_usertable.find_many( # type: ignore + order={"spend": "desc"}, + where={ # type:ignore + "OR": [ + {"expires": None}, # type:ignore + {"expires": {"gt": expires}}, # type:ignore + ], + }, + ) + else: + # return all users in the table, get their key aliases ordered by spend + sql_query = """ + SELECT + u.*, + json_agg(v.key_alias) AS key_aliases + FROM + "LiteLLM_UserTable" u + LEFT JOIN "LiteLLM_VerificationToken" v ON u.user_id = v.user_id + GROUP BY + u.user_id + ORDER BY u.spend DESC + LIMIT $1 + OFFSET $2 + """ + response = await self.db.query_raw(sql_query, limit, offset) + return response + elif table_name == "spend": + verbose_proxy_logger.debug( + "PrismaClient: get_data: table_name == 'spend'" + ) + if key_val is not None: + if query_type == "find_unique": + response = await self.db.litellm_spendlogs.find_unique( # type: ignore + where={ # type: ignore + key_val["key"]: key_val["value"], # type: ignore + } + ) + elif query_type == "find_all": + response = await self.db.litellm_spendlogs.find_many( # type: ignore + where={ + key_val["key"]: key_val["value"], # type: ignore + } + ) + return response + else: + response = await self.db.litellm_spendlogs.find_many( # type: ignore + order={"startTime": "desc"}, + ) + return response + elif table_name == "team": + if query_type == "find_unique": + response = await self.db.litellm_teamtable.find_unique( + where={"team_id": team_id}, # type: ignore + include={"litellm_model_table": True}, # type: ignore + ) + elif query_type == "find_all" and reset_at is not None: + response = await self.db.litellm_teamtable.find_many( + where={ # type:ignore + "budget_reset_at": {"lt": reset_at}, + } + ) + elif query_type == "find_all" and user_id is not None: + response = await self.db.litellm_teamtable.find_many( + where={ + "members": {"has": user_id}, + }, + include={"litellm_budget_table": True}, + ) + elif query_type == "find_all" and team_id_list is not None: + response = await self.db.litellm_teamtable.find_many( + where={"team_id": {"in": team_id_list}} + ) + elif query_type == "find_all" and team_id_list is None: + response = await self.db.litellm_teamtable.find_many(take=20) + return response + elif table_name == "user_notification": + if query_type == "find_unique": + response = await self.db.litellm_usernotifications.find_unique( # type: ignore + where={"user_id": user_id} # type: ignore + ) + elif query_type == "find_all": + response = await self.db.litellm_usernotifications.find_many() # type: ignore + return response + elif table_name == "combined_view": + # check if plain text or hash + if token is not None: + if isinstance(token, str): + hashed_token = _hash_token_if_needed(token=token) + verbose_proxy_logger.debug( + f"PrismaClient: find_unique for token: {hashed_token}" + ) + if query_type == "find_unique": + if token is None: + raise HTTPException( + status_code=400, + detail={"error": f"No token passed in. Token={token}"}, + ) + + sql_query = f""" + SELECT + v.*, + t.spend AS team_spend, + t.max_budget AS team_max_budget, + t.tpm_limit AS team_tpm_limit, + t.rpm_limit AS team_rpm_limit, + t.models AS team_models, + t.metadata AS team_metadata, + t.blocked AS team_blocked, + t.team_alias AS team_alias, + t.metadata AS team_metadata, + t.members_with_roles AS team_members_with_roles, + t.organization_id as org_id, + tm.spend AS team_member_spend, + m.aliases AS team_model_aliases, + -- Added comma to separate b.* columns + b.max_budget AS litellm_budget_table_max_budget, + b.tpm_limit AS litellm_budget_table_tpm_limit, + b.rpm_limit AS litellm_budget_table_rpm_limit, + b.model_max_budget as litellm_budget_table_model_max_budget, + b.soft_budget as litellm_budget_table_soft_budget + FROM "LiteLLM_VerificationToken" AS v + LEFT JOIN "LiteLLM_TeamTable" AS t ON v.team_id = t.team_id + LEFT JOIN "LiteLLM_TeamMembership" AS tm ON v.team_id = tm.team_id AND tm.user_id = v.user_id + LEFT JOIN "LiteLLM_ModelTable" m ON t.model_id = m.id + LEFT JOIN "LiteLLM_BudgetTable" AS b ON v.budget_id = b.budget_id + WHERE v.token = '{token}' + """ + + print_verbose("sql_query being made={}".format(sql_query)) + response = await self.db.query_first(query=sql_query) + + if response is not None: + if response["team_models"] is None: + response["team_models"] = [] + if response["team_blocked"] is None: + response["team_blocked"] = False + + team_member: Optional[Member] = None + if ( + response["team_members_with_roles"] is not None + and response["user_id"] is not None + ): + ## find the team member corresponding to user id + """ + [ + { + "role": "admin", + "user_id": "default_user_id", + "user_email": null + }, + { + "role": "user", + "user_id": null, + "user_email": "test@email.com" + } + ] + """ + for tm in response["team_members_with_roles"]: + if tm.get("user_id") is not None and response[ + "user_id" + ] == tm.get("user_id"): + team_member = Member(**tm) + response["team_member"] = team_member + response = LiteLLM_VerificationTokenView( + **response, last_refreshed_at=time.time() + ) + # for prisma we need to cast the expires time to str + if response.expires is not None and isinstance( + response.expires, datetime + ): + response.expires = response.expires.isoformat() + return response + except Exception as e: + import traceback + + prisma_query_info = f"LiteLLM Prisma Client Exception: Error with `get_data`. Args passed in: {args_passed_in}" + error_msg = prisma_query_info + str(e) + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + verbose_proxy_logger.debug(error_traceback) + end_time = time.time() + _duration = end_time - start_time + + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="get_data", + traceback_str=error_traceback, + ) + ) + raise e + + def jsonify_team_object(self, db_data: dict): + db_data = self.jsonify_object(data=db_data) + if db_data.get("members_with_roles", None) is not None and isinstance( + db_data["members_with_roles"], list + ): + db_data["members_with_roles"] = json.dumps(db_data["members_with_roles"]) + return db_data + + # Define a retrying strategy with exponential backoff + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def insert_data( # noqa: PLR0915 + self, + data: dict, + table_name: Literal[ + "user", "key", "config", "spend", "team", "user_notification" + ], + ): + """ + Add a key to the database. If it already exists, do nothing. + """ + start_time = time.time() + try: + verbose_proxy_logger.debug("PrismaClient: insert_data: %s", data) + if table_name == "key": + token = data["token"] + hashed_token = self.hash_token(token=token) + db_data = self.jsonify_object(data=data) + db_data["token"] = hashed_token + print_verbose( + "PrismaClient: Before upsert into litellm_verificationtoken" + ) + new_verification_token = await self.db.litellm_verificationtoken.upsert( # type: ignore + where={ + "token": hashed_token, + }, + data={ + "create": {**db_data}, # type: ignore + "update": {}, # don't do anything if it already exists + }, + include={"litellm_budget_table": True}, + ) + verbose_proxy_logger.info("Data Inserted into Keys Table") + return new_verification_token + elif table_name == "user": + db_data = self.jsonify_object(data=data) + try: + new_user_row = await self.db.litellm_usertable.upsert( + where={"user_id": data["user_id"]}, + data={ + "create": {**db_data}, # type: ignore + "update": {}, # don't do anything if it already exists + }, + ) + except Exception as e: + if ( + "Foreign key constraint failed on the field: `LiteLLM_UserTable_organization_id_fkey (index)`" + in str(e) + ): + raise HTTPException( + status_code=400, + detail={ + "error": f"Foreign Key Constraint failed. Organization ID={db_data['organization_id']} does not exist in LiteLLM_OrganizationTable. Create via `/organization/new`." + }, + ) + raise e + verbose_proxy_logger.info("Data Inserted into User Table") + return new_user_row + elif table_name == "team": + db_data = self.jsonify_team_object(db_data=data) + new_team_row = await self.db.litellm_teamtable.upsert( + where={"team_id": data["team_id"]}, + data={ + "create": {**db_data}, # type: ignore + "update": {}, # don't do anything if it already exists + }, + ) + verbose_proxy_logger.info("Data Inserted into Team Table") + return new_team_row + elif table_name == "config": + """ + For each param, + get the existing table values + + Add the new values + + Update DB + """ + tasks = [] + for k, v in data.items(): + updated_data = v + updated_data = json.dumps(updated_data) + updated_table_row = self.db.litellm_config.upsert( + where={"param_name": k}, # type: ignore + data={ + "create": {"param_name": k, "param_value": updated_data}, # type: ignore + "update": {"param_value": updated_data}, + }, + ) + + tasks.append(updated_table_row) + await asyncio.gather(*tasks) + verbose_proxy_logger.info("Data Inserted into Config Table") + elif table_name == "spend": + db_data = self.jsonify_object(data=data) + new_spend_row = await self.db.litellm_spendlogs.upsert( + where={"request_id": data["request_id"]}, + data={ + "create": {**db_data}, # type: ignore + "update": {}, # don't do anything if it already exists + }, + ) + verbose_proxy_logger.info("Data Inserted into Spend Table") + return new_spend_row + elif table_name == "user_notification": + db_data = self.jsonify_object(data=data) + new_user_notification_row = ( + await self.db.litellm_usernotifications.upsert( # type: ignore + where={"request_id": data["request_id"]}, + data={ + "create": {**db_data}, # type: ignore + "update": {}, # don't do anything if it already exists + }, + ) + ) + verbose_proxy_logger.info("Data Inserted into Model Request Table") + return new_user_notification_row + + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception in insert_data: {str(e)}" + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="insert_data", + traceback_str=error_traceback, + ) + ) + raise e + + # Define a retrying strategy with exponential backoff + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def update_data( # noqa: PLR0915 + self, + token: Optional[str] = None, + data: dict = {}, + data_list: Optional[List] = None, + user_id: Optional[str] = None, + team_id: Optional[str] = None, + query_type: Literal["update", "update_many"] = "update", + table_name: Optional[Literal["user", "key", "config", "spend", "team"]] = None, + update_key_values: Optional[dict] = None, + update_key_values_custom_query: Optional[dict] = None, + ): + """ + Update existing data + """ + verbose_proxy_logger.debug( + f"PrismaClient: update_data, table_name: {table_name}" + ) + start_time = time.time() + try: + db_data = self.jsonify_object(data=data) + if update_key_values is not None: + update_key_values = self.jsonify_object(data=update_key_values) + if token is not None: + print_verbose(f"token: {token}") + # check if plain text or hash + token = _hash_token_if_needed(token=token) + db_data["token"] = token + response = await self.db.litellm_verificationtoken.update( + where={"token": token}, # type: ignore + data={**db_data}, # type: ignore + ) + verbose_proxy_logger.debug( + "\033[91m" + + f"DB Token Table update succeeded {response}" + + "\033[0m" + ) + _data: dict = {} + if response is not None: + try: + _data = response.model_dump() # type: ignore + except Exception: + _data = response.dict() + return {"token": token, "data": _data} + elif ( + user_id is not None + or (table_name is not None and table_name == "user") + and query_type == "update" + ): + """ + If data['spend'] + data['user'], update the user table with spend info as well + """ + if user_id is None: + user_id = db_data["user_id"] + if update_key_values is None: + if update_key_values_custom_query is not None: + update_key_values = update_key_values_custom_query + else: + update_key_values = db_data + update_user_row = await self.db.litellm_usertable.upsert( + where={"user_id": user_id}, # type: ignore + data={ + "create": {**db_data}, # type: ignore + "update": { + **update_key_values # type: ignore + }, # just update user-specified values, if it already exists + }, + ) + verbose_proxy_logger.info( + "\033[91m" + + f"DB User Table - update succeeded {update_user_row}" + + "\033[0m" + ) + return {"user_id": user_id, "data": update_user_row} + elif ( + team_id is not None + or (table_name is not None and table_name == "team") + and query_type == "update" + ): + """ + If data['spend'] + data['user'], update the user table with spend info as well + """ + if team_id is None: + team_id = db_data["team_id"] + if update_key_values is None: + update_key_values = db_data + if "team_id" not in db_data and team_id is not None: + db_data["team_id"] = team_id + if "members_with_roles" in db_data and isinstance( + db_data["members_with_roles"], list + ): + db_data["members_with_roles"] = json.dumps( + db_data["members_with_roles"] + ) + if "members_with_roles" in update_key_values and isinstance( + update_key_values["members_with_roles"], list + ): + update_key_values["members_with_roles"] = json.dumps( + update_key_values["members_with_roles"] + ) + update_team_row = await self.db.litellm_teamtable.upsert( + where={"team_id": team_id}, # type: ignore + data={ + "create": {**db_data}, # type: ignore + "update": { + **update_key_values # type: ignore + }, # just update user-specified values, if it already exists + }, + ) + verbose_proxy_logger.info( + "\033[91m" + + f"DB Team Table - update succeeded {update_team_row}" + + "\033[0m" + ) + return {"team_id": team_id, "data": update_team_row} + elif ( + table_name is not None + and table_name == "key" + and query_type == "update_many" + and data_list is not None + and isinstance(data_list, list) + ): + """ + Batch write update queries + """ + batcher = self.db.batch_() + for idx, t in enumerate(data_list): + # check if plain text or hash + if t.token.startswith("sk-"): # type: ignore + t.token = self.hash_token(token=t.token) # type: ignore + try: + data_json = self.jsonify_object( + data=t.model_dump(exclude_none=True) + ) + except Exception: + data_json = self.jsonify_object(data=t.dict(exclude_none=True)) + batcher.litellm_verificationtoken.update( + where={"token": t.token}, # type: ignore + data={**data_json}, # type: ignore + ) + await batcher.commit() + print_verbose( + "\033[91m" + "DB Token Table update succeeded" + "\033[0m" + ) + elif ( + table_name is not None + and table_name == "user" + and query_type == "update_many" + and data_list is not None + and isinstance(data_list, list) + ): + """ + Batch write update queries + """ + batcher = self.db.batch_() + for idx, user in enumerate(data_list): + try: + data_json = self.jsonify_object( + data=user.model_dump(exclude_none=True) + ) + except Exception: + data_json = self.jsonify_object(data=user.dict()) + batcher.litellm_usertable.upsert( + where={"user_id": user.user_id}, # type: ignore + data={ + "create": {**data_json}, # type: ignore + "update": { + **data_json # type: ignore + }, # just update user-specified values, if it already exists + }, + ) + await batcher.commit() + verbose_proxy_logger.info( + "\033[91m" + "DB User Table Batch update succeeded" + "\033[0m" + ) + elif ( + table_name is not None + and table_name == "team" + and query_type == "update_many" + and data_list is not None + and isinstance(data_list, list) + ): + # Batch write update queries + batcher = self.db.batch_() + for idx, team in enumerate(data_list): + try: + data_json = self.jsonify_team_object( + db_data=team.model_dump(exclude_none=True) + ) + except Exception: + data_json = self.jsonify_object( + data=team.dict(exclude_none=True) + ) + batcher.litellm_teamtable.upsert( + where={"team_id": team.team_id}, # type: ignore + data={ + "create": {**data_json}, # type: ignore + "update": { + **data_json # type: ignore + }, # just update user-specified values, if it already exists + }, + ) + await batcher.commit() + verbose_proxy_logger.info( + "\033[91m" + "DB Team Table Batch update succeeded" + "\033[0m" + ) + + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception - update_data: {str(e)}" + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="update_data", + traceback_str=error_traceback, + ) + ) + raise e + + # Define a retrying strategy with exponential backoff + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def delete_data( + self, + tokens: Optional[List] = None, + team_id_list: Optional[List] = None, + table_name: Optional[Literal["user", "key", "config", "spend", "team"]] = None, + user_id: Optional[str] = None, + ): + """ + Allow user to delete a key(s) + + Ensure user owns that key, unless admin. + """ + start_time = time.time() + try: + if tokens is not None and isinstance(tokens, List): + hashed_tokens = [] + for token in tokens: + if isinstance(token, str) and token.startswith("sk-"): + hashed_token = self.hash_token(token=token) + else: + hashed_token = token + hashed_tokens.append(hashed_token) + filter_query: dict = {} + if user_id is not None: + filter_query = { + "AND": [{"token": {"in": hashed_tokens}}, {"user_id": user_id}] + } + else: + filter_query = {"token": {"in": hashed_tokens}} + + deleted_tokens = await self.db.litellm_verificationtoken.delete_many( + where=filter_query # type: ignore + ) + verbose_proxy_logger.debug("deleted_tokens: %s", deleted_tokens) + return {"deleted_keys": deleted_tokens} + elif ( + table_name == "team" + and team_id_list is not None + and isinstance(team_id_list, List) + ): + # admin only endpoint -> `/team/delete` + await self.db.litellm_teamtable.delete_many( + where={"team_id": {"in": team_id_list}} + ) + return {"deleted_teams": team_id_list} + elif ( + table_name == "key" + and team_id_list is not None + and isinstance(team_id_list, List) + ): + # admin only endpoint -> `/team/delete` + await self.db.litellm_verificationtoken.delete_many( + where={"team_id": {"in": team_id_list}} + ) + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception - delete_data: {str(e)}" + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="delete_data", + traceback_str=error_traceback, + ) + ) + raise e + + # Define a retrying strategy with exponential backoff + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def connect(self): + start_time = time.time() + try: + verbose_proxy_logger.debug( + "PrismaClient: connect() called Attempting to Connect to DB" + ) + if self.db.is_connected() is False: + verbose_proxy_logger.debug( + "PrismaClient: DB not connected, Attempting to Connect to DB" + ) + await self.db.connect() + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception connect(): {str(e)}" + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="connect", + traceback_str=error_traceback, + ) + ) + raise e + + # Define a retrying strategy with exponential backoff + @backoff.on_exception( + backoff.expo, + Exception, # base exception to catch for the backoff + max_tries=3, # maximum number of retries + max_time=10, # maximum total time to retry for + on_backoff=on_backoff, # specifying the function to call on backoff + ) + async def disconnect(self): + start_time = time.time() + try: + await self.db.disconnect() + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception disconnect(): {str(e)}" + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="disconnect", + traceback_str=error_traceback, + ) + ) + raise e + + async def health_check(self): + """ + Health check endpoint for the prisma client + """ + start_time = time.time() + try: + sql_query = "SELECT 1" + + # Execute the raw query + # The asterisk before `user_id_list` unpacks the list into separate arguments + response = await self.db.query_raw(sql_query) + return response + except Exception as e: + import traceback + + error_msg = f"LiteLLM Prisma Client Exception disconnect(): {str(e)}" + print_verbose(error_msg) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + self.proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="health_check", + traceback_str=error_traceback, + ) + ) + raise e + + async def _get_spend_logs_row_count(self) -> int: + try: + sql_query = """ + SELECT reltuples::BIGINT + FROM pg_class + WHERE oid = '"LiteLLM_SpendLogs"'::regclass; + """ + result = await self.db.query_raw(query=sql_query) + return result[0]["reltuples"] + except Exception as e: + verbose_proxy_logger.error( + f"Error getting LiteLLM_SpendLogs row count: {e}" + ) + return 0 + + async def _set_spend_logs_row_count_in_proxy_state(self) -> None: + """ + Set the `LiteLLM_SpendLogs`row count in proxy state. + + This is used later to determine if we should run expensive UI Usage queries. + """ + from litellm.proxy.proxy_server import proxy_state + + _num_spend_logs_rows = await self._get_spend_logs_row_count() + proxy_state.set_proxy_state_variable( + variable_name="spend_logs_row_count", + value=_num_spend_logs_rows, + ) + + +### HELPER FUNCTIONS ### +async def _cache_user_row(user_id: str, cache: DualCache, db: PrismaClient): + """ + Check if a user_id exists in cache, + if not retrieve it. + """ + cache_key = f"{user_id}_user_api_key_user_id" + response = cache.get_cache(key=cache_key) + if response is None: # Cache miss + user_row = await db.get_data(user_id=user_id) + if user_row is not None: + print_verbose(f"User Row: {user_row}, type = {type(user_row)}") + if hasattr(user_row, "model_dump_json") and callable( + getattr(user_row, "model_dump_json") + ): + cache_value = user_row.model_dump_json() + cache.set_cache( + key=cache_key, value=cache_value, ttl=600 + ) # store for 10 minutes + return + + +async def send_email(receiver_email, subject, html): + """ + smtp_host, + smtp_port, + smtp_username, + smtp_password, + sender_name, + sender_email, + """ + ## SERVER SETUP ## + + smtp_host = os.getenv("SMTP_HOST") + smtp_port = int(os.getenv("SMTP_PORT", "587")) # default to port 587 + smtp_username = os.getenv("SMTP_USERNAME") + smtp_password = os.getenv("SMTP_PASSWORD") + sender_email = os.getenv("SMTP_SENDER_EMAIL", None) + if sender_email is None: + raise ValueError("Trying to use SMTP, but SMTP_SENDER_EMAIL is not set") + + ## EMAIL SETUP ## + email_message = MIMEMultipart() + email_message["From"] = sender_email + email_message["To"] = receiver_email + email_message["Subject"] = subject + verbose_proxy_logger.debug( + "sending email from %s to %s", sender_email, receiver_email + ) + + if smtp_host is None: + raise ValueError("Trying to use SMTP, but SMTP_HOST is not set") + + # Attach the body to the email + email_message.attach(MIMEText(html, "html")) + + try: + # Establish a secure connection with the SMTP server + with smtplib.SMTP(smtp_host, smtp_port) as server: # type: ignore + if os.getenv("SMTP_TLS", "True") != "False": + server.starttls() + + # Login to your email account only if smtp_username and smtp_password are provided + if smtp_username and smtp_password: + server.login(smtp_username, smtp_password) # type: ignore + + # Send the email + server.send_message(email_message) + + except Exception as e: + print_verbose("An error occurred while sending the email:" + str(e)) + + +def hash_token(token: str): + import hashlib + + # Hash the string using SHA-256 + hashed_token = hashlib.sha256(token.encode()).hexdigest() + + return hashed_token + + +def _hash_token_if_needed(token: str) -> str: + """ + Hash the token if it's a string and starts with "sk-" + + Else return the token as is + """ + if token.startswith("sk-"): + return hash_token(token=token) + else: + return token + + +class ProxyUpdateSpend: + @staticmethod + async def update_end_user_spend( + n_retry_times: int, prisma_client: PrismaClient, proxy_logging_obj: ProxyLogging + ): + for i in range(n_retry_times + 1): + start_time = time.time() + try: + async with prisma_client.db.tx( + timeout=timedelta(seconds=60) + ) as transaction: + async with transaction.batch_() as batcher: + for ( + end_user_id, + response_cost, + ) in prisma_client.end_user_list_transactons.items(): + if litellm.max_end_user_budget is not None: + pass + batcher.litellm_endusertable.upsert( + where={"user_id": end_user_id}, + data={ + "create": { + "user_id": end_user_id, + "spend": response_cost, + "blocked": False, + }, + "update": {"spend": {"increment": response_cost}}, + }, + ) + + break + except DB_CONNECTION_ERROR_TYPES as e: + if i >= n_retry_times: # If we've reached the maximum number of retries + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + # Optionally, sleep for a bit before retrying + await asyncio.sleep(2**i) # Exponential backoff + except Exception as e: + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + finally: + prisma_client.end_user_list_transactons = ( + {} + ) # reset the end user list transactions - prevent bad data from causing issues + + @staticmethod + async def update_spend_logs( + n_retry_times: int, + prisma_client: PrismaClient, + db_writer_client: Optional[HTTPHandler], + proxy_logging_obj: ProxyLogging, + ): + BATCH_SIZE = 100 # Preferred size of each batch to write to the database + MAX_LOGS_PER_INTERVAL = ( + 1000 # Maximum number of logs to flush in a single interval + ) + # Get initial logs to process + logs_to_process = prisma_client.spend_log_transactions[:MAX_LOGS_PER_INTERVAL] + start_time = time.time() + try: + for i in range(n_retry_times + 1): + try: + base_url = os.getenv("SPEND_LOGS_URL", None) + if ( + len(logs_to_process) > 0 + and base_url is not None + and db_writer_client is not None + ): + if not base_url.endswith("/"): + base_url += "/" + verbose_proxy_logger.debug("base_url: {}".format(base_url)) + response = await db_writer_client.post( + url=base_url + "spend/update", + data=json.dumps(logs_to_process), + headers={"Content-Type": "application/json"}, + ) + if response.status_code == 200: + prisma_client.spend_log_transactions = ( + prisma_client.spend_log_transactions[ + len(logs_to_process) : + ] + ) + else: + for j in range(0, len(logs_to_process), BATCH_SIZE): + batch = logs_to_process[j : j + BATCH_SIZE] + batch_with_dates = [ + prisma_client.jsonify_object({**entry}) + for entry in batch + ] + await prisma_client.db.litellm_spendlogs.create_many( + data=batch_with_dates, skip_duplicates=True + ) + verbose_proxy_logger.debug( + f"Flushed {len(batch)} logs to the DB." + ) + + prisma_client.spend_log_transactions = ( + prisma_client.spend_log_transactions[len(logs_to_process) :] + ) + verbose_proxy_logger.debug( + f"{len(logs_to_process)} logs processed. Remaining in queue: {len(prisma_client.spend_log_transactions)}" + ) + break + except DB_CONNECTION_ERROR_TYPES: + if i is None: + i = 0 + if i >= n_retry_times: + raise + await asyncio.sleep(2**i) + except Exception as e: + prisma_client.spend_log_transactions = prisma_client.spend_log_transactions[ + len(logs_to_process) : + ] + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + + @staticmethod + def disable_spend_updates() -> bool: + """ + returns True if should not update spend in db + Skips writing spend logs and updates to key, team, user spend to DB + """ + from litellm.proxy.proxy_server import general_settings + + if general_settings.get("disable_spend_updates") is True: + return True + return False + + +async def update_spend( # noqa: PLR0915 + prisma_client: PrismaClient, + db_writer_client: Optional[HTTPHandler], + proxy_logging_obj: ProxyLogging, +): + """ + Batch write updates to db. + + Triggered every minute. + + Requires: + user_id_list: dict, + keys_list: list, + team_list: list, + spend_logs: list, + """ + n_retry_times = 3 + i = None + ### UPDATE USER TABLE ### + if len(prisma_client.user_list_transactons.keys()) > 0: + for i in range(n_retry_times + 1): + start_time = time.time() + try: + async with prisma_client.db.tx( + timeout=timedelta(seconds=60) + ) as transaction: + async with transaction.batch_() as batcher: + for ( + user_id, + response_cost, + ) in prisma_client.user_list_transactons.items(): + batcher.litellm_usertable.update_many( + where={"user_id": user_id}, + data={"spend": {"increment": response_cost}}, + ) + prisma_client.user_list_transactons = ( + {} + ) # Clear the remaining transactions after processing all batches in the loop. + break + except DB_CONNECTION_ERROR_TYPES as e: + if i >= n_retry_times: # If we've reached the maximum number of retries + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + # Optionally, sleep for a bit before retrying + await asyncio.sleep(2**i) # Exponential backoff + except Exception as e: + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + + ### UPDATE END-USER TABLE ### + verbose_proxy_logger.debug( + "End-User Spend transactions: {}".format( + len(prisma_client.end_user_list_transactons.keys()) + ) + ) + if len(prisma_client.end_user_list_transactons.keys()) > 0: + await ProxyUpdateSpend.update_end_user_spend( + n_retry_times=n_retry_times, + prisma_client=prisma_client, + proxy_logging_obj=proxy_logging_obj, + ) + ### UPDATE KEY TABLE ### + verbose_proxy_logger.debug( + "KEY Spend transactions: {}".format( + len(prisma_client.key_list_transactons.keys()) + ) + ) + if len(prisma_client.key_list_transactons.keys()) > 0: + for i in range(n_retry_times + 1): + start_time = time.time() + try: + async with prisma_client.db.tx( + timeout=timedelta(seconds=60) + ) as transaction: + async with transaction.batch_() as batcher: + for ( + token, + response_cost, + ) in prisma_client.key_list_transactons.items(): + batcher.litellm_verificationtoken.update_many( # 'update_many' prevents error from being raised if no row exists + where={"token": token}, + data={"spend": {"increment": response_cost}}, + ) + prisma_client.key_list_transactons = ( + {} + ) # Clear the remaining transactions after processing all batches in the loop. + break + except DB_CONNECTION_ERROR_TYPES as e: + if i >= n_retry_times: # If we've reached the maximum number of retries + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + # Optionally, sleep for a bit before retrying + await asyncio.sleep(2**i) # Exponential backoff + except Exception as e: + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + + ### UPDATE TEAM TABLE ### + verbose_proxy_logger.debug( + "Team Spend transactions: {}".format( + len(prisma_client.team_list_transactons.keys()) + ) + ) + if len(prisma_client.team_list_transactons.keys()) > 0: + for i in range(n_retry_times + 1): + start_time = time.time() + try: + async with prisma_client.db.tx( + timeout=timedelta(seconds=60) + ) as transaction: + async with transaction.batch_() as batcher: + for ( + team_id, + response_cost, + ) in prisma_client.team_list_transactons.items(): + verbose_proxy_logger.debug( + "Updating spend for team id={} by {}".format( + team_id, response_cost + ) + ) + batcher.litellm_teamtable.update_many( # 'update_many' prevents error from being raised if no row exists + where={"team_id": team_id}, + data={"spend": {"increment": response_cost}}, + ) + prisma_client.team_list_transactons = ( + {} + ) # Clear the remaining transactions after processing all batches in the loop. + break + except DB_CONNECTION_ERROR_TYPES as e: + if i >= n_retry_times: # If we've reached the maximum number of retries + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + # Optionally, sleep for a bit before retrying + await asyncio.sleep(2**i) # Exponential backoff + except Exception as e: + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + + ### UPDATE TEAM Membership TABLE with spend ### + if len(prisma_client.team_member_list_transactons.keys()) > 0: + for i in range(n_retry_times + 1): + start_time = time.time() + try: + async with prisma_client.db.tx( + timeout=timedelta(seconds=60) + ) as transaction: + async with transaction.batch_() as batcher: + for ( + key, + response_cost, + ) in prisma_client.team_member_list_transactons.items(): + # key is "team_id::<value>::user_id::<value>" + team_id = key.split("::")[1] + user_id = key.split("::")[3] + + batcher.litellm_teammembership.update_many( # 'update_many' prevents error from being raised if no row exists + where={"team_id": team_id, "user_id": user_id}, + data={"spend": {"increment": response_cost}}, + ) + prisma_client.team_member_list_transactons = ( + {} + ) # Clear the remaining transactions after processing all batches in the loop. + break + except DB_CONNECTION_ERROR_TYPES as e: + if i >= n_retry_times: # If we've reached the maximum number of retries + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + # Optionally, sleep for a bit before retrying + await asyncio.sleep(2**i) # Exponential backoff + except Exception as e: + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + + ### UPDATE ORG TABLE ### + if len(prisma_client.org_list_transactons.keys()) > 0: + for i in range(n_retry_times + 1): + start_time = time.time() + try: + async with prisma_client.db.tx( + timeout=timedelta(seconds=60) + ) as transaction: + async with transaction.batch_() as batcher: + for ( + org_id, + response_cost, + ) in prisma_client.org_list_transactons.items(): + batcher.litellm_organizationtable.update_many( # 'update_many' prevents error from being raised if no row exists + where={"organization_id": org_id}, + data={"spend": {"increment": response_cost}}, + ) + prisma_client.org_list_transactons = ( + {} + ) # Clear the remaining transactions after processing all batches in the loop. + break + except DB_CONNECTION_ERROR_TYPES as e: + if i >= n_retry_times: # If we've reached the maximum number of retries + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + # Optionally, sleep for a bit before retrying + await asyncio.sleep(2**i) # Exponential backoff + except Exception as e: + _raise_failed_update_spend_exception( + e=e, start_time=start_time, proxy_logging_obj=proxy_logging_obj + ) + + ### UPDATE SPEND LOGS ### + verbose_proxy_logger.debug( + "Spend Logs transactions: {}".format(len(prisma_client.spend_log_transactions)) + ) + + if len(prisma_client.spend_log_transactions) > 0: + await ProxyUpdateSpend.update_spend_logs( + n_retry_times=n_retry_times, + prisma_client=prisma_client, + proxy_logging_obj=proxy_logging_obj, + db_writer_client=db_writer_client, + ) + + +def _raise_failed_update_spend_exception( + e: Exception, start_time: float, proxy_logging_obj: ProxyLogging +): + """ + Raise an exception for failed update spend logs + + - Calls proxy_logging_obj.failure_handler to log the error + - Ensures error messages says "Non-Blocking" + """ + import traceback + + error_msg = ( + f"[Non-Blocking]LiteLLM Prisma Client Exception - update spend logs: {str(e)}" + ) + error_traceback = error_msg + "\n" + traceback.format_exc() + end_time = time.time() + _duration = end_time - start_time + asyncio.create_task( + proxy_logging_obj.failure_handler( + original_exception=e, + duration=_duration, + call_type="update_spend", + traceback_str=error_traceback, + ) + ) + raise e + + +def _is_projected_spend_over_limit( + current_spend: float, soft_budget_limit: Optional[float] +): + from datetime import date + + if soft_budget_limit is None: + # If there's no limit, we can't exceed it. + return False + + today = date.today() + + # Finding the first day of the next month, then subtracting one day to get the end of the current month. + if today.month == 12: # December edge case + end_month = date(today.year + 1, 1, 1) - timedelta(days=1) + else: + end_month = date(today.year, today.month + 1, 1) - timedelta(days=1) + + remaining_days = (end_month - today).days + + # Check for the start of the month to avoid division by zero + if today.day == 1: + daily_spend_estimate = current_spend + else: + daily_spend_estimate = current_spend / (today.day - 1) + + # Total projected spend for the month + projected_spend = current_spend + (daily_spend_estimate * remaining_days) + + if projected_spend > soft_budget_limit: + print_verbose("Projected spend exceeds soft budget limit!") + return True + return False + + +def _get_projected_spend_over_limit( + current_spend: float, soft_budget_limit: Optional[float] +) -> Optional[tuple]: + import datetime + + if soft_budget_limit is None: + return None + + today = datetime.date.today() + end_month = datetime.date(today.year, today.month + 1, 1) - datetime.timedelta( + days=1 + ) + remaining_days = (end_month - today).days + + daily_spend = current_spend / ( + today.day - 1 + ) # assuming the current spend till today (not including today) + projected_spend = daily_spend * remaining_days + + if projected_spend > soft_budget_limit: + approx_days = soft_budget_limit / daily_spend + limit_exceed_date = today + datetime.timedelta(days=approx_days) + + # return the projected spend and the date it will exceeded + return projected_spend, limit_exceed_date + + return None + + +def _is_valid_team_configs(team_id=None, team_config=None, request_data=None): + if team_id is None or team_config is None or request_data is None: + return + # check if valid model called for team + if "models" in team_config: + valid_models = team_config.pop("models") + model_in_request = request_data["model"] + if model_in_request not in valid_models: + raise Exception( + f"Invalid model for team {team_id}: {model_in_request}. Valid models for team are: {valid_models}\n" + ) + return + + +def _to_ns(dt): + return int(dt.timestamp() * 1e9) + + +def get_error_message_str(e: Exception) -> str: + error_message = "" + if isinstance(e, HTTPException): + if isinstance(e.detail, str): + error_message = e.detail + elif isinstance(e.detail, dict): + error_message = json.dumps(e.detail) + elif hasattr(e, "message"): + _error = getattr(e, "message", None) + if isinstance(_error, str): + error_message = _error + elif isinstance(_error, dict): + error_message = json.dumps(_error) + else: + error_message = str(e) + else: + error_message = str(e) + return error_message + + +def _get_redoc_url() -> str: + """ + Get the redoc URL from the environment variables. + + - If REDOC_URL is set, return it. + - Otherwise, default to "/redoc". + """ + return os.getenv("REDOC_URL", "/redoc") + + +def _get_docs_url() -> Optional[str]: + """ + Get the docs URL from the environment variables. + + - If DOCS_URL is set, return it. + - If NO_DOCS is True, return None. + - Otherwise, default to "/". + """ + docs_url = os.getenv("DOCS_URL", None) + if docs_url: + return docs_url + + if os.getenv("NO_DOCS", "False") == "True": + return None + + # default to "/" + return "/" + + +def handle_exception_on_proxy(e: Exception) -> ProxyException: + """ + Returns an Exception as ProxyException, this ensures all exceptions are OpenAI API compatible + """ + from fastapi import status + + if isinstance(e, HTTPException): + return ProxyException( + message=getattr(e, "detail", f"error({str(e)})"), + type=ProxyErrorTypes.internal_server_error, + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR), + ) + elif isinstance(e, ProxyException): + return e + return ProxyException( + message="Internal Server Error, " + str(e), + type=ProxyErrorTypes.internal_server_error, + param=getattr(e, "param", "None"), + code=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + +def _premium_user_check(): + """ + Raises an HTTPException if the user is not a premium user + """ + from litellm.proxy.proxy_server import premium_user + + if not premium_user: + raise HTTPException( + status_code=403, + detail={ + "error": f"This feature is only available for LiteLLM Enterprise users. {CommonProxyErrors.not_premium_user.value}" + }, + ) diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py new file mode 100644 index 00000000..0c91c326 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/langfuse_endpoints.py @@ -0,0 +1,139 @@ +""" +What is this? + +Logging Pass-Through Endpoints +""" + +""" +1. Create pass-through endpoints for any LITELLM_BASE_URL/langfuse/<endpoint> map to LANGFUSE_BASE_URL/<endpoint> +""" + +import base64 +import os +from base64 import b64encode +from typing import Optional + +import httpx +from fastapi import APIRouter, Request, Response + +import litellm +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.litellm_pre_call_utils import _get_dynamic_logging_metadata +from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( + create_pass_through_route, +) + +router = APIRouter() +default_vertex_config = None + + +def create_request_copy(request: Request): + return { + "method": request.method, + "url": str(request.url), + "headers": dict(request.headers), + "cookies": request.cookies, + "query_params": dict(request.query_params), + } + + +@router.api_route( + "/langfuse/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Langfuse Pass-through", "pass-through"], +) +async def langfuse_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, +): + """ + Call Langfuse via LiteLLM proxy. Works with Langfuse SDK. + + [Docs](https://docs.litellm.ai/docs/pass_through/langfuse) + """ + from litellm.proxy.proxy_server import proxy_config + + ## CHECK FOR LITELLM API KEY IN THE QUERY PARAMS - ?..key=LITELLM_API_KEY + api_key = request.headers.get("Authorization") or "" + + ## decrypt base64 hash + api_key = api_key.replace("Basic ", "") + + decoded_bytes = base64.b64decode(api_key) + decoded_str = decoded_bytes.decode("utf-8") + api_key = decoded_str.split(":")[1] # assume api key is passed in as secret key + + user_api_key_dict = await user_api_key_auth( + request=request, api_key="Bearer {}".format(api_key) + ) + + callback_settings_obj: Optional[TeamCallbackMetadata] = ( + _get_dynamic_logging_metadata( + user_api_key_dict=user_api_key_dict, proxy_config=proxy_config + ) + ) + + dynamic_langfuse_public_key: Optional[str] = None + dynamic_langfuse_secret_key: Optional[str] = None + dynamic_langfuse_host: Optional[str] = None + if ( + callback_settings_obj is not None + and callback_settings_obj.callback_vars is not None + ): + for k, v in callback_settings_obj.callback_vars.items(): + if k == "langfuse_public_key": + dynamic_langfuse_public_key = v + elif k == "langfuse_secret_key": + dynamic_langfuse_secret_key = v + elif k == "langfuse_host": + dynamic_langfuse_host = v + + base_target_url: str = ( + dynamic_langfuse_host + or os.getenv("LANGFUSE_HOST", "https://cloud.langfuse.com") + or "https://cloud.langfuse.com" + ) + if not ( + base_target_url.startswith("http://") or base_target_url.startswith("https://") + ): + # add http:// if unset, assume communicating over private network - e.g. render + base_target_url = "http://" + base_target_url + + encoded_endpoint = httpx.URL(endpoint).path + + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + base_url = httpx.URL(base_target_url) + updated_url = base_url.copy_with(path=encoded_endpoint) + + # Add or update query parameters + langfuse_public_key = dynamic_langfuse_public_key or litellm.utils.get_secret( + secret_name="LANGFUSE_PUBLIC_KEY" + ) + langfuse_secret_key = dynamic_langfuse_secret_key or litellm.utils.get_secret( + secret_name="LANGFUSE_SECRET_KEY" + ) + + langfuse_combined_key = "Basic " + b64encode( + f"{langfuse_public_key}:{langfuse_secret_key}".encode("utf-8") + ).decode("ascii") + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=str(updated_url), + custom_headers={"Authorization": langfuse_combined_key}, + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + query_params=dict(request.query_params), # type: ignore + ) + + return received_value diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/vertex_endpoints.py b/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/vertex_endpoints.py new file mode 100644 index 00000000..7444e3d1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/vertex_endpoints.py @@ -0,0 +1,274 @@ +import traceback +from typing import Optional + +import httpx +from fastapi import APIRouter, HTTPException, Request, Response, status + +import litellm +from litellm._logging import verbose_proxy_logger +from litellm.fine_tuning.main import vertex_fine_tuning_apis_instance +from litellm.proxy._types import * +from litellm.proxy.auth.user_api_key_auth import user_api_key_auth +from litellm.proxy.pass_through_endpoints.pass_through_endpoints import ( + create_pass_through_route, +) +from litellm.secret_managers.main import get_secret_str +from litellm.types.passthrough_endpoints.vertex_ai import * + +from .vertex_passthrough_router import VertexPassThroughRouter + +router = APIRouter() +vertex_pass_through_router = VertexPassThroughRouter() + +default_vertex_config: VertexPassThroughCredentials = VertexPassThroughCredentials() + + +def _get_vertex_env_vars() -> VertexPassThroughCredentials: + """ + Helper to get vertex pass through config from environment variables + + The following environment variables are used: + - DEFAULT_VERTEXAI_PROJECT (project id) + - DEFAULT_VERTEXAI_LOCATION (location) + - DEFAULT_GOOGLE_APPLICATION_CREDENTIALS (path to credentials file) + """ + return VertexPassThroughCredentials( + vertex_project=get_secret_str("DEFAULT_VERTEXAI_PROJECT"), + vertex_location=get_secret_str("DEFAULT_VERTEXAI_LOCATION"), + vertex_credentials=get_secret_str("DEFAULT_GOOGLE_APPLICATION_CREDENTIALS"), + ) + + +def set_default_vertex_config(config: Optional[dict] = None): + """Sets vertex configuration from provided config and/or environment variables + + Args: + config (Optional[dict]): Configuration dictionary + Example: { + "vertex_project": "my-project-123", + "vertex_location": "us-central1", + "vertex_credentials": "os.environ/GOOGLE_CREDS" + } + """ + global default_vertex_config + + # Initialize config dictionary if None + if config is None: + default_vertex_config = _get_vertex_env_vars() + return + + if isinstance(config, dict): + for key, value in config.items(): + if isinstance(value, str) and value.startswith("os.environ/"): + config[key] = litellm.get_secret(value) + + _set_default_vertex_config(VertexPassThroughCredentials(**config)) + + +def _set_default_vertex_config( + vertex_pass_through_credentials: VertexPassThroughCredentials, +): + global default_vertex_config + default_vertex_config = vertex_pass_through_credentials + + +def exception_handler(e: Exception): + verbose_proxy_logger.error( + "litellm.proxy.proxy_server.v1/projects/tuningJobs(): Exception occurred - {}".format( + str(e) + ) + ) + verbose_proxy_logger.debug(traceback.format_exc()) + if isinstance(e, HTTPException): + return ProxyException( + message=getattr(e, "message", str(e.detail)), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST), + ) + else: + error_msg = f"{str(e)}" + return ProxyException( + message=getattr(e, "message", error_msg), + type=getattr(e, "type", "None"), + param=getattr(e, "param", "None"), + code=getattr(e, "status_code", 500), + ) + + +def construct_target_url( + base_url: str, + requested_route: str, + default_vertex_location: Optional[str], + default_vertex_project: Optional[str], +) -> httpx.URL: + """ + Allow user to specify their own project id / location. + + If missing, use defaults + + Handle cachedContent scenario - https://github.com/BerriAI/litellm/issues/5460 + + Constructed Url: + POST https://LOCATION-aiplatform.googleapis.com/{version}/projects/PROJECT_ID/locations/LOCATION/cachedContents + """ + new_base_url = httpx.URL(base_url) + if "locations" in requested_route: # contains the target project id + location + updated_url = new_base_url.copy_with(path=requested_route) + return updated_url + """ + - Add endpoint version (e.g. v1beta for cachedContent, v1 for rest) + - Add default project id + - Add default location + """ + vertex_version: Literal["v1", "v1beta1"] = "v1" + if "cachedContent" in requested_route: + vertex_version = "v1beta1" + + base_requested_route = "{}/projects/{}/locations/{}".format( + vertex_version, default_vertex_project, default_vertex_location + ) + + updated_requested_route = "/" + base_requested_route + requested_route + + updated_url = new_base_url.copy_with(path=updated_requested_route) + return updated_url + + +@router.api_route( + "/vertex-ai/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Vertex AI Pass-through", "pass-through"], + include_in_schema=False, +) +@router.api_route( + "/vertex_ai/{endpoint:path}", + methods=["GET", "POST", "PUT", "DELETE", "PATCH"], + tags=["Vertex AI Pass-through", "pass-through"], +) +async def vertex_proxy_route( + endpoint: str, + request: Request, + fastapi_response: Response, +): + """ + Call LiteLLM proxy via Vertex AI SDK. + + [Docs](https://docs.litellm.ai/docs/pass_through/vertex_ai) + """ + encoded_endpoint = httpx.URL(endpoint).path + verbose_proxy_logger.debug("requested endpoint %s", endpoint) + headers: dict = {} + api_key_to_use = get_litellm_virtual_key(request=request) + user_api_key_dict = await user_api_key_auth( + request=request, + api_key=api_key_to_use, + ) + + vertex_project: Optional[str] = ( + VertexPassThroughRouter._get_vertex_project_id_from_url(endpoint) + ) + vertex_location: Optional[str] = ( + VertexPassThroughRouter._get_vertex_location_from_url(endpoint) + ) + vertex_credentials = vertex_pass_through_router.get_vertex_credentials( + project_id=vertex_project, + location=vertex_location, + ) + + # Use headers from the incoming request if no vertex credentials are found + if vertex_credentials.vertex_project is None: + headers = dict(request.headers) or {} + verbose_proxy_logger.debug( + "default_vertex_config not set, incoming request headers %s", headers + ) + base_target_url = f"https://{vertex_location}-aiplatform.googleapis.com/" + headers.pop("content-length", None) + headers.pop("host", None) + else: + vertex_project = vertex_credentials.vertex_project + vertex_location = vertex_credentials.vertex_location + vertex_credentials_str = vertex_credentials.vertex_credentials + + # Construct base URL for the target endpoint + base_target_url = f"https://{vertex_location}-aiplatform.googleapis.com/" + + _auth_header, vertex_project = ( + await vertex_fine_tuning_apis_instance._ensure_access_token_async( + credentials=vertex_credentials_str, + project_id=vertex_project, + custom_llm_provider="vertex_ai_beta", + ) + ) + + auth_header, _ = vertex_fine_tuning_apis_instance._get_token_and_url( + model="", + auth_header=_auth_header, + gemini_api_key=None, + vertex_credentials=vertex_credentials_str, + vertex_project=vertex_project, + vertex_location=vertex_location, + stream=False, + custom_llm_provider="vertex_ai_beta", + api_base="", + ) + + headers = { + "Authorization": f"Bearer {auth_header}", + } + + request_route = encoded_endpoint + verbose_proxy_logger.debug("request_route %s", request_route) + + # Ensure endpoint starts with '/' for proper URL construction + if not encoded_endpoint.startswith("/"): + encoded_endpoint = "/" + encoded_endpoint + + # Construct the full target URL using httpx + updated_url = construct_target_url( + base_url=base_target_url, + requested_route=encoded_endpoint, + default_vertex_location=vertex_location, + default_vertex_project=vertex_project, + ) + # base_url = httpx.URL(base_target_url) + # updated_url = base_url.copy_with(path=encoded_endpoint) + + verbose_proxy_logger.debug("updated url %s", updated_url) + + ## check for streaming + target = str(updated_url) + is_streaming_request = False + if "stream" in str(updated_url): + is_streaming_request = True + target += "?alt=sse" + + ## CREATE PASS-THROUGH + endpoint_func = create_pass_through_route( + endpoint=endpoint, + target=target, + custom_headers=headers, + ) # dynamically construct pass-through endpoint based on incoming path + received_value = await endpoint_func( + request, + fastapi_response, + user_api_key_dict, + stream=is_streaming_request, # type: ignore + ) + + return received_value + + +def get_litellm_virtual_key(request: Request) -> str: + """ + Extract and format API key from request headers. + Prioritizes x-litellm-api-key over Authorization header. + + + Vertex JS SDK uses `Authorization` header, we use `x-litellm-api-key` to pass litellm virtual key + + """ + litellm_api_key = request.headers.get("x-litellm-api-key") + if litellm_api_key: + return f"Bearer {litellm_api_key}" + return request.headers.get("Authorization", "") diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/vertex_passthrough_router.py b/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/vertex_passthrough_router.py new file mode 100644 index 00000000..0273a620 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/litellm/proxy/vertex_ai_endpoints/vertex_passthrough_router.py @@ -0,0 +1,121 @@ +import json +import re +from typing import Dict, Optional + +from litellm._logging import verbose_proxy_logger +from litellm.proxy.vertex_ai_endpoints.vertex_endpoints import ( + VertexPassThroughCredentials, +) +from litellm.types.llms.vertex_ai import VERTEX_CREDENTIALS_TYPES + + +class VertexPassThroughRouter: + """ + Vertex Pass Through Router for Vertex AI pass-through endpoints + + + - if request specifies a project-id, location -> use credentials corresponding to the project-id, location + - if request does not specify a project-id, location -> use credentials corresponding to the DEFAULT_VERTEXAI_PROJECT, DEFAULT_VERTEXAI_LOCATION + """ + + def __init__(self): + """ + Initialize the VertexPassThroughRouter + Stores the vertex credentials for each deployment key + ``` + { + "project_id-location": VertexPassThroughCredentials, + "adroit-crow-us-central1": VertexPassThroughCredentials, + } + ``` + """ + self.deployment_key_to_vertex_credentials: Dict[ + str, VertexPassThroughCredentials + ] = {} + pass + + def get_vertex_credentials( + self, project_id: Optional[str], location: Optional[str] + ) -> VertexPassThroughCredentials: + """ + Get the vertex credentials for the given project-id, location + """ + from litellm.proxy.vertex_ai_endpoints.vertex_endpoints import ( + default_vertex_config, + ) + + deployment_key = self._get_deployment_key( + project_id=project_id, + location=location, + ) + if deployment_key is None: + return default_vertex_config + if deployment_key in self.deployment_key_to_vertex_credentials: + return self.deployment_key_to_vertex_credentials[deployment_key] + else: + return default_vertex_config + + def add_vertex_credentials( + self, + project_id: str, + location: str, + vertex_credentials: VERTEX_CREDENTIALS_TYPES, + ): + """ + Add the vertex credentials for the given project-id, location + """ + from litellm.proxy.vertex_ai_endpoints.vertex_endpoints import ( + _set_default_vertex_config, + ) + + deployment_key = self._get_deployment_key( + project_id=project_id, + location=location, + ) + if deployment_key is None: + verbose_proxy_logger.debug( + "No deployment key found for project-id, location" + ) + return + vertex_pass_through_credentials = VertexPassThroughCredentials( + vertex_project=project_id, + vertex_location=location, + vertex_credentials=vertex_credentials, + ) + self.deployment_key_to_vertex_credentials[deployment_key] = ( + vertex_pass_through_credentials + ) + verbose_proxy_logger.debug( + f"self.deployment_key_to_vertex_credentials: {json.dumps(self.deployment_key_to_vertex_credentials, indent=4, default=str)}" + ) + _set_default_vertex_config(vertex_pass_through_credentials) + + def _get_deployment_key( + self, project_id: Optional[str], location: Optional[str] + ) -> Optional[str]: + """ + Get the deployment key for the given project-id, location + """ + if project_id is None or location is None: + return None + return f"{project_id}-{location}" + + @staticmethod + def _get_vertex_project_id_from_url(url: str) -> Optional[str]: + """ + Get the vertex project id from the url + + `https://${LOCATION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL_ID}:streamGenerateContent` + """ + match = re.search(r"/projects/([^/]+)", url) + return match.group(1) if match else None + + @staticmethod + def _get_vertex_location_from_url(url: str) -> Optional[str]: + """ + Get the vertex location from the url + + `https://${LOCATION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL_ID}:streamGenerateContent` + """ + match = re.search(r"/locations/([^/]+)", url) + return match.group(1) if match else None |